diff options
Diffstat (limited to 'libkonq')
45 files changed, 434 insertions, 325 deletions
diff --git a/libkonq/CMakeLists.txt b/libkonq/CMakeLists.txt index e774a81bb..c1780780d 100644 --- a/libkonq/CMakeLists.txt +++ b/libkonq/CMakeLists.txt @@ -43,6 +43,7 @@ install( FILES konq_historymgr.h konq_historycomm.h konq_pixmapprovider.h kivdirectoryoverlay.h kivfreespaceoverlay.h konq_faviconmgr.h konq_xmlguiclient.h konqbookmarkmanager.h konq_filetip.h + konq_sort_constants.h konq_string_compare.h DESTINATION ${INCLUDE_INSTALL_DIR} ) diff --git a/libkonq/Makefile.am b/libkonq/Makefile.am index 3290c3e85..3c3897155 100644 --- a/libkonq/Makefile.am +++ b/libkonq/Makefile.am @@ -52,7 +52,8 @@ include_HEADERS = konq_popupmenu.h knewmenu.h \ konq_pixmapprovider.h \ kivdirectoryoverlay.h \ kivfreespaceoverlay.h \ - konq_faviconmgr.h konq_xmlguiclient.h konqbookmarkmanager.h konq_filetip.h + konq_faviconmgr.h konq_xmlguiclient.h konqbookmarkmanager.h konq_filetip.h \ + konq_sort_constants.h konq_string_compare.h if include_ARTS diff --git a/libkonq/PLUGINS b/libkonq/PLUGINS.md index 4eb535a59..f89ca70ef 100644 --- a/libkonq/PLUGINS +++ b/libkonq/PLUGINS.md @@ -1,13 +1,20 @@ +Menu Plugins +============ + Thus file explains how to add plugins into the konqpopupmenu used by konqueror and kdesktop. -Why? +Why +--- + Why do we need this kind of functionality? We do have SERVICEMENUS. A plugin can be much more dynamic. If you want to add features that are runtime specific or need some interaction with different things -a plugin comes in handy +a plugin comes in handy. + +How +--- -How? -Please look at ?no_location? to get the latest plugin template +Please look at *no_location* to get the latest plugin template. -Holger Freyther 30th October 2001
\ No newline at end of file +Holger Freyther 30th October 2001 diff --git a/libkonq/SERVICEMENUS b/libkonq/SERVICEMENUS deleted file mode 100644 index 12035388c..000000000 --- a/libkonq/SERVICEMENUS +++ /dev/null @@ -1,52 +0,0 @@ -This file explains how to add an item in the popupmenu (for both -konqueror and kdesktop), without using the file associations. - -Why -=== -One reason for doing this is being able to associate -some action with all files without this action becoming a default handler -(called on left click). -Another is that for text-based programs and tools (e.g. gzip) it's faster -than defining a desktop file for the application, making it hidden, and -associate it with the relevant file types. - -How -=== -Create a file ~/.trinity/share/apps/konqueror/servicemenus/something.desktop -and write into it something like (without the comments) : - -[Desktop Entry] -ServiceTypes=text/html,text/plain # use all/all for all entries - # all/allfiles for files only - # and use inode/directory for dirs only - # you can also do things like image/* for all - # image mimetypes -Actions=gzip;mail # those are ';' separated, per the standard ! -X-TDE-Submenu=Menuname # this optional entry allows grouping the - # entries in this servicemenu file into a - # common submenu, in this case "Menuname" -TryExec=gzip # Find if executable exist, if it doesn't exist - # menu entry is not displaying -ExcludeServiceTypes=application/x-zip # This entry is used to avoid to display menu - # when it's a specific servicetype - # for exemple when we use all/allfiles and zip - # them, we don't want to zip a zip file - - -[Desktop Action gzip] # One "Desktop Action <name>" group per Action -Name=GZip this file -Name[fr]=... -Icon=tgz -Exec=gzip %f - -[Desktop Action mail] -Name=Mail this file -Name[fr]=... -Icon=kmail -Exec=kmail --there-is-no-such-option-yet %f - - -See also the "desktop entry standard", which defines more formally the same -concept of actions but for desktop files (e.g. eject on a device desktop file, -etc.) - diff --git a/libkonq/SERVICEMENUS.md b/libkonq/SERVICEMENUS.md new file mode 100644 index 000000000..bcd7ae1f7 --- /dev/null +++ b/libkonq/SERVICEMENUS.md @@ -0,0 +1,55 @@ +Service Menus +============= + +This file explains how to add an item in the popupmenu (for both +konqueror and kdesktop), without using the file associations. + +Why +--- + +One reason for doing this is being able to associate +some action with all files without this action becoming a default handler +(called on left click). + +Another is that for text-based programs and tools (e.g. gzip) it's faster +than defining a desktop file for the application, making it hidden, and +associate it with the relevant file types. + +How +--- + +Create a file `~/.trinity/share/apps/konqueror/servicemenus/something.desktop` +and write into it something like (without the comments): + + [Desktop Entry] + ServiceTypes=text/html,text/plain # use all/all for all entries + # all/allfiles for files only + # and use inode/directory for dirs only + # you can also do things like image/* for all + # image mimetypes + Actions=gzip;mail # those are ';' separated, per the standard ! + X-TDE-Submenu=Menuname # this optional entry allows grouping the + # entries in this servicemenu file into a + # common submenu, in this case "Menuname" + TryExec=gzip # Find if executable exist, if it doesn't exist + # menu entry is not displaying + ExcludeServiceTypes=application/x-zip # This entry is used to avoid to display menu + # when it's a specific servicetype + # for exemple when we use all/allfiles and zip + # them, we don't want to zip a zip file + + [Desktop Action gzip] # One "Desktop Action <name>" group per Action + Name=GZip this file + Name[fr]=... + Icon=tgz + Exec=gzip %f + + [Desktop Action mail] + Name=Mail this file + Name[fr]=... + Icon=kmail + Exec=kmail --there-is-no-such-option-yet %f + +See also the *desktop entry standard*, which defines more formally the same +concept of actions but for desktop files (e.g. eject on a device desktop file, +etc.). diff --git a/libkonq/favicons/favicons.cpp b/libkonq/favicons/favicons.cpp index 05bddec1e..d0bde9fc3 100644 --- a/libkonq/favicons/favicons.cpp +++ b/libkonq/favicons/favicons.cpp @@ -29,8 +29,8 @@ #include <kdatastream.h> // DO NOT REMOVE, otherwise bool marshalling breaks #include <kicontheme.h> #include <kimageio.h> -#include <ksimpleconfig.h> -#include <kstandarddirs.h> +#include <tdesimpleconfig.h> +#include <tdestandarddirs.h> #include <tdeio/job.h> #include "favicons.moc" @@ -47,7 +47,7 @@ struct FaviconsModulePrivate }; TQMap<TDEIO::Job *, DownloadInfo> downloads; TQStringList failedDownloads; - KSimpleConfig *config; + TDESimpleConfig *config; TQPtrList<TDEIO::Job> killJobs; TDEIO::MetaData metaData; TQString faviconsDir; @@ -66,7 +66,7 @@ FaviconsModule::FaviconsModule(const TQCString &obj) d->metaData.insert("UseCache", "false"); d->metaData.insert("cookies", "none"); d->metaData.insert("no-auth", "true"); - d->config = new KSimpleConfig(locateLocal("data", "konqueror/faviconrc")); + d->config = new TDESimpleConfig(locateLocal("data", "konqueror/faviconrc")); d->killJobs.setAutoDelete(true); d->faviconsCache.setAutoDelete(true); } @@ -186,9 +186,9 @@ void FaviconsModule::startDownload(const TQString &hostOrURL, bool isHost, const TDEIO::Job *job = TDEIO::get(iconURL, false, false); job->addMetaData(d->metaData); - connect(job, TQT_SIGNAL(data(TDEIO::Job *, const TQByteArray &)), TQT_SLOT(slotData(TDEIO::Job *, const TQByteArray &))); - connect(job, TQT_SIGNAL(result(TDEIO::Job *)), TQT_SLOT(slotResult(TDEIO::Job *))); - connect(job, TQT_SIGNAL(infoMessage(TDEIO::Job *, const TQString &)), TQT_SLOT(slotInfoMessage(TDEIO::Job *, const TQString &))); + connect(job, TQ_SIGNAL(data(TDEIO::Job *, const TQByteArray &)), TQ_SLOT(slotData(TDEIO::Job *, const TQByteArray &))); + connect(job, TQ_SIGNAL(result(TDEIO::Job *)), TQ_SLOT(slotResult(TDEIO::Job *))); + connect(job, TQ_SIGNAL(infoMessage(TDEIO::Job *, const TQString &)), TQ_SLOT(slotInfoMessage(TDEIO::Job *, const TQString &))); FaviconsModulePrivate::DownloadInfo download; download.hostOrURL = hostOrURL; download.isHost = isHost; @@ -202,7 +202,7 @@ void FaviconsModule::slotData(TDEIO::Job *job, const TQByteArray &data) if (oldSize > 0x10000) { d->killJobs.append(job); - TQTimer::singleShot(0, this, TQT_SLOT(slotKill())); + TQTimer::singleShot(0, this, TQ_SLOT(slotKill())); } download.iconData.resize(oldSize + data.size()); memcpy(download.iconData.data() + oldSize, data.data(), data.size()); @@ -219,7 +219,7 @@ void FaviconsModule::slotResult(TDEIO::Job *job) TQBuffer buffer(download.iconData); buffer.open(IO_ReadOnly); TQImageIO io; - io.setIODevice(TQT_TQIODEVICE(&buffer)); + io.setIODevice(&buffer); io.setParameters("size=16"); // Check here too, the job might have had no error, but the downloaded // file contains just a 404 message sent with a 200 status. @@ -265,7 +265,7 @@ void FaviconsModule::slotKill() } extern "C" { - KDE_EXPORT KDEDModule *create_favicons(const TQCString &obj) + TDE_EXPORT KDEDModule *create_favicons(const TQCString &obj) { KImageIO::registerFormats(); return new FaviconsModule(obj); diff --git a/libkonq/favicons/favicons.h b/libkonq/favicons/favicons.h index 41802c9bc..61480e5b9 100644 --- a/libkonq/favicons/favicons.h +++ b/libkonq/favicons/favicons.h @@ -44,7 +44,7 @@ namespace TDEIO { class Job; } */ class FaviconsModule : public KDEDModule { - Q_OBJECT + TQ_OBJECT K_DCOP public: FaviconsModule(const TQCString &obj); diff --git a/libkonq/kivdirectoryoverlay.cpp b/libkonq/kivdirectoryoverlay.cpp index bb1b0d6c2..a9e780134 100644 --- a/libkonq/kivdirectoryoverlay.cpp +++ b/libkonq/kivdirectoryoverlay.cpp @@ -27,7 +27,7 @@ #include <tdefileitem.h> #include <tdeapplication.h> #include <kdirlister.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kiconloader.h> #include <konq_settings.h> #include <tdelocale.h> @@ -43,8 +43,8 @@ KIVDirectoryOverlay::KIVDirectoryOverlay(KFileIVI* directory) { m_lister = new KDirLister; m_lister->setAutoErrorHandlingEnabled(false, 0); - connect(m_lister, TQT_SIGNAL(completed()), TQT_SLOT(slotCompleted())); - connect(m_lister, TQT_SIGNAL(newItems( const KFileItemList& )), TQT_SLOT(slotNewItems( const KFileItemList& ))); + connect(m_lister, TQ_SIGNAL(completed()), TQ_SLOT(slotCompleted())); + connect(m_lister, TQ_SIGNAL(newItems( const KFileItemList& )), TQ_SLOT(slotNewItems( const KFileItemList& ))); m_lister->setShowingDotFiles(false); } m_directory = directory; diff --git a/libkonq/kivdirectoryoverlay.h b/libkonq/kivdirectoryoverlay.h index 1734f8108..0aa7e912e 100644 --- a/libkonq/kivdirectoryoverlay.h +++ b/libkonq/kivdirectoryoverlay.h @@ -30,7 +30,7 @@ class KFileIVI; class LIBKONQ_EXPORT KIVDirectoryOverlay : public TQObject { - Q_OBJECT + TQ_OBJECT public: KIVDirectoryOverlay(KFileIVI* directory); diff --git a/libkonq/kivfreespaceoverlay.cpp b/libkonq/kivfreespaceoverlay.cpp index 0343a4ab6..6651a9d53 100644 --- a/libkonq/kivfreespaceoverlay.cpp +++ b/libkonq/kivfreespaceoverlay.cpp @@ -32,7 +32,7 @@ #include <tdefileitem.h> #include <tdeapplication.h> #include <kdirlister.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kiconloader.h> #include <konq_settings.h> #include <tdelocale.h> @@ -63,7 +63,7 @@ void KIVFreeSpaceOverlay::start() if ( !m_freespace->item()->isReadable() ) { emit finished(); } - TQTimer::singleShot(0, this, TQT_SLOT(slotDisplay())); + TQTimer::singleShot(0, this, TQ_SLOT(slotDisplay())); } void KIVFreeSpaceOverlay::timerEvent(TQTimerEvent *) diff --git a/libkonq/kivfreespaceoverlay.h b/libkonq/kivfreespaceoverlay.h index 6527ccd29..a31d66b92 100644 --- a/libkonq/kivfreespaceoverlay.h +++ b/libkonq/kivfreespaceoverlay.h @@ -31,7 +31,7 @@ class KFileIVI; class LIBKONQ_EXPORT KIVFreeSpaceOverlay : public TQObject { - Q_OBJECT + TQ_OBJECT public: KIVFreeSpaceOverlay(KFileIVI* freespace); diff --git a/libkonq/knewmenu.cpp b/libkonq/knewmenu.cpp index 621b1f614..1051ba7eb 100644 --- a/libkonq/knewmenu.cpp +++ b/libkonq/knewmenu.cpp @@ -20,13 +20,13 @@ #include <tqdir.h> #include <kdebug.h> -#include <kdesktopfile.h> +#include <tdedesktopfile.h> #include <kdirwatch.h> -#include <kinstance.h> +#include <tdeinstance.h> #include <kinputdialog.h> #include <tdelocale.h> #include <tdemessagebox.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kprotocolinfo.h> #include <tdepopupmenu.h> #include <krun.h> @@ -145,8 +145,8 @@ void KNewMenu::parseFiles() TQString templatePath; // If a desktop file, then read the name from it. // Otherwise (or if no name in it?) use file name - if ( KDesktopFile::isDesktopFile( filePath ) ) { - KSimpleConfig config( filePath, true ); + if ( TDEDesktopFile::isDesktopFile( filePath ) ) { + TDESimpleConfig config( filePath, true ); config.setDesktopGroup(); text = config.readEntry("Name"); (*templ).icon = config.readEntry("Icon"); @@ -238,7 +238,7 @@ void KNewMenu::fillMenu() // The best way to identify the "Create Directory", "Link to Location", "Link to Application" was the template if ( (*templ).templatePath.endsWith( "emptydir" ) ) { - TDEAction * act = new TDEAction( (*templ).text, (*templ).icon, 0, this, TQT_SLOT( slotNewDir() ), + TDEAction * act = new TDEAction( (*templ).text, (*templ).icon, 0, this, TQ_SLOT( slotNewDir() ), d->m_actionCollection, TQCString().sprintf("newmenu%d", i ) ); act->setGroup( "KNewMenu" ); act->plug( popupMenu() ); @@ -248,7 +248,7 @@ void KNewMenu::fillMenu() } else { - TDEAction * act = new TDEAction( (*templ).text, (*templ).icon, 0, this, TQT_SLOT( slotNewFile() ), + TDEAction * act = new TDEAction( (*templ).text, (*templ).icon, 0, this, TQ_SLOT( slotNewFile() ), d->m_actionCollection, TQCString().sprintf("newmenu%d", i ) ); act->setGroup( "KNewMenu" ); @@ -260,9 +260,9 @@ void KNewMenu::fillMenu() { linkApp = act; } - else if ( KDesktopFile::isDesktopFile( entry.templatePath ) ) + else if ( TDEDesktopFile::isDesktopFile( entry.templatePath ) ) { - KDesktopFile df( entry.templatePath ); + TDEDesktopFile df( entry.templatePath ); if(df.readType() == "FSDevice") act->plug( d->m_menuDev->popupMenu() ); else @@ -302,12 +302,12 @@ void KNewMenu::slotFillTemplates() //kdDebug(1203) << "Templates resource dir: " << *it << endl; s_pDirWatch->addDir( *it ); } - connect ( s_pDirWatch, TQT_SIGNAL( dirty( const TQString & ) ), - this, TQT_SLOT ( slotFillTemplates() ) ); - connect ( s_pDirWatch, TQT_SIGNAL( created( const TQString & ) ), - this, TQT_SLOT ( slotFillTemplates() ) ); - connect ( s_pDirWatch, TQT_SIGNAL( deleted( const TQString & ) ), - this, TQT_SLOT ( slotFillTemplates() ) ); + connect ( s_pDirWatch, TQ_SIGNAL( dirty( const TQString & ) ), + this, TQ_SLOT ( slotFillTemplates() ) ); + connect ( s_pDirWatch, TQ_SIGNAL( created( const TQString & ) ), + this, TQ_SLOT ( slotFillTemplates() ) ); + connect ( s_pDirWatch, TQ_SIGNAL( deleted( const TQString & ) ), + this, TQ_SLOT ( slotFillTemplates() ) ); // Ok, this doesn't cope with new dirs in TDEDIRS, but that's another story } s_templatesVersion++; @@ -333,7 +333,7 @@ void KNewMenu::slotFillTemplates() s_templatesList->prepend( e ); else { - KSimpleConfig config( *it, true ); + TDESimpleConfig config( *it, true ); config.setDesktopGroup(); // tricky solution to ensure that TextFile is at the beginning @@ -368,11 +368,11 @@ void KNewMenu::slotNewDir() void KNewMenu::slotNewFile() { - int id = TQString( TQT_TQOBJECT_CONST(sender())->name() + 7 ).toInt(); // skip "newmenu" + int id = TQString( sender()->name() + 7 ).toInt(); // skip "newmenu" if (id == 0) { // run the command for the templates - KRun::runCommand(TQString(TQT_TQOBJECT_CONST(sender())->name())); + KRun::runCommand(TQString(sender()->name())); return; } @@ -388,9 +388,9 @@ void KNewMenu::slotNewFile() } m_isURLDesktopFile = false; TQString name; - if ( KDesktopFile::isDesktopFile( entry.templatePath ) ) + if ( TDEDesktopFile::isDesktopFile( entry.templatePath ) ) { - KDesktopFile df( entry.templatePath ); + TDEDesktopFile df( entry.templatePath ); //kdDebug(1203) << df.readType() << endl; if ( df.readType() == "Link" ) { @@ -468,11 +468,11 @@ void KNewMenu::slotNewFile() //kdDebug(1203) << "KNewMenu : TDEIO::copyAs( " << uSrc.url() << ", " << dest.url() << ")" << endl; TDEIO::CopyJob * job = TDEIO::copyAs( uSrc, dest ); job->setDefaultPermissions( true ); - connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), - TQT_SLOT( slotResult( TDEIO::Job * ) ) ); + connect( job, TQ_SIGNAL( result( TDEIO::Job * ) ), + TQ_SLOT( slotResult( TDEIO::Job * ) ) ); if ( m_isURLDesktopFile ) - connect( job, TQT_SIGNAL( renamed( TDEIO::Job *, const KURL&, const KURL& ) ), - TQT_SLOT( slotRenamed( TDEIO::Job *, const KURL&, const KURL& ) ) ); + connect( job, TQ_SIGNAL( renamed( TDEIO::Job *, const KURL&, const KURL& ) ), + TQ_SLOT( slotRenamed( TDEIO::Job *, const KURL&, const KURL& ) ) ); KURL::List lst; lst.append( uSrc ); (void)new KonqCommandRecorder( KonqCommand::COPY, lst, dest, job ); @@ -505,7 +505,7 @@ void KNewMenu::slotResult( TDEIO::Job * job ) // destURL is the original destination for the new file. // But in case of a renaming (due to a conflict), the real path is in m_destPath kdDebug(1203) << " destURL=" << destURL.path() << " " << " d->m_destPath=" << d->m_destPath << endl; - KDesktopFile df( d->m_destPath ); + TDEDesktopFile df( d->m_destPath ); df.writeEntry( "Icon", KProtocolInfo::icon( KURL(m_linkURL).protocol() ) ); df.writePathEntry( "URL", m_linkURL ); df.sync(); @@ -549,8 +549,8 @@ void KURLDesktopFileDlg::initDialog( const TQString& textFileName, const TQStrin label->setBuddy(m_leFileName); // please "scheck" style m_leFileName->setText( defaultName ); m_leFileName->setSelection(0, m_leFileName->text().length()); // autoselect - connect( m_leFileName, TQT_SIGNAL(textChanged(const TQString&)), - TQT_SLOT(slotNameTextChanged(const TQString&)) ); + connect( m_leFileName, TQ_SIGNAL(textChanged(const TQString&)), + TQ_SLOT(slotNameTextChanged(const TQString&)) ); // Second line: url TQHBox * urlBox = new TQHBox( plainPage() ); @@ -560,13 +560,13 @@ void KURLDesktopFileDlg::initDialog( const TQString& textFileName, const TQStrin m_urlRequester->setMode( KFile::File | KFile::Directory ); m_urlRequester->setMinimumWidth( m_urlRequester->sizeHint().width() * 3 ); - connect( m_urlRequester->lineEdit(), TQT_SIGNAL(textChanged(const TQString&)), - TQT_SLOT(slotURLTextChanged(const TQString&)) ); + connect( m_urlRequester->lineEdit(), TQ_SIGNAL(textChanged(const TQString&)), + TQ_SLOT(slotURLTextChanged(const TQString&)) ); label->setBuddy(m_urlRequester); // please "scheck" style m_urlRequester->setFocus(); enableButtonOK( !defaultName.isEmpty() && !defaultUrl.isEmpty() ); - connect( this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(slotClear()) ); + connect( this, TQ_SIGNAL(user1Clicked()), this, TQ_SLOT(slotClear()) ); m_fileNameEdited = false; } diff --git a/libkonq/knewmenu.h b/libkonq/knewmenu.h index a0ea38f44..5d28e58cb 100644 --- a/libkonq/knewmenu.h +++ b/libkonq/knewmenu.h @@ -51,7 +51,7 @@ class TQPopupMenu; */ class LIBKONQ_EXPORT KNewMenu : public TDEActionMenu { - Q_OBJECT + TQ_OBJECT public: /** @@ -184,7 +184,7 @@ private: */ class KURLDesktopFileDlg : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: KURLDesktopFileDlg( const TQString& textFileName, const TQString& textUrl ); KURLDesktopFileDlg( const TQString& textFileName, const TQString& textUrl, TQWidget *parent ); diff --git a/libkonq/konq_bgnddlg.cpp b/libkonq/konq_bgnddlg.cpp index 60f3aa63d..53039e908 100644 --- a/libkonq/konq_bgnddlg.cpp +++ b/libkonq/konq_bgnddlg.cpp @@ -29,7 +29,7 @@ #include <kimagefilepreview.h> #include <tdelocale.h> //#include <tderecentdocument.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kurlrequester.h> #include "konq_bgnddlg.h" @@ -47,15 +47,15 @@ KonqBgndDialog::KonqBgndDialog( TQWidget* parent, TQVBoxLayout* mainLayout = new TQVBoxLayout( page, 0, KDialog::spacingHint() ); m_buttonGroup = new TQButtonGroup( i18n("Background"), page ); - m_buttonGroup->setColumnLayout( 0, Qt::Vertical ); + m_buttonGroup->setColumnLayout( 0, TQt::Vertical ); m_buttonGroup->layout()->setMargin( KDialog::marginHint() ); m_buttonGroup->layout()->setSpacing( KDialog::spacingHint() ); TQGridLayout* groupLayout = new TQGridLayout( m_buttonGroup->layout() ); - groupLayout->setAlignment( Qt::AlignTop ); + groupLayout->setAlignment( TQt::AlignTop ); mainLayout->addWidget( m_buttonGroup ); - connect( m_buttonGroup, TQT_SIGNAL( clicked(int) ), - this, TQT_SLOT( slotBackgroundModeChanged() ) ); + connect( m_buttonGroup, TQ_SIGNAL( clicked(int) ), + this, TQ_SLOT( slotBackgroundModeChanged() ) ); // color m_radioColor = new TQRadioButton( i18n("Co&lor:"), m_buttonGroup ); @@ -65,8 +65,8 @@ KonqBgndDialog::KonqBgndDialog( TQWidget* parent, TQSizePolicy::Minimum ); groupLayout->addWidget( m_buttonColor, 0, 1 ); - connect( m_buttonColor, TQT_SIGNAL( changed( const TQColor& ) ), - this, TQT_SLOT( slotColorChanged() ) ); + connect( m_buttonColor, TQ_SIGNAL( changed( const TQColor& ) ), + this, TQ_SLOT( slotColorChanged() ) ); // picture m_radioPicture = new TQRadioButton( i18n("&Picture:"), m_buttonGroup ); @@ -75,10 +75,10 @@ KonqBgndDialog::KonqBgndDialog( TQWidget* parent, groupLayout->addMultiCellWidget( m_comboPicture, 1, 1, 1, 2 ); initPictures(); - connect( m_comboPicture->comboBox(), TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( slotPictureChanged() ) ); - connect( m_comboPicture, TQT_SIGNAL( urlSelected(const TQString &) ), - this, TQT_SLOT( slotPictureChanged() ) ); + connect( m_comboPicture->comboBox(), TQ_SIGNAL( activated( int ) ), + this, TQ_SLOT( slotPictureChanged() ) ); + connect( m_comboPicture, TQ_SIGNAL( urlSelected(const TQString &) ), + this, TQ_SLOT( slotPictureChanged() ) ); TQSpacerItem* spacer1 = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); diff --git a/libkonq/konq_bgnddlg.h b/libkonq/konq_bgnddlg.h index a5e179b6f..68667e316 100644 --- a/libkonq/konq_bgnddlg.h +++ b/libkonq/konq_bgnddlg.h @@ -37,7 +37,7 @@ class TQRadioButton; */ class KonqBgndDialog : public KDialogBase { - Q_OBJECT + TQ_OBJECT public: /** * Constructor diff --git a/libkonq/konq_dirpart.cpp b/libkonq/konq_dirpart.cpp index 030cc90a9..2066d9600 100644 --- a/libkonq/konq_dirpart.cpp +++ b/libkonq/konq_dirpart.cpp @@ -121,7 +121,7 @@ int KonqDirPart::KonqDirPartPrivate::findNearestIconSize(int preferred) int KonqDirPart::KonqDirPartPrivate::nearestIconSizeError(int size) { - return QABS(size - findNearestIconSize(size)); + return TQABS(size - findNearestIconSize(size)); } KonqDirPart::KonqDirPart( TQObject *parent, const char *name ) @@ -133,12 +133,12 @@ KonqDirPart::KonqDirPart( TQObject *parent, const char *name ) resetCount(); //m_bMultipleItemsSelected = false; - connect( TQApplication::clipboard(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotClipboardDataChanged()) ); + connect( TQApplication::clipboard(), TQ_SIGNAL(dataChanged()), this, TQ_SLOT(slotClipboardDataChanged()) ); actionCollection()->setHighlightingEnabled( true ); - m_paIncIconSize = new TDEAction( i18n( "Enlarge Icons" ), "zoom-in", 0, this, TQT_SLOT( slotIncIconSize() ), actionCollection(), "incIconSize" ); - m_paDecIconSize = new TDEAction( i18n( "Shrink Icons" ), "zoom-out", 0, this, TQT_SLOT( slotDecIconSize() ), actionCollection(), "decIconSize" ); + m_paIncIconSize = new TDEAction( i18n( "Enlarge Icons" ), "zoom-in", 0, this, TQ_SLOT( slotIncIconSize() ), actionCollection(), "incIconSize" ); + m_paDecIconSize = new TDEAction( i18n( "Shrink Icons" ), "zoom-out", 0, this, TQ_SLOT( slotDecIconSize() ), actionCollection(), "decIconSize" ); m_paDefaultIcons = new TDERadioAction( i18n( "&Default Size" ), 0, actionCollection(), "modedefault" ); d->aEnormousIcons = new TDERadioAction( i18n( "&Huge" ), 0, @@ -158,17 +158,17 @@ KonqDirPart::KonqDirPart( TQObject *parent, const char *name ) d->aSmallMediumIcons->setExclusiveGroup( "ViewMode" ); m_paSmallIcons->setExclusiveGroup( "ViewMode" ); - connect( m_paDefaultIcons, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotIconSizeToggled( bool ) ) ); - connect( d->aEnormousIcons, TQT_SIGNAL( toggled( bool ) ), - this, TQT_SLOT( slotIconSizeToggled( bool ) ) ); - connect( m_paHugeIcons, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotIconSizeToggled( bool ) ) ); - connect( m_paLargeIcons, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotIconSizeToggled( bool ) ) ); - connect( m_paMediumIcons, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotIconSizeToggled( bool ) ) ); - connect( d->aSmallMediumIcons, TQT_SIGNAL( toggled( bool ) ), - this, TQT_SLOT( slotIconSizeToggled( bool ) ) ); - connect( m_paSmallIcons, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotIconSizeToggled( bool ) ) ); - - connect( kapp, TQT_SIGNAL(iconChanged(int)), TQT_SLOT(slotIconChanged(int)) ); + connect( m_paDefaultIcons, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( slotIconSizeToggled( bool ) ) ); + connect( d->aEnormousIcons, TQ_SIGNAL( toggled( bool ) ), + this, TQ_SLOT( slotIconSizeToggled( bool ) ) ); + connect( m_paHugeIcons, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( slotIconSizeToggled( bool ) ) ); + connect( m_paLargeIcons, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( slotIconSizeToggled( bool ) ) ); + connect( m_paMediumIcons, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( slotIconSizeToggled( bool ) ) ); + connect( d->aSmallMediumIcons, TQ_SIGNAL( toggled( bool ) ), + this, TQ_SLOT( slotIconSizeToggled( bool ) ) ); + connect( m_paSmallIcons, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( slotIconSizeToggled( bool ) ) ); + + connect( tdeApp, TQ_SIGNAL(iconChanged(int)), TQ_SLOT(slotIconChanged(int)) ); #if 0 // Extract 6 icon sizes from the icon theme. // Use 16,22,32,48,64,128 as default. @@ -219,7 +219,7 @@ KonqDirPart::KonqDirPart( TQObject *parent, const char *name ) m_iIconSize[4] = TDEIcon::SizeHuge; // ... up to here - TDEAction *a = new TDEAction( i18n( "Configure Background..." ), "background", 0, this, TQT_SLOT( slotBackgroundSettings() ), + TDEAction *a = new TDEAction( i18n( "Configure Background..." ), "background", 0, this, TQ_SLOT( slotBackgroundSettings() ), actionCollection(), "bgsettings" ); a->setToolTip( i18n( "Allows choosing of background settings for this view" ) ); @@ -665,25 +665,25 @@ void KonqDirPart::setFindPart( KParts::ReadOnlyPart * part ) { assert(part); m_findPart = part; - connect( m_findPart, TQT_SIGNAL( started() ), - this, TQT_SLOT( slotStarted() ) ); - connect( m_findPart, TQT_SIGNAL( started() ), - this, TQT_SLOT( slotStartAnimationSearching() ) ); - connect( m_findPart, TQT_SIGNAL( clear() ), - this, TQT_SLOT( slotClear() ) ); - connect( m_findPart, TQT_SIGNAL( newItems( const KFileItemList & ) ), - this, TQT_SLOT( slotNewItems( const KFileItemList & ) ) ); - connect( m_findPart, TQT_SIGNAL( finished() ), // can't name it completed, it conflicts with a KROP signal - this, TQT_SLOT( slotCompleted() ) ); - connect( m_findPart, TQT_SIGNAL( finished() ), - this, TQT_SLOT( slotStopAnimationSearching() ) ); - connect( m_findPart, TQT_SIGNAL( canceled() ), - this, TQT_SLOT( slotCanceled() ) ); - connect( m_findPart, TQT_SIGNAL( canceled() ), - this, TQT_SLOT( slotStopAnimationSearching() ) ); - - connect( m_findPart, TQT_SIGNAL( findClosed() ), - this, TQT_SLOT( slotFindClosed() ) ); + connect( m_findPart, TQ_SIGNAL( started() ), + this, TQ_SLOT( slotStarted() ) ); + connect( m_findPart, TQ_SIGNAL( started() ), + this, TQ_SLOT( slotStartAnimationSearching() ) ); + connect( m_findPart, TQ_SIGNAL( clear() ), + this, TQ_SLOT( slotClear() ) ); + connect( m_findPart, TQ_SIGNAL( newItems( const KFileItemList & ) ), + this, TQ_SLOT( slotNewItems( const KFileItemList & ) ) ); + connect( m_findPart, TQ_SIGNAL( finished() ), // can't name it completed, it conflicts with a KROP signal + this, TQ_SLOT( slotCompleted() ) ); + connect( m_findPart, TQ_SIGNAL( finished() ), + this, TQ_SLOT( slotStopAnimationSearching() ) ); + connect( m_findPart, TQ_SIGNAL( canceled() ), + this, TQ_SLOT( slotCanceled() ) ); + connect( m_findPart, TQ_SIGNAL( canceled() ), + this, TQ_SLOT( slotStopAnimationSearching() ) ); + + connect( m_findPart, TQ_SIGNAL( findClosed() ), + this, TQ_SLOT( slotFindClosed() ) ); emit findOpened( this ); diff --git a/libkonq/konq_dirpart.h b/libkonq/konq_dirpart.h index 4a8d82cca..1b71eb125 100644 --- a/libkonq/konq_dirpart.h +++ b/libkonq/konq_dirpart.h @@ -38,7 +38,7 @@ class KonqDirPartBrowserExtension; class LIBKONQ_EXPORT KonqDirPart: public KParts::ReadOnlyPart { - Q_OBJECT + TQ_OBJECT friend class KonqDirPartBrowserExtension; diff --git a/libkonq/konq_drag.h b/libkonq/konq_drag.h index c30bbe49b..e2a75133c 100644 --- a/libkonq/konq_drag.h +++ b/libkonq/konq_drag.h @@ -37,7 +37,7 @@ // Clipboard/dnd data for: Icons + URLS + isCut class LIBKONQ_EXPORT KonqIconDrag : public TQIconDrag { - Q_OBJECT + TQ_OBJECT public: KonqIconDrag( TQWidget * dragSource, const char* name = 0 ); @@ -65,7 +65,7 @@ protected: // KDE4: private. And d pointer... */ class LIBKONQ_EXPORT KonqIconDrag2 : public KonqIconDrag { - Q_OBJECT + TQ_OBJECT public: KonqIconDrag2( TQWidget * dragSource ); diff --git a/libkonq/konq_faviconmgr.cpp b/libkonq/konq_faviconmgr.cpp index c5c828ec0..411d680f9 100644 --- a/libkonq/konq_faviconmgr.cpp +++ b/libkonq/konq_faviconmgr.cpp @@ -44,7 +44,7 @@ void KonqFavIconMgr::setIconForURL(const KURL &url, const KURL &iconURL) TQByteArray data; TQDataStream str(data, IO_WriteOnly); str << url << iconURL; - kapp->dcopClient()->send("kded", "favicons", "setIconForURL(KURL, KURL)", data); + tdeApp->dcopClient()->send("kded", "favicons", "setIconForURL(KURL, KURL)", data); } void KonqFavIconMgr::downloadHostIcon(const KURL &url) @@ -52,6 +52,6 @@ void KonqFavIconMgr::downloadHostIcon(const KURL &url) TQByteArray data; TQDataStream str(data, IO_WriteOnly); str << url; - kapp->dcopClient()->send("kded", "favicons", "downloadHostIcon(KURL)", data); + tdeApp->dcopClient()->send("kded", "favicons", "downloadHostIcon(KURL)", data); } diff --git a/libkonq/konq_faviconmgr.h b/libkonq/konq_faviconmgr.h index 48c345bcd..083c7e7df 100644 --- a/libkonq/konq_faviconmgr.h +++ b/libkonq/konq_faviconmgr.h @@ -30,7 +30,7 @@ */ class LIBKONQ_EXPORT KonqFavIconMgr : public TQObject, public DCOPObject { - Q_OBJECT + TQ_OBJECT K_DCOP public: /** diff --git a/libkonq/konq_filetip.cpp b/libkonq/konq_filetip.cpp index 8ad1e0d6f..b70a3158c 100644 --- a/libkonq/konq_filetip.cpp +++ b/libkonq/konq_filetip.cpp @@ -23,7 +23,7 @@ #include <tdefileitem.h> #include <tdeglobalsettings.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdeapplication.h> #include <tqlabel.h> @@ -114,7 +114,7 @@ void KonqFileTip::setItem( KFileItem *item, const TQRect &rect, const TQPixmap * // Don't start immediately, because the user could move the mouse over another item // This avoids a quick sequence of started preview-jobs m_timer->disconnect( this ); - connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(startDelayed())); + connect(m_timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(startDelayed())); m_timer->start( 300, true ); } } @@ -217,12 +217,12 @@ void KonqFileTip::setFilter( bool enable ) if ( enable == m_filter ) return; if ( enable ) { - kapp->installEventFilter( this ); + tdeApp->installEventFilter( this ); TQApplication::setGlobalMouseTracking( true ); } else { TQApplication::setGlobalMouseTracking( false ); - kapp->removeEventFilter( this ); + tdeApp->removeEventFilter( this ); } m_filter = enable; } @@ -234,7 +234,7 @@ void KonqFileTip::showTip() if ( text.isEmpty() ) return; m_timer->disconnect( this ); - connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(hideTip())); + connect(m_timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(hideTip())); m_timer->start( 15000, true ); m_textLabel->setText( text ); @@ -261,14 +261,14 @@ void KonqFileTip::startDelayed() oneItem.append( m_item ); m_previewJob = TDEIO::filePreview( oneItem, 256, 256, 64, 70, true, true, 0); - connect( m_previewJob, TQT_SIGNAL( gotPreview( const KFileItem *, const TQPixmap & ) ), - this, TQT_SLOT( gotPreview( const KFileItem *, const TQPixmap & ) ) ); - connect( m_previewJob, TQT_SIGNAL( result( TDEIO::Job * ) ), - this, TQT_SLOT( gotPreviewResult() ) ); + connect( m_previewJob, TQ_SIGNAL( gotPreview( const KFileItem *, const TQPixmap & ) ), + this, TQ_SLOT( gotPreview( const KFileItem *, const TQPixmap & ) ) ); + connect( m_previewJob, TQ_SIGNAL( result( TDEIO::Job * ) ), + this, TQ_SLOT( gotPreviewResult() ) ); } m_timer->disconnect( this ); - connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(showTip())); + connect(m_timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(showTip())); m_timer->start( 400, true ); } diff --git a/libkonq/konq_filetip.h b/libkonq/konq_filetip.h index 4bbc9d0e2..7a418510f 100644 --- a/libkonq/konq_filetip.h +++ b/libkonq/konq_filetip.h @@ -37,7 +37,7 @@ class TQTimer; class LIBKONQ_EXPORT KonqFileTip : public TQFrame { - Q_OBJECT + TQ_OBJECT public: KonqFileTip( TQScrollView *parent ); diff --git a/libkonq/konq_historymgr.cpp b/libkonq/konq_historymgr.cpp index 25cfef345..7ee04f170 100644 --- a/libkonq/konq_historymgr.cpp +++ b/libkonq/konq_historymgr.cpp @@ -24,8 +24,8 @@ #include <tdeapplication.h> #include <kdebug.h> #include <ksavefile.h> -#include <ksimpleconfig.h> -#include <kstandarddirs.h> +#include <tdesimpleconfig.h> +#include <tdestandarddirs.h> #include <zlib.h> @@ -50,8 +50,8 @@ KonqHistoryManager::KonqHistoryManager( TQObject *parent, const char *name ) m_filename = locateLocal( "data", TQString::fromLatin1("konqueror/konq_history" )); - if ( !kapp->dcopClient()->isAttached() ) - kapp->dcopClient()->attach(); + if ( !tdeApp->dcopClient()->isAttached() ) + tdeApp->dcopClient()->attach(); // take care of the completion object @@ -61,7 +61,7 @@ KonqHistoryManager::KonqHistoryManager( TQObject *parent, const char *name ) // and load the history loadHistory(); - connect( m_updateTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( slotEmitUpdated() )); + connect( m_updateTimer, TQ_SIGNAL( timeout() ), TQ_SLOT( slotEmitUpdated() )); } @@ -355,7 +355,7 @@ void KonqHistoryManager::emitAddToHistory( const KonqHistoryEntry& entry ) // Protection against very long urls (like data:) if ( data.size() > 4096 ) return; - kapp->dcopClient()->send( "konqueror*", "KonqHistoryManager", + tdeApp->dcopClient()->send( "konqueror*", "KonqHistoryManager", "notifyHistoryEntry(KonqHistoryEntry, TQCString)", data ); } @@ -397,7 +397,7 @@ void KonqHistoryManager::emitRemoveFromHistory( const KURL& url ) TQByteArray data; TQDataStream stream( data, IO_WriteOnly ); stream << url << objId(); - kapp->dcopClient()->send( "konqueror*", "KonqHistoryManager", + tdeApp->dcopClient()->send( "konqueror*", "KonqHistoryManager", "notifyRemove(KURL, TQCString)", data ); } @@ -406,7 +406,7 @@ void KonqHistoryManager::emitRemoveFromHistory( const KURL::List& urls ) TQByteArray data; TQDataStream stream( data, IO_WriteOnly ); stream << urls << objId(); - kapp->dcopClient()->send( "konqueror*", "KonqHistoryManager", + tdeApp->dcopClient()->send( "konqueror*", "KonqHistoryManager", "notifyRemove(KURL::List, TQCString)", data ); } @@ -415,7 +415,7 @@ void KonqHistoryManager::emitClear() TQByteArray data; TQDataStream stream( data, IO_WriteOnly ); stream << objId(); - kapp->dcopClient()->send( "konqueror*", "KonqHistoryManager", + tdeApp->dcopClient()->send( "konqueror*", "KonqHistoryManager", "notifyClear(TQCString)", data ); } @@ -424,7 +424,7 @@ void KonqHistoryManager::emitSetMaxCount( TQ_UINT32 count ) TQByteArray data; TQDataStream stream( data, IO_WriteOnly ); stream << count << objId(); - kapp->dcopClient()->send( "konqueror*", "KonqHistoryManager", + tdeApp->dcopClient()->send( "konqueror*", "KonqHistoryManager", "notifyMaxCount(TQ_UINT32, TQCString)", data ); } @@ -433,7 +433,7 @@ void KonqHistoryManager::emitSetMaxAge( TQ_UINT32 days ) TQByteArray data; TQDataStream stream( data, IO_WriteOnly ); stream << days << objId(); - kapp->dcopClient()->send( "konqueror*", "KonqHistoryManager", + tdeApp->dcopClient()->send( "konqueror*", "KonqHistoryManager", "notifyMaxAge(TQ_UINT32, TQCString)", data ); } @@ -594,7 +594,7 @@ bool KonqHistoryManager::loadFallback() return false; KonqHistoryEntry *entry; - KSimpleConfig config( file ); + TDESimpleConfig config( file ); config.setGroup("History"); TQStringList items = config.readListEntry( "CompletionItems" ); TQStringList::Iterator it = items.begin(); diff --git a/libkonq/konq_historymgr.h b/libkonq/konq_historymgr.h index c4cc6a9b1..ad704868d 100644 --- a/libkonq/konq_historymgr.h +++ b/libkonq/konq_historymgr.h @@ -74,7 +74,7 @@ protected: class LIBKONQ_EXPORT KonqHistoryManager : public KParts::HistoryProvider, public KonqHistoryComm { - Q_OBJECT + TQ_OBJECT public: static KonqHistoryManager *kself() { diff --git a/libkonq/konq_iconviewwidget.cpp b/libkonq/konq_iconviewwidget.cpp index 995b51ebc..226a34413 100644 --- a/libkonq/konq_iconviewwidget.cpp +++ b/libkonq/konq_iconviewwidget.cpp @@ -45,7 +45,7 @@ #include <kicontheme.h> #include <kiconeffect.h> #include <kurldrag.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kprotocolinfo.h> #include <ktrader.h> @@ -121,17 +121,17 @@ KonqIconViewWidget::KonqIconViewWidget( TQWidget * parent, const char * name, WF m_bSetGridX( !kdesktop ) /* No line breaking on the desktop */ { d = new KonqIconViewWidgetPrivate; - connect( this, TQT_SIGNAL( dropped( TQDropEvent *, const TQValueList<TQIconDragItem> & ) ), - this, TQT_SLOT( slotDropped( TQDropEvent*, const TQValueList<TQIconDragItem> & ) ) ); + connect( this, TQ_SIGNAL( dropped( TQDropEvent *, const TQValueList<TQIconDragItem> & ) ), + this, TQ_SLOT( slotDropped( TQDropEvent*, const TQValueList<TQIconDragItem> & ) ) ); - connect( this, TQT_SIGNAL( selectionChanged() ), - this, TQT_SLOT( slotSelectionChanged() ) ); + connect( this, TQ_SIGNAL( selectionChanged() ), + this, TQ_SLOT( slotSelectionChanged() ) ); - kapp->addKipcEventMask( KIPC::IconChanged ); - connect( kapp, TQT_SIGNAL(iconChanged(int)), TQT_SLOT(slotIconChanged(int)) ); - connect( this, TQT_SIGNAL(onItem(TQIconViewItem *)), TQT_SLOT(slotOnItem(TQIconViewItem *)) ); - connect( this, TQT_SIGNAL(onViewport()), TQT_SLOT(slotOnViewport()) ); - connect( this, TQT_SIGNAL(itemRenamed(TQIconViewItem *, const TQString &)), TQT_SLOT(slotItemRenamed(TQIconViewItem *, const TQString &)) ); + tdeApp->addKipcEventMask( KIPC::IconChanged ); + connect( tdeApp, TQ_SIGNAL(iconChanged(int)), TQ_SLOT(slotIconChanged(int)) ); + connect( this, TQ_SIGNAL(onItem(TQIconViewItem *)), TQ_SLOT(slotOnItem(TQIconViewItem *)) ); + connect( this, TQ_SIGNAL(onViewport()), TQ_SLOT(slotOnViewport()) ); + connect( this, TQ_SIGNAL(itemRenamed(TQIconViewItem *, const TQString &)), TQ_SLOT(slotItemRenamed(TQIconViewItem *, const TQString &)) ); m_pSettings = KonqFMSettings::settings(); // already needed in setItemTextPos(), calculateGridX() d->bBoostPreview = boostPreview(); @@ -284,7 +284,7 @@ void KonqIconViewWidget::slotOnItem( TQIconViewItem *_item ) else { kdDebug(1203) << "we go ahead.." << endl; d->m_movieBlocked++; - TQTimer::singleShot(300, this, TQT_SLOT(slotReenableAnimation())); + TQTimer::singleShot(300, this, TQ_SLOT(slotReenableAnimation())); d->m_movie->restart(); d->m_movie->unpause(); } @@ -307,8 +307,8 @@ void KonqIconViewWidget::slotOnItem( TQIconViewItem *_item ) } if (!hasPixmap && backgroundMode() != NoBackground) d->m_movie->setBackgroundColor( viewport()->backgroundColor() ); - d->m_movie->connectUpdate( this, TQT_SLOT( slotMovieUpdate(const TQRect &) ) ); - d->m_movie->connectStatus( TQT_TQOBJECT(this), TQT_SLOT( slotMovieStatus(int) ) ); + d->m_movie->connectUpdate( this, TQ_SLOT( slotMovieUpdate(const TQRect &) ) ); + d->m_movie->connectStatus( this, TQ_SLOT( slotMovieStatus(int) ) ); d->movieFileName = d->pActiveItem->mouseOverAnimation(); d->pActiveItem->setAnimated( true ); } @@ -349,14 +349,14 @@ void KonqIconViewWidget::slotOnItem( TQIconViewItem *_item ) d->pSoundPlayer->mimeTypes().contains( item->item()->mimetype()) && TDEGlobalSettings::showFilePreview(item->item()->url()) - && topLevelWidget() == kapp->activeWindow()) + && topLevelWidget() == tdeApp->activeWindow()) { d->pSoundItem = item; d->bSoundItemClicked = false; if (!d->pSoundTimer) { d->pSoundTimer = new TQTimer(this); - connect(d->pSoundTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotStartSoundPreview())); + connect(d->pSoundTimer, TQ_SIGNAL(timeout()), TQ_SLOT(slotStartSoundPreview())); } if (d->pSoundTimer->isActive()) d->pSoundTimer->stop(); @@ -394,7 +394,7 @@ void KonqIconViewWidget::slotOnViewport() d->m_movie->pause(); d->m_movieBlocked++; kdDebug(1203) << "on viewport, blocking" << endl; - TQTimer::singleShot(300, this, TQT_SLOT(slotReenableAnimation())); + TQTimer::singleShot(300, this, TQ_SLOT(slotReenableAnimation())); } #endif d->pActiveItem->refreshIcon( true ); @@ -561,7 +561,7 @@ bool KonqIconViewWidget::initConfig( bool bInit ) if ( itemTextBg.isValid() ) setItemTextBackground( itemTextBg ); else - setItemTextBackground( Qt::NoBrush ); + setItemTextBackground( TQt::NoBrush ); } bool on = m_pSettings->showFileTips() && TQToolTip::isGloballyEnabled(); @@ -840,7 +840,7 @@ void KonqIconViewWidget::startImagePreview( const TQStringList &, bool force ) KLibFactory *factory = KLibLoader::self()->factory("konq_sound"); if (factory) d->pSoundPlayer = static_cast<KonqSoundPlayer *>( - factory->create(TQT_TQOBJECT(this), 0, "KonqSoundPlayer")); + factory->create(this, 0, "KonqSoundPlayer")); d->bSoundPreviews = (d->pSoundPlayer != 0L); } @@ -874,10 +874,10 @@ void KonqIconViewWidget::startImagePreview( const TQStringList &, bool force ) d->pPreviewJob = TDEIO::filePreview( items, size, size, iconSize, m_pSettings->textPreviewIconTransparency(), true /* scale */, true /* save */, &(d->previewSettings) ); - connect( d->pPreviewJob, TQT_SIGNAL( gotPreview( const KFileItem *, const TQPixmap & ) ), - this, TQT_SLOT( slotPreview( const KFileItem *, const TQPixmap & ) ) ); - connect( d->pPreviewJob, TQT_SIGNAL( result( TDEIO::Job * ) ), - this, TQT_SLOT( slotPreviewResult() ) ); + connect( d->pPreviewJob, TQ_SIGNAL( gotPreview( const KFileItem *, const TQPixmap & ) ), + this, TQ_SLOT( slotPreview( const KFileItem *, const TQPixmap & ) ) ); + connect( d->pPreviewJob, TQ_SIGNAL( result( TDEIO::Job * ) ), + this, TQ_SLOT( slotPreviewResult() ) ); } void KonqIconViewWidget::stopImagePreview() @@ -1300,7 +1300,7 @@ void KonqIconViewWidget::doubleClickTimeout() if ( url.isLocalFile() && (url.directory(false) == TDEGlobalSettings::trashPath() || url.path(1).startsWith(TDEGlobalSettings::trashPath()))) brenameTrash = true; - if ( url.isLocalFile() && !brenameTrash && d->renameItem && m_pSettings->renameIconDirectly() && e.button() == Qt::LeftButton && item->textRect( false ).contains(e.pos())) + if ( url.isLocalFile() && !brenameTrash && d->renameItem && m_pSettings->renameIconDirectly() && e.button() == TQt::LeftButton && item->textRect( false ).contains(e.pos())) { if( d->pActivateDoubleClick->isActive () ) d->pActivateDoubleClick->stop(); @@ -1378,7 +1378,7 @@ void KonqIconViewWidget::contentsMousePressEvent( TQMouseEvent *e ) bool brenameTrash =false; if ( url.isLocalFile() && (url.directory(false) == TDEGlobalSettings::trashPath() || url.path(1).startsWith(TDEGlobalSettings::trashPath()))) brenameTrash = true; - if ( !brenameTrash && !TDEGlobalSettings::singleClick() && m_pSettings->renameIconDirectly() && e->button() == Qt::LeftButton && item->textRect( false ).contains(e->pos())&& !d->firstClick && url.isLocalFile() && (!url.protocol().find("device", 0, false)==0)) + if ( !brenameTrash && !TDEGlobalSettings::singleClick() && m_pSettings->renameIconDirectly() && e->button() == TQt::LeftButton && item->textRect( false ).contains(e->pos())&& !d->firstClick && url.isLocalFile() && (!url.protocol().find("device", 0, false)==0)) { d->firstClick = true; d->mousePos = e->pos(); @@ -1386,7 +1386,7 @@ void KonqIconViewWidget::contentsMousePressEvent( TQMouseEvent *e ) if (!d->pActivateDoubleClick) { d->pActivateDoubleClick = new TQTimer(this); - connect(d->pActivateDoubleClick, TQT_SIGNAL(timeout()), this, TQT_SLOT(doubleClickTimeout())); + connect(d->pActivateDoubleClick, TQ_SIGNAL(timeout()), this, TQ_SLOT(doubleClickTimeout())); } if( d->pActivateDoubleClick->isActive () ) d->pActivateDoubleClick->stop(); @@ -1433,7 +1433,7 @@ void KonqIconViewWidget::slotSaveIconPositions() if ( !m_bDesktop ) return; // Currently not available in Konqueror kdDebug(1214) << "KonqIconViewWidget::slotSaveIconPositions" << endl; - KSimpleConfig dotDirectory( m_dotDirectoryPath ); + TDESimpleConfig dotDirectory( m_dotDirectoryPath ); TQIconViewItem *it = firstItem(); if ( !it ) return; // No more icons. Maybe we're closing and they've been removed already @@ -1502,7 +1502,7 @@ void KonqIconViewWidget::insertInGrid(TQIconViewItem *item) TQMemArray<TQRect> rects = r.rects(); TQMemArray<TQRect>::Iterator it = rects.begin(); - bool foundPlace = FALSE; + bool foundPlace = false; for (; it != rects.end(); ++it) { TQRect rect = *it; diff --git a/libkonq/konq_iconviewwidget.h b/libkonq/konq_iconviewwidget.h index d4adf7ed5..75e3c1f37 100644 --- a/libkonq/konq_iconviewwidget.h +++ b/libkonq/konq_iconviewwidget.h @@ -41,7 +41,7 @@ namespace TDEIO { class Job; } */ class LIBKONQ_EXPORT KonqIconViewWidget : public TDEIconView { - Q_OBJECT + TQ_OBJECT TQ_PROPERTY( bool sortDirectoriesFirst READ sortDirectoriesFirst WRITE setSortDirectoriesFirst ) TQ_PROPERTY( TQRect iconArea READ iconArea WRITE setIconArea ) TQ_PROPERTY( int lineupMode READ lineupMode WRITE setLineupMode ) @@ -56,7 +56,7 @@ public: /** * Constructor */ - KonqIconViewWidget( TQWidget *parent = 0L, const char *name = 0L, WFlags f = 0, bool kdesktop = FALSE ); + KonqIconViewWidget( TQWidget *parent = 0L, const char *name = 0L, WFlags f = 0, bool kdesktop = false ); virtual ~KonqIconViewWidget(); /** diff --git a/libkonq/konq_operations.cpp b/libkonq/konq_operations.cpp index 4f754681e..7c715d084 100644 --- a/libkonq/konq_operations.cpp +++ b/libkonq/konq_operations.cpp @@ -42,7 +42,7 @@ #include <kipc.h> #include <kdebug.h> #include <tdefileitem.h> -#include <kdesktopfile.h> +#include <tdedesktopfile.h> #include <kurldrag.h> #include <tdeglobalsettings.h> #include <kimageio.h> @@ -54,7 +54,7 @@ #include <konq_drag.h> #include <konq_iconviewwidget.h> #include <kprotocolinfo.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <kstringhandler.h> #include <tqpopupmenu.h> #include <unistd.h> @@ -221,8 +221,8 @@ void KonqOperations::_del( int method, const KURL::List & _selectedURLs, Confirm delete this; return; } - connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), - TQT_SLOT( slotResult( TDEIO::Job * ) ) ); + connect( job, TQ_SIGNAL( result( TDEIO::Job * ) ), + TQ_SLOT( slotResult( TDEIO::Job * ) ) ); } else delete this; } @@ -231,8 +231,8 @@ void KonqOperations::_restoreTrashedItems( const KURL::List& urls ) { m_method = RESTORE; KonqMultiRestoreJob* job = new KonqMultiRestoreJob( urls, true ); - connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), - TQT_SLOT( slotResult( TDEIO::Job * ) ) ); + connect( job, TQ_SIGNAL( result( TDEIO::Job * ) ), + TQ_SLOT( slotResult( TDEIO::Job * ) ) ); } bool KonqOperations::askDeleteConfirmation( const KURL::List & selectedURLs, int method, ConfirmationType confirmation, TQWidget* widget ) @@ -296,7 +296,7 @@ bool KonqOperations::askDeleteConfirmation( const KURL::List & selectedURLs, int if (!keyName.isEmpty()) { // Check kmessagebox setting... erase & copy to konquerorrc. - TDEConfig *config = kapp->config(); + TDEConfig *config = tdeApp->config(); TDEConfigGroupSaver saver(config, "Notification Messages"); if (!config->readBoolEntry(keyName, true)) { @@ -376,7 +376,7 @@ void KonqOperations::doDrop( const KFileItem * destItem, const KURL & dest, TQDr else { // we need to stat to get it. - op->_statURL( dest, op, TQT_SLOT( asyncDrop( const KFileItem * ) ) ); + op->_statURL( dest, op, TQ_SLOT( asyncDrop( const KFileItem * ) ) ); } // In both cases asyncDrop will delete op when done @@ -428,7 +428,7 @@ void KonqOperations::asyncDrop( const KFileItem * destItem ) || (destItem->mimetype() == "media/builtin-webbrowser") ) { // Local .desktop file. What type ? - KDesktopFile desktopFile( m_destURL.path() ); + TDEDesktopFile desktopFile( m_destURL.path() ); if ( desktopFile.hasApplicationType() ) { TQString error; @@ -458,7 +458,7 @@ void KonqOperations::asyncDrop( const KFileItem * destItem ) bool ro = desktopFile.readBoolEntry( "ReadOnly", false ); TQString fstype = desktopFile.readEntry( "FSType" ); KAutoMount* am = new KAutoMount( ro, fstype, dev, point, m_destURL.path(), false ); - connect( am, TQT_SIGNAL( finished() ), this, TQT_SLOT( doFileCopy() ) ); + connect( am, TQ_SIGNAL( finished() ), this, TQ_SLOT( doFileCopy() ) ); } return; } @@ -503,7 +503,7 @@ void KonqOperations::doFileCopy() bool local = (*it).isLocalFile(); if ( KProtocolInfo::supportsDeleting( *it ) && (!local || TQFileInfo((*it).directory()).isWritable() )) mlst.append(*it); - if ( local && KDesktopFile::isDesktopFile((*it).path())) + if ( local && TDEDesktopFile::isDesktopFile((*it).path())) isDesktopFile = true; if ( local && (*it).path().startsWith(TDEGlobalSettings::desktopPath())) itemIsOnDesktop = true; @@ -512,7 +512,7 @@ void KonqOperations::doFileCopy() } bool linkOnly = false; - if (isDesktopFile && !kapp->authorize("run_desktop_files") && + if (isDesktopFile && !tdeApp->authorize("run_desktop_files") && (m_destURL.path(1) == TDEGlobalSettings::desktopPath()) ) { linkOnly = true; @@ -520,7 +520,7 @@ void KonqOperations::doFileCopy() if ( !mlst.isEmpty() && m_destURL.protocol() == "trash" ) { - if ( itemIsOnDesktop && !kapp->authorize("editable_desktop_icons") ) + if ( itemIsOnDesktop && !tdeApp->authorize("editable_desktop_icons") ) { delete this; return; @@ -543,7 +543,7 @@ void KonqOperations::doFileCopy() linkOnly ) { // Neither control nor shift are pressed => show popup menu - KonqIconViewWidget *iconView = tqt_dynamic_cast<KonqIconViewWidget*>(parent()); + KonqIconViewWidget *iconView = dynamic_cast<KonqIconViewWidget*>(parent()); bool bSetWallpaper = false; if ( iconView && iconView->maySetWallpaper() && lst.count() == 1 ) { @@ -579,7 +579,7 @@ void KonqOperations::doFileCopy() if (bSetWallpaper) popup.insertItem(SmallIconSet("background"), i18n( "Set as &Wallpaper" ), 4 ); popup.insertSeparator(); - popup.insertItem(SmallIconSet("cancel"), i18n( "C&ancel" ) + "\t" + KKey( Qt::Key_Escape ).toString(), 5); + popup.insertItem(SmallIconSet("cancel"), i18n( "C&ancel" ) + "\t" + KKey( TQt::Key_Escape ).toString(), 5); int result = popup.exec( m_info->mousePos ); @@ -658,16 +658,16 @@ void KonqOperations::setOperation( TDEIO::Job * job, int method, const KURL::Lis m_destURL = dest; if ( job ) { - connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), - TQT_SLOT( slotResult( TDEIO::Job * ) ) ); - TDEIO::CopyJob *copyJob = tqt_dynamic_cast<TDEIO::CopyJob*>(job); - KonqIconViewWidget *iconView = tqt_dynamic_cast<KonqIconViewWidget*>(parent()); + connect( job, TQ_SIGNAL( result( TDEIO::Job * ) ), + TQ_SLOT( slotResult( TDEIO::Job * ) ) ); + TDEIO::CopyJob *copyJob = dynamic_cast<TDEIO::CopyJob*>(job); + KonqIconViewWidget *iconView = dynamic_cast<KonqIconViewWidget*>(parent()); if (copyJob && iconView) { - connect(copyJob, TQT_SIGNAL(aboutToCreate(TDEIO::Job *,const TQValueList<TDEIO::CopyInfo> &)), - this, TQT_SLOT(slotAboutToCreate(TDEIO::Job *,const TQValueList<TDEIO::CopyInfo> &))); - connect(this, TQT_SIGNAL(aboutToCreate(const TQPoint &, const TQValueList<TDEIO::CopyInfo> &)), - iconView, TQT_SLOT(slotAboutToCreate(const TQPoint &, const TQValueList<TDEIO::CopyInfo> &))); + connect(copyJob, TQ_SIGNAL(aboutToCreate(TDEIO::Job *,const TQValueList<TDEIO::CopyInfo> &)), + this, TQ_SLOT(slotAboutToCreate(TDEIO::Job *,const TQValueList<TDEIO::CopyInfo> &))); + connect(this, TQ_SIGNAL(aboutToCreate(const TQPoint &, const TQValueList<TDEIO::CopyInfo> &)), + iconView, TQ_SLOT(slotAboutToCreate(const TQPoint &, const TQValueList<TDEIO::CopyInfo> &))); } } else // for link @@ -688,10 +688,10 @@ void KonqOperations::statURL( const KURL & url, const TQObject *receiver, const void KonqOperations::_statURL( const KURL & url, const TQObject *receiver, const char *member ) { - connect( this, TQT_SIGNAL( statFinished( const KFileItem * ) ), receiver, member ); + connect( this, TQ_SIGNAL( statFinished( const KFileItem * ) ), receiver, member ); TDEIO::StatJob * job = TDEIO::stat( url /*, false?*/ ); - connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), - TQT_SLOT( slotStatResult( TDEIO::Job * ) ) ); + connect( job, TQ_SIGNAL( result( TDEIO::Job * ) ), + TQ_SLOT( slotStatResult( TDEIO::Job * ) ) ); } void KonqOperations::slotStatResult( TDEIO::Job * job ) @@ -763,7 +763,7 @@ KonqMultiRestoreJob::KonqMultiRestoreJob( const KURL::List& urls, bool showProgr m_urls( urls ), m_urlsIterator( m_urls.begin() ), m_progress( 0 ) { - TQTimer::singleShot(0, this, TQT_SLOT(slotStart())); + TQTimer::singleShot(0, this, TQ_SLOT(slotStart())); } void KonqMultiRestoreJob::slotStart() diff --git a/libkonq/konq_operations.h b/libkonq/konq_operations.h index c6cef7431..ebc127189 100644 --- a/libkonq/konq_operations.h +++ b/libkonq/konq_operations.h @@ -36,7 +36,7 @@ class KonqMainWindow; */ class LIBKONQ_EXPORT KonqOperations : public TQObject { - Q_OBJECT + TQ_OBJECT protected: KonqOperations( TQWidget * parent ); virtual ~KonqOperations(); @@ -197,7 +197,7 @@ private: /// Restore multiple trashed files class KonqMultiRestoreJob : public TDEIO::Job { - Q_OBJECT + TQ_OBJECT public: KonqMultiRestoreJob( const KURL::List& urls, bool showProgressInfo ); diff --git a/libkonq/konq_pixmapprovider.cpp b/libkonq/konq_pixmapprovider.cpp index 28d5a9992..e560cc63c 100644 --- a/libkonq/konq_pixmapprovider.cpp +++ b/libkonq/konq_pixmapprovider.cpp @@ -32,7 +32,7 @@ KonqPixmapProvider * KonqPixmapProvider::s_self = 0L; KonqPixmapProvider * KonqPixmapProvider::self() { if ( !s_self ) - s_self = new KonqPixmapProvider( TQT_TQOBJECT(kapp), "KonqPixmapProvider" ); + s_self = new KonqPixmapProvider( tdeApp, "KonqPixmapProvider" ); return s_self; } @@ -186,7 +186,7 @@ TQPixmap KonqPixmapProvider::loadIcon( const TQString& url, const TQString& icon if ( big.mask() ) { TQBitmap mask = *big.mask(); bitBlt( &mask, x, y, - small.mask() ? TQT_TQPIXMAP(const_cast<TQBitmap *>(small.mask())) : &small, 0, 0, + small.mask() ? const_cast<TQBitmap *>(small.mask()) : &small, 0, 0, small.width(), small.height(), small.mask() ? OrROP : SetROP ); big.setMask( mask ); diff --git a/libkonq/konq_popupmenu.cpp b/libkonq/konq_popupmenu.cpp index adaffe9e3..4ed65e189 100644 --- a/libkonq/konq_popupmenu.cpp +++ b/libkonq/konq_popupmenu.cpp @@ -30,7 +30,7 @@ #include <kiconloader.h> #include <kinputdialog.h> #include <tdeglobalsettings.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kxmlguifactory.h> #include <kxmlguibuilder.h> #include <tdeparts/componentfactory.h> @@ -38,7 +38,7 @@ #include <assert.h> #include <tdefileshare.h> -#include <kprocess.h> +#include <tdeprocess.h> #include "kpropertiesdialog.h" #include "knewmenu.h" @@ -287,7 +287,7 @@ int KonqPopupMenu::insertServices(const ServiceList& list, name.setNum( id ); name.prepend( isBuiltin ? "builtinservice_" : "userservice_" ); TDEAction * act = new TDEAction( TQString((*it).m_strName).replace('&',"&&"), 0, - TQT_TQOBJECT(this), TQT_SLOT( slotRunService() ), + this, TQ_SLOT( slotRunService() ), &m_ownActions, name ); if ( !(*it).m_strIcon.isEmpty() ) @@ -314,13 +314,13 @@ bool KonqPopupMenu::KIOSKAuthorizedAction(TDEConfig& cfg) } TQStringList list = cfg.readListEntry("X-TDE-AuthorizeAction"); - if (kapp && !list.isEmpty()) + if (tdeApp && !list.isEmpty()) { for(TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { - if (!kapp->authorize((*it).stripWhiteSpace())) + if (!tdeApp->authorize((*it).stripWhiteSpace())) { return false; } @@ -430,10 +430,10 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) d->localURLSlotFired = false; TDEIO::LocalURLJob* localURLJob = TDEIO::localURL(m_sViewURL); if (localURLJob) { - connect(localURLJob, TQT_SIGNAL(localURL(TDEIO::LocalURLJob*, const KURL&, bool)), this, TQT_SLOT(slotLocalURL(TDEIO::LocalURLJob*, const KURL&, bool))); - connect(localURLJob, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotLocalURLKIODestroyed())); + connect(localURLJob, TQ_SIGNAL(localURL(TDEIO::LocalURLJob*, const KURL&, bool)), this, TQ_SLOT(slotLocalURL(TDEIO::LocalURLJob*, const KURL&, bool))); + connect(localURLJob, TQ_SIGNAL(destroyed()), this, TQ_SLOT(slotLocalURLKIODestroyed())); while (!d->localURLSlotFired) { - kapp->eventLoop()->enterLoop(); + tdeApp->eventLoop()->enterLoop(); } if (d->localURLResultIsLocal) { realURL = d->localURLResultURL; @@ -459,7 +459,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) || (m_sMimeType == "media/builtin-printers") || (m_sMimeType == "media/builtin-trash") || (m_sMimeType == "media/builtin-webbrowser")) ) { - KSimpleConfig cfg( firstPopupURL.path(), true ); + TDESimpleConfig cfg( firstPopupURL.path(), true ); cfg.setDesktopGroup(); isTrashLink = ( cfg.readEntry("Type") == "Link" && cfg.readEntry("URL") == "trash:/" ); } @@ -488,10 +488,10 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) if (!isCurrentTrash) addMerge( "konqueror" ); - bool isKDesktop = TQCString( kapp->name() ) == "kdesktop"; + bool isKDesktop = TQCString( tdeApp->name() ) == "kdesktop"; if (( kpf & ShowProperties ) && isKDesktop && - !kapp->authorize("editable_desktop_icons")) + !tdeApp->authorize("editable_desktop_icons")) { kpf &= ~ShowProperties; // remove flag } @@ -501,7 +501,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) if ( ((kpf & ShowNewWindow) != 0) && sReading && !isEncryptedMediaFile) { TQString openStr = isKDesktop ? i18n( "&Open" ) : i18n( "Open in New &Window" ); - TDEAction *actNewWindow = new TDEAction( openStr, "window-new", 0, TQT_TQOBJECT(this), TQT_SLOT( slotPopupNewView() ), &m_ownActions, "newview" ); + TDEAction *actNewWindow = new TDEAction( openStr, "window-new", 0, this, TQ_SLOT( slotPopupNewView() ), &m_ownActions, "newview" ); actNewWindow->setToolTip( i18n( "Open item in a new window" ) ); addAction( actNewWindow ); addSeparator(); @@ -523,14 +523,14 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) { if (d->m_itemFlags & KParts::BrowserExtension::ShowCreateDirectory) { - TDEAction *actNewDir = new TDEAction( i18n( "Create &Folder..." ), "folder-new", 0, TQT_TQOBJECT(this), TQT_SLOT( slotPopupNewDir() ), &m_ownActions, "newdir" ); + TDEAction *actNewDir = new TDEAction( i18n( "Create &Folder..." ), "folder-new", 0, this, TQ_SLOT( slotPopupNewDir() ), &m_ownActions, "newdir" ); addAction( actNewDir ); addSeparator(); } } } else if ( isIntoTrash ) { // Trashed item, offer restoring - act = new TDEAction( i18n( "&Restore" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotPopupRestoreTrashedItems() ), &m_ownActions, "restore" ); + act = new TDEAction( i18n( "&Restore" ), 0, this, TQ_SLOT( slotPopupRestoreTrashedItems() ), &m_ownActions, "restore" ); addAction( act ); } @@ -584,7 +584,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) addDel = true; } else { - TDEConfigGroup configGroup( kapp->config(), "KDE" ); + TDEConfigGroup configGroup( tdeApp->config(), "KDE" ); if ( configGroup.readBoolEntry( "ShowDeleteCommand", false ) ) addDel = true; } @@ -598,8 +598,8 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) } if ( isCurrentTrash ) { - act = new TDEAction( i18n( "&Empty Trash Bin" ), "emptytrash", 0, TQT_TQOBJECT(this), TQT_SLOT( slotPopupEmptyTrashBin() ), &m_ownActions, "empytrash" ); - KSimpleConfig trashConfig( "trashrc", true ); + act = new TDEAction( i18n( "&Empty Trash Bin" ), "emptytrash", 0, this, TQ_SLOT( slotPopupEmptyTrashBin() ), &m_ownActions, "empytrash" ); + TDESimpleConfig trashConfig( "trashrc", true ); trashConfig.setGroup( "Status" ); act->setEnabled( !trashConfig.readBoolEntry( "Empty", true ) ); addAction( act ); @@ -631,10 +631,10 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) else caption = i18n("&Bookmark This File"); - act = new TDEAction( caption, "bookmark_add", 0, TQT_TQOBJECT(this), TQT_SLOT( slotPopupAddToBookmark() ), &m_ownActions, "bookmark_add" ); + act = new TDEAction( caption, "bookmark_add", 0, this, TQ_SLOT( slotPopupAddToBookmark() ), &m_ownActions, "bookmark_add" ); if (m_lstItems.count() > 1) act->setEnabled(false); - if (kapp->authorizeTDEAction("bookmarks")) + if (tdeApp->authorizeTDEAction("bookmarks")) addAction( act ); if (bIsLink) addGroup( "linkactions" ); @@ -662,7 +662,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) // get builtin services, like mount/unmount s.builtin = KDEDesktopMimeType::builtinServices( urlForServiceMenu ); const TQString path = urlForServiceMenu.path(); - KSimpleConfig cfg( path, true ); + TDESimpleConfig cfg( path, true ); cfg.setDesktopGroup(); const TQString priority = cfg.readEntry("X-TDE-Priority"); const TQString submenuName = cfg.readEntry( "X-TDE-Submenu" ); @@ -684,7 +684,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) if (isDirectory && isSingleLocal) { TQString dotDirectoryFile = urlForServiceMenu.path(1).append(".directory"); - KSimpleConfig cfg( dotDirectoryFile, true ); + TDESimpleConfig cfg( dotDirectoryFile, true ); cfg.setDesktopGroup(); if (KIOSKAuthorizedAction(cfg)) @@ -704,7 +704,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) const TQStringList::ConstIterator eEnd = entries.end(); for (; eIt != eEnd; ++eIt ) { - KSimpleConfig cfg( *eIt, true ); + TDESimpleConfig cfg( *eIt, true ); cfg.setDesktopGroup(); if (!KIOSKAuthorizedAction(cfg)) @@ -715,7 +715,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) if ( cfg.hasKey( "X-TDE-ShowIfRunning" ) ) { const TQString app = cfg.readEntry( "X-TDE-ShowIfRunning" ); - if ( !kapp->dcopClient()->isApplicationRegistered( app.utf8() ) ) + if ( !tdeApp->dcopClient()->isApplicationRegistered( app.utf8() ) ) continue; } if ( cfg.hasKey( "X-TDE-ShowIfDcopCall" ) ) @@ -723,7 +723,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) TQString dcopcall = cfg.readEntry( "X-TDE-ShowIfDcopCall" ); const TQCString app = TQString(dcopcall.section(' ', 0,0)).utf8(); - //if( !kapp->dcopClient()->isApplicationRegistered( app )) + //if( !tdeApp->dcopClient()->isApplicationRegistered( app )) // continue; //app does not exist so cannot send call TQByteArray dataToSend; @@ -739,7 +739,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) continue; //Be safe. } - if(!kapp->dcopClient()->call( app, object, + if(!tdeApp->dcopClient()->call( app, object, function.utf8(), dataToSend, replyType, replyData, true, 1000)) continue; @@ -839,7 +839,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) TDETrader::OfferList offers; - if (kapp->authorizeTDEAction("openwith")) + if (tdeApp->authorizeTDEAction("openwith")) { TQString constraint = "Type == 'Application' and DesktopEntryName != 'kfmclient' and DesktopEntryName != 'kfmclient_dir' and DesktopEntryName != 'kfmclient_html'"; TQString subConstraint = " and '%1' in ServiceTypes"; @@ -915,7 +915,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) actionName = i18n( "Open with %1" ).arg( actionName ); act = new TDEAction( actionName, (*it)->pixmap( TDEIcon::Small ), 0, - TQT_TQOBJECT(this), TQT_SLOT( slotRunService() ), + this, TQ_SLOT( slotRunService() ), &m_ownActions, nam.prepend( "appservice_" ) ); addAction( act, menu ); @@ -932,12 +932,12 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) { openWithActionName = i18n( "&Open With..." ); } - TDEAction *openWithAct = new TDEAction( openWithActionName, 0, TQT_TQOBJECT(this), TQT_SLOT( slotPopupOpenWith() ), &m_ownActions, "openwith" ); + TDEAction *openWithAct = new TDEAction( openWithActionName, 0, this, TQ_SLOT( slotPopupOpenWith() ), &m_ownActions, "openwith" ); addAction( openWithAct, menu ); } else // no app offers -> Open With... { - act = new TDEAction( i18n( "&Open With..." ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotPopupOpenWith() ), &m_ownActions, "openwith" ); + act = new TDEAction( i18n( "&Open With..." ), 0, this, TQ_SLOT( slotPopupOpenWith() ), &m_ownActions, "openwith" ); addAction( act ); } @@ -991,7 +991,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) if ( KPropertiesDialog::canDisplay( m_lstItems ) && (kpf & ShowProperties) ) { - act = new TDEAction( i18n( "&Properties" ), "edit", 0, TQT_TQOBJECT(this), TQT_SLOT( slotPopupProperties() ), + act = new TDEAction( i18n( "&Properties" ), "edit", 0, this, TQ_SLOT( slotPopupProperties() ), &m_ownActions, "properties" ); addAction( act ); } @@ -1005,7 +1005,7 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf) if ( KFileShare::authorization() == KFileShare::Authorized ) { addSeparator(); - act = new TDEAction( i18n("Share"), 0, TQT_TQOBJECT(this), TQT_SLOT( slotOpenShareFileDialog() ), + act = new TDEAction( i18n("Share"), 0, this, TQ_SLOT( slotOpenShareFileDialog() ), &m_ownActions, "sharefile" ); addAction( act ); } @@ -1087,7 +1087,7 @@ void KonqPopupMenu::slotPopupAddToBookmark() void KonqPopupMenu::slotRunService() { - TQCString senderName = TQT_TQOBJECT_CONST(sender())->name(); + TQCString senderName = sender()->name(); int id = senderName.mid( senderName.find( '_' ) + 1 ).toInt(); // Is it a usual service (application) @@ -1185,7 +1185,7 @@ void KonqPopupMenu::addPlugins() KonqPopupMenuPlugin *plugin = KParts::ComponentFactory:: createInstanceFromLibrary<KonqPopupMenuPlugin>( TQFile::encodeName( (*iterator)->library() ), - TQT_TQOBJECT(this), + this, (*iterator)->name().latin1() ); if ( !plugin ) continue; @@ -1221,7 +1221,7 @@ void KonqPopupMenu::slotLocalURL(TDEIO::LocalURLJob *job, const KURL& url, bool d->localURLSlotFired = true; d->localURLResultURL = url; d->localURLResultIsLocal = isLocal; - kapp->eventLoop()->exitLoop(); + tdeApp->eventLoop()->exitLoop(); } void KonqPopupMenu::slotLocalURLKIODestroyed() @@ -1230,7 +1230,7 @@ void KonqPopupMenu::slotLocalURLKIODestroyed() d->localURLSlotFired = true; d->localURLResultURL = KURL(); d->localURLResultIsLocal = false; - kapp->eventLoop()->exitLoop(); + tdeApp->eventLoop()->exitLoop(); } } diff --git a/libkonq/konq_popupmenu.h b/libkonq/konq_popupmenu.h index 5785d53ab..d4c956029 100644 --- a/libkonq/konq_popupmenu.h +++ b/libkonq/konq_popupmenu.h @@ -55,7 +55,7 @@ class KBookmarkManager; */ class LIBKONQ_EXPORT KonqPopupMenu : public TQPopupMenu, public KonqXMLGUIClient { - Q_OBJECT + TQ_OBJECT public: /** @@ -79,7 +79,7 @@ public: KURL viewURL, TDEActionCollection & actions, KNewMenu * newMenu, - bool showPropertiesAndFileType = true ) KDE_DEPRECATED; + bool showPropertiesAndFileType = true ) TDE_DEPRECATED; /** * @deprecated uses bool instead of KonqPopupFlags enum, @@ -91,7 +91,7 @@ public: TDEActionCollection & actions, KNewMenu * newMenu, TQWidget * parentWidget, - bool showPropertiesAndFileType = true ) KDE_DEPRECATED; + bool showPropertiesAndFileType = true ) TDE_DEPRECATED; /** * Constructor @@ -210,7 +210,7 @@ private: }; class LIBKONQ_EXPORT KonqPopupMenuPlugin : public TQObject, public KonqXMLGUIClient { - Q_OBJECT + TQ_OBJECT public: /** * Constructor diff --git a/libkonq/konq_propsview.cpp b/libkonq/konq_propsview.cpp index af7a65eae..a5acfa1bf 100644 --- a/libkonq/konq_propsview.cpp +++ b/libkonq/konq_propsview.cpp @@ -21,7 +21,7 @@ #include "konq_settings.h" #include <kdebug.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kpixmap.h> #include <tqpixmapcache.h> #include <tqiconview.h> @@ -29,10 +29,12 @@ #include <tqfile.h> #include <iostream> #include <ktrader.h> -#include <kinstance.h> +#include <tdeinstance.h> #include <assert.h> -#include <ksimpleconfig.h> +#include <tdesimpleconfig.h> + +#include "konq_sort_constants.h" static TQPixmap wallpaperPixmap( const TQString & _wallpaper ) { @@ -65,10 +67,11 @@ static TQPixmap wallpaperPixmap( const TQString & _wallpaper ) struct KonqPropsView::Private { TQStringList* previewsToShow; + TextSortOrder textSortOrder; bool previewsEnabled:1; bool caseInsensitiveSort:1; - bool hiddenfirst:1; bool dirsfirst:1; + bool hiddenfirst:1; bool descending:1; TQString sortcriterion; }; @@ -91,6 +94,7 @@ KonqPropsView::KonqPropsView( TDEInstance * instance, KonqPropsView * defaultPro m_iIconSize = config->readNumEntry( "IconSize", 0 ); m_iItemTextPos = config->readNumEntry( "ItemTextPos", TQIconView::Bottom ); d->sortcriterion = config->readEntry( "SortingCriterion", "sort_nci" ); + d->textSortOrder = (TextSortOrder) config->readNumEntry( "TextSortOrder", 1 ); d->dirsfirst = config->readBoolEntry( "SortDirsFirst", true ); d->hiddenfirst = config->readBoolEntry( "SortHiddenFirst", true ); d->descending = config->readBoolEntry( "SortDescending", false ); @@ -140,6 +144,11 @@ bool KonqPropsView::isCaseInsensitiveSort() const return d->caseInsensitiveSort; } +TextSortOrder KonqPropsView::getSortOrder() const +{ + return d->textSortOrder; +} + bool KonqPropsView::isDirsFirst() const { return d->dirsfirst; @@ -164,7 +173,7 @@ TDEConfigBase * KonqPropsView::currentConfig() assert ( !isDefaultProperties() ); if (!dotDirectory.isEmpty()) - m_currentConfig = new KSimpleConfig( dotDirectory ); + m_currentConfig = new TDESimpleConfig( dotDirectory ); // the "else" is when we want to save locally but this is a remote URL -> no save } return m_currentConfig; @@ -206,6 +215,7 @@ bool KonqPropsView::enterDir( const KURL & dir ) m_iIconSize = m_defaultProps->iconSize(); m_iItemTextPos = m_defaultProps->itemTextPos(); d->sortcriterion = m_defaultProps->sortCriterion(); + d->textSortOrder = m_defaultProps->getSortOrder(); d->dirsfirst = m_defaultProps->isDirsFirst(); d->hiddenfirst = m_defaultProps->isHiddenFirst(); d->descending = m_defaultProps->isDescending(); @@ -220,12 +230,13 @@ bool KonqPropsView::enterDir( const KURL & dir ) if (dotDirExists) { //kdDebug(1203) << "Found .directory file" << endl; - KSimpleConfig * config = new KSimpleConfig( dotDirectory, true ); + TDESimpleConfig * config = new TDESimpleConfig( dotDirectory, true ); config->setGroup("URL properties"); m_iIconSize = config->readNumEntry( "IconSize", m_iIconSize ); m_iItemTextPos = config->readNumEntry( "ItemTextPos", m_iItemTextPos ); d->sortcriterion = config->readEntry( "SortingCriterion" , d->sortcriterion ); + d->textSortOrder = (TextSortOrder) config->readNumEntry( "TextSortOrder", d->textSortOrder ); d->dirsfirst = config->readBoolEntry( "SortDirsFirst", d->dirsfirst ); d->hiddenfirst = config->readBoolEntry( "SortHiddenFirst", d->hiddenfirst ); d->descending = config->readBoolEntry( "SortDescending", d->descending ); @@ -279,7 +290,7 @@ void KonqPropsView::setSaveViewPropertiesLocally( bool value ) //kdDebug(1203) << "KonqPropsView::setSaveViewPropertiesLocally " << value << endl; if ( m_bSaveViewPropertiesLocally ) - delete m_currentConfig; // points to a KSimpleConfig + delete m_currentConfig; // points to a TDESimpleConfig m_bSaveViewPropertiesLocally = value; m_currentConfig = 0L; // mark as dirty @@ -324,6 +335,20 @@ void KonqPropsView::setSortCriterion( const TQString &criterion ) } } +void KonqPropsView::setSortOrder( TextSortOrder order) +{ + d->textSortOrder = order; + if ( m_defaultProps && !m_bSaveViewPropertiesLocally ) { + m_defaultProps->setSortOrder( order ); + } + else if (currentConfig()) + { + TDEConfigGroupSaver cgs(currentConfig(), currentGroup()); + currentConfig()->writeEntry( "TextSortOrder", d->textSortOrder ); + currentConfig()->sync(); + } +} + void KonqPropsView::setDirsFirst( bool first) { d->dirsfirst = first; diff --git a/libkonq/konq_propsview.h b/libkonq/konq_propsview.h index 84ffcf029..fff534978 100644 --- a/libkonq/konq_propsview.h +++ b/libkonq/konq_propsview.h @@ -26,6 +26,8 @@ #include <kurl.h> #include <libkonq_export.h> +#include "konq_sort_constants.h" + class TDEInstance; class TDEConfigBase; class TDEConfig; @@ -34,7 +36,7 @@ class TDEConfig; * The class KonqPropsView holds the properties for a Konqueror View * * Separating them from the view class allows to store the default - * values (the one read from \<kinstance\>rc) in one instance of this class + * values (the one read from \<tdeinstance\>rc) in one instance of this class * and to have another instance of this class in each view, storing the * current values of the view. * @@ -68,7 +70,7 @@ public: * Called when entering a directory * Checks for a .directory, read it. * Don't do this on the default properties instance - * Returns TRUE if the settings for the new directories are + * Returns true if the settings for the new directories are * different from the settings in the old directory. */ bool enterDir( const KURL & dir ); @@ -90,6 +92,9 @@ public: void setSortCriterion( const TQString &criterion ); const TQString& sortCriterion() const; + void setSortOrder( TextSortOrder order); + TextSortOrder getSortOrder() const; + void setDirsFirst ( bool first ); bool isDirsFirst() const; @@ -167,7 +172,7 @@ private: // save-view-properties-locally mode, otherwise to the global config // It is set to 0L to mark it as "needs to be constructed". // This is to be used for SAVING only. - // Can be a TDEConfig or a KSimpleConfig + // Can be a TDEConfig or a TDESimpleConfig TDEConfigBase * m_currentConfig; // If this is not a "default properties" instance (but one used by a view) diff --git a/libkonq/konq_settings.cpp b/libkonq/konq_settings.cpp index 41460e8ae..3334a2eca 100644 --- a/libkonq/konq_settings.cpp +++ b/libkonq/konq_settings.cpp @@ -22,7 +22,7 @@ #include "tdeglobalsettings.h" #include <tdeglobal.h> #include <kservicetype.h> -#include <kdesktopfile.h> +#include <tdedesktopfile.h> #include <kdebug.h> #include <assert.h> #include <tqfontmetrics.h> @@ -109,7 +109,7 @@ void KonqFMSettings::init( TDEConfig * config ) m_iconTransparency = DEFAULT_TEXTPREVIEW_ICONTRANSPARENCY; // Behaviour - m_alwaysNewWin = config->readBoolEntry( "AlwaysNewWin", FALSE ); + m_alwaysNewWin = config->readBoolEntry( "AlwaysNewWin", false ); m_homeURL = config->readPathEntry("HomeURL", "~"); @@ -121,6 +121,8 @@ void KonqFMSettings::init( TDEConfig * config ) /// true if TQString::localeAwareCompare is case sensitive (it usually isn't, when LC_COLLATE is set) d->localeAwareCompareIsCaseSensitive = TQString( "a" ).localeAwareCompare( "B" ) > 0; // see #40131 + + m_doubleClickMoveToParent = config->readBoolEntry("DoubleClickMoveToParent", true); } bool KonqFMSettings::shouldEmbed( const TQString & serviceType ) const diff --git a/libkonq/konq_settings.h b/libkonq/konq_settings.h index daca8babe..52e9ac3b6 100644 --- a/libkonq/konq_settings.h +++ b/libkonq/konq_settings.h @@ -81,12 +81,13 @@ public: bool underlineLink() const { return m_underlineLink; } bool fileSizeInBytes() const { return m_fileSizeInBytes; } bool alwaysNewWin() const { return m_alwaysNewWin; } + bool doubleClickMoveToParent() const { return m_doubleClickMoveToParent; } const TQString & homeURL() const { return m_homeURL; } bool showFileTips() const {return m_showFileTips; } bool showPreviewsInFileTips() const; int numFileTips() const {return m_numFileTips; } - bool renameIconDirectly() const; + bool renameIconDirectly() const; // Font settings const TQFont& standardFont() const { return m_standardFont; } @@ -107,7 +108,7 @@ private: bool m_underlineLink; bool m_fileSizeInBytes; bool m_alwaysNewWin; - bool m_bTreeFollow; + bool m_doubleClickMoveToParent; TQMap<TQString, TQString> m_embedMap; diff --git a/libkonq/konq_sort_constants.h b/libkonq/konq_sort_constants.h new file mode 100644 index 000000000..f6c695b19 --- /dev/null +++ b/libkonq/konq_sort_constants.h @@ -0,0 +1,13 @@ +#ifndef KONQ_SORT_CONSTANTS_H +#define KONQ_SORT_CONSTANTS_H + +typedef unsigned short TextSortOrder; + // Can't use name 'SortOrder' because that's part of TQt + +enum { + UNICODE_UNMODIFIED = 0, + LOCALE_UNMODIFIED = 1, + UNICODE_CASEINSENSITIVE = 2, +} TextSortOrders; + +#endif // KONQ_SORT_CONSTANTS_H diff --git a/libkonq/konq_sound.cpp b/libkonq/konq_sound.cpp index b40c33858..a2357dd23 100644 --- a/libkonq/konq_sound.cpp +++ b/libkonq/konq_sound.cpp @@ -115,20 +115,20 @@ public: protected: virtual TQObject *createObject(TQObject * = 0, const char * = 0, - const char *className = TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList()); + const char *className = "TQObject", const TQStringList &args = TQStringList()); }; TQObject *KonqSoundFactory::createObject(TQObject *, const char *, const char *className, const TQStringList &) { if (qstrcmp(className, "KonqSoundPlayer") == 0) - return TQT_TQOBJECT(new KonqSoundPlayerImpl()); + return new KonqSoundPlayerImpl(); return 0; } extern "C" { - KDE_EXPORT KLibFactory *init_konq_sound() + TDE_EXPORT KLibFactory *init_konq_sound() { return new KonqSoundFactory(); } diff --git a/libkonq/konq_string_compare.h b/libkonq/konq_string_compare.h new file mode 100644 index 000000000..8d17d409f --- /dev/null +++ b/libkonq/konq_string_compare.h @@ -0,0 +1,51 @@ +#ifndef KONQ_STRING_COMPARE_H +#define KONQ_STRING_COMPARE_H + +#include "konq_sort_constants.h" + +static inline int stringCompare( + const TextSortOrder sortorder, + const TQString& a, + const TQString& b +) +{ + // Our caller probably determined sortorder from KonqPropsView::getSortOrder() + // but we have a reasonable fallback position for bogus values. + + switch(sortorder) { + + case UNICODE_UNMODIFIED: + /* + * Strictly character code(point) numeric comparison as defined + * by the Unicode Standard that is backward compatible with the + * the ASCII standard. + . */ + return a.compare( b ); + break; + + case UNICODE_CASEINSENSITIVE: + /* + * This is the traditional "case-insensitive" variation on character + * code order that ensures that ASCII lowercase and uppercase alphabetic + * characters are are grouped together instead of being separated by + * non-alphabetic ASCII characters [ \ ] ^ _ ` + */ + return a.lower().compare( b.lower() ); + break; + + case LOCALE_UNMODIFIED: + /* + * This is the pure locale-aware comparison as defined by ICU. + * Note: if LC_COLLATE == 'C' or 'Posix', this will produce same + * result as UNICODE_UNMODIFIED. + */ + return a.localeAwareCompare( b ); + break; + + default: // Treat as UNICODE_UNMODIFIED + return a.compare( b ); + break; + } +} + +#endif // KONQ_STRING_COMPARE_H diff --git a/libkonq/konq_undo.cpp b/libkonq/konq_undo.cpp index 51d85587d..4ecca65fa 100644 --- a/libkonq/konq_undo.cpp +++ b/libkonq/konq_undo.cpp @@ -93,14 +93,14 @@ KonqCommandRecorder::KonqCommandRecorder( KonqCommand::Type op, const KURL::List d->m_cmd.m_valid = true; d->m_cmd.m_src = src; d->m_cmd.m_dst = dst; - connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), - this, TQT_SLOT( slotResult( TDEIO::Job * ) ) ); + connect( job, TQ_SIGNAL( result( TDEIO::Job * ) ), + this, TQ_SLOT( slotResult( TDEIO::Job * ) ) ); if ( op != KonqCommand::MKDIR ) { - connect( job, TQT_SIGNAL( copyingDone( TDEIO::Job *, const KURL &, const KURL &, bool, bool ) ), - this, TQT_SLOT( slotCopyingDone( TDEIO::Job *, const KURL &, const KURL &, bool, bool ) ) ); - connect( job, TQT_SIGNAL( copyingLinkDone( TDEIO::Job *, const KURL &, const TQString &, const KURL & ) ), - this, TQT_SLOT( slotCopyingLinkDone( TDEIO::Job *, const KURL &, const TQString &, const KURL & ) ) ); + connect( job, TQ_SIGNAL( copyingDone( TDEIO::Job *, const KURL &, const KURL &, bool, bool ) ), + this, TQ_SLOT( slotCopyingDone( TDEIO::Job *, const KURL &, const KURL &, bool, bool ) ) ); + connect( job, TQ_SIGNAL( copyingLinkDone( TDEIO::Job *, const KURL &, const TQString &, const KURL & ) ), + this, TQ_SLOT( slotCopyingLinkDone( TDEIO::Job *, const KURL &, const TQString &, const KURL & ) ) ); } KonqUndoManager::incRef(); @@ -197,8 +197,8 @@ public: KonqUndoManager::KonqUndoManager() : DCOPObject( "KonqUndoManager" ) { - if ( !kapp->dcopClient()->isAttached() ) - kapp->dcopClient()->attach(); + if ( !tdeApp->dcopClient()->isAttached() ) + tdeApp->dcopClient()->attach(); d = new KonqUndoManagerPrivate; d->m_syncronized = initializeFromKDesky(); @@ -411,8 +411,8 @@ void KonqUndoManager::undoStep() undoRemovingDirectories(); if ( d->m_currentJob ) - connect( d->m_currentJob, TQT_SIGNAL( result( TDEIO::Job * ) ), - this, TQT_SLOT( slotResult( TDEIO::Job * ) ) ); + connect( d->m_currentJob, TQ_SIGNAL( result( TDEIO::Job * ) ), + this, TQ_SLOT( slotResult( TDEIO::Job * ) ) ); } void KonqUndoManager::undoMakingDirectories() @@ -625,7 +625,7 @@ bool KonqUndoManager::initializeFromKDesky() // ### FIXME: post 2.1 return false; - DCOPClient *client = kapp->dcopClient(); + DCOPClient *client = tdeApp->dcopClient(); if ( client->appId() == "kdesktop" ) // we are master :) return true; diff --git a/libkonq/konq_undo.h b/libkonq/konq_undo.h index fa908de67..17af645b5 100644 --- a/libkonq/konq_undo.h +++ b/libkonq/konq_undo.h @@ -70,7 +70,7 @@ struct KonqCommand class KonqCommandRecorder : public TQObject { - Q_OBJECT + TQ_OBJECT public: KonqCommandRecorder( KonqCommand::Type op, const KURL::List &src, const KURL &dst, TDEIO::Job *job ); virtual ~KonqCommandRecorder(); @@ -88,7 +88,7 @@ private: class LIBKONQ_EXPORT KonqUndoManager : public TQObject, public DCOPObject { - Q_OBJECT + TQ_OBJECT K_DCOP friend class KonqUndoJob; public: diff --git a/libkonq/konq_xmlguiclient.cpp b/libkonq/konq_xmlguiclient.cpp index a12d237c6..2352498c1 100644 --- a/libkonq/konq_xmlguiclient.cpp +++ b/libkonq/konq_xmlguiclient.cpp @@ -79,7 +79,7 @@ void KonqXMLGUIClient::addAction( const char *name, const TQDomElement &menu ) { static const TQString& tagAction = TDEGlobal::staticQString( "action" ); - if (!kapp->authorizeTDEAction(name)) + if (!tdeApp->authorizeTDEAction(name)) return; handlePendingSeparator(); diff --git a/libkonq/konqbookmarkmanager.h b/libkonq/konqbookmarkmanager.h index 88ff45ced..d2173cd03 100644 --- a/libkonq/konqbookmarkmanager.h +++ b/libkonq/konqbookmarkmanager.h @@ -2,7 +2,7 @@ #define KONQBOOKMARKMANAGER_H #include <kbookmarkmanager.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kurl.h> #include <tdeio/job.h> #include <libkonq_export.h> @@ -22,7 +22,7 @@ public: { TDEIO::file_copy(KURL::fromPathOrURL(globalBookmarkFile), KURL::fromPathOrURL(bookmarksFile)); - kapp->processEvents(3000); // Allows up to 3 seconds to copy the file + tdeApp->processEvents(3000); // Allows up to 3 seconds to copy the file } s_bookmarkManager = KBookmarkManager::managerForFile( bookmarksFile ); } diff --git a/libkonq/libkonq_export.h b/libkonq/libkonq_export.h index 4e10a4ec0..f1fe245a7 100644 --- a/libkonq/libkonq_export.h +++ b/libkonq/libkonq_export.h @@ -21,18 +21,18 @@ #ifndef LIBKONQ_EXPORT_H #define LIBKONQ_EXPORT_H -/* needed for KDE_EXPORT macros */ -#include <kdemacros.h> +/* needed for TDE_EXPORT macros */ +#include <tdemacros.h> /* needed, because e.g. Q_OS_UNIX is so frequently used */ #include <tqglobal.h> -#ifdef Q_WS_WIN +#ifdef TQ_WS_WIN #else /* Q_OS_UNIX */ /* export statements for unix */ -#define LIBKONQ_EXPORT KDE_EXPORT +#define LIBKONQ_EXPORT TDE_EXPORT #endif diff --git a/libkonq/tdefileivi.cpp b/libkonq/tdefileivi.cpp index ad2d743a1..02fa748ca 100644 --- a/libkonq/tdefileivi.cpp +++ b/libkonq/tdefileivi.cpp @@ -33,7 +33,7 @@ #include <krun.h> #include <kservice.h> #include <kmimetype.h> // for KDEDesktopMimeType -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #undef Bool @@ -437,7 +437,7 @@ void KFileIVI::paintItem( TQPainter *p, const TQColorGroup &c ) /*if ( ( ( KonqIconViewWidget* ) iconView() )->m_pActiveItem == this ) { TQFont f( p->font() ); - f.setUnderline( TRUE ); + f.setUnderline( true ); p->setFont( f ); }*/ @@ -510,7 +510,7 @@ void KFileIVI::paintFontUpdate( TQPainter *p ) const if ( m_fileitem->isLink() ) { TQFont f( p->font() ); - f.setItalic( TRUE ); + f.setItalic( true ); p->setFont( f ); } } diff --git a/libkonq/tdefileivi.h b/libkonq/tdefileivi.h index 3fb7e3734..7ddb2deb7 100644 --- a/libkonq/tdefileivi.h +++ b/libkonq/tdefileivi.h @@ -237,7 +237,7 @@ private: /** You are not supposed to call this on a KFileIVI, from the outside, * it bypasses the icons cache */ virtual void setPixmap ( const TQPixmap & icon ) { TDEIconViewItem::setPixmap( icon ); } - virtual void setPixmap ( const TQPixmap & icon, bool recalc, bool redraw = TRUE ) + virtual void setPixmap ( const TQPixmap & icon, bool recalc, bool redraw = true ) { TDEIconViewItem::setPixmap( icon, recalc, redraw ); } /** Check if a thumbnail will be generated and calc the size of the icon */ |