From a2277b6bc715464e83882b90c2a058139b8a6b54 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 23 Jun 2011 01:42:07 +0000 Subject: TQt4 port kdeutils This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1238125 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- ark/ace.cpp | 4 +-- ark/ace.h | 1 + ark/addition.ui | 16 ++++----- ark/ar.cpp | 2 +- ark/ar.h | 1 + ark/arch.cpp | 40 ++++++++++----------- ark/arch.h | 37 +++++++++---------- ark/archiveformatdlg.cpp | 10 +++--- ark/archiveformatdlg.h | 3 +- ark/archiveformatinfo.cpp | 22 ++++++------ ark/archiveformatinfo.h | 2 +- ark/ark_part.cpp | 50 +++++++++++++------------- ark/ark_part.h | 9 +++-- ark/arkapp.cpp | 6 ++-- ark/arkapp.h | 3 +- ark/arkfactory.cpp | 6 ++-- ark/arkfactory.h | 4 +-- ark/arkutils.cpp | 8 ++--- ark/arkviewer.cpp | 14 ++++---- ark/arkviewer.h | 3 +- ark/arkwidget.cpp | 90 +++++++++++++++++++++++------------------------ ark/arkwidget.h | 11 +++--- ark/compressedfile.cpp | 16 ++++----- ark/compressedfile.h | 1 + ark/extraction.ui | 16 ++++----- ark/extractiondialog.cpp | 22 ++++++------ ark/extractiondialog.h | 5 +-- ark/filelistview.cpp | 80 ++++++++++++++++++++--------------------- ark/filelistview.h | 7 ++-- ark/general.ui | 18 +++++----- ark/lha.cpp | 8 ++--- ark/lha.h | 1 + ark/mainwindow.cpp | 38 ++++++++++---------- ark/mainwindow.h | 11 +++--- ark/rar.cpp | 8 ++--- ark/rar.h | 1 + ark/searchbar.cpp | 8 ++--- ark/searchbar.h | 3 +- ark/sevenzip.cpp | 18 +++++----- ark/sevenzip.h | 1 + ark/tar.cpp | 18 +++++----- ark/tar.h | 1 + ark/tarlistingthread.cpp | 12 +++---- ark/tarlistingthread.h | 14 ++++---- ark/zip.cpp | 6 ++-- ark/zip.h | 1 + ark/zoo.cpp | 6 ++-- ark/zoo.h | 1 + 48 files changed, 342 insertions(+), 321 deletions(-) (limited to 'ark') diff --git a/ark/ace.cpp b/ark/ace.cpp index 0c8fb14..4ce0709 100644 --- a/ark/ace.cpp +++ b/ark/ace.cpp @@ -102,7 +102,7 @@ void AceArch::open() if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { KMessageBox::error( 0, i18n( "Could not start a subprocess." ) ); - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); } } @@ -174,7 +174,7 @@ void AceArch::unarchFileInternal( ) void AceArch::catchMeIfYouCan( KProcess*, char *buffer, int buflen ) { - TQString myBuf = TQString::fromLatin1( buffer, buflen ); + TQString myBuf = TQString::tqfromLatin1( buffer, buflen ); kdDebug(1601) << " Wololo!: " << myBuf << endl; } diff --git a/ark/ace.h b/ark/ace.h index 0f22fb1..2492961 100644 --- a/ark/ace.h +++ b/ark/ace.h @@ -32,6 +32,7 @@ class KProcess; // TODO: Remove me! class AceArch : public Arch { Q_OBJECT + TQ_OBJECT public: AceArch( ArkWidget *, const TQString & ); virtual ~AceArch(); diff --git a/ark/addition.ui b/ark/addition.ui index a8f51d8..8098325 100644 --- a/ark/addition.ui +++ b/ark/addition.ui @@ -1,6 +1,6 @@ Addition - + Addition @@ -16,7 +16,7 @@ unnamed - + kcfg_replaceOnlyWithNewer @@ -24,7 +24,7 @@ Replace old files only &with newer files - + kcfg_forceMSDOS @@ -32,7 +32,7 @@ Force &MS-DOS short filenames (Zip) - + kcfg_convertLF2CRLF @@ -40,7 +40,7 @@ Translate &LF to DOS CRLF (Zip) - + kcfg_rarStoreSymlinks @@ -48,7 +48,7 @@ &Store symlinks as links (Zip, Rar) - + kcfg_rarRecurseSubdirs @@ -66,7 +66,7 @@ Expanding - + 20 51 @@ -75,5 +75,5 @@ - + diff --git a/ark/ar.cpp b/ark/ar.cpp index d71a2a0..3456f81 100644 --- a/ark/ar.cpp +++ b/ark/ar.cpp @@ -100,7 +100,7 @@ void ArArch::open() if (kp->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false) { KMessageBox::error( 0, i18n("Could not start a subprocess.") ); - emit sigOpen(this, false, TQString::null, 0 ); + emit sigOpen(this, false, TQString(), 0 ); } kdDebug(1601) << "-ArArch::open" << endl; } diff --git a/ark/ar.h b/ark/ar.h index 39b2ba3..ccc7172 100644 --- a/ark/ar.h +++ b/ark/ar.h @@ -40,6 +40,7 @@ class ArkWidget; class ArArch : public Arch { Q_OBJECT + TQ_OBJECT public: ArArch( ArkWidget *_gui, const TQString & _fileName ); diff --git a/ark/arch.cpp b/ark/arch.cpp index a08484c..336fe59 100644 --- a/ark/arch.cpp +++ b/ark/arch.cpp @@ -118,7 +118,7 @@ void Arch::slotOpenExited( KProcess* _kp ) return; } m_password = ""; - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); delete _kp; _kp = m_currentProcess = 0; return; @@ -140,7 +140,7 @@ void Arch::slotOpenExited( KProcess* _kp ) emit sigOpen( this, true, m_filename, Arch::Extract | Arch::Delete | Arch::Add | Arch::View ); else - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); delete _kp; _kp = m_currentProcess = 0; @@ -206,7 +206,7 @@ void Arch::slotExtractExited( KProcess *_kp ) if ( !getLastShellOutput().isNull() ) { - //getLastShellOutput() is a TQString. errorList is expecting QStringLists to show in multiple lines + //getLastShellOutput() is a TQString. errorList is expecting TQStringLists to show in multiple lines TQStringList list = TQStringList::split( "\n", getLastShellOutput() ); KMessageBox::errorList( m_gui, msg, list ); clearShellOutput(); @@ -297,7 +297,7 @@ void Arch::slotReceivedTOC( KProcess*, char* data, int length ) { processLine( m_buffer ); } - else if ( m_buffer.find( m_headerString ) == -1 ) + else if ( m_buffer.tqfind( m_headerString.data() ) == -1 ) { if ( m_header_removed && !m_finished ) { @@ -365,13 +365,13 @@ bool Arch::processLine( const TQCString &line ) : columns[ m_fixYear ]; TQString month = ( m_repairMonth >= 0 ) ? TQString( "%1" ) - .arg( ArkUtils::getMonth( columns[ m_repairMonth ].ascii() ) ) + .tqarg( ArkUtils::getMonth( columns[ m_repairMonth ].ascii() ) ) : columns[ m_fixMonth ]; - TQString timestamp = TQString::fromLatin1( "%1-%2-%3 %4" ) - .arg( year ) - .arg( month ) - .arg( columns[ m_fixDay ] ) - .arg( columns[ m_fixTime ] ); + TQString timestamp = TQString::tqfromLatin1( "%1-%2-%3 %4" ) + .tqarg( year ) + .tqarg( month ) + .tqarg( columns[ m_fixDay ] ) + .tqarg( columns[ m_fixTime ] ); columns[ m_dateCol ] = timestamp; } @@ -390,37 +390,37 @@ bool Arch::processLine( const TQCString &line ) Arch *Arch::archFactory( ArchType aType, - ArkWidget *parent, const TQString &filename, + ArkWidget *tqparent, const TQString &filename, const TQString &openAsMimeType ) { switch( aType ) { case TAR_FORMAT: - return new TarArch( parent, filename, openAsMimeType ); + return new TarArch( tqparent, filename, openAsMimeType ); case ZIP_FORMAT: - return new ZipArch( parent, filename ); + return new ZipArch( tqparent, filename ); case LHA_FORMAT: - return new LhaArch( parent, filename ); + return new LhaArch( tqparent, filename ); case COMPRESSED_FORMAT: - return new CompressedFile( parent, filename, openAsMimeType ); + return new CompressedFile( tqparent, filename, openAsMimeType ); case ZOO_FORMAT: - return new ZooArch( parent, filename ); + return new ZooArch( tqparent, filename ); case RAR_FORMAT: - return new RarArch( parent, filename ); + return new RarArch( tqparent, filename ); case AA_FORMAT: - return new ArArch( parent, filename ); + return new ArArch( tqparent, filename ); case SEVENZIP_FORMAT: - return new SevenZipArch( parent, filename ); + return new SevenZipArch( tqparent, filename ); case ACE_FORMAT: - return new AceArch( parent, filename ); + return new AceArch( tqparent, filename ); case UNKNOWN_FORMAT: default: diff --git a/ark/arch.h b/ark/arch.h index de04260..05642fc 100644 --- a/ark/arch.h +++ b/ark/arch.h @@ -67,15 +67,16 @@ enum ArchType { UNKNOWN_FORMAT, ZIP_FORMAT, TAR_FORMAT, AA_FORMAT, LHA_FORMAT, RAR_FORMAT, ZOO_FORMAT, COMPRESSED_FORMAT, SEVENZIP_FORMAT, ACE_FORMAT }; -typedef TQValueList< QPair< TQString, Qt::AlignmentFlags > > ColumnList; +typedef TQValueList< TQPair< TQString, TQt::AlignmentFlags > > ColumnList; /** * Pure virtual base class for archives - provides a framework as well as * useful common functionality. */ -class Arch : public QObject +class Arch : public TQObject { Q_OBJECT + TQ_OBJECT protected: /** @@ -128,7 +129,7 @@ class Arch : public QObject // check to see if the utility exists in the PATH of the user void verifyUtilityIsAvailable( const TQString &, - const TQString & = TQString::null ); + const TQString & = TQString() ); void verifyCompressUtilityIsAvailable( const TQString &utility ); @@ -146,9 +147,9 @@ class Arch : public QObject void clearShellOutput() { m_lastShellOutput.truncate( 0 ); } const TQString& getLastShellOutput() const { return m_lastShellOutput; } - static Arch *archFactory( ArchType aType, ArkWidget *parent, + static Arch *archFactory( ArchType aType, ArkWidget *tqparent, const TQString &filename, - const TQString &openAsMimeType = TQString::null ); + const TQString &openAsMimeType = TQString() ); protected slots: void slotOpenExited( KProcess* ); @@ -204,18 +205,18 @@ class Arch : public QObject // Columns // don't forget to change common_texts.cpp if you change something here -#define FILENAME_COLUMN qMakePair( i18n(" Filename "), Qt::AlignLeft ) -#define PERMISSION_COLUMN qMakePair( i18n(" Permissions "), Qt::AlignLeft ) -#define OWNER_GROUP_COLUMN qMakePair( i18n(" Owner/Group "), Qt::AlignLeft ) -#define SIZE_COLUMN qMakePair( i18n(" Size "), Qt::AlignRight ) -#define TIMESTAMP_COLUMN qMakePair( i18n(" Timestamp "), Qt::AlignRight ) -#define LINK_COLUMN qMakePair( i18n(" Link "), Qt::AlignLeft ) -#define PACKED_COLUMN qMakePair( i18n(" Size Now "), Qt::AlignRight ) -#define RATIO_COLUMN qMakePair( i18n(" Ratio "), Qt::AlignRight ) -#define CRC_COLUMN qMakePair( i18n("Cyclic Redundancy Check"," CRC "), Qt::AlignLeft ) -#define METHOD_COLUMN qMakePair( i18n(" Method "), Qt::AlignLeft ) -#define VERSION_COLUMN qMakePair( i18n(" Version "), Qt::AlignLeft ) -#define OWNER_COLUMN qMakePair( i18n(" Owner "), Qt::AlignLeft ) -#define GROUP_COLUMN qMakePair( i18n(" Group "), Qt::AlignLeft ) +#define FILENAME_COLUMN tqMakePair( i18n(" Filename "), TQt::AlignLeft ) +#define PERMISSION_COLUMN tqMakePair( i18n(" Permissions "), TQt::AlignLeft ) +#define OWNER_GROUP_COLUMN tqMakePair( i18n(" Owner/Group "), TQt::AlignLeft ) +#define SIZE_COLUMN tqMakePair( i18n(" Size "), TQt::AlignRight ) +#define TIMESTAMP_COLUMN tqMakePair( i18n(" Timestamp "), TQt::AlignRight ) +#define LINK_COLUMN tqMakePair( i18n(" Link "), TQt::AlignLeft ) +#define PACKED_COLUMN tqMakePair( i18n(" Size Now "), TQt::AlignRight ) +#define RATIO_COLUMN tqMakePair( i18n(" Ratio "), TQt::AlignRight ) +#define CRC_COLUMN tqMakePair( i18n("Cyclic Redundancy Check"," CRC "), TQt::AlignLeft ) +#define METHOD_COLUMN tqMakePair( i18n(" Method "), TQt::AlignLeft ) +#define VERSION_COLUMN tqMakePair( i18n(" Version "), TQt::AlignLeft ) +#define OWNER_COLUMN tqMakePair( i18n(" Owner "), TQt::AlignLeft ) +#define GROUP_COLUMN tqMakePair( i18n(" Group "), TQt::AlignLeft ) #endif /* ARCH_H */ diff --git a/ark/archiveformatdlg.cpp b/ark/archiveformatdlg.cpp index 5ac942c..f9ac931 100644 --- a/ark/archiveformatdlg.cpp +++ b/ark/archiveformatdlg.cpp @@ -28,8 +28,8 @@ #include #include -ArchiveFormatDlg::ArchiveFormatDlg( TQWidget * parent, const TQString & defaultType ) - :KDialogBase( parent, "archiveformatdialog", true, +ArchiveFormatDlg::ArchiveFormatDlg( TQWidget * tqparent, const TQString & defaultType ) + :KDialogBase( tqparent, "archiveformatdialog", true, i18n( "Choose Archive Format" ), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok), m_combo( 0 ) @@ -40,12 +40,12 @@ ArchiveFormatDlg::ArchiveFormatDlg( TQWidget * parent, const TQString & defaultT text = i18n( "This file appears to be of type %1,\n" "which is not a supported archive format.\n" "In order to proceed, please choose the format\n" - "of the file." ).arg( defaultType ); + "of the file." ).tqarg( defaultType ); else text = i18n( "You are about to open a file that has a non-standard extension.\n" "Ark has detected the format: %1\n" "If this is not correct, please choose " - "the appropriate format." ).arg( defaultDescription ); + "the appropriate format." ).tqarg( defaultDescription ); TQVBox * page = makeVBoxMainWidget(); @@ -56,7 +56,7 @@ ArchiveFormatDlg::ArchiveFormatDlg( TQWidget * parent, const TQString & defaultT TQStringList list = ArchiveFormatInfo::self()->allDescriptions(); list.sort(); m_combo->insertStringList( list ); - m_combo->setCurrentItem( list.findIndex( defaultDescription ) ); + m_combo->setCurrentItem( list.tqfindIndex( defaultDescription ) ); } TQString ArchiveFormatDlg::mimeType() diff --git a/ark/archiveformatdlg.h b/ark/archiveformatdlg.h index 6ef2302..1a1cefa 100644 --- a/ark/archiveformatdlg.h +++ b/ark/archiveformatdlg.h @@ -28,8 +28,9 @@ class ArchiveFormatDlg: public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ArchiveFormatDlg( TQWidget * parent, const TQString & defaultType ); + ArchiveFormatDlg( TQWidget * tqparent, const TQString & defaultType ); TQString mimeType(); private: diff --git a/ark/archiveformatinfo.cpp b/ark/archiveformatinfo.cpp index 01b84fc..ea07d6a 100644 --- a/ark/archiveformatinfo.cpp +++ b/ark/archiveformatinfo.cpp @@ -72,7 +72,7 @@ void ArchiveFormatInfo::buildFormatInfos() addFormatInfo( COMPRESSED_FORMAT, "application/x-xz", ".xz" ); addFormatInfo( COMPRESSED_FORMAT, "application/x-lzop", ".lzo" ); addFormatInfo( COMPRESSED_FORMAT, "application/x-compress", ".Z" ); - find( COMPRESSED_FORMAT ).description = i18n( "Compressed File" ); + tqfind( COMPRESSED_FORMAT ).description = i18n( "Compressed File" ); addFormatInfo( ZOO_FORMAT, "application/x-zoo", ".zoo" ); @@ -90,7 +90,7 @@ void ArchiveFormatInfo::buildFormatInfos() void ArchiveFormatInfo::addFormatInfo( ArchType type, TQString mime, TQString stdExt ) { - FormatInfo & info = find( type ); + FormatInfo & info = tqfind( type ); KDesktopFile * desktopFile = new KDesktopFile( mime + ".desktop", true, "mime" ); if( !desktopFile ) @@ -146,7 +146,7 @@ TQStringList ArchiveFormatInfo::allDescriptions() return descriptions; } -ArchiveFormatInfo::FormatInfo & ArchiveFormatInfo::find( ArchType type ) +ArchiveFormatInfo::FormatInfo & ArchiveFormatInfo::tqfind( ArchType type ) { InfoList::Iterator it = m_formatInfos.begin(); for( ; it != m_formatInfos.end(); ++it ) @@ -177,7 +177,7 @@ ArchType ArchiveFormatInfo::archTypeForMimeType( const TQString & mimeType ) InfoList::Iterator it = m_formatInfos.begin(); for( ; it != m_formatInfos.end(); ++it ) { - int index = (*it).mimeTypes.findIndex( mimeType ); + int index = (*it).mimeTypes.tqfindIndex( mimeType ); if( index != -1 ) return (*it).type; } @@ -223,7 +223,7 @@ TQString ArchiveFormatInfo::findMimeType( const KURL & url ) char buffer[ 0x200 ]; dev->open( IO_ReadOnly ); - Q_LONG n = dev->readBlock( buffer, 0x200 ); + TQ_LONG n = dev->readBlock( buffer, 0x200 ); delete dev; if ( n == 0x200 && buffer[0] != 0 && !strncmp(buffer + 257, "ustar", 5) ) @@ -243,11 +243,11 @@ TQString ArchiveFormatInfo::mimeTypeForDescription( const TQString & description int index; for( ; it != m_formatInfos.end(); ++it ) { - index = (*it).allDescriptions.findIndex( description ); + index = (*it).allDescriptions.tqfindIndex( description ); if ( index != -1 ) return (* (*it).mimeTypes.at( index ) ); } - return TQString::null; + return TQString(); } TQString ArchiveFormatInfo::descriptionForMimeType( const TQString & mimeType ) @@ -256,11 +256,11 @@ TQString ArchiveFormatInfo::descriptionForMimeType( const TQString & mimeType ) int index; for( ; it != m_formatInfos.end(); ++it ) { - index = (*it).mimeTypes.findIndex( mimeType ); + index = (*it).mimeTypes.tqfindIndex( mimeType ); if ( index != -1 ) return (* (*it).allDescriptions.at( index ) ); } - return TQString::null; + return TQString(); } TQString ArchiveFormatInfo::defaultExtension( const TQString & mimeType ) @@ -269,11 +269,11 @@ TQString ArchiveFormatInfo::defaultExtension( const TQString & mimeType ) int index; for( ; it != m_formatInfos.end(); ++it ) { - index = (*it).mimeTypes.findIndex( mimeType ); + index = (*it).mimeTypes.tqfindIndex( mimeType ); if ( index != -1 ) return (* (*it).defaultExtensions.at( index ) ); } - return TQString::null; + return TQString(); } bool ArchiveFormatInfo::wasUnknownExtension() diff --git a/ark/archiveformatinfo.h b/ark/archiveformatinfo.h index 5ba5ef3..e1c987d 100644 --- a/ark/archiveformatinfo.h +++ b/ark/archiveformatinfo.h @@ -59,7 +59,7 @@ private: enum ArchType type; }; - FormatInfo & find ( ArchType type ); + FormatInfo & tqfind ( ArchType type ); typedef TQValueList InfoList; InfoList m_formatInfos; diff --git a/ark/ark_part.cpp b/ark/ark_part.cpp index 60e7ff0..62aa81e 100644 --- a/ark/ark_part.cpp +++ b/ark/ark_part.cpp @@ -63,13 +63,13 @@ KAboutData *ArkPart::createAboutData() -ArkPart::ArkPart( TQWidget *parentWidget, const char * /*widgetName*/, TQObject *parent, +ArkPart::ArkPart( TQWidget *tqparentWidget, const char * /*widgetName*/, TQObject *tqparent, const char *name, const TQStringList &, bool readWrite ) - : KParts::ReadWritePart(parent, name) + : KParts::ReadWritePart(tqparent, name) { kdDebug(1601)<<"ArkPart::ArkPart"<fileList(), TQT_SLOT(selectAll()), actionCollection(), "select_all"); + selectAllAction = KStdAction::selectAll(TQT_TQOBJECT(awidget->fileList()), TQT_SLOT(selectAll()), actionCollection(), "select_all"); - deselectAllAction = new KAction(i18n("&Unselect All"), 0, awidget->fileList(), TQT_SLOT(unselectAll()), actionCollection(), "deselect_all"); + deselectAllAction = new KAction(i18n("&Unselect All"), 0, TQT_TQOBJECT(awidget->fileList()),TQT_SLOT(unselectAll()), actionCollection(), "deselect_all"); - invertSelectionAction = new KAction(i18n("&Invert Selection"), 0, awidget->fileList(), TQT_SLOT(invertSelection()), actionCollection(), "invert_selection"); + invertSelectionAction = new KAction(i18n("&Invert Selection"), 0, TQT_TQOBJECT(awidget->fileList()),TQT_SLOT(invertSelection()), actionCollection(), "invert_selection"); saveAsAction = KStdAction::saveAs(this, TQT_SLOT(file_save_as()), actionCollection()); //KStdAction::preferences(awidget, TQT_SLOT(showSettings()), actionCollection()); - ( void ) new KAction( i18n( "Configure &Ark..." ), "configure" , 0, awidget, + ( void ) new KAction( i18n( "Configure &Ark..." ), "configure" , 0, TQT_TQOBJECT(awidget), TQT_SLOT( showSettings() ), actionCollection(), "options_configure_ark" ); @@ -158,7 +158,7 @@ ArkPart::setupActions() showSearchBar->setChecked( ArkSettings::showSearchBar() ); - connect( showSearchBar, TQT_SIGNAL( toggled( bool ) ), awidget, TQT_SLOT( slotShowSearchBarToggled( bool ) ) ); + connect( showSearchBar, TQT_SIGNAL( toggled( bool ) ), TQT_TQOBJECT(awidget), TQT_SLOT( slotShowSearchBarToggled( bool ) ) ); initialEnables(); } @@ -249,7 +249,7 @@ bool ArkPart::openFile() url.setPath( m_file ); if( !TQFile::exists( m_file ) ) { - emit setWindowCaption( TQString::null ); + emit setWindowCaption( TQString() ); emit removeRecentURL( awidget->realURL() ); return false; } @@ -294,7 +294,7 @@ bool ArkPart::closeURL() int res = KMessageBox::warningYesNoCancel( widget(), i18n( "The archive \"%1\" has been modified.\n" - "Do you want to save it?" ).arg( docName ), + "Do you want to save it?" ).tqarg( docName ), i18n( "Save Archive?" ), KStdGuiItem::save(), KStdGuiItem::discard() ); switch ( res ) @@ -320,7 +320,7 @@ void ArkPart::transferStarted( KIO::Job *job ) { m_job = job; - m_bar->slotSetBusy( i18n( "Downloading %1..." ).arg( m_url.prettyURL() ), + m_bar->slotSetBusy( i18n( "Downloading %1..." ).tqarg( m_url.prettyURL() ), (job != 0), (job != 0) ); if ( job ) @@ -372,8 +372,8 @@ void ArkPart::cancelTransfer() } } -ArkBrowserExtension::ArkBrowserExtension( KParts::ReadOnlyPart * parent, const char * name ) - : KParts::BrowserExtension( parent, name ) +ArkBrowserExtension::ArkBrowserExtension( KParts::ReadOnlyPart * tqparent, const char * name ) + : KParts::BrowserExtension( tqparent, name ) { } @@ -382,8 +382,8 @@ void ArkBrowserExtension::slotOpenURLRequested( const KURL & url ) emit openURLRequest( url, KParts::URLArgs() ); } -ArkStatusBarExtension::ArkStatusBarExtension( KParts::ReadWritePart * parent ) - : KParts::StatusBarExtension( parent ), +ArkStatusBarExtension::ArkStatusBarExtension( KParts::ReadWritePart * tqparent ) + : KParts::StatusBarExtension( tqparent ), m_bBusy( false ), m_pStatusLabelSelect( 0 ), m_pStatusLabelTotal( 0 ), @@ -411,12 +411,12 @@ void ArkStatusBarExtension::setupStatusBar() m_pStatusLabelTotal = new KSqueezedTextLabel( statusBar(), "StatusLabelTotal" ); m_pStatusLabelTotal->setFrameStyle( TQFrame::NoFrame ); - m_pStatusLabelTotal->setAlignment( AlignRight ); + m_pStatusLabelTotal->tqsetAlignment( AlignRight ); m_pStatusLabelTotal->setText( i18n( "Total: 0 files" ) ); m_pStatusLabelSelect = new TQLabel( statusBar(), "StatusLabelSelect" ); m_pStatusLabelSelect->setFrameStyle( TQFrame::NoFrame ); - m_pStatusLabelSelect->setAlignment( AlignLeft ); + m_pStatusLabelSelect->tqsetAlignment( AlignLeft ); m_pStatusLabelSelect->setText(i18n( "0 files selected" ) ); m_cancelButton = new KPushButton( SmallIcon( "cancel" ), TQString(), statusBar(), "CancelButton" ); @@ -454,7 +454,7 @@ void ArkStatusBarExtension::slotSetBusy( const TQString & text, bool showCancelB { m_pBusyText = new TQLabel( statusBar() ); - m_pBusyText->setAlignment( AlignLeft ); + m_pBusyText->tqsetAlignment( AlignLeft ); m_pBusyText->setFrameStyle( TQFrame::Panel | TQFrame::Raised ); } diff --git a/ark/ark_part.h b/ark/ark_part.h index 2be1bd8..816ee6c 100644 --- a/ark/ark_part.h +++ b/ark/ark_part.h @@ -46,8 +46,9 @@ namespace KIO class ArkBrowserExtension: public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT public: - ArkBrowserExtension( KParts::ReadOnlyPart * parent, const char * name = 0L ); + ArkBrowserExtension( KParts::ReadOnlyPart * tqparent, const char * name = 0L ); public slots: void slotOpenURLRequested( const KURL & url ); }; @@ -55,8 +56,9 @@ public slots: class ArkStatusBarExtension: public KParts::StatusBarExtension { Q_OBJECT + TQ_OBJECT public: - ArkStatusBarExtension( KParts::ReadWritePart * parent ); + ArkStatusBarExtension( KParts::ReadWritePart * tqparent ); ~ArkStatusBarExtension(); void setProgress( unsigned long progress ); @@ -86,8 +88,9 @@ private: class ArkPart: public KParts::ReadWritePart { Q_OBJECT + TQ_OBJECT public: - ArkPart( TQWidget *parentWidget, const char *widgetName, TQObject *parent, + ArkPart( TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name, const TQStringList &, bool readWrite ); virtual ~ArkPart(); diff --git a/ark/arkapp.cpp b/ark/arkapp.cpp index c4604e6..3085399 100644 --- a/ark/arkapp.cpp +++ b/ark/arkapp.cpp @@ -85,7 +85,7 @@ static TQString resolveFilename(const TQString & _arkname) if (name.at(0) != '/') { // copy the path from _arkname - int index = _arkname.findRev('/'); + int index = _arkname.tqfindRev('/'); name = _arkname.left(index + 1) + name; } kdDebug(1601) << "Now resolve " << name << endl; @@ -243,7 +243,7 @@ ArkApplication::addOpenArk(const KURL & _arkname, MainWindow *_ptr) else realName = _arkname.prettyURL(); openArksList.append(realName); - m_windowsHash.replace(realName, _ptr); + m_windowsHash.tqreplace(realName, _ptr); kdDebug(1601) << "Saved ptr " << _ptr << " added open ark: " << realName << endl; } @@ -287,7 +287,7 @@ ArkApplication::isArkOpenAlready(const KURL & _arkname) realName = resolveFilename(_arkname.path()); // follow symlink else realName = _arkname.prettyURL(); - return ( openArksList.findIndex(realName) != -1 ); + return ( openArksList.tqfindIndex(realName) != -1 ); } #include "arkapp.moc" diff --git a/ark/arkapp.h b/ark/arkapp.h index 197b241..71cd573 100644 --- a/ark/arkapp.h +++ b/ark/arkapp.h @@ -52,6 +52,7 @@ class EqualKey class ArkApplication : public KUniqueApplication { Q_OBJECT + TQ_OBJECT public: virtual int newInstance(); virtual ~ArkApplication() {} @@ -78,7 +79,7 @@ class ArkApplication : public KUniqueApplication ArkApplication(); private: - TQWidget *m_mainwidget; // to be the parent of all ArkWidgets + TQWidget *m_mainwidget; // to be the tqparent of all ArkWidgets int m_windowCount; TQStringList openArksList; diff --git a/ark/arkfactory.cpp b/ark/arkfactory.cpp index 3e17e7a..d5dfba6 100644 --- a/ark/arkfactory.cpp +++ b/ark/arkfactory.cpp @@ -38,8 +38,8 @@ ArkFactory::~ArkFactory() s_instance = 0L; } -KParts::Part * ArkFactory::createPartObject( TQWidget *parentWidget, - const char *widgetName, TQObject *parent, +KParts::Part * ArkFactory::createPartObject( TQWidget *tqparentWidget, + const char *widgetName, TQObject *tqparent, const char *name, const char *classname, const TQStringList &args ) { @@ -49,7 +49,7 @@ KParts::Part * ArkFactory::createPartObject( TQWidget *parentWidget, { readWrite = true; } - ArkPart* obj = new ArkPart( parentWidget, widgetName, parent, name, + ArkPart* obj = new ArkPart( tqparentWidget, widgetName, tqparent, name, args, readWrite ); //kdDebug( 1601 ) << "classname is: " << TQCString( classname ) << endl; return obj; diff --git a/ark/arkfactory.h b/ark/arkfactory.h index 2b5514b..57bc105 100644 --- a/ark/arkfactory.h +++ b/ark/arkfactory.h @@ -29,8 +29,8 @@ public: ArkFactory() : KParts::Factory() {} virtual ~ArkFactory(); virtual KParts::Part *createPartObject( - TQWidget *parentWidget = 0,const char *widgetName = 0, - TQObject *parent = 0, const char *name = 0, + TQWidget *tqparentWidget = 0,const char *widgetName = 0, + TQObject *tqparent = 0, const char *name = 0, const char *classname = "KParts::Part", const TQStringList &args = TQStringList() ); static KInstance* instance(); diff --git a/ark/arkutils.cpp b/ark/arkutils.cpp index bfe496c..94b5bc1 100644 --- a/ark/arkutils.cpp +++ b/ark/arkutils.cpp @@ -69,7 +69,7 @@ #include #include -// Qt includes +// TQt includes #include #include "arkutils.h" @@ -101,7 +101,7 @@ TQString ArkUtils::getTimeStamp(const TQString &_month, TQString year, timestamp; - if (_yearOrTime.contains(":")) + if (_yearOrTime.tqcontains(":")) // it has a timestamp so we have to figure out the year { year.sprintf("%d", ArkUtils::getYear(nMonth, thisYear, thisMonth)); @@ -147,7 +147,7 @@ int ArkUtils::getMonth(const char *strMonth) int ArkUtils::getYear(int theMonth, int thisYear, int thisMonth) { - int monthDiff = QABS(thisMonth - theMonth); + int monthDiff = TQABS(thisMonth - theMonth); if (monthDiff > 6) return (thisYear - 1); else @@ -176,7 +176,7 @@ TQString ArkUtils::fixYear(const TQString& strYear) return TQString::number( y ); } else - return TQString::null; + return TQString(); } bool diff --git a/ark/arkviewer.cpp b/ark/arkviewer.cpp index 2f173a8..1e70ce5 100644 --- a/ark/arkviewer.cpp +++ b/ark/arkviewer.cpp @@ -36,11 +36,11 @@ #include -ArkViewer::ArkViewer( TQWidget * parent, const char * name ) - : KDialogBase( parent, name, false, TQString::null, Close ), m_part( 0 ) +ArkViewer::ArkViewer( TQWidget * tqparent, const char * name ) + : KDialogBase( tqparent, name, false, TQString(), Close ), m_part( 0 ) { m_widget = new TQVBox( this ); - m_widget->layout()->setSpacing( 10 ); + m_widget->tqlayout()->setSpacing( 10 ); connect( this, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotFinished() ) ); @@ -76,17 +76,17 @@ bool ArkViewer::view( const KURL& filename ) TQLabel *iconLabel = new TQLabel( header ); iconLabel->setPixmap( mimetype->pixmap( KIcon::Desktop ) ); - iconLabel->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ); + iconLabel->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ); TQVBox *headerRight = new TQVBox( header ); new TQLabel( TQString( "%1" ) - .arg( filename.fileName() ), headerRight + .tqarg( filename.fileName() ), headerRight ); new TQLabel( mimetype->comment(), headerRight ); - header->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Maximum ); + header->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Maximum ); - m_part = KParts::ComponentFactory::createPartInstanceFromQuery( mimetype->name(), TQString::null, m_widget, 0, this ); + m_part = KParts::ComponentFactory::createPartInstanceFromQuery( mimetype->name(), TQString(), m_widget, 0, TQT_TQOBJECT(this) ); if ( m_part ) { diff --git a/ark/arkviewer.h b/ark/arkviewer.h index 3720ffa..c601eab 100644 --- a/ark/arkviewer.h +++ b/ark/arkviewer.h @@ -28,9 +28,10 @@ class ArkViewer : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - ArkViewer( TQWidget* parent = 0, const char * name = 0 ); + ArkViewer( TQWidget* tqparent = 0, const char * name = 0 ); ~ArkViewer(); bool view( const KURL& filename ); diff --git a/ark/arkwidget.cpp b/ark/arkwidget.cpp index 4ced49a..2eb922b 100644 --- a/ark/arkwidget.cpp +++ b/ark/arkwidget.cpp @@ -32,7 +32,7 @@ #include #include -// Qt includes +// TQt includes #include #include #include @@ -81,7 +81,7 @@ #include "searchbar.h" #include "arkviewer.h" -static void viewInExternalViewer( ArkWidget* parent, const KURL& filename ) +static void viewInExternalViewer( ArkWidget* tqparent, const KURL& filename ) { TQString mimetype = KMimeType::findByURL( filename )->name(); bool view = true; @@ -89,7 +89,7 @@ static void viewInExternalViewer( ArkWidget* parent, const KURL& filename ) if ( KRun::isExecutable( mimetype ) ) { TQString text = i18n( "The file you're trying to view may be an executable. Running untrusted executables may compromise your system's security.\nAre you sure you want to run that file?" ); - view = ( KMessageBox::warningContinueCancel( parent, text, TQString::null, i18n("Run Nevertheless") ) == KMessageBox::Continue ); + view = ( KMessageBox::warningContinueCancel( tqparent, text, TQString(), i18n("Run Nevertheless") ) == KMessageBox::Continue ); } if ( view ) @@ -103,10 +103,10 @@ static void viewInExternalViewer( ArkWidget* parent, const KURL& filename ) // //---------------------------------------------------------------------- -ArkWidget::ArkWidget( TQWidget *parent, const char *name ) - : TQVBox(parent, name), m_bBusy( false ), m_bBusyHold( false ), +ArkWidget::ArkWidget( TQWidget *tqparent, const char *name ) + : TQVBox(tqparent, name), m_bBusy( false ), m_bBusyHold( false ), m_extractOnly( false ), m_extractRemote(false), - m_openAsMimeType(TQString::null), m_pTempAddList(NULL), + m_openAsMimeType(TQString()), m_pTempAddList(NULL), m_bArchivePopupEnabled( false ), m_convert_tmpDir( NULL ), m_convertSuccess( false ), m_createRealArchTmpDir( NULL ), m_extractRemoteTmpDir( NULL ), @@ -199,7 +199,7 @@ ArkWidget::updateStatusTotals() m_nSizeOfFiles = m_fileListView->totalSize(); TQString strInfo = i18n( "%n file %1", "%n files %1", m_nNumFiles ) - .arg( KIO::convertSize( m_nSizeOfFiles ) ); + .tqarg( KIO::convertSize( m_nSizeOfFiles ) ); emit setStatusBarText(strInfo); } @@ -354,7 +354,7 @@ ArkWidget::convertSlotCreateDone( bool success ) // addFile( const TQString & baseDir, // // const TQStringList & filesToAdd ) // ////////////////////////////////////////////////////// - *it = TQString::fromLatin1( "file:" )+ m_convert_tmpDir->name() + *it; + *it = TQString::tqfromLatin1( "file:" )+ m_convert_tmpDir->name() + *it; } bool bOldRecVal = ArkSettings::rarRecurseSubdirs(); connect( arch, TQT_SIGNAL( sigAdd( bool ) ), this, TQT_SLOT( convertSlotAddDone( bool ) ) ); @@ -431,7 +431,7 @@ ArkWidget::extractTo( const KURL & targetDirectory, const KURL & archive, bool b { if ( !KIO::NetAccess::mkdir( m_extractTo_targetDirectory, this ) ) { - KMessageBox::error( 0, i18n( "Could not create the folder %1" ).arg( + KMessageBox::error( 0, i18n( "Could not create the folder %1" ).tqarg( targetDirectory.prettyURL() ) ); emit request_file_quit(); return; @@ -441,7 +441,7 @@ ArkWidget::extractTo( const KURL & targetDirectory, const KURL & archive, bool b connect( this, TQT_SIGNAL( openDone( bool ) ), this, TQT_SLOT( extractToSlotOpenDone( bool ) ) ); } -const QString +const TQString ArkWidget::guessName( const KURL &archive ) { TQString fileName = archive.fileName(); @@ -453,7 +453,7 @@ ArkWidget::guessName( const KURL &archive ) ext = (*it).remove( '*' ); if ( fileName.endsWith( ext ) ) { - fileName = fileName.left( fileName.findRev( ext ) ); + fileName = fileName.left( fileName.tqfindRev( ext ) ); break; } } @@ -467,7 +467,7 @@ ArkWidget::extractToSlotOpenDone( bool success ) disconnect( this, TQT_SIGNAL( openDone( bool ) ), this, TQT_SLOT( extractToSlotOpenDone( bool ) ) ); if ( !success ) { - KMessageBox::error( this, i18n( "An error occurred while opening the archive %1." ).arg( m_url.prettyURL() ) ); + KMessageBox::error( this, i18n( "An error occurred while opening the archive %1." ).tqarg( m_url.prettyURL() ) ); emit request_file_quit(); return; } @@ -712,7 +712,7 @@ ArkWidget::file_open(const KURL& url) TQFileInfo fileInfo( strFile ); if ( !fileInfo.exists() ) { - KMessageBox::error(this, i18n("The archive %1 does not exist.").arg(strFile)); + KMessageBox::error(this, i18n("The archive %1 does not exist.").tqarg(strFile)); emit removeRecentURL( m_realURL ); return; } @@ -756,7 +756,7 @@ ArkWidget::getCreateFilename(const TQString & _caption, TQString strFile; KURL url; - KFileDialog dlg( ":ArkSaveAsDialog", TQString::null, this, "SaveAsDialog", true ); + KFileDialog dlg( ":ArkSaveAsDialog", TQString(), this, "SaveAsDialog", true ); dlg.setCaption( _caption ); dlg.setOperationMode( KFileDialog::Saving ); dlg.setMimeFilter( ArchiveFormatInfo::self()->supportedMimeTypes( allowCompressed ), @@ -775,13 +775,13 @@ ArkWidget::getCreateFilename(const TQString & _caption, strFile = url.path(); if (strFile.isEmpty()) - return TQString::null; + return TQString(); //the user chose to save as the current archive //or wanted to create a new one with the same name //no need to do anything if (strFile == m_strArchName && m_bIsArchiveOpen) - return TQString::null; + return TQString(); TQStringList extensions = dlg.currentFilterMimeType()->patterns(); TQStringList::Iterator it = extensions.begin(); @@ -809,7 +809,7 @@ ArkWidget::getCreateFilename(const TQString & _caption, } else if ( choice == KMessageBox::Cancel ) { - return TQString::null; + return TQString(); } else { @@ -821,8 +821,8 @@ ArkWidget::getCreateFilename(const TQString & _caption, { KMessageBox::error( this, i18n( "You do not have permission" - " to write to the directory %1" ).arg(url.directory() ) ); - return TQString::null; + " to write to the directory %1" ).tqarg(url.directory() ) ); + return TQString(); } } // end of while loop @@ -957,7 +957,7 @@ ArkWidget::file_close() if ( isArchiveOpen() ) { closeArch(); - emit setWindowCaption( TQString::null ); + emit setWindowCaption( TQString() ); emit removeOpenArk( m_strArchName ); updateStatusTotals(); updateStatusSelection(); @@ -968,7 +968,7 @@ ArkWidget::file_close() closeArch(); } - m_strArchName = TQString::null; + m_strArchName = TQString(); m_url = KURL(); } @@ -984,10 +984,10 @@ ArkWidget::askToCreateRealArchive() if (choice == KMessageBox::Yes) { url = getCreateFilename( i18n("Create New Archive"), - TQString::null, false ); + TQString(), false ); } else - url.setPath( TQString::null ); + url.setPath( TQString() ); return url; } @@ -1096,7 +1096,7 @@ ArkWidget::action_add() return; } - KFileDialog fileDlg( ":ArkAddDir", TQString::null, this, "adddlg", true ); + KFileDialog fileDlg( ":ArkAddDir", TQString(), this, "adddlg", true ); fileDlg.setMode( KFile::Mode( KFile::Files | KFile::ExistingOnly ) ); fileDlg.setCaption(i18n("Select Files to Add")); @@ -1204,7 +1204,7 @@ ArkWidget::toLocalFile( const KURL& url ) TQString strURL = url.prettyURL(); TQString tempfile = tmpDir(); - tempfile += strURL.right(strURL.length() - strURL.findRev("/") - 1); + tempfile += strURL.right(strURL.length() - strURL.tqfindRev("/") - 1); deleteAfterUse(tempfile); // remember for deletion KURL tempurl; tempurl.setPath( tempfile ); if( !KIO::NetAccess::dircopy(url, tempurl, this) ) @@ -1255,7 +1255,7 @@ ArkWidget::action_delete() if ( KMessageBox::warningContinueCancelList( this, i18n( "Do you really want to delete the selected items?" ), list, - TQString::null, + TQString(), KStdGuiItem::del(), "confirmDelete" ) != KMessageBox::Continue) @@ -1321,7 +1321,7 @@ ArkWidget::openWithSlotExtractDone( bool success ) { KURL::List list; list.append(m_viewURL); - KOpenWithDlg l( list, i18n("Open with:"), TQString::null, (TQWidget*)0L); + KOpenWithDlg l( list, i18n("Open with:"), TQString(), (TQWidget*)0L); if ( l.exec() ) { KService::Ptr service = l.service(); @@ -1389,7 +1389,7 @@ ArkWidget::reportExtractFailures( const TQString & _dest, TQStringList *_list ) return redoExtraction; } -QStringList +TQStringList ArkWidget::existingFiles( const TQString & _dest, TQStringList & _list ) { TQString strFilename, tmp; @@ -1608,7 +1608,7 @@ ArkWidget::editStart() KURL::List list; // edit will be in progress until the KProcess terminates. KOpenWithDlg l( list, i18n("Edit with:"), - TQString::null, (TQWidget*)0L ); + TQString(), (TQWidget*)0L ); if ( l.exec() ) { KProcess *kp = new KProcess; @@ -1643,10 +1643,10 @@ ArkWidget::slotEditFinished(KProcess *kp) TQStringList::Iterator it = list.begin(); TQString filename = *it; TQString path; - if (filename.contains('/') > 3) + if (filename.tqcontains('/') > 3) { kdDebug(1601) << "Filename is originally: " << filename << endl; - int i = filename.find('/', 5); + int i = filename.tqfind('/', 5); path = filename.left(1+i); kdDebug(1601) << "Changing to dir: " << path << endl; TQDir::setCurrent(path); @@ -1696,7 +1696,7 @@ ArkWidget::viewSlotExtractDone( bool success ) if ( !viewer->view( m_viewURL ) ) { TQString text = i18n( "The internal viewer is not able to display this file. Would you like to view it using an external program?" ); - view = ( KMessageBox::warningYesNo( this, text, TQString::null, i18n("View Externally"), i18n("Do Not View") ) == KMessageBox::Yes ); + view = ( KMessageBox::warningYesNo( this, text, TQString(), i18n("View Externally"), i18n("Do Not View") ) == KMessageBox::Yes ); if ( view ) viewInExternalViewer( this, m_viewURL ); @@ -1734,7 +1734,7 @@ ArkWidget::showCurrentFile() TQString fullname = tmpDir(); fullname += name; - if(fullname.contains("../")) + if(fullname.tqcontains("../")) fullname.remove("../"); //Convert the TQString filename to KURL to escape the bad characters @@ -1817,13 +1817,13 @@ ArkWidget::updateStatusSelection() else if (m_nNumSelectedFiles != 1) { strInfo = i18n("%1 files selected %2") - .arg(KGlobal::locale()->formatNumber(m_nNumSelectedFiles, 0)) - .arg(KIO::convertSize(m_nSizeOfSelectedFiles)); + .tqarg(KGlobal::locale()->formatNumber(m_nNumSelectedFiles, 0)) + .tqarg(KIO::convertSize(m_nSizeOfSelectedFiles)); } else { strInfo = i18n("1 file selected %2") - .arg(KIO::convertSize(m_nSizeOfSelectedFiles)); + .tqarg(KIO::convertSize(m_nSizeOfSelectedFiles)); } emit setStatusBarSelectedFiles(strInfo); @@ -1896,7 +1896,7 @@ ArkWidget::dropAction( TQStringList & list ) // one or open it as the new current archive int nRet = KMessageBox::warningYesNoCancel(this, i18n("Do you wish to add this to the current archive or open it as a new archive?"), - TQString::null, + TQString(), i18n("&Add"), i18n("&Open")); if (KMessageBox::Yes == nRet) // add it { @@ -1954,7 +1954,7 @@ ArkWidget::dropAction( TQStringList & list ) str = (list.count() > 1) ? i18n("There is no archive currently open. Do you wish to create one now for these files?") : i18n("There is no archive currently open. Do you wish to create one now for this file?"); - int nRet = KMessageBox::warningYesNo(this, str, TQString::null, i18n("Create Archive"), i18n("Do Not Create")); + int nRet = KMessageBox::warningYesNo(this, str, TQString(), i18n("Create Archive"), i18n("Do Not Create")); if (nRet == KMessageBox::Yes) // yes { file_new(); @@ -2044,7 +2044,7 @@ Arch * ArkWidget::getNewArchive( const TQString & _fileName, const TQString& _mi if (!newArch->archUtilityIsAvailable()) { - KMessageBox::error(this, i18n("The utility %1 is not in your PATH.\nPlease install it or contact your system administrator.").arg(newArch->getArchUtility())); + KMessageBox::error(this, i18n("The utility %1 is not in your PATH.\nPlease install it or contact your system administrator.").tqarg(newArch->getArchUtility())); return NULL; } @@ -2128,7 +2128,7 @@ ArkWidget::openArchive( const TQString & _filename ) ArchiveFormatDlg * dlg = new ArchiveFormatDlg( this, info->findMimeType( m_url ) ); if ( !dlg->exec() == TQDialog::Accepted ) { - emit setWindowCaption( TQString::null ); + emit setWindowCaption( TQString() ); emit removeRecentURL( m_realURL ); delete dlg; file_close(); @@ -2148,7 +2148,7 @@ ArkWidget::openArchive( const TQString & _filename ) if( 0 == ( newArch = Arch::archFactory( archtype, this, _filename, m_openAsMimeType) ) ) { - emit setWindowCaption( TQString::null ); + emit setWindowCaption( TQString() ); emit removeRecentURL( m_realURL ); KMessageBox::error( this, i18n("Unknown archive format or corrupted archive") ); return; @@ -2156,7 +2156,7 @@ ArkWidget::openArchive( const TQString & _filename ) if (!newArch->unarchUtilityIsAvailable()) { - KMessageBox::error(this, i18n("The utility %1 is not in your PATH.\nPlease install it or contact your system administrator.").arg(newArch->getUnarchUtility())); + KMessageBox::error(this, i18n("The utility %1 is not in your PATH.\nPlease install it or contact your system administrator.").tqarg(newArch->getUnarchUtility())); return; } @@ -2210,8 +2210,8 @@ ArkWidget::slotOpen( Arch * /* _newarch */, bool _success, const TQString & _fil else { emit removeRecentURL( m_realURL ); - emit setWindowCaption( TQString::null ); - KMessageBox::error( this, i18n( "An error occurred while trying to open the archive %1" ).arg( _filename ) ); + emit setWindowCaption( TQString() ); + KMessageBox::error( this, i18n( "An error occurred while trying to open the archive %1" ).tqarg( _filename ) ); if ( m_extractOnly ) emit request_file_quit(); @@ -2257,7 +2257,7 @@ void ArkWidget::showSettings(){ if ( offers.isEmpty() ) genPage->kcfg_KonquerorIntegration->setEnabled( false ); else - genPage->konqIntegrationLabel->setText( TQString::null ); + genPage->konqIntegrationLabel->setText( TQString() ); dialog->show(); diff --git a/ark/arkwidget.h b/ark/arkwidget.h index 529d50e..1ea203f 100644 --- a/ark/arkwidget.h +++ b/ark/arkwidget.h @@ -56,11 +56,12 @@ class FileListView; class SearchBar; -class ArkWidget : public QVBox +class ArkWidget : public TQVBox { Q_OBJECT + TQ_OBJECT public: - ArkWidget( TQWidget *parent=0, const char *name=0 ); + ArkWidget( TQWidget *tqparent=0, const char *name=0 ); virtual ~ArkWidget(); bool isArchiveOpen() const { return m_bIsArchiveOpen; } @@ -75,7 +76,7 @@ public: const KURL& realURL() const { return m_realURL; } void setRealURL( const KURL& url ) { m_realURL = url; } - TQString tmpDir() const { return m_tmpDir ? m_tmpDir->name() : TQString::null; } + TQString tmpDir() const { return m_tmpDir ? m_tmpDir->name() : TQString(); } FileListView * fileList() const { return m_fileListView; } SearchBar * searchBar() const { return m_searchBar; } @@ -181,9 +182,9 @@ private: // methods void createRealArchive( const TQString &strFilename, const TQStringList & filesToAdd = TQStringList() ); KURL getCreateFilename( const TQString & _caption, - const TQString & _defaultMimeType = TQString::null, + const TQString & _defaultMimeType = TQString(), bool allowCompressed = true, - const TQString & _suggestedName = TQString::null ); + const TQString & _suggestedName = TQString() ); bool reportExtractFailures(const TQString & _dest, TQStringList *_list); TQStringList existingFiles( const TQString & _dest, TQStringList & _list ); diff --git a/ark/compressedfile.cpp b/ark/compressedfile.cpp index 65e21de..17df279 100644 --- a/ark/compressedfile.cpp +++ b/ark/compressedfile.cpp @@ -28,7 +28,7 @@ #include #include -// Qt includes +// TQt includes #include // KDE includes @@ -60,7 +60,7 @@ CompressedFile::CompressedFile( ArkWidget *_gui, const TQString & _fileName, con m_openAsMimeType = _openAsMimeType; kdDebug(1601) << "CompressedFile constructor" << endl; m_tempDirectory = new KTempDir( _gui->tmpDir() - + TQString::fromLatin1( "compressed_file_temp" ) ); + + TQString::tqfromLatin1( "compressed_file_temp" ) ); m_tempDirectory->setAutoDelete( true ); m_tmpdir = m_tempDirectory->name(); initData(); @@ -97,8 +97,8 @@ void CompressedFile::setHeaders() void CompressedFile::initData() { - m_unarchiver_program = TQString::null; - m_archiver_program = TQString::null; + m_unarchiver_program = TQString(); + m_archiver_program = TQString(); TQString mimeType; if ( !m_openAsMimeType.isNull() ) @@ -155,7 +155,7 @@ TQString CompressedFile::extension() TQStringList::Iterator it = m_defaultExtensions.begin(); for( ; it != m_defaultExtensions.end(); ++it ) if( m_filename.endsWith( *it ) ) - return TQString::null; + return TQString(); return m_defaultExtensions.first(); } @@ -212,7 +212,7 @@ void CompressedFile::open() if (kp->start(KProcess::NotifyOnExit, KProcess::AllOutput) == false) { KMessageBox::error( 0, i18n("Could not start a subprocess.") ); - emit sigOpen(this, false, TQString::null, 0 ); + emit sigOpen(this, false, TQString(), 0 ); } kdDebug(1601) << "-CompressedFile::open" << endl; @@ -235,7 +235,7 @@ void CompressedFile::slotUncompressDone(KProcess *_kp) if ( !bSuccess ) { - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); return; } @@ -289,7 +289,7 @@ void CompressedFile::addFile( const TQStringList &urls ) proc.start(KProcess::Block); m_tmpfile = file.right(file.length() - - file.findRev("/")-1); + - file.tqfindRev("/")-1); m_tmpfile = m_tmpdir + '/' + m_tmpfile; kdDebug(1601) << "Temp file name is " << m_tmpfile << endl; diff --git a/ark/compressedfile.h b/ark/compressedfile.h index 99e19be..3c5ede8 100644 --- a/ark/compressedfile.h +++ b/ark/compressedfile.h @@ -44,6 +44,7 @@ class ArkWidget; class CompressedFile : public Arch { Q_OBJECT + TQ_OBJECT public: CompressedFile( ArkWidget *_gui, const TQString & _fileName, const TQString &_openAsMimeType ); virtual ~CompressedFile(); diff --git a/ark/extraction.ui b/ark/extraction.ui index 692692f..a8b324a 100644 --- a/ark/extraction.ui +++ b/ark/extraction.ui @@ -1,6 +1,6 @@ Extraction - + Extraction @@ -16,7 +16,7 @@ unnamed - + kcfg_extractOverwrite @@ -24,7 +24,7 @@ O&verwrite files (Zip, Tar, Zoo, Rar) - + kcfg_preservePerms @@ -32,7 +32,7 @@ &Preserve permissions (Tar) - + kcfg_extractJunkPaths @@ -40,7 +40,7 @@ &Ignore folder names (Zip) - + kcfg_rarToLower @@ -48,7 +48,7 @@ Convert file names to &lowercase (Zip, Rar) - + kcfg_rarToUpper @@ -66,7 +66,7 @@ Expanding - + 20 20 @@ -75,5 +75,5 @@ - + diff --git a/ark/extractiondialog.cpp b/ark/extractiondialog.cpp index cf95d48..87df006 100644 --- a/ark/extractiondialog.cpp +++ b/ark/extractiondialog.cpp @@ -51,36 +51,36 @@ #include "arkutils.h" #include "settings.h" -ExtractionDialog::ExtractionDialog( TQWidget *parent, const char *name, +ExtractionDialog::ExtractionDialog( TQWidget *tqparent, const char *name, bool enableSelected, const KURL& defaultExtractionDir, const TQString &prefix, const TQString &archiveName ) - : KDialogBase( parent, name, true, i18n( "Extract" ), Ok | Cancel, Ok ), + : KDialogBase( tqparent, name, true, i18n( "Extract" ), Ok | Cancel, Ok ), m_selectedButton( 0 ), m_allButton( 0 ), m_selectedOnly( enableSelected ), m_extractionDirectory( defaultExtractionDir ), m_defaultExtractionDir( defaultExtractionDir.prettyURL() ), m_prefix( prefix ) { if ( !archiveName.isNull() ) { - setCaption( i18n( "Extract Files From %1" ).arg( archiveName ) ); + setCaption( i18n( "Extract Files From %1" ).tqarg( archiveName ) ); } TQVBox *vbox = makeVBoxMainWidget(); TQHBox *header = new TQHBox( vbox ); - header->layout()->setSpacing( 10 ); + header->tqlayout()->setSpacing( 10 ); TQLabel *icon = new TQLabel( header ); icon->setPixmap( DesktopIcon( "ark_extract" ) ); - icon->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ); + icon->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Minimum ); if ( enableSelected ) { TQVBox *whichFiles = new TQVBox( header ); - whichFiles->layout()->setSpacing( 6 ); + whichFiles->tqlayout()->setSpacing( 6 ); new TQLabel( TQString( "%1" ) - .arg( i18n( "Extract:" ) ), whichFiles ); + .tqarg( i18n( "Extract:" ) ), whichFiles ); TQHButtonGroup *filesGroup = new TQHButtonGroup( whichFiles ); m_selectedButton = new TQRadioButton( i18n( "Selected files only" ), filesGroup ); m_allButton = new TQRadioButton( i18n( "All files" ), filesGroup ); @@ -90,13 +90,13 @@ ExtractionDialog::ExtractionDialog( TQWidget *parent, const char *name, else { new TQLabel( TQString( "%1" ) - .arg( i18n( "Extract all files" ) ), header ); + .tqarg( i18n( "Extract all files" ) ), header ); } TQHBox *destDirBox = new TQHBox( vbox ); TQLabel *destFolderLabel = new TQLabel( i18n( "Destination folder: " ), destDirBox ); - destFolderLabel->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); + destFolderLabel->tqsetSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); KHistoryCombo *combobox = new KHistoryCombo( true, destDirBox ); combobox->setPixmapProvider( new KURLPixmapProvider ); @@ -111,7 +111,7 @@ ExtractionDialog::ExtractionDialog( TQWidget *parent, const char *name, combobox->setInsertionPolicy( TQComboBox::AtTop ); m_urlRequester = new KURLRequester( combobox, destDirBox ); - m_urlRequester->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); + m_urlRequester->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); m_urlRequester->setMode( KFile::Directory ); if (!defaultExtractionDir.prettyURL().isEmpty() ) @@ -145,7 +145,7 @@ void ExtractionDialog::accept() TQFileInfo fi( p.path() ); if ( !fi.isDir() && !fi.exists() ) { - TQString ltext = i18n( "Create folder %1?").arg(p.path()); + TQString ltext = i18n( "Create folder %1?").tqarg(p.path()); int createDir = KMessageBox::questionYesNo( this, ltext, i18n( "Missing Folder" ) , i18n("Create Folder"), i18n("Do Not Create")); if( createDir == 4 ) { diff --git a/ark/extractiondialog.h b/ark/extractiondialog.h index 6d27ae2..b881770 100644 --- a/ark/extractiondialog.h +++ b/ark/extractiondialog.h @@ -41,15 +41,16 @@ class KURLRequester; class ExtractionDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** * Constructor. */ - ExtractionDialog( TQWidget *parent = 0, const char *name = 0, + ExtractionDialog( TQWidget *tqparent = 0, const char *name = 0, bool enableSelected = true, const KURL &defaultExtractionDir = KURL(), const TQString &prefix = TQString(), - const TQString &archiveName = TQString::null ); + const TQString &archiveName = TQString() ); /** * Destructor. diff --git a/ark/filelistview.cpp b/ark/filelistview.cpp index 165b128..8036a28 100644 --- a/ark/filelistview.cpp +++ b/ark/filelistview.cpp @@ -26,7 +26,7 @@ */ -// Qt includes +// TQt includes #include #include #include @@ -129,7 +129,7 @@ void FileLVI::setText( int column, const TQString &text ) name = name.left( name.length() - 1 ); if ( name.startsWith( "/" ) ) name = name.mid( 1 ); - int pos = name.findRev( '/' ); + int pos = name.tqfindRev( '/' ); if ( pos != -1 ) name = name.right( name.length() - pos - 1 ); TQListViewItem::setText( column, name ); @@ -153,7 +153,7 @@ void FileLVI::setText( int column, const TQString &text ) else m_ratio = text.toDouble(); TQListViewItem::setText( column, i18n( "Packed Ratio", "%1 %" ) - .arg(KGlobal::locale()->formatNumber( m_ratio, 1 ) ) + .tqarg(KGlobal::locale()->formatNumber( m_ratio, 1 ) ) ); } else if ( colName == timeStampStrCol ) @@ -162,7 +162,7 @@ void FileLVI::setText( int column, const TQString &text ) TQListViewItem::setText(column, text); else { - m_timeStamp = TQDateTime::fromString( text, ISODate ); + m_timeStamp = TQDateTime::fromString( text, Qt::ISODate ); TQListViewItem::setText( column, KGlobal::locale()->formatDateTime( m_timeStamp ) ); } } @@ -170,9 +170,9 @@ void FileLVI::setText( int column, const TQString &text ) TQListViewItem::setText(column, text); } -static FileLVI* folderLVI( KListViewItem *parent, const TQString& name ) +static FileLVI* folderLVI( KListViewItem *tqparent, const TQString& name ) { - FileLVI *folder = new FileLVI( parent ); + FileLVI *folder = new FileLVI( tqparent ); folder->setText( 0, name ); @@ -181,9 +181,9 @@ static FileLVI* folderLVI( KListViewItem *parent, const TQString& name ) return folder; } -static FileLVI* folderLVI( KListView *parent, const TQString& name ) +static FileLVI* folderLVI( KListView *tqparent, const TQString& name ) { - FileLVI *folder = new FileLVI( parent ); + FileLVI *folder = new FileLVI( tqparent ); folder->setText( 0, name ); folder->setPixmap( 0, KMimeType::mimeType( "inode/directory" )->pixmap( KIcon::Small ) ); return folder; @@ -194,8 +194,8 @@ static FileLVI* folderLVI( KListView *parent, const TQString& name ) ///////////////////////////////////////////////////////////////////// -FileListView::FileListView(TQWidget *parent, const char* name) - : KListView(parent, name) +FileListView::FileListView(TQWidget *tqparent, const char* name) + : KListView(tqparent, name) { TQWhatsThis::add( this, i18n( "This area is for displaying information about the files contained within an archive." ) @@ -242,7 +242,7 @@ void FileListView::removeColumn( int index ) { for ( unsigned int i = index; i < m_columnMap.count() - 2; i++ ) { - m_columnMap.replace( i, m_columnMap[ i + 1 ] ); + m_columnMap.tqreplace( i, m_columnMap[ i + 1 ] ); } m_columnMap.remove( m_columnMap[ m_columnMap.count() - 1 ] ); @@ -264,31 +264,31 @@ TQStringList FileListView::selectedFilenames() { if ( item->isSelected() ) { - // If the item has children, add each child and the item + // If the item has tqchildren, add each child and the item if ( item->childCount() > 0 ) { files += item->fileName(); - files += childrenOf( item ); + files += tqchildrenOf( item ); /* If we got here, then the logic for "going to the next item" - * is a bit different: as we already dealt with all the children, + * is a bit different: as we already dealt with all the tqchildren, * the "next item" is the next sibling of the current item, not * its first child. If the current item has no siblings, then - * the next item is the next sibling of its parent, and so on. + * the next item is the next sibling of its tqparent, and so on. */ FileLVI *nitem = static_cast( item->nextSibling() ); - while ( !nitem && item->parent() ) + while ( !nitem && item->tqparent() ) { - item = static_cast( item->parent() ); - if ( item->parent() ) - nitem = static_cast( item->parent()->nextSibling() ); + item = static_cast( item->tqparent() ); + if ( item->tqparent() ) + nitem = static_cast( item->tqparent()->nextSibling() ); } item = nitem; continue; } else { - // If the item has no children, just add it to the list + // If the item has no tqchildren, just add it to the list files += item->fileName(); } } @@ -331,7 +331,7 @@ bool FileListView::isSelectionEmpty() void FileListView::contentsMousePressEvent(TQMouseEvent *e) { - if( e->button()==TQMouseEvent::LeftButton ) + if( e->button()==Qt::LeftButton ) { m_pressed = true; m_presspos = e->pos(); @@ -385,9 +385,9 @@ FileListView::item(const TQString& filename) const void FileListView::addItem( const TQStringList & entries ) { - FileLVI *flvi, *parent = findParent( entries[0] ); - if ( parent ) - flvi = new FileLVI( parent ); + FileLVI *flvi, *tqparent = findParent( entries[0] ); + if ( tqparent ) + flvi = new FileLVI( tqparent ); else flvi = new FileLVI( this ); @@ -422,7 +422,7 @@ void FileListView::setHeaders( const ColumnList& columns ) it != columns.constEnd(); ++it ) { - QPair< TQString, Qt::AlignmentFlags > pair = *it; + TQPair< TQString, TQt::AlignmentFlags > pair = *it; int colnum = addColumn( pair.first ); setColumnAlignment( colnum, pair.second ); } @@ -508,13 +508,13 @@ FileLVI* FileListView::findParent( const TQString& fullname ) name = name.left( name.length() -1 ); if ( name.startsWith( "/" ) ) name = name.mid( 1 ); - // Checks if this entry needs a parent - if ( !name.contains( '/' ) ) + // Checks if this entry needs a tqparent + if ( !name.tqcontains( '/' ) ) return static_cast< FileLVI* >( 0 ); // Get a list of ancestors - TQString parentFullname = name.left( name.findRev( '/' ) ); - TQStringList ancestorList = TQStringList::split( '/', parentFullname ); + TQString tqparentFullname = name.left( name.tqfindRev( '/' ) ); + TQStringList ancestorList = TQStringList::split( '/', tqparentFullname ); // Checks if the listview contains the first item in the list of ancestors TQListViewItem *item = firstChild(); @@ -538,8 +538,8 @@ FileLVI* FileListView::findParent( const TQString& fullname ) { TQString name = ancestorList[0]; - FileLVI *parent = static_cast< FileLVI*>( item ); - item = parent->firstChild(); + FileLVI *tqparent = static_cast< FileLVI*>( item ); + item = tqparent->firstChild(); while ( item ) { if ( item->text(0) == name ) @@ -549,7 +549,7 @@ FileLVI* FileListView::findParent( const TQString& fullname ) if ( !item ) { - item = folderLVI( parent, name ); + item = folderLVI( tqparent, name ); } ancestorList.pop_front(); @@ -559,28 +559,28 @@ FileLVI* FileListView::findParent( const TQString& fullname ) return static_cast< FileLVI* >( item ); } -TQStringList FileListView::childrenOf( FileLVI* parent ) +TQStringList FileListView::tqchildrenOf( FileLVI* tqparent ) { - Q_ASSERT( parent ); - TQStringList children; + Q_ASSERT( tqparent ); + TQStringList tqchildren; - FileLVI *item = static_cast( parent->firstChild() ); + FileLVI *item = static_cast( tqparent->firstChild() ); while ( item ) { if ( item->childCount() == 0 ) { - children += item->fileName(); + tqchildren += item->fileName(); } else { - children += item->fileName(); - children += childrenOf( item ); + tqchildren += item->fileName(); + tqchildren += tqchildrenOf( item ); } item = static_cast( item->nextSibling() ); } - return children; + return tqchildren; } #include "filelistview.moc" diff --git a/ark/filelistview.h b/ark/filelistview.h index 54c22c1..e2546e5 100644 --- a/ark/filelistview.h +++ b/ark/filelistview.h @@ -69,13 +69,14 @@ class FileLVI : public KListViewItem TQString m_entryName; }; -typedef TQValueList< QPair< TQString, Qt::AlignmentFlags > > ColumnList; +typedef TQValueList< TQPair< TQString, TQt::AlignmentFlags > > ColumnList; class FileListView: public KListView { Q_OBJECT + TQ_OBJECT public: - FileListView( TQWidget *parent = 0, const char* name = 0 ); + FileListView( TQWidget *tqparent = 0, const char* name = 0 ); FileLVI *currentItem() {return ((FileLVI *) KListView::currentItem());} @@ -152,7 +153,7 @@ class FileListView: public KListView private: FileLVI* findParent( const TQString& fullname ); - TQStringList childrenOf( FileLVI* parent ); + TQStringList tqchildrenOf( FileLVI* tqparent ); TQMap m_columnMap; bool m_pressed; diff --git a/ark/general.ui b/ark/general.ui index d822b4c..f782d69 100644 --- a/ark/general.ui +++ b/ark/general.ui @@ -1,6 +1,6 @@ General - + General @@ -19,7 +19,7 @@ unnamed - + kcfg_UseIntegratedViewer @@ -27,7 +27,7 @@ &Use integrated viewer - + kcfg_KonquerorIntegration @@ -35,9 +35,9 @@ &Enable Konqueror integration - + - layout1 + tqlayout1 @@ -53,14 +53,14 @@ Fixed - + 15 31 - + konqIntegrationLabel @@ -80,7 +80,7 @@ Expanding - + 20 90 @@ -89,5 +89,5 @@ - + diff --git a/ark/lha.cpp b/ark/lha.cpp index 1bf3aac..d34fd51 100644 --- a/ark/lha.cpp +++ b/ark/lha.cpp @@ -67,7 +67,7 @@ bool LhaArch::processLine( const TQCString &line ) char columns[13][80]; char filename[4096]; - if ( line.contains( "[generic]" ) ) + if ( line.tqcontains( "[generic]" ) ) { sscanf( _line, " %79[]\\[generic] %79[0-9] %79[0-9] %79[0-9.%*] %10[-a-z0-9 ] %3[A-Za-z]%1[ ]%2[0-9 ]%1[ ]%5[ 0-9:]%1[ ]%4095[^\n]", @@ -76,7 +76,7 @@ bool LhaArch::processLine( const TQCString &line ) columns[9], filename ); strcpy( columns[1], " " ); } - else if ( line.contains( "[MS-DOS]" ) ) + else if ( line.tqcontains( "[MS-DOS]" ) ) { sscanf( _line, " %79[]\\[MS-DOS] %79[0-9] %79[0-9] %79[0-9.%*] %10[-a-z0-9 ] %3[A-Za-z]%1[ ]%2[0-9 ]%1[ ]%5[ 0-9:]%1[ ]%4095[^\n]", @@ -103,7 +103,7 @@ bool LhaArch::processLine( const TQCString &line ) TQString file = filename; TQString name, link; bool bLink = false; - int pos = file.find( " -> " ); + int pos = file.tqfind( " -> " ); if ( pos != -1 ) { bLink = true; @@ -154,7 +154,7 @@ void LhaArch::open() if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { KMessageBox::error( 0, i18n( "Could not start a subprocess." ) ); - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); } } diff --git a/ark/lha.h b/ark/lha.h index bd0c1b0..075f7a3 100644 --- a/ark/lha.h +++ b/ark/lha.h @@ -38,6 +38,7 @@ class ArkWidget; class LhaArch : public Arch { Q_OBJECT + TQ_OBJECT public: LhaArch( ArkWidget *, const TQString & ); virtual ~LhaArch() { } diff --git a/ark/mainwindow.cpp b/ark/mainwindow.cpp index 5866d18..045ce1a 100644 --- a/ark/mainwindow.cpp +++ b/ark/mainwindow.cpp @@ -45,11 +45,11 @@ #include "archiveformatinfo.h" #include "arkwidget.h" -MainWindow::MainWindow( TQWidget * /*parent*/, const char *name ) +MainWindow::MainWindow( TQWidget * /*tqparent*/, const char *name ) : KParts::MainWindow(), progressDialog( 0 ) { setXMLFile( "arkui.rc" ); - m_part = KParts::ComponentFactory::createPartInstanceFromLibrary( "libarkpart", this, name, this, "ArkPart"); + m_part = KParts::ComponentFactory::createPartInstanceFromLibrary( "libarkpart", this, name, TQT_TQOBJECT(this), "ArkPart"); if (m_part ) { //Since most of the functionality is still in ArkWidget: @@ -109,24 +109,24 @@ MainWindow::~MainWindow() void MainWindow::setupActions() { - newWindowAction = new KAction(i18n("New &Window"), "window_new", KShortcut(), this, + newWindowAction = new KAction(i18n("New &Window"), "window_new", KShortcut(), TQT_TQOBJECT(this), TQT_SLOT(file_newWindow()), actionCollection(), "new_window"); - newArchAction = KStdAction::openNew(this, TQT_SLOT(file_new()), actionCollection()); - openAction = KStdAction::open(this, TQT_SLOT(file_open()), actionCollection()); + newArchAction = KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(file_new()), actionCollection()); + openAction = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(file_open()), actionCollection()); - reloadAction = new KAction(i18n("Re&load"), "reload", KStdAccel::shortcut( KStdAccel::Reload ), this, + reloadAction = new KAction(i18n("Re&load"), "reload", KStdAccel::shortcut( KStdAccel::Reload ), TQT_TQOBJECT(this), TQT_SLOT(file_reload()), actionCollection(), "reload_arch"); - closeAction = KStdAction::close(this, TQT_SLOT(file_close()), actionCollection(), "file_close"); + closeAction = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(file_close()), actionCollection(), "file_close"); - recent = KStdAction::openRecent(this, TQT_SLOT(openURL(const KURL&)), actionCollection()); + recent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(openURL(const KURL&)), actionCollection()); recent->loadEntries(kapp->config()); createStandardStatusBarAction(); - KStdAction::quit(this, TQT_SLOT(window_close()), actionCollection()); - KStdAction::configureToolbars(this, TQT_SLOT(editToolbars()), actionCollection()); - KStdAction::keyBindings(this, TQT_SLOT( slotConfigureKeyBindings()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(window_close()), actionCollection()); + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(editToolbars()), actionCollection()); + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT( slotConfigureKeyBindings()), actionCollection()); openAction->setEnabled( true ); recent->setEnabled( true ); @@ -177,7 +177,7 @@ MainWindow::file_reload() void MainWindow::editToolbars() { - saveMainWindowSettings( KGlobal::config(), TQString::fromLatin1("MainWindow") ); + saveMainWindowSettings( KGlobal::config(), TQString::tqfromLatin1("MainWindow") ); KEditToolbar dlg( factory(), this ); connect(&dlg, TQT_SIGNAL( newToolbarConfig() ), this, TQT_SLOT( slotNewToolbarConfig() )); dlg.exec(); @@ -187,7 +187,7 @@ void MainWindow::slotNewToolbarConfig() { createGUI( m_part ); - applyMainWindowSettings( KGlobal::config(), TQString::fromLatin1("MainWindow") ); + applyMainWindowSettings( KGlobal::config(), TQString::tqfromLatin1("MainWindow") ); } void @@ -221,7 +221,7 @@ MainWindow::arkAlreadyOpen( const KURL & url ) window_close(); // notify the user what's going on - KMessageBox::information(0, i18n("The archive %1 is already open and has been raised.\nNote: if the filename does not match, it only means that one of the two is a symbolic link.").arg(url.prettyURL())); + KMessageBox::information(0, i18n("The archive %1 is already open and has been raised.\nNote: if the filename does not match, it only means that one of the two is a symbolic link.").tqarg(url.prettyURL())); return true; } return false; @@ -262,8 +262,8 @@ MainWindow::getOpenURL( bool addOnly, const TQString & caption, TQString filter = ArchiveFormatInfo::self()->filter(); if ( !suggestedName.isEmpty() ) { - filter = TQString::null; - combo->setCurrentItem( list.findIndex( ArchiveFormatInfo::self()->descriptionForMimeType( + filter = TQString(); + combo->setCurrentItem( list.tqfindIndex( ArchiveFormatInfo::self()->descriptionForMimeType( KMimeType::findByPath( suggestedName, 0, true )->name() ) ) ); } @@ -296,7 +296,7 @@ MainWindow::getOpenURL( bool addOnly, const TQString & caption, m_widget->setOpenAsMimeType( ArchiveFormatInfo::self()->mimeTypeForDescription( combo->currentText() ) ); else - m_widget->setOpenAsMimeType( TQString::null ); + m_widget->setOpenAsMimeType( TQString() ); return url; } @@ -446,11 +446,11 @@ void MainWindow::startProgressDialog( const TQString & text ) { if ( !progressDialog ) - progressDialog = new KProgressDialog( this, "progress_dialog", TQString::null, text, false ); + progressDialog = new KProgressDialog( this, "progress_dialog", TQString(), text, false ); else progressDialog->setLabel( text ); -// progressDialog->setWFlags( Qt::WType_TopLevel ); +// progressDialog->setWFlags( TQt::WType_TopLevel ); progressDialog->setAllowCancel( true ); progressDialog->setPlainCaption( i18n( "Please Wait" ) ); diff --git a/ark/mainwindow.h b/ark/mainwindow.h index 428167e..28989c0 100644 --- a/ark/mainwindow.h +++ b/ark/mainwindow.h @@ -41,13 +41,14 @@ class MainWindow: public KParts::MainWindow { Q_OBJECT + TQ_OBJECT public: - MainWindow( TQWidget *parent=0, const char *name=0 ); + MainWindow( TQWidget *tqparent=0, const char *name=0 ); virtual ~MainWindow(); void setExtractOnly ( bool b ); void extractTo( const KURL & targetDirectory, const KURL & archive, bool guessName ); - void addToArchive( const KURL::List & filesToAdd, const TQString & cwd = TQString::null, + void addToArchive( const KURL::List & filesToAdd, const TQString & cwd = TQString(), const KURL & archive = KURL(), bool askForName = false ); public slots: @@ -84,9 +85,9 @@ private: // methods void newCaption(const TQString & filename); bool arkAlreadyOpen( const KURL & url ); - KURL getOpenURL( bool addOnly = false , const TQString & caption = TQString::null, - const TQString & startDir = TQString::null, - const TQString & suggestedName = TQString::null ); + KURL getOpenURL( bool addOnly = false , const TQString & caption = TQString(), + const TQString & startDir = TQString(), + const TQString & suggestedName = TQString() ); void startProgressDialog( const TQString & text ); diff --git a/ark/rar.cpp b/ark/rar.cpp index 87f9ab4..056e6c4 100644 --- a/ark/rar.cpp +++ b/ark/rar.cpp @@ -90,10 +90,10 @@ RarArch::RarArch( ArkWidget *_gui, const TQString & _fileName ) bool RarArch::processLine( const TQCString &line ) { - TQString unicode_line; + TQString tqunicode_line; TQTextCodec *codec = TQTextCodec::codecForLocale(); - unicode_line = codec->toUnicode( line ); + tqunicode_line = codec->toUnicode( line ); if ( m_isFirstLine ) { @@ -153,7 +153,7 @@ void RarArch::open() if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { KMessageBox::error( 0, i18n( "Could not start a subprocess." ) ); - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); } } @@ -291,7 +291,7 @@ void RarArch::unarchFileInternal() bool RarArch::passwordRequired() { - return m_lastShellOutput.findRev("password incorrect ?)")+1; + return m_lastShellOutput.tqfindRev("password incorrect ?)")+1; } void RarArch::remove( TQStringList *list ) diff --git a/ark/rar.h b/ark/rar.h index ca64621..9176fe6 100644 --- a/ark/rar.h +++ b/ark/rar.h @@ -35,6 +35,7 @@ class ArkWidget; class RarArch : public Arch { Q_OBJECT + TQ_OBJECT public: RarArch( ArkWidget *_gui, const TQString & _fileName ); virtual ~RarArch() {} diff --git a/ark/searchbar.cpp b/ark/searchbar.cpp index 40fb522..fce4576 100644 --- a/ark/searchbar.cpp +++ b/ark/searchbar.cpp @@ -32,12 +32,12 @@ #include #include -SearchBar::SearchBar( TQWidget* parent, KActionCollection* aC, const char * name ) - : KListViewSearchLine( parent, 0, name ) +SearchBar::SearchBar( TQWidget* tqparent, KActionCollection* aC, const char * name ) + : KListViewSearchLine( tqparent, 0, name ) { - KAction *resetSearch = new KAction( i18n( "Reset Search" ), TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase", 0, this, TQT_SLOT( clear() ), aC, "reset_search" ); + KAction *resetSearch = new KAction( i18n( "Reset Search" ), TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase", 0, TQT_TQOBJECT(this), TQT_SLOT( clear() ), aC, "reset_search" ); - resetSearch->plug( parent ); + resetSearch->plug( tqparent ); resetSearch->setWhatsThis( i18n( "Reset Search\n" "Resets the search bar, so that all archive entries are shown again." ) ); } diff --git a/ark/searchbar.h b/ark/searchbar.h index c21b4d4..2e245ab 100644 --- a/ark/searchbar.h +++ b/ark/searchbar.h @@ -32,8 +32,9 @@ class KActionCollection; class SearchBar: public KListViewSearchLine { Q_OBJECT + TQ_OBJECT public: - SearchBar( TQWidget* parent, KActionCollection* aC, const char * name = 0 ); + SearchBar( TQWidget* tqparent, KActionCollection* aC, const char * name = 0 ); ~SearchBar(); }; diff --git a/ark/sevenzip.cpp b/ark/sevenzip.cpp index 99170ac..2292214 100644 --- a/ark/sevenzip.cpp +++ b/ark/sevenzip.cpp @@ -110,7 +110,7 @@ void SevenZipArch::open() if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { KMessageBox::error( 0, i18n( "Could not start a subprocess." ) ); - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); } } @@ -283,13 +283,13 @@ bool SevenZipArch::processLine( const TQCString& _line ) : columns[ m_fixYear ]; TQString month = ( m_repairMonth >= 0 ) ? TQString( "%1" ) - .arg( ArkUtils::getMonth( columns[ m_repairMonth ].ascii() ) ) + .tqarg( ArkUtils::getMonth( columns[ m_repairMonth ].ascii() ) ) : columns[ m_fixMonth ]; - TQString timestamp = TQString::fromLatin1( "%1-%2-%3 %4" ) - .arg( year ) - .arg( month ) - .arg( columns[ m_fixDay ] ) - .arg( columns[ m_fixTime ] ); + TQString timestamp = TQString::tqfromLatin1( "%1-%2-%3 %4" ) + .tqarg( year ) + .tqarg( month ) + .tqarg( columns[ m_fixDay ] ) + .tqarg( columns[ m_fixTime ] ); columns[ m_dateCol ] = timestamp; } @@ -330,11 +330,11 @@ void SevenZipArch::slotReceivedTOC( KProcess*, char* data, int length ) startChar = lfChar + 1; // Check if the header was found - if ( m_buffer.find( m_headerString ) != -1 ) + if ( m_buffer.tqfind( m_headerString.data() ) != -1 ) { if ( !m_header_removed ) { - m_nameColumnPos = m_buffer.findRev( ' ' ) + 1; + m_nameColumnPos = m_buffer.tqfindRev( ' ' ) + 1; m_header_removed = true; } else diff --git a/ark/sevenzip.h b/ark/sevenzip.h index f728768..535ea53 100644 --- a/ark/sevenzip.h +++ b/ark/sevenzip.h @@ -29,6 +29,7 @@ class SevenZipArch : public Arch { Q_OBJECT + TQ_OBJECT public: SevenZipArch( ArkWidget *, const TQString & ); virtual ~SevenZipArch(); diff --git a/ark/tar.cpp b/ark/tar.cpp index 7de54f9..4bc6c0a 100644 --- a/ark/tar.cpp +++ b/ark/tar.cpp @@ -48,7 +48,7 @@ #include #include -// Qt includes +// TQt includes #include #include #include @@ -106,12 +106,12 @@ TarArch::TarArch( ArkWidget *_gui, { compressed = true; m_tmpDir = new KTempDir( _gui->tmpDir() - + TQString::fromLatin1( "temp_tar" ) ); + + TQString::tqfromLatin1( "temp_tar" ) ); m_tmpDir->setAutoDelete( true ); m_tmpDir->qDir()->cd( m_tmpDir->name() ); // build the temp file name KTempFile *pTempFile = new KTempFile( m_tmpDir->name(), - TQString::fromLatin1(".tar") ); + TQString::tqfromLatin1(".tar") ); tmpfile = pTempFile->name(); delete pTempFile; @@ -217,7 +217,7 @@ TQString TarArch::getCompressor() if( m_fileMimeType == "application/x-tzo" ) return TQString( "lzop" ); - return TQString::null; + return TQString(); } @@ -241,7 +241,7 @@ TQString TarArch::getUnCompressor() if( m_fileMimeType == "application/x-tzo" ) return TQString( "lzop" ); - return TQString::null; + return TQString(); } void @@ -322,14 +322,14 @@ void TarArch::slotListingDone(KProcess *_kp) if (flv!=NULL && flv->totalFiles()>0) { const TQString firstfile = ((FileLVI *) flv->firstChild())->fileName(); - if (list.find(TQRegExp(TQString("\\s\\./%1[/\\n]").arg(firstfile)))>=0) + if (list.tqfind(TQRegExp(TQString("\\s\\./%1[/\\n]").tqarg(firstfile)))>=0) { m_dotslash = true; kdDebug(1601) << k_funcinfo << "archive has dot-slash" << endl; } else { - if (list.find(TQRegExp(TQString("\\s%1[/\\n]").arg(firstfile)))>=0) + if (list.tqfind(TQRegExp(TQString("\\s%1[/\\n]").tqarg(firstfile)))>=0) { // archive doesn't have dot-slash m_dotslash = false; @@ -418,7 +418,7 @@ void TarArch::createTmp() if (kp->start(KProcess::NotifyOnExit, flag ) == false) { KMessageBox::error(0, i18n("Unable to fork a decompressor")); - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); } } else @@ -772,7 +772,7 @@ void TarArch::customEvent( TQCustomEvent *ev ) m_listingThread->wait(); delete m_listingThread; m_listingThread = 0; - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); break; case ListingEvent::ListingFinished: diff --git a/ark/tar.h b/ark/tar.h index a12ad95..74f37c2 100644 --- a/ark/tar.h +++ b/ark/tar.h @@ -56,6 +56,7 @@ class TarListingThread; class TarArch : public Arch { Q_OBJECT + TQ_OBJECT public: TarArch( ArkWidget *_gui, const TQString & _filename, const TQString & _openAsMimeType ); diff --git a/ark/tarlistingthread.cpp b/ark/tarlistingthread.cpp index 3045c4a..4b09bfd 100644 --- a/ark/tarlistingthread.cpp +++ b/ark/tarlistingthread.cpp @@ -78,8 +78,8 @@ static char *makeAccessString(mode_t mode) return buffer; } -TarListingThread::TarListingThread( TQObject *parent, const TQString& filename ) - : TQThread(), m_parent( parent ) +TarListingThread::TarListingThread( TQObject *tqparent, const TQString& filename ) + : TQThread(), m_parent( tqparent ) { Q_ASSERT( m_parent ); m_archive = new KTar( filename ); @@ -96,7 +96,7 @@ void TarListingThread::run() if (!m_archive->open( IO_ReadOnly )) { ListingEvent *ev = new ListingEvent( TQStringList(), ListingEvent::Error ); - qApp->postEvent( m_parent, ev ); + tqApp->postEvent( m_parent, ev ); return; } @@ -104,7 +104,7 @@ void TarListingThread::run() // Send an empty TQStringList in an Event to signal the listing end. ListingEvent *ev = new ListingEvent( TQStringList(), ListingEvent::ListingFinished ); - qApp->postEvent( m_parent, ev ); + tqApp->postEvent( m_parent, ev ); } void TarListingThread::processDir( const KTarDirectory *tardir, const TQString & root ) @@ -144,12 +144,12 @@ void TarListingThread::processDir( const KTarDirectory *tardir, const TQString & strSize.sprintf("%d", ((KTarFile *)tarEntry)->size()); } col_list.append(strSize); - TQString timestamp = tarEntry->datetime().toString(ISODate); + TQString timestamp = tarEntry->datetime().toString(Qt::ISODate); col_list.append(timestamp); col_list.append(tarEntry->symlink()); ListingEvent *ev = new ListingEvent( col_list ); - qApp->postEvent( m_parent, ev ); + tqApp->postEvent( m_parent, ev ); // if it's a directory, process it. // remember that name is root + / + the name of the directory diff --git a/ark/tarlistingthread.h b/ark/tarlistingthread.h index 25ce188..b6f1dea 100644 --- a/ark/tarlistingthread.h +++ b/ark/tarlistingthread.h @@ -29,25 +29,25 @@ class TQString; class KArchive; -class ListingEvent: public QCustomEvent +class ListingEvent: public TQCustomEvent { public: - enum Status { Normal, Error, ListingFinished }; - ListingEvent( const TQStringList& data, Status st = Normal ) + enum tqStatus { Normal, Error, ListingFinished }; + ListingEvent( const TQStringList& data, tqStatus st = Normal ) : TQCustomEvent( 65442 ), m_data( data ), m_status( st ) {} const TQStringList& columns() const { return m_data; } - Status status() const { return m_status; } + tqStatus status() const { return m_status; } private: TQStringList m_data; - Status m_status; + tqStatus m_status; }; -class TarListingThread: public QThread +class TarListingThread: public TQThread { public: - TarListingThread( TQObject *parent, const TQString& filename ); + TarListingThread( TQObject *tqparent, const TQString& filename ); ~TarListingThread(); protected: diff --git a/ark/zip.cpp b/ark/zip.cpp index f223016..59db0c9 100644 --- a/ark/zip.cpp +++ b/ark/zip.cpp @@ -26,7 +26,7 @@ */ -// Qt includes +// TQt includes #include // KDE includes @@ -103,7 +103,7 @@ void ZipArch::open() if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { KMessageBox::error( 0, i18n( "Could not start a subprocess." ) ); - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); } } @@ -240,7 +240,7 @@ void ZipArch::unarchFileInternal() bool ZipArch::passwordRequired() { - return m_lastShellOutput.findRev("unable to get password\n")!=-1 || m_lastShellOutput.endsWith("password inflating\n") || m_lastShellOutput.findRev("password incorrect--reenter:")!=-1 || m_lastShellOutput.endsWith("incorrect password\n"); + return m_lastShellOutput.tqfindRev("unable to get password\n")!=-1 || m_lastShellOutput.endsWith("password inflating\n") || m_lastShellOutput.tqfindRev("password incorrect--reenter:")!=-1 || m_lastShellOutput.endsWith("incorrect password\n"); } void ZipArch::remove( TQStringList *list ) diff --git a/ark/zip.h b/ark/zip.h index 74813a1..c6f0fe3 100644 --- a/ark/zip.h +++ b/ark/zip.h @@ -38,6 +38,7 @@ class ArkWidget; class ZipArch : public Arch { Q_OBJECT + TQ_OBJECT public: ZipArch( ArkWidget *_gui, const TQString & _fileName ); virtual ~ZipArch() { } diff --git a/ark/zoo.cpp b/ark/zoo.cpp index 8896251..6f9a53e 100644 --- a/ark/zoo.cpp +++ b/ark/zoo.cpp @@ -120,7 +120,7 @@ void ZooArch::open() if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) ) { KMessageBox::error( 0, i18n( "Could not start a subprocess." ) ); - emit sigOpen( this, false, TQString::null, 0 ); + emit sigOpen( this, false, TQString(), 0 ); } } @@ -287,9 +287,9 @@ TQString fixTime( const TQString &_strTime ) // +3 or -3 etc. TQString strTime = _strTime; - if ( strTime.contains("+") || strTime.contains("-") ) + if ( strTime.tqcontains("+") || strTime.tqcontains("-") ) { - TQCharRef c = strTime.at( 8 ); + TQCharRef c = strTime.tqat( 8 ); int offset = strTime.right( strTime.length() - 9 ).toInt(); TQString strHour = strTime.left( 2 ); int nHour = strHour.toInt(); diff --git a/ark/zoo.h b/ark/zoo.h index 87e1c0b..6b9538e 100644 --- a/ark/zoo.h +++ b/ark/zoo.h @@ -36,6 +36,7 @@ class ArkWidget; class ZooArch : public Arch { Q_OBJECT + TQ_OBJECT public: ZooArch( ArkWidget *, const TQString & ); virtual ~ZooArch() { } -- cgit v1.2.1