summaryrefslogtreecommitdiffstats
path: root/konq-plugins/arkplugin
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:22:56 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:22:56 +0000
commit7346aee26bf190a7e70333c40fab4caca847cd27 (patch)
tree4b019b434f88dcc3eeaafe1d3f26240b4c4718e8 /konq-plugins/arkplugin
parent23a3d3aa5b44cbdf305495919866d9dbf4f6da54 (diff)
downloadtdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.tar.gz
tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konq-plugins/arkplugin')
-rw-r--r--konq-plugins/arkplugin/arkplugin.cpp124
-rw-r--r--konq-plugins/arkplugin/arkplugin.h24
2 files changed, 74 insertions, 74 deletions
diff --git a/konq-plugins/arkplugin/arkplugin.cpp b/konq-plugins/arkplugin/arkplugin.cpp
index 35e610e..9d5e0f8 100644
--- a/konq-plugins/arkplugin/arkplugin.cpp
+++ b/konq-plugins/arkplugin/arkplugin.cpp
@@ -33,19 +33,19 @@
#include <kurl.h>
#include <kio/netaccess.h>
-#include <qdir.h>
-#include <qcstring.h>
-#include <qsignalmapper.h>
-#include <qobject.h>
+#include <tqdir.h>
+#include <tqcstring.h>
+#include <tqsignalmapper.h>
+#include <tqobject.h>
typedef KGenericFactory<ArkMenu, KonqPopupMenu> ArkMenuFactory;
K_EXPORT_COMPONENT_FACTORY( libarkplugin, ArkMenuFactory("arkplugin") )
-ArkMenu::ArkMenu( KonqPopupMenu * popupmenu, const char *name, const QStringList& /* list */ )
+ArkMenu::ArkMenu( KonqPopupMenu * popupmenu, const char *name, const TQStringList& /* list */ )
: KonqPopupMenuPlugin( popupmenu, name),
m_compAsMapper( 0 ), m_addToMapper( 0 ), m_conf( 0 )
{
- if ( ( QCString( kapp->name() ) == "kdesktop" && !kapp->authorize("editable_desktop_icons" ) )
+ if ( ( TQCString( kapp->name() ) == "kdesktop" && !kapp->authorize("editable_desktop_icons" ) )
|| ( KStandardDirs::findExe( "ark" ).isNull() ) )
return;
@@ -86,7 +86,7 @@ ArkMenu::ArkMenu( KonqPopupMenu * popupmenu, const char *name, const QStringList
break;
}
- QString ext;
+ TQString ext;
KActionMenu * actionMenu;
KAction * action;
if ( hasOther && itemList.first()->name()!="." && popupmenu->protocolInfo().supportsWriting() ) // don't try to compress if we right click on a folder without files selected
@@ -99,13 +99,13 @@ ArkMenu::ArkMenu( KonqPopupMenu * popupmenu, const char *name, const QStringList
item = itemList.first();
m_name = itemList.first()->name();
action = new KAction( i18n( "Compress as %1" ).arg( m_name + m_ext ), 0, this,
- SLOT( slotCompressAsDefault() ), actionCollection() );
+ TQT_SLOT( slotCompressAsDefault() ), actionCollection() );
}
else
{
action = new KAction( KMimeType::mimeType( m_conf->readEntry(
"LastMimeType", "application/x-tgz" ) )->comment(),
- 0, this, SLOT( slotCompressAsDefault() ), actionCollection() );
+ 0, this, TQT_SLOT( slotCompressAsDefault() ), actionCollection() );
}
actionMenu->insert( action );
@@ -117,14 +117,14 @@ ArkMenu::ArkMenu( KonqPopupMenu * popupmenu, const char *name, const QStringList
if ( itemList.first()->url().isLocalFile() )
actionMenu->insert( m_addToMenu );
- connect( m_compAsMenu->popupMenu(), SIGNAL( aboutToShow() ),
- this, SLOT( slotPrepareCompAsMenu() ) );
- connect( m_addToMenu->popupMenu(), SIGNAL( aboutToShow() ),
- this, SLOT( slotPrepareAddToMenu() ) );
+ connect( m_compAsMenu->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( slotPrepareCompAsMenu() ) );
+ connect( m_addToMenu->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( slotPrepareAddToMenu() ) );
action = new KAction( i18n( "Add to Archive..." ), 0, this,
- SLOT( slotAdd() ), actionCollection() );
+ TQT_SLOT( slotAdd() ), actionCollection() );
actionMenu->insert( action );
addAction( actionMenu );
}
@@ -136,30 +136,30 @@ ArkMenu::ArkMenu( KonqPopupMenu * popupmenu, const char *name, const QStringList
actionMenu = new KActionMenu( i18n( "Extract" ), "ark", actionCollection(), "ark_extract_menu" );
action = new KAction( i18n( "Extract Here" ), 0, this,
- SLOT( slotExtractHere() ), actionCollection() );
+ TQT_SLOT( slotExtractHere() ), actionCollection() );
actionMenu->insert( action );
// stolen from arkwidget.cpp
if ( itemCount == 1 )
{
- QString targetName = itemList.first()->name();
+ TQString targetName = itemList.first()->name();
stripExtension( targetName );
action = new KAction( i18n( "Extract to %1" ).arg( targetName ), 0, this,
- SLOT( slotExtractToSubfolders() ), actionCollection() );
+ TQT_SLOT( slotExtractToSubfolders() ), actionCollection() );
}
else
{
action = new KAction( i18n( "Extract to Subfolders" ), 0, this,
- SLOT( slotExtractToSubfolders() ), actionCollection() );
+ TQT_SLOT( slotExtractToSubfolders() ), actionCollection() );
}
actionMenu->insert( action );
action = new KAction( i18n( "Extract To..." ), 0 , this,
- SLOT( slotExtractTo() ), actionCollection() );
+ TQT_SLOT( slotExtractTo() ), actionCollection() );
actionMenu->insert( action );
addAction( actionMenu );
}
else
{
- action = new KAction( i18n( "Extract To..." ), "ark", 0, this, SLOT( slotExtractTo() ), actionCollection(), "ark_extract_menu" );
+ action = new KAction( i18n( "Extract To..." ), "ark", 0, this, TQT_SLOT( slotExtractTo() ), actionCollection(), "ark_extract_menu" );
addAction( action );
}
}
@@ -173,17 +173,17 @@ ArkMenu::~ArkMenu()
void ArkMenu::slotPrepareCompAsMenu()
{
- disconnect( m_compAsMenu->popupMenu(), SIGNAL( aboutToShow() ),
- this, SLOT( slotPrepareCompAsMenu() ) );
+ disconnect( m_compAsMenu->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( slotPrepareCompAsMenu() ) );
KAction * action;
- m_compAsMapper = new QSignalMapper( this, "compAsMapper" );
- QString ext;
- QStringList newExt;
+ m_compAsMapper = new TQSignalMapper( this, "compAsMapper" );
+ TQString ext;
+ TQStringList newExt;
unsigned int counter = 0;
- QCString actionName;
- QStringList::Iterator eit;
- QStringList::Iterator mit;
+ TQCString actionName;
+ TQStringList::Iterator eit;
+ TQStringList::Iterator mit;
mit = m_archiveMimeTypes.begin();
for ( ; mit != m_archiveMimeTypes.end(); ++mit )
{
@@ -195,13 +195,13 @@ void ArkMenu::slotPrepareCompAsMenu()
if ( m_urlList.count() == 1 )
{
action = new KAction( m_name + (*eit), 0, m_compAsMapper,
- SLOT( map() ), actionCollection() );
+ TQT_SLOT( map() ), actionCollection() );
}
else
{
ext = KMimeType::mimeType(*mit)->comment();
action = new KAction( ext, 0, m_compAsMapper,
- SLOT( map() ), actionCollection() );
+ TQT_SLOT( map() ), actionCollection() );
}
m_compAsMenu->insert( action );
@@ -218,13 +218,13 @@ void ArkMenu::slotPrepareCompAsMenu()
m_extensionList += newExt;
}
- connect( m_compAsMapper, SIGNAL( mapped( int ) ), SLOT( slotCompressAs( int ) ) );
+ connect( m_compAsMapper, TQT_SIGNAL( mapped( int ) ), TQT_SLOT( slotCompressAs( int ) ) );
}
void ArkMenu::slotPrepareAddToMenu()
{
- disconnect( m_addToMenu->popupMenu(), SIGNAL( aboutToShow() ),
- this, SLOT( slotPrepareAddToMenu() ) );
+ disconnect( m_addToMenu->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( slotPrepareAddToMenu() ) );
if ( m_extensionList.isEmpty() ) // is filled in slotPrepareCompAsMenu
@@ -232,20 +232,20 @@ void ArkMenu::slotPrepareAddToMenu()
unsigned int counter = 0;
KAction * action;
- m_addToMapper = new QSignalMapper( this, "addToMapper" );
- QCString actionName;
- QStringList::Iterator mit;
+ m_addToMapper = new TQSignalMapper( this, "addToMapper" );
+ TQCString actionName;
+ TQStringList::Iterator mit;
KURL archive;
- QDir dir( m_urlList.first().directory() );
- QStringList entries = dir.entryList();
- QStringList::Iterator uit = entries.begin();
+ TQDir dir( m_urlList.first().directory() );
+ TQStringList entries = dir.entryList();
+ TQStringList::Iterator uit = entries.begin();
for ( ; uit != entries.end(); ++uit )
{
for ( mit = m_extensionList.begin(); mit != m_extensionList.end(); ++mit )
if ( (*uit).endsWith(*mit) )
{
action = new KAction( *uit, 0, m_addToMapper,
- SLOT( map() ), actionCollection() );
+ TQT_SLOT( map() ), actionCollection() );
m_addToMenu->insert( action );
m_addToMapper->setMapping( action, counter );
archive.setPath( *uit );
@@ -254,7 +254,7 @@ void ArkMenu::slotPrepareAddToMenu()
break;
}
}
- connect( m_addToMapper, SIGNAL( mapped( int ) ), SLOT( slotAddTo( int ) ) );
+ connect( m_addToMapper, TQT_SIGNAL( mapped( int ) ), TQT_SLOT( slotAddTo( int ) ) );
}
void ArkMenu::compMimeTypes()
@@ -395,11 +395,11 @@ void ArkMenu::extMimeTypes()
m_extractMimeTypes << "application/x-archive";
}
-void ArkMenu::stripExtension( QString & name )
+void ArkMenu::stripExtension( TQString & name )
{
- QStringList patternList = KMimeType::findByPath( name )->patterns();
- QStringList::Iterator it = patternList.begin();
- QString ext;
+ TQStringList patternList = KMimeType::findByPath( name )->patterns();
+ TQStringList::Iterator it = patternList.begin();
+ TQString ext;
for ( ; it != patternList.end(); ++it )
{
ext = (*it).remove( '*' );
@@ -413,10 +413,10 @@ void ArkMenu::stripExtension( QString & name )
void ArkMenu::slotCompressAs( int pos )
{
- QCString name;
- QString extension, mimeType;
+ TQCString name;
+ TQString extension, mimeType;
KURL target;
- QStringList filelist( m_urlStringList );
+ TQStringList filelist( m_urlStringList );
//if KMimeType returns .ZIP, .7Z or .RAR. convert them to lowercase
if ( m_extensionList[ pos ].contains ( ".ZIP" ) )
@@ -446,9 +446,9 @@ void ArkMenu::slotCompressAs( int pos )
m_conf->setGroup( "ArkPlugin" );
m_conf->writeEntry( "LastExtension", extension );
- QStringList extensions;
- QStringList::Iterator eit;
- QStringList::Iterator mit = m_archiveMimeTypes.begin();
+ TQStringList extensions;
+ TQStringList::Iterator eit;
+ TQStringList::Iterator mit = m_archiveMimeTypes.begin();
bool done = false;
for ( ; mit != m_archiveMimeTypes.end() && !done; ++mit )
{
@@ -488,9 +488,9 @@ void ArkMenu::slotCompressAsDefault()
}
// make work for URLs
-void ArkMenu::compressAs( const QStringList &name, const KURL & compressed )
+void ArkMenu::compressAs( const TQStringList &name, const KURL & compressed )
{
- QStringList args;
+ TQStringList args;
args << "--add-to";
args += name;
args << compressed.url();
@@ -499,7 +499,7 @@ void ArkMenu::compressAs( const QStringList &name, const KURL & compressed )
void ArkMenu::slotAddTo( int pos )
{
- QStringList args( m_urlStringList );
+ TQStringList args( m_urlStringList );
args.prepend( "--add-to" );
KURL archive( m_urlStringList.first() );
@@ -512,7 +512,7 @@ void ArkMenu::slotAddTo( int pos )
void ArkMenu::slotAdd()
{
- QStringList args( m_urlStringList );
+ TQStringList args( m_urlStringList );
args.prepend( "--add" );
kapp->kdeinitExec( "ark", args );
@@ -520,11 +520,11 @@ void ArkMenu::slotAdd()
void ArkMenu::slotExtractHere()
{
- for ( QValueList<KURL>::ConstIterator it = m_urlList.constBegin();
+ for ( TQValueList<KURL>::ConstIterator it = m_urlList.constBegin();
it != m_urlList.constEnd();
++it )
{
- QStringList args;
+ TQStringList args;
KURL targetDirectory = ( *it ).url();
targetDirectory.setPath( targetDirectory.directory() );
args << "--extract-to" << targetDirectory.url() << ( *it ).url();
@@ -534,13 +534,13 @@ void ArkMenu::slotExtractHere()
void ArkMenu::slotExtractToSubfolders()
{
- for ( QStringList::ConstIterator it = m_urlStringList.constBegin();
+ for ( TQStringList::ConstIterator it = m_urlStringList.constBegin();
it != m_urlStringList.constEnd();
++it )
{
KURL targetDir;
- QString dirName;
- QStringList args;
+ TQString dirName;
+ TQStringList args;
targetDir = *it;
dirName = targetDir.path();
@@ -553,11 +553,11 @@ void ArkMenu::slotExtractToSubfolders()
void ArkMenu::slotExtractTo()
{
- for ( QStringList::ConstIterator it = m_urlStringList.constBegin();
+ for ( TQStringList::ConstIterator it = m_urlStringList.constBegin();
it != m_urlStringList.constEnd();
++it )
{
- QStringList args;
+ TQStringList args;
args << "--extract" << *it;
kapp->kdeinitExec( "ark", args );
}
diff --git a/konq-plugins/arkplugin/arkplugin.h b/konq-plugins/arkplugin/arkplugin.h
index 8732294..6b9a6fe 100644
--- a/konq-plugins/arkplugin/arkplugin.h
+++ b/konq-plugins/arkplugin/arkplugin.h
@@ -31,7 +31,7 @@ class QSignalMapper;
class ArkMenu : public KonqPopupMenuPlugin {
Q_OBJECT
public:
- ArkMenu( KonqPopupMenu *, const char *name, const QStringList & list );
+ ArkMenu( KonqPopupMenu *, const char *name, const TQStringList & list );
virtual ~ArkMenu();
public slots:
@@ -48,24 +48,24 @@ public slots:
protected:
void extMimeTypes();
void compMimeTypes();
- void compressAs( const QStringList &name, const KURL & compressed );
+ void compressAs( const TQStringList &name, const KURL & compressed );
- void stripExtension( QString & name );
+ void stripExtension( TQString & name );
private:
- QString m_name, m_ext;
- QValueList<KURL> m_urlList;
- QStringList m_urlStringList;
+ TQString m_name, m_ext;
+ TQValueList<KURL> m_urlList;
+ TQStringList m_urlStringList;
KURL::List m_archiveList;
- QStringList m_archiveMimeTypes;
- QStringList m_extractMimeTypes;
- QStringList m_extensionList;
+ TQStringList m_archiveMimeTypes;
+ TQStringList m_extractMimeTypes;
+ TQStringList m_extensionList;
KActionMenu * m_compAsMenu;
KActionMenu * m_addToMenu;
- QSignalMapper * m_compAsMapper;
- QSignalMapper * m_addToMapper;
+ TQSignalMapper * m_compAsMapper;
+ TQSignalMapper * m_addToMapper;
KConfig * m_conf;
- QString m_dir; //contains the currect directory
+ TQString m_dir; //contains the currect directory
};
#endif