summaryrefslogtreecommitdiffstats
path: root/kviewshell/plugins/djvu/libdjvu/DjVuGlobal.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
commite69e8b1d09fb579316595b4e6a850e717358a8b1 (patch)
treea24fc20865f65772f530d16177520190594ffdd2 /kviewshell/plugins/djvu/libdjvu/DjVuGlobal.cpp
parenteecec9afb81fdebb0f22e9da22635874c403f854 (diff)
downloadtdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz
tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kviewshell/plugins/djvu/libdjvu/DjVuGlobal.cpp')
-rw-r--r--kviewshell/plugins/djvu/libdjvu/DjVuGlobal.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/kviewshell/plugins/djvu/libdjvu/DjVuGlobal.cpp b/kviewshell/plugins/djvu/libdjvu/DjVuGlobal.cpp
index b31b04bf..85454b4c 100644
--- a/kviewshell/plugins/djvu/libdjvu/DjVuGlobal.cpp
+++ b/kviewshell/plugins/djvu/libdjvu/DjVuGlobal.cpp
@@ -111,7 +111,7 @@ DjVuProgressTask::set_callback(djvu_progress_callback *_callback)
{
GMap<void *,GP<DjVuProgressTask::Data> > &map=get_map();
void *threadID=GThread::current();
- if(map.contains(threadID))
+ if(map.tqcontains(threadID))
{
DjVuProgressTask::Data &data=*(map[threadID]);
retval=data.callback;
@@ -127,7 +127,7 @@ DjVuProgressTask::set_callback(djvu_progress_callback *_callback)
{
GMap<void *,GP<DjVuProgressTask::Data> > &map=get_map();
void *threadID=GThread::current();
- if(map.contains(threadID))
+ if(map.tqcontains(threadID))
{
DjVuProgressTask::Data &data=*(map[threadID]);
retval=data.callback;
@@ -142,13 +142,13 @@ DjVuProgressTask::set_callback(djvu_progress_callback *_callback)
}
DjVuProgressTask::DjVuProgressTask(const char *xtask,int nsteps)
- : task(xtask),parent(0), nsteps(nsteps), runtostep(0), gdata(0), data(0)
+ : task(xtask),tqparent(0), nsteps(nsteps), runtostep(0), gdata(0), data(0)
{
// gtask=task;
{
GMap<void *,GP<DjVuProgressTask::Data> > &map=get_map();
void *threadID=GThread::current();
- if(map.contains(threadID))
+ if(map.tqcontains(threadID))
{
gdata=new GP<Data>;
Data &d=*(data=((*(GP<Data> *)gdata)=map[threadID]));
@@ -158,7 +158,7 @@ DjVuProgressTask::DjVuProgressTask(const char *xtask,int nsteps)
startdate = curdate;
if (!d.head)
d.lastsigdate = curdate + INITIAL;
- parent = d.head;
+ tqparent = d.head;
d.head = this;
}
}
@@ -171,8 +171,8 @@ DjVuProgressTask::~DjVuProgressTask()
{
if (data->head != this)
G_THROW( ERR_MSG("DjVuGlobal.not_compatible") );
- data->head = parent;
- if (!parent)
+ data->head = tqparent;
+ if (!tqparent)
{
unsigned long curdate = GOS::ticks();
if((*(data->callback))(data->gtask?data->gtask:"",curdate-startdate, curdate-startdate))
@@ -210,9 +210,9 @@ DjVuProgressTask::signal(unsigned long curdate, unsigned long estdate)
{
const unsigned long enddate = startdate+
(unsigned long)(((float)(estdate-startdate) * (float)nsteps) / (float)inprogress);
- if (parent)
+ if (tqparent)
{
- parent->signal(curdate, enddate);
+ tqparent->signal(curdate, enddate);
}
else if (data && data->callback && curdate<enddate)
{