summaryrefslogtreecommitdiffstats
path: root/src/kvilib/file/kvi_packagefile.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2023-08-24 21:28:39 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2023-08-31 10:03:10 +0900
commit030a2248f3630fd0404df98beffc78b5b5ca4c31 (patch)
tree75d55e7e177ca48e69d59f74181ce37841ecd51b /src/kvilib/file/kvi_packagefile.cpp
parent17118265cf93b35b0b68e450ea5f43046c1d81c3 (diff)
downloadkvirc-030a2248f3630fd0404df98beffc78b5b5ca4c31.tar.gz
kvirc-030a2248f3630fd0404df98beffc78b5b5ca4c31.zip
Drop USE_QT4 code
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/kvilib/file/kvi_packagefile.cpp')
-rw-r--r--src/kvilib/file/kvi_packagefile.cpp44
1 files changed, 0 insertions, 44 deletions
diff --git a/src/kvilib/file/kvi_packagefile.cpp b/src/kvilib/file/kvi_packagefile.cpp
index 31f69438..2c1ad469 100644
--- a/src/kvilib/file/kvi_packagefile.cpp
+++ b/src/kvilib/file/kvi_packagefile.cpp
@@ -128,11 +128,7 @@ KviPackageIOEngine::~KviPackageIOEngine()
bool KviPackageIOEngine::updateProgress(int iProgress,const TQString &szLabel)
{
if(!m_pProgressDialog)return true;
-#ifdef COMPILE_USE_QT4
- m_pProgressDialog->setValue(iProgress);
-#else
m_pProgressDialog->setProgress(iProgress);
-#endif
m_pProgressDialogLabel->setText(szLabel);
tqApp->processEvents();
if(m_pProgressDialog->wasCanceled())
@@ -145,14 +141,8 @@ bool KviPackageIOEngine::updateProgress(int iProgress,const TQString &szLabel)
void KviPackageIOEngine::showProgressDialog(const TQString &szCaption,int iTotalSteps)
{
-#ifdef COMPILE_USE_QT4
- m_pProgressDialog = new TQProgressDialog(TQString(""),__tr2qs("Cancel"),0,iTotalSteps,0);
- m_pProgressDialog->setModal(true);
- m_pProgressDialog->setWindowTitle(szCaption);
-#else
m_pProgressDialog = new TQProgressDialog(TQString(""),__tr2qs("Cancel"),iTotalSteps,0,"",true);
m_pProgressDialog->setCaption(szCaption);
-#endif
m_pProgressDialogLabel = new TQLabel(m_pProgressDialog);
m_pProgressDialogLabel->setMaximumSize(500,300);
m_pProgressDialog->setLabel(m_pProgressDialogLabel);
@@ -234,67 +224,35 @@ bool KviPackageWriter::addFileInternal(const TQFileInfo * fi,const TQString &szL
bool KviPackageWriter::addDirectory(const TQString &szLocalDirectoryName,const TQString &szTargetDirectoryPrefix,kvi_u32_t uAddFileFlags)
{
TQDir d(szLocalDirectoryName);
-#ifdef COMPILE_USE_QT4
- TQDir::Filters iFlags;
-#else
int iFlags;
-#endif
iFlags = TQDir::Files | TQDir::Readable;
if(!(uAddFileFlags & FollowSymLinks))
iFlags |= TQDir::NoSymLinks;
- // QT4SUX: Because the TQDir::entryInfoList() breaks really a lot of code by returning an object that behaves in a _totally_ different way.. it's also much slower
-
-#ifdef COMPILE_USE_QT4
- int j;
- TQFileInfoList sl = d.entryInfoList(iFlags);
- for(j=0;j<sl.size();j++)
- {
-#else
const TQFileInfoList * sl = d.entryInfoList(iFlags);
if(!sl)return false;
TQFileInfoListIterator it(*sl);
while(TQFileInfo * fi = it.current())
{
-#endif
TQString szSFileName = szLocalDirectoryName;
KviTQString::ensureLastCharIs(szSFileName,TQChar(KVI_PATH_SEPARATOR_CHAR));
-#ifdef COMPILE_USE_QT4
- TQFileInfo slowCopy = sl.at(j);
- szSFileName += slowCopy.fileName();
-#else
szSFileName += fi->fileName();
-#endif
TQString szDFileName = szTargetDirectoryPrefix;
KviTQString::ensureLastCharIs(szDFileName,TQChar(KVI_PATH_SEPARATOR_CHAR));
-#ifdef COMPILE_USE_QT4
- szDFileName += slowCopy.fileName();
- if(!addFileInternal(&slowCopy,szSFileName,szDFileName,uAddFileFlags))
- return false;
-#else
szDFileName += fi->fileName();
if(!addFileInternal(fi,szSFileName,szDFileName,uAddFileFlags))
return false;
-#endif
-#ifndef COMPILE_USE_QT4
++it;
-#endif
}
iFlags = TQDir::Dirs | TQDir::Readable;
if(!(uAddFileFlags & FollowSymLinks))
iFlags |= TQDir::NoSymLinks;
sl = d.entryInfoList(iFlags);
-#ifdef COMPILE_USE_QT4
- for(j=0;j<sl.size();j++)
- {
- TQString szDir = sl.at(j).fileName();
-#else
if(!sl)return false;
TQFileInfoListIterator it2(*sl);
while(TQFileInfo * fi2 = it2.current())
{
TQString szDir = fi2->fileName();
-#endif
if(!KviTQString::equalCS(szDir,"..") && !KviTQString::equalCS(szDir,"."))
{
TQString szSDirName = szLocalDirectoryName;
@@ -306,9 +264,7 @@ bool KviPackageWriter::addDirectory(const TQString &szLocalDirectoryName,const T
if(!addDirectory(szSDirName,szDDirName,uAddFileFlags))
return false;
}
-#ifndef COMPILE_USE_QT4
++it2;
-#endif
}
return true;