diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
commit | 395a904bff7b4d6ead445c342f7ac0c5fbf29121 (patch) | |
tree | 9829cadb79d2cc7c29a940627fadb28b11e54150 /konq-plugins/kuick | |
parent | 399f47c376fdf4d19192732a701ea9578d11619d (diff) | |
download | tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.tar.gz tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.zip |
TQt4 port kdeaddons
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1237404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konq-plugins/kuick')
-rw-r--r-- | konq-plugins/kuick/kcmkuick/kcmkuick.cpp | 4 | ||||
-rw-r--r-- | konq-plugins/kuick/kcmkuick/kcmkuick.h | 3 | ||||
-rw-r--r-- | konq-plugins/kuick/kcmkuick/kcmkuickdialog.ui | 36 | ||||
-rw-r--r-- | konq-plugins/kuick/kdirmenu.cpp | 24 | ||||
-rw-r--r-- | konq-plugins/kuick/kdirmenu.h | 5 | ||||
-rw-r--r-- | konq-plugins/kuick/kimcontactmenu.cpp | 4 | ||||
-rw-r--r-- | konq-plugins/kuick/kimcontactmenu.h | 5 | ||||
-rw-r--r-- | konq-plugins/kuick/kmetamenu.cpp | 20 | ||||
-rw-r--r-- | konq-plugins/kuick/kmetamenu.h | 3 | ||||
-rw-r--r-- | konq-plugins/kuick/kuick_plugin.cpp | 4 | ||||
-rw-r--r-- | konq-plugins/kuick/kuick_plugin.h | 1 |
11 files changed, 57 insertions, 52 deletions
diff --git a/konq-plugins/kuick/kcmkuick/kcmkuick.cpp b/konq-plugins/kuick/kcmkuick/kcmkuick.cpp index 27459ee..de544bf 100644 --- a/konq-plugins/kuick/kcmkuick/kcmkuick.cpp +++ b/konq-plugins/kuick/kcmkuick/kcmkuick.cpp @@ -33,8 +33,8 @@ typedef KGenericFactory<KCMKuick, TQWidget> KuickFactory; K_EXPORT_COMPONENT_FACTORY ( kcm_kuick, KuickFactory( "kcmkuick" ) ) -KCMKuick::KCMKuick(TQWidget *parent, const char *name, const TQStringList &) -:KCModule(parent, name) +KCMKuick::KCMKuick(TQWidget *tqparent, const char *name, const TQStringList &) +:KCModule(tqparent, name) { KAboutData *ab=new KAboutData( "kcmkuick", I18N_NOOP("KCM Kuick"), "0.2",I18N_NOOP("KControl module for Kuick's configuration"), KAboutData::License_GPL, diff --git a/konq-plugins/kuick/kcmkuick/kcmkuick.h b/konq-plugins/kuick/kcmkuick/kcmkuick.h index d4316eb..6ff97eb 100644 --- a/konq-plugins/kuick/kcmkuick/kcmkuick.h +++ b/konq-plugins/kuick/kcmkuick/kcmkuick.h @@ -24,9 +24,10 @@ class KCMKuick : public KCModule { Q_OBJECT + TQ_OBJECT public: - KCMKuick (TQWidget *parent, const char *name, const TQStringList &); + KCMKuick (TQWidget *tqparent, const char *name, const TQStringList &); ~KCMKuick(); void load(); void load(const TQString &); diff --git a/konq-plugins/kuick/kcmkuick/kcmkuickdialog.ui b/konq-plugins/kuick/kcmkuick/kcmkuickdialog.ui index 5001ad9..2ca7a5c 100644 --- a/konq-plugins/kuick/kcmkuick/kcmkuickdialog.ui +++ b/konq-plugins/kuick/kcmkuick/kcmkuickdialog.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>KCMKuickDialog</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KCMKuickDialog</cstring> </property> @@ -22,7 +22,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>m_chkShow</cstring> </property> @@ -30,7 +30,7 @@ <string>&Show "Copy To" and "Move To" entries in context menus</string> </property> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_grpCopy</cstring> </property> @@ -47,7 +47,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QPushButton" row="2" column="0"> + <widget class="TQPushButton" row="2" column="0"> <property name="name"> <cstring>pbCopyClear</cstring> </property> @@ -55,7 +55,7 @@ <string>&Clear List</string> </property> </widget> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>m_txtCopyDir</cstring> </property> @@ -63,7 +63,7 @@ <string>folders.</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_txtCopyCache</cstring> </property> @@ -79,7 +79,7 @@ <string>Cache the last</string> </property> </widget> - <widget class="QSpinBox" row="0" column="1"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> <cstring>m_sbCopy</cstring> </property> @@ -100,7 +100,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -109,7 +109,7 @@ </spacer> </grid> </widget> - <widget class="QGroupBox"> + <widget class="TQGroupBox"> <property name="name"> <cstring>m_grpMove</cstring> </property> @@ -126,7 +126,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QPushButton" row="2" column="0"> + <widget class="TQPushButton" row="2" column="0"> <property name="name"> <cstring>pbMoveClear</cstring> </property> @@ -134,7 +134,7 @@ <string>Clear &List</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>m_txtMoveCache</cstring> </property> @@ -142,7 +142,7 @@ <string>Cache the last</string> </property> </widget> - <widget class="QSpinBox" row="0" column="1"> + <widget class="TQSpinBox" row="0" column="1"> <property name="name"> <cstring>m_sbMove</cstring> </property> @@ -153,7 +153,7 @@ <number>1</number> </property> </widget> - <widget class="QLabel" row="0" column="2"> + <widget class="TQLabel" row="0" column="2"> <property name="name"> <cstring>m_txtMoveDir</cstring> </property> @@ -171,7 +171,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -188,10 +188,10 @@ <tabstop>m_sbMove</tabstop> <tabstop>pbMoveClear</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot access="private">slotClearMoveCache()</slot> <slot access="protected">slotClearCopyCache()</slot> -</slots> -<layoutdefaults spacing="6" margin="0"/> -<layoutfunctions spacing="KDialog::spacingHint"/> +</Q_SLOTS> +<tqlayoutdefaults spacing="6" margin="0"/> +<tqlayoutfunctions spacing="KDialog::spacingHint"/> </UI> diff --git a/konq-plugins/kuick/kdirmenu.cpp b/konq-plugins/kuick/kdirmenu.cpp index 4dbd212..1174ee3 100644 --- a/konq-plugins/kuick/kdirmenu.cpp +++ b/konq-plugins/kuick/kdirmenu.cpp @@ -34,28 +34,28 @@ TQMap<TQString, TQPixmap> *KDirMenu::_icons = 0; -KDirMenu::KDirMenu ( TQWidget *parent, const KURL &_src, +KDirMenu::KDirMenu ( TQWidget *tqparent, const KURL &_src, const TQString &_path, const TQString &_name, bool /*showfile*/ ) - : TQPopupMenu(parent), + : TQPopupMenu(tqparent), path(_path), name(_name), src( _src ), action( 0 ) { - children.setAutoDelete( true ); + tqchildren.setAutoDelete( true ); initIconMap( ); connect( this, TQT_SIGNAL( aboutToShow( ) ), this, TQT_SLOT( slotAboutToShow( ) ) ); connect( this, TQT_SIGNAL( aboutToHide( ) ), this, TQT_SLOT( slotAboutToHide( ) ) ); - children.clear(); // just in case + tqchildren.clear(); // just in case TQFileInfo fileInfo(path); if (( src.path() != path || !src.isLocalFile()) && fileInfo.isWritable()) - action = new KAction(name, 0, this, TQT_SLOT(new_slot( ) ), this); + action = new KAction(name, 0, TQT_TQOBJECT(this), TQT_SLOT(new_slot( ) ), TQT_TQOBJECT(this)); } KDirMenu::~KDirMenu( ) { delete action; clear( ); - children.clear( ); + tqchildren.clear( ); } void KDirMenu::insert( KDirMenu *submenu, const TQString &_path ) { static const TQIconSet folder = SmallIconSet("folder"); @@ -76,11 +76,11 @@ void KDirMenu::insert( KDirMenu *submenu, const TQString &_path ) { KIcon::DefaultState, 0, true); if(icon.isNull()) icon = CICON("folder"); - insertItem( icon, escapedPath.replace( "&", "&&" ), submenu ); + insertItem( icon, escapedPath.tqreplace( "&", "&&" ), submenu ); } else - insertItem( folder, escapedPath.replace( "&", "&&" ), submenu ); - children.append( submenu ); + insertItem( folder, escapedPath.tqreplace( "&", "&&" ), submenu ); + tqchildren.append( submenu ); connect(submenu, TQT_SIGNAL(fileChosen(const TQString &)), this, TQT_SLOT(slotFileSelected(const TQString &))); } @@ -101,11 +101,11 @@ void KDirMenu::slotAboutToShow( ) { setItemEnabled( insertItem( name ), false ); // all dirs writeable and readable - TQDir dir(path, TQString::null, + TQDir dir(path, TQString(), TQDir::Name | TQDir::DirsFirst | TQDir::IgnoreCase, TQDir::Dirs | TQDir::Readable | TQDir::Executable); - const QFileInfoList* dirList = dir.entryInfoList(); + const TQFileInfoList* dirList = dir.entryInfoList(); if ( !dirList || dirList->isEmpty() ) { if ( action ) action->setEnabled( false ); @@ -123,7 +123,7 @@ void KDirMenu::slotAboutToShow( ) { static const TQString& dot = KGlobal::staticQString( "." ); static const TQString& dotdot = KGlobal::staticQString( ".." ); - for ( QFileInfoListIterator it( *dirList ); *it; ++it ) { + for ( TQFileInfoListIterator it( *dirList ); *it; ++it ) { TQString fileName = (*it)->fileName(); if ( fileName == dot || fileName == dotdot ) continue; diff --git a/konq-plugins/kuick/kdirmenu.h b/konq-plugins/kuick/kdirmenu.h index 5bbe68e..cdc2933 100644 --- a/konq-plugins/kuick/kdirmenu.h +++ b/konq-plugins/kuick/kdirmenu.h @@ -30,8 +30,9 @@ class KURL; class KDirMenu : public TQPopupMenu { Q_OBJECT + TQ_OBJECT public: - KDirMenu( TQWidget *parent, const KURL &src, const TQString &_path, + KDirMenu( TQWidget *tqparent, const KURL &src, const TQString &_path, const TQString &name, bool showfiles = false ); ~KDirMenu( ); void setPath( const TQString &_path); @@ -47,7 +48,7 @@ private: TQString name; KURL src; KAction *action; - TQPtrList<KDirMenu> children; + TQPtrList<KDirMenu> tqchildren; void initIconMap( ); public slots: void slotAboutToShow( ); diff --git a/konq-plugins/kuick/kimcontactmenu.cpp b/konq-plugins/kuick/kimcontactmenu.cpp index 77ef7a4..e711df2 100644 --- a/konq-plugins/kuick/kimcontactmenu.cpp +++ b/konq-plugins/kuick/kimcontactmenu.cpp @@ -34,8 +34,8 @@ #include "kimcontactmenu.h" -KIMContactMenu::KIMContactMenu( TQWidget *parent, KIMProxy *proxy ) - : TQPopupMenu( parent), mProxy( proxy ) +KIMContactMenu::KIMContactMenu( TQWidget *tqparent, KIMProxy *proxy ) + : TQPopupMenu( tqparent), mProxy( proxy ) { #ifdef KIMCONTACTS_USE_KABC m_addressBook = KABC::StdAddressBook::self( false ); diff --git a/konq-plugins/kuick/kimcontactmenu.h b/konq-plugins/kuick/kimcontactmenu.h index 478c55b..2f1c0bb 100644 --- a/konq-plugins/kuick/kimcontactmenu.h +++ b/konq-plugins/kuick/kimcontactmenu.h @@ -31,11 +31,12 @@ namespace KABC { class AddressBook; } -class KIMContactMenu : public QPopupMenu +class KIMContactMenu : public TQPopupMenu { Q_OBJECT + TQ_OBJECT public: - KIMContactMenu( TQWidget *parent, KIMProxy *proxy ); + KIMContactMenu( TQWidget *tqparent, KIMProxy *proxy ); ~KIMContactMenu(); protected slots: // populate menus if not already populated diff --git a/konq-plugins/kuick/kmetamenu.cpp b/konq-plugins/kuick/kmetamenu.cpp index 2b5d78a..451f127 100644 --- a/konq-plugins/kuick/kmetamenu.cpp +++ b/konq-plugins/kuick/kmetamenu.cpp @@ -36,9 +36,9 @@ #include "kimcontactmenu.h" #include "kmetamenu.moc" -KMetaMenu::KMetaMenu( TQWidget *parent, const KURL &url, +KMetaMenu::KMetaMenu( TQWidget *tqparent, const KURL &url, const TQString &text, const TQString &key, KIMProxy *imProxy ) -: TQPopupMenu( parent), +: TQPopupMenu( tqparent), m_root( 0 ), m_home( 0 ), m_etc( 0 ), m_current( 0 ), m_browse( 0 ) { int recent_no; group = key; @@ -51,7 +51,7 @@ KMetaMenu::KMetaMenu( TQWidget *parent, const KURL &url, u.setPath(TQDir::homeDirPath()); if ( kapp->authorizeURLAction("list", u, u) ) { - m_home = new KDirMenu( parent, url, u.path() , text ); + m_home = new KDirMenu( tqparent, url, u.path() , text ); insertItem( SmallIcon( "kfm_home" ), i18n("&Home Folder"), m_home); dirList << u.path(); @@ -62,7 +62,7 @@ KMetaMenu::KMetaMenu( TQWidget *parent, const KURL &url, u.setPath(TQDir::rootDirPath()); if ( kapp->authorizeURLAction("list", u, u) ) { - m_root = new KDirMenu( parent, url, u.path() , text ); + m_root = new KDirMenu( tqparent, url, u.path() , text ); insertItem( SmallIcon( "folder_red" ), i18n("&Root Folder"), m_root); dirList << u.path(); @@ -75,7 +75,7 @@ KMetaMenu::KMetaMenu( TQWidget *parent, const KURL &url, if ( TQFileInfo( confDir ).isWritable() && kapp->authorizeURLAction("list", u, u) ) { - m_etc = new KDirMenu( parent, url, confDir, text ); + m_etc = new KDirMenu( tqparent, url, confDir, text ); insertItem( SmallIcon( "folder_yellow" ) , i18n("&System Configuration"), m_etc); dirList << confDir; @@ -85,7 +85,7 @@ KMetaMenu::KMetaMenu( TQWidget *parent, const KURL &url, } if ( url.isLocalFile() - && dirList.find( url.path() ) == dirList.end() + && dirList.tqfind( url.path() ) == dirList.end() && TQFileInfo( url.path() ).isWritable() && TQFileInfo( url.path() ).isDir() && kapp->authorizeURLAction("list", url, url) ) @@ -93,7 +93,7 @@ KMetaMenu::KMetaMenu( TQWidget *parent, const KURL &url, //(#60192) { // Also add current working directory - m_current = new KDirMenu( parent, url, url.path(), text ); + m_current = new KDirMenu( tqparent, url, url.path(), text ); insertItem( SmallIcon( "folder" ), i18n( "&Current Folder" ), m_current ); @@ -103,7 +103,7 @@ KMetaMenu::KMetaMenu( TQWidget *parent, const KURL &url, if ( imProxy ) { - m_contacts = new KIMContactMenu( parent, imProxy ); + m_contacts = new KIMContactMenu( tqparent, imProxy ); int item = insertItem( SmallIconSet( "personal" ), i18n( "C&ontact" ), m_contacts ); connect ( m_contacts, TQT_SIGNAL( contactChosen( const TQString &) ), TQT_SIGNAL( contactChosen( const TQString & ) ) ); if ( !imProxy->initialize() || imProxy->fileTransferContacts().isEmpty() ) @@ -111,7 +111,7 @@ KMetaMenu::KMetaMenu( TQWidget *parent, const KURL &url, } - m_browse = new KAction(i18n("&Browse..."), 0, this, TQT_SLOT(slotBrowse()), this ); + m_browse = new KAction(i18n("&Browse..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotBrowse()), TQT_TQOBJECT(this) ); m_browse->plug(this); // read the last chosen dirs // first set the group according to our parameter @@ -133,7 +133,7 @@ KMetaMenu::KMetaMenu( TQWidget *parent, const KURL &url, continue; } TQString escapedDir = *it; - KAction *action = new KAction(escapedDir.replace("&", "&&"), 0, this, TQT_SLOT(slotFastPath()), this); + KAction *action = new KAction(escapedDir.tqreplace("&", "&&"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotFastPath()), TQT_TQOBJECT(this)); action->plug(this ); actions.append( action ); ++it; diff --git a/konq-plugins/kuick/kmetamenu.h b/konq-plugins/kuick/kmetamenu.h index 6b23cb7..a15878b 100644 --- a/konq-plugins/kuick/kmetamenu.h +++ b/konq-plugins/kuick/kmetamenu.h @@ -35,9 +35,10 @@ class KURL; class KMetaMenu : public TQPopupMenu { Q_OBJECT + TQ_OBJECT public: - KMetaMenu( TQWidget *parent, const KURL &url, const TQString &text, + KMetaMenu( TQWidget *tqparent, const KURL &url, const TQString &text, const TQString &key, KIMProxy * imProxy = 0L ); KMetaMenu(); ~KMetaMenu(); diff --git a/konq-plugins/kuick/kuick_plugin.cpp b/konq-plugins/kuick/kuick_plugin.cpp index 772f169..27152e7 100644 --- a/konq-plugins/kuick/kuick_plugin.cpp +++ b/konq-plugins/kuick/kuick_plugin.cpp @@ -43,7 +43,7 @@ KTestMenu::KTestMenu( KonqPopupMenu *popupmenu, const char *name, const TQString meta_copy_mmu = 0L; meta_move_mmu = 0L; my_action = new KAction( "kuick_plugin", 0, this, TQT_SLOT( slotPopupMaeh( ) ), actionCollection( ), "Do some funky stuff" ); - addAction( my_action ); + tqaddAction( my_action ); addSeparator(); //popupmenu->addMerge(); connect( popup, TQT_SIGNAL(aboutToShow() ), this, TQT_SLOT(slotPrepareMenu( ) ) ); @@ -82,7 +82,7 @@ void KTestMenu::slotPrepareMenu( ) { // now it's time to set up the menu... for(int i= popup->count(); i >=1; i--) { int id = popup->idAt( i ); TQString text = popup->text( id ); - if( text.contains("kuick_plugin") ) { + if( text.tqcontains("kuick_plugin") ) { popup->removeItem( id ); if (isKDesktop && !kapp->authorize("editable_desktop_icons")) { diff --git a/konq-plugins/kuick/kuick_plugin.h b/konq-plugins/kuick/kuick_plugin.h index 8369f7f..cd35342 100644 --- a/konq-plugins/kuick/kuick_plugin.h +++ b/konq-plugins/kuick/kuick_plugin.h @@ -28,6 +28,7 @@ class KAction; class KURL; class KTestMenu : public KonqPopupMenuPlugin { Q_OBJECT + TQ_OBJECT public: KTestMenu (KonqPopupMenu *, const char *name, const TQStringList &list); virtual ~KTestMenu( ); |