From 030a2248f3630fd0404df98beffc78b5b5ca4c31 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 24 Aug 2023 21:28:39 +0900 Subject: Drop USE_QT4 code Signed-off-by: Michele Calgaro --- src/kvilib/file/kvi_packagefile.cpp | 44 ------------------------------------- 1 file changed, 44 deletions(-) (limited to 'src/kvilib/file/kvi_packagefile.cpp') 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;jfileName(); -#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;jfileName(); -#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; -- cgit v1.2.1