summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2026-03-07 11:07:29 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2026-03-07 22:48:54 +0900
commita675856e6e7e5d7f20c66681f1c9d25c58d4b7ee (patch)
tree0d8bb87ef55a5d3bbd3e29899345ce90dab50889 /src
parent93cd4949e72fe0a36b0118cd34a3ade29b1fe551 (diff)
downloadkrusader-remove/kde-is-version.tar.gz
krusader-remove/kde-is-version.zip
Remove use of KDE_IS_VERSIONremove/kde-is-version
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src')
-rw-r--r--src/app/BookMan/krbookmark.cpp8
-rw-r--r--src/app/Dialogs/krprogress.cpp6
-rw-r--r--src/app/DiskUsage/diskusage.cpp4
-rw-r--r--src/app/GUI/mediabutton.cpp7
-rw-r--r--src/app/KViewer/krviewer.cpp2
-rw-r--r--src/app/Konfigurator/kgadvanced.cpp5
-rw-r--r--src/app/KrJS/krjs.cpp7
-rw-r--r--src/app/Synchronizer/synchronizer.cpp6
-rw-r--r--src/app/Synchronizer/synchronizerdirlist.cpp8
-rw-r--r--src/app/VFS/ftp_vfs.cpp8
-rw-r--r--src/app/VFS/normal_vfs.cpp10
-rw-r--r--src/app/VFS/preservingcopyjob.cpp10
-rw-r--r--src/app/VFS/vfile.cpp2
-rw-r--r--src/app/VFS/vfs.cpp8
-rw-r--r--src/app/VFS/virt_vfs.cpp4
-rw-r--r--src/app/krusader.cpp9
-rw-r--r--src/virt/virt.cpp4
17 files changed, 16 insertions, 92 deletions
diff --git a/src/app/BookMan/krbookmark.cpp b/src/app/BookMan/krbookmark.cpp
index cc67228..2231aed 100644
--- a/src/app/BookMan/krbookmark.cpp
+++ b/src/app/BookMan/krbookmark.cpp
@@ -8,11 +8,7 @@
#define BM_NAME(X) (TQString("Bookmark:")+X)
-#if KDE_IS_VERSION(3,4,0)
static const char* NAME_DEVICES = I18N_NOOP("Media");
-#else
-static const char* NAME_DEVICES = I18N_NOOP("Devices");
-#endif
static const char* NAME_VIRTUAL = I18N_NOOP("Virtual Filesystem");
static const char* NAME_LAN = I18N_NOOP("Local Network");
@@ -49,11 +45,7 @@ KrBookmark* KrBookmark::getExistingBookmark(TQString actionName, TDEActionCollec
KrBookmark* KrBookmark::devices(TDEActionCollection *collection) {
KrBookmark *bm = getExistingBookmark(i18n(NAME_DEVICES), collection);
if (!bm) {
-#if KDE_IS_VERSION(3,4,0)
bm = new KrBookmark(i18n(NAME_DEVICES), "media:/", collection);
-#else
- bm = new KrBookmark(i18n(NAME_DEVICES), "devices:/", collection);
-#endif
bm->setIconSet(krLoader->loadIcon("blockdevice", TDEIcon::Small));
}
return bm;
diff --git a/src/app/Dialogs/krprogress.cpp b/src/app/Dialogs/krprogress.cpp
index fa97ec4..0f4ef13 100644
--- a/src/app/Dialogs/krprogress.cpp
+++ b/src/app/Dialogs/krprogress.cpp
@@ -222,12 +222,8 @@ void KrProgress::slotSpeed( TDEIO::Job*, unsigned long bytes_per_second )
if ( bytes_per_second == 0 ) {
speedLabel->setText( i18n( "Working") );
} else {
-#if KDE_IS_VERSION(3,4,0)
unsigned int seconds = TDEIO::calculateRemainingSeconds( m_iTotalSize, m_iProcessedSize, bytes_per_second );
- TQString remaining = TDEIO::convertSeconds(seconds);
-#else
- TQString remaining = TDEIO::calculateRemaining( m_iTotalSize, m_iProcessedSize, bytes_per_second ).toString();
-#endif
+ TQString remaining = TDEIO::convertSeconds(seconds);
speedLabel->setText( i18n( "%1/s ( %2 remaining )").arg( TDEIO::convertSize( bytes_per_second )).arg( remaining ) );
}
}
diff --git a/src/app/DiskUsage/diskusage.cpp b/src/app/DiskUsage/diskusage.cpp
index c372e8c..b84b9b7 100644
--- a/src/app/DiskUsage/diskusage.cpp
+++ b/src/app/DiskUsage/diskusage.cpp
@@ -641,11 +641,7 @@ int DiskUsage::del( File *file, bool calcPercents, int depth )
if( trash )
{
-#if KDE_IS_VERSION(3,4,0)
job = TDEIO::trash( url, true );
-#else
- job = new TDEIO::CopyJob( url,TDEGlobalSettings::trashPath(),TDEIO::CopyJob::Move,false,true );
-#endif
connect(job,TQ_SIGNAL(result(TDEIO::Job*)),krApp,TQ_SLOT(changeTrashIcon()));
}
else
diff --git a/src/app/GUI/mediabutton.cpp b/src/app/GUI/mediabutton.cpp
index 19a5d71..90c6cb2 100644
--- a/src/app/GUI/mediabutton.cpp
+++ b/src/app/GUI/mediabutton.cpp
@@ -170,11 +170,9 @@ void MediaButton::slotEntries( TDEIO::Job *, const TDEIO::UDSEntryList& entries
if( !mime.endsWith( "unmounted" ) )
mounted = true;
break;
-#if KDE_IS_VERSION(3,4,0)
case TDEIO::UDS_LOCAL_PATH:
localPath = (*it2).m_str;
break;
-#endif
}
}
@@ -442,12 +440,7 @@ void MediaButton::addMountPoint( KMountPoint * mp, bool isMounted ) {
TQString extSpc = ( isMounted && type == "hdd" ) ? extraSpaces : "";
/* WORKAROUND CODE END */
-#if KDE_IS_VERSION(3,4,0)
TQString mimeBase = "media/";
-#else
- TQString mimeBase = "kdedevice/";
-#endif
-
TQString mime = mimeBase + type + mountString;
if( type == "hdd" )
diff --git a/src/app/KViewer/krviewer.cpp b/src/app/KViewer/krviewer.cpp
index 0f5291a..2ab3e64 100644
--- a/src/app/KViewer/krviewer.cpp
+++ b/src/app/KViewer/krviewer.cpp
@@ -71,9 +71,7 @@ KParts::MainWindow( parent, name ), manager( this, this ), tabBar( this ), retur
this, TQ_SLOT( tabCloseRequest(TQWidget*) ) );
tabBar.setTabReorderingEnabled(false);
-#if KDE_IS_VERSION(3,4,0)
tabBar.setAutomaticResizeTabs(true);
-#endif
// "edit"
// "document-save-as"
setCentralWidget( &tabBar );
diff --git a/src/app/Konfigurator/kgadvanced.cpp b/src/app/Konfigurator/kgadvanced.cpp
index e6b753b..55755fa 100644
--- a/src/app/Konfigurator/kgadvanced.cpp
+++ b/src/app/Konfigurator/kgadvanced.cpp
@@ -48,12 +48,7 @@ KgAdvanced::KgAdvanced( bool first, TQWidget* parent, const char* name ) :
TQGroupBox *generalGrp = createFrame( i18n( "General" ), parent, "kgAdvGeneralGrp" );
TQGridLayout *generalGrid = createGridLayout( generalGrp->layout() );
-#if KDE_IS_VERSION( 3,5,1 )
bool dontUseMedia = false;
-#else
- bool dontUseMedia = true;
-#endif
-
bool isMediaProtocolPresent = KProtocolInfo::isKnownProtocol( TQString( "media" ) );
if( !isMediaProtocolPresent )
dontUseMedia = true;
diff --git a/src/app/KrJS/krjs.cpp b/src/app/KrJS/krjs.cpp
index 8d1cffb..a80ca9d 100644
--- a/src/app/KrJS/krjs.cpp
+++ b/src/app/KrJS/krjs.cpp
@@ -51,7 +51,6 @@ bool KrJS::runFile(const TQString & filename) {
we can catch it here and handle it with c++
*/
{
-#if KDE_IS_VERSION(3,4,0)
KJS::Object exception = jsres.value().toObject(exec);
int line = int( exception.get( exec, KJS::Identifier("line") ).toNumber(exec) );
TQString type = exception.get( exec, KJS::Identifier("name") ).toString(exec).qstring();
@@ -67,12 +66,6 @@ bool KrJS::runFile(const TQString & filename) {
), //text
i18n("JavaScript error"), //caption
KMessageBox::Dangerous) ;
-#else
- KMessageBox::error ( 0, //parent
- TQString(i18n("In %1:\nThere is an error in the JavaScript")).arg(filename), //text
- i18n("JavaScript error"), //caption
- KMessageBox::Dangerous) ;
-#endif
break;
}
default:
diff --git a/src/app/Synchronizer/synchronizer.cpp b/src/app/Synchronizer/synchronizer.cpp
index 7388dd4..38c3820 100644
--- a/src/app/Synchronizer/synchronizer.cpp
+++ b/src/app/Synchronizer/synchronizer.cpp
@@ -66,7 +66,7 @@
-#if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL )
+#if defined( HAVE_POSIX_ACL )
#include <sys/acl.h>
#ifdef HAVE_NON_POSIX_ACL_EXTENSIONS
#include <acl/libacl.h>
@@ -1076,7 +1076,7 @@ void Synchronizer::slotTaskFinished(TDEIO::Job *job )
chmod( (const char *)( leftURL.path( -1 ).local8Bit() ), item->rightMode() & 07777 );
-#if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL )
+#if defined( HAVE_POSIX_ACL )
if( !item->rightACL().isNull() )
{
acl_t acl = acl_from_text( item->rightACL().latin1() );
@@ -1117,7 +1117,7 @@ void Synchronizer::slotTaskFinished(TDEIO::Job *job )
chmod( (const char *)( rightURL.path( -1 ).local8Bit() ), item->leftMode() & 07777 );
-#if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL )
+#if defined( HAVE_POSIX_ACL )
if( !item->leftACL().isNull() )
{
acl_t acl = acl_from_text( item->leftACL().latin1() );
diff --git a/src/app/Synchronizer/synchronizerdirlist.cpp b/src/app/Synchronizer/synchronizerdirlist.cpp
index 95bc89a..6dfa7d2 100644
--- a/src/app/Synchronizer/synchronizerdirlist.cpp
+++ b/src/app/Synchronizer/synchronizerdirlist.cpp
@@ -41,7 +41,7 @@
#include <tdeversion.h>
-#if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL )
+#if defined( HAVE_POSIX_ACL )
#include <sys/acl.h>
#ifdef HAVE_NON_POSIX_ACL_EXTENSIONS
#include <acl/libacl.h>
@@ -193,10 +193,10 @@ void SynchronizerDirList::slotEntries( TDEIO::Job * job, const TDEIO::UDSEntryLi
vfile *item = new vfile( kfi.text(), kfi.size(), perm, kfi.time( TDEIO::UDS_MODIFICATION_TIME ),
kfi.isLink(), kfi.user(), kfi.group(), kfi.user(),
kfi.mimetype(), kfi.linkDest(), mode, rwx
-#if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL )
- , kfi.ACL().asString()
+#if defined( HAVE_POSIX_ACL )
+ , kfi.ACL().asString()
#endif
- );
+ );
insert( key, item );
}
++it;
diff --git a/src/app/VFS/ftp_vfs.cpp b/src/app/VFS/ftp_vfs.cpp
index 2da0665..0e48ba2 100644
--- a/src/app/VFS/ftp_vfs.cpp
+++ b/src/app/VFS/ftp_vfs.cpp
@@ -113,25 +113,17 @@ void ftp_vfs::slotAddFiles( TDEIO::Job *, const TDEIO::UDSEntryList& entries ) {
currentUser = ""; // empty, but not TQString()
}
}
-#if KDE_IS_VERSION(3,5,0)
temp = new vfile( name, size, perm, mtime, symLink,
kfi.user(), kfi.group(), currentUser,
mime, symDest, mode, rwx, kfi.ACL().asString(),
kfi.defaultACL().asString() );
-#else
- temp = new vfile( name, size, perm, mtime, symLink, kfi.user(), kfi.group(), currentUser, mime, symDest, mode, rwx );
-#endif
}
-#if KDE_IS_VERSION(3,4,0)
if( !kfi.localPath().isEmpty() ){
temp->vfile_setUrl( kfi.localPath() );
} else {
temp->vfile_setUrl( kfi.url() );
}
-#else
- temp->vfile_setUrl( kfi.url() );
-#endif
temp->vfile_setIcon( kfi.iconName() );
foundVfile( temp );
}
diff --git a/src/app/VFS/normal_vfs.cpp b/src/app/VFS/normal_vfs.cpp
index f81ab9a..bc9c930 100644
--- a/src/app/VFS/normal_vfs.cpp
+++ b/src/app/VFS/normal_vfs.cpp
@@ -55,14 +55,12 @@
#include "../krslots.h"
// header files for ACL
-#if KDE_IS_VERSION(3,5,0)
#ifdef HAVE_POSIX_ACL
#include <sys/acl.h>
#ifdef HAVE_NON_POSIX_ACL_EXTENSIONS
#include <acl/libacl.h>
#endif
#endif
-#endif
normal_vfs::normal_vfs(TQObject* panel):vfs(panel), watcher(0) {
vfs_type=NORMAL;
@@ -185,11 +183,7 @@ void normal_vfs::vfs_delFiles(TQStringList *fileNames){
// delete of move to trash ?
krConfig->setGroup("General");
if( krConfig->readBoolEntry("Move To Trash",_MoveToTrash) ){
-#if KDE_IS_VERSION(3,4,0)
job = TDEIO::trash(filesUrls, true );
-#else
- job = new TDEIO::CopyJob(filesUrls,TDEGlobalSettings::trashPath(),TDEIO::CopyJob::Move,false,true );
-#endif
connect(job,TQ_SIGNAL(result(TDEIO::Job*)),SLOTS,TQ_SLOT(changeTrashIcon()));
}
else
@@ -283,7 +277,7 @@ vfile* normal_vfs::vfileFromName(const TQString& name){
void normal_vfs::getACL( vfile *file, TQString &acl, TQString &defAcl )
{
acl = defAcl = TQString();
-#if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL )
+#if defined( HAVE_POSIX_ACL )
TQCString fileName = file->vfile_getUrl().path( -1 ).local8Bit();
#if HAVE_NON_POSIX_ACL_EXTENSIONS
if ( acl_extended_file( fileName.data() ) )
@@ -300,7 +294,7 @@ void normal_vfs::getACL( vfile *file, TQString &acl, TQString &defAcl )
TQString normal_vfs::getACL( const TQString & path, int type )
{
-#if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL )
+#if defined( HAVE_POSIX_ACL )
acl_t acl = 0;
// do we have an acl for the file, and/or a default acl for the dir, if it is one?
if ( ( acl = acl_get_file( path.ascii(), type ) ) != 0 )
diff --git a/src/app/VFS/preservingcopyjob.cpp b/src/app/VFS/preservingcopyjob.cpp
index 04c3195..d399049 100644
--- a/src/app/VFS/preservingcopyjob.cpp
+++ b/src/app/VFS/preservingcopyjob.cpp
@@ -41,7 +41,7 @@
#include <grp.h>
-#if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL )
+#if defined( HAVE_POSIX_ACL )
#include <sys/acl.h>
#ifdef HAVE_NON_POSIX_ACL_EXTENSIONS
#include <acl/libacl.h>
@@ -100,7 +100,7 @@ void PreservingCopyJob::slotAboutToCreate( TDEIO::Job */*job*/, const TQValueLis
KDE_lstat( (*it).uSource.path(-1).local8Bit(),&stat_p); /* getting the date information */
TQString aclStr;
-#if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL )
+#if defined( HAVE_POSIX_ACL )
acl_t acl = acl_get_file( (*it).uSource.path(-1).local8Bit(), ACL_TYPE_ACCESS );
bool aclExtended = false;
@@ -161,7 +161,7 @@ void PreservingCopyJob::slotResult( Job *job ) {
TDEIO::UDSEntry entry = static_cast<TDEIO::StatJob*>(job)->statResult();
KFileItem kfi(entry, url );
-#if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL )
+#if defined( HAVE_POSIX_ACL )
fileAttributes[ url ] = Attributes( kfi.time( TDEIO::UDS_MODIFICATION_TIME ), kfi.user(), kfi.group(), kfi.mode(), kfi.ACL().asString() );
#else
fileAttributes[ url ] = Attributes( kfi.time( TDEIO::UDS_MODIFICATION_TIME ), kfi.user(), kfi.group(), kfi.mode(), TQString() );
@@ -213,7 +213,7 @@ void PreservingCopyJob::slotListEntries(TDEIO::Job *job, const TDEIO::UDSEntryLi
case TDEIO::UDS_ACCESS:
mode = (*it2).m_long;
break;
-#if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL )
+#if defined( HAVE_POSIX_ACL )
case TDEIO::UDS_ACL_STRING:
acl = (*it2).m_str;
break;
@@ -265,7 +265,7 @@ void PreservingCopyJob::slotCopyingDone( TDEIO::Job *, const KURL &from, const K
if( attrs.mode != (mode_t) -1 )
chmod( (const char *)( to.path( -1 ).local8Bit() ), attrs.mode );
-#if KDE_IS_VERSION(3,5,0) && defined( HAVE_POSIX_ACL )
+#if defined( HAVE_POSIX_ACL )
if( !attrs.acl.isNull() )
{
acl_t acl = acl_from_text( attrs.acl.latin1() );
diff --git a/src/app/VFS/vfile.cpp b/src/app/VFS/vfile.cpp
index c333f45..35dba93 100644
--- a/src/app/VFS/vfile.cpp
+++ b/src/app/VFS/vfile.cpp
@@ -234,7 +234,6 @@ const TDEIO::UDSEntry vfile::vfile_getEntry() {
entry.append(atom);
}
-#if KDE_IS_VERSION(3,5,0)
if( !vfile_acl_loaded )
vfile_loadACL();
if( vfile_has_acl ) {
@@ -256,7 +255,6 @@ const TDEIO::UDSEntry vfile::vfile_getEntry() {
entry.append(atom);
}
}
-#endif
return entry;
}
diff --git a/src/app/VFS/vfs.cpp b/src/app/VFS/vfs.cpp
index e6804e6..9785283 100644
--- a/src/app/VFS/vfs.cpp
+++ b/src/app/VFS/vfs.cpp
@@ -35,6 +35,7 @@
#include <time.h>
#include <tqeventloop.h>
#include <tdeapplication.h>
+#include <kdirsize.h>
#include <klargefile.h>
#include <tqdir.h>
#include "vfs.h"
@@ -286,9 +287,6 @@ void vfs::vfs_requestDelete() {
deleteRequested = true;
}
-/// to be implemented
-#if KDE_IS_VERSION(3,3,0)
-#include <kdirsize.h>
void vfs::slotKdsResult( TDEIO::Job* job){
if( job && !job->error() ){
KDirSize* kds = static_cast<KDirSize*>(job);
@@ -377,10 +375,6 @@ void vfs::slotStatResultArrived( TDEIO::Job* job ) {
stat_busy = false;
}
-#else
-void vfs::slotKdsResult(TDEIO::Job *job){/* empty */}
-void vfs::vfs_calcSpace( TQString /*name*/ , TDEIO::filesize_t* /*totalSize*/, unsigned long* /*totalFiles*/, unsigned long* /*totalDirs*/, bool* /*stop*/ ) {/* empty*/}
-#endif
TQValueList<vfile*> vfs::vfs_search(const KRQuery& filter) {
TQValueList<vfile*> result;
diff --git a/src/app/VFS/virt_vfs.cpp b/src/app/VFS/virt_vfs.cpp
index 2b40c38..4592221 100644
--- a/src/app/VFS/virt_vfs.cpp
+++ b/src/app/VFS/virt_vfs.cpp
@@ -121,11 +121,7 @@ void virt_vfs::vfs_delFiles( TQStringList *fileNames ) {
// delete of move to trash ?
krConfig->setGroup( "General" );
if ( krConfig->readBoolEntry( "Move To Trash", _MoveToTrash ) ) {
-#if KDE_IS_VERSION(3,4,0)
job = TDEIO::trash( filesUrls, true );
-#else
- job = new TDEIO::CopyJob( filesUrls, TDEGlobalSettings::trashPath(), TDEIO::CopyJob::Move, false, true );
-#endif
connect( job, TQ_SIGNAL( result( TDEIO::Job* ) ), krApp, TQ_SLOT( changeTrashIcon() ) );
} else
job = new TDEIO::DeleteJob( filesUrls, false, true );
diff --git a/src/app/krusader.cpp b/src/app/krusader.cpp
index e3e3af0..8421c20 100644
--- a/src/app/krusader.cpp
+++ b/src/app/krusader.cpp
@@ -46,11 +46,7 @@ YP YD 88 YD ~Y8888P' `8888Y' YP YP Y8888D' Y88888P 88 YD
#include <tdelocale.h>
#include <tdeaccelmanager.h>
#include <twin.h>
-
-#if KDE_IS_VERSION(3,2,0)
#include <tdeactionclasses.h>
-#endif
-
#include <tdeversion.h>
// TQt includes
#include <tqpixmap.h>
@@ -694,15 +690,10 @@ void Krusader::setupActions() {
SLOTS, TQ_SLOT( homeTerminal() ), actionCollection(), "terminal@home" );
actFTPDisconnect = new TDEAction( i18n( "Disconnect &from Net" ), "kr_ftp_disconnect", SHIFT + CTRL + Key_F,
SLOTS, TQ_SLOT( FTPDisconnect() ), actionCollection(), "ftp disconnect" );
-#if KDE_IS_VERSION(3,2,0) /* new mountman feature is available in kde 3.2 only! */
actMountMan = new TDEToolBarPopupAction( i18n( "&MountMan..." ), "kr_mountman", ALT + Key_Slash,
SLOTS, TQ_SLOT( runMountMan() ), actionCollection(), "mountman" );
connect( ( ( TDEToolBarPopupAction* ) actMountMan ) ->popupMenu(), TQ_SIGNAL( aboutToShow() ),
mountMan, TQ_SLOT( quickList() ) );
-#else
- actMountMan = new TDEAction( i18n( "&MountMan..." ), "kr_mountman", ALT + Key_Slash,
- SLOTS, TQ_SLOT( runMountMan() ), actionCollection(), "mountman" );
-#endif /* KDE 3.2 */
actFind = new TDEAction( i18n( "&Search..." ), "filefind", CTRL + Key_S,
SLOTS, TQ_SLOT( search() ), actionCollection(), "find" );
diff --git a/src/virt/virt.cpp b/src/virt/virt.cpp
index c94b282..61345f2 100644
--- a/src/virt/virt.cpp
+++ b/src/virt/virt.cpp
@@ -35,11 +35,7 @@ using namespace TDEIO;
#define VIRT_VFS_DB "virt_vfs.db"
#define VIRT_PROTOCOL "virt"
-#if KDE_IS_VERSION(3,4,0)
extern "C" { int TDE_EXPORT kdemain( int argc, char **argv ); }
-#else
-extern "C" { int kdemain( int argc, char **argv ); }
-#endif
#define KrDEBUG(X...){\
FILE* f = fopen("/tmp/tdeio_virt.log","a+");\