diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /parts/openwith | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/openwith')
-rw-r--r-- | parts/openwith/openwithpart.cpp | 30 | ||||
-rw-r--r-- | parts/openwith/openwithpart.h | 4 |
2 files changed, 17 insertions, 17 deletions
diff --git a/parts/openwith/openwithpart.cpp b/parts/openwith/openwithpart.cpp index 4ff33ffb..2f45f867 100644 --- a/parts/openwith/openwithpart.cpp +++ b/parts/openwith/openwithpart.cpp @@ -1,6 +1,6 @@ #include "openwithpart.h" -#include <qfile.h> +#include <tqfile.h> #include <kpopupmenu.h> #include <kdevgenericfactory.h> @@ -21,13 +21,13 @@ typedef KDevGenericFactory<OpenWithPart> OpenWithFactory; static const KDevPluginInfo data("kdevopenwith"); K_EXPORT_COMPONENT_FACTORY(libkdevopenwith, OpenWithFactory(data)) -OpenWithPart::OpenWithPart(QObject *parent, const char *name, const QStringList &) +OpenWithPart::OpenWithPart(TQObject *parent, const char *name, const TQStringList &) : KDevPlugin(&data, parent, name ? name : "OpenWithPart") { setInstance( OpenWithFactory::instance() ); - connect(core(), SIGNAL(contextMenu(QPopupMenu*,const Context *)), - this, SLOT(fillContextMenu(QPopupMenu*,const Context *))); + connect(core(), TQT_SIGNAL(contextMenu(TQPopupMenu*,const Context *)), + this, TQT_SLOT(fillContextMenu(TQPopupMenu*,const Context *))); } @@ -36,7 +36,7 @@ OpenWithPart::~OpenWithPart() } -void OpenWithPart::fillContextMenu(QPopupMenu *popup, const Context *context) +void OpenWithPart::fillContextMenu(TQPopupMenu *popup, const Context *context) { if ( !context->hasType( Context::FileContext ) ) return; @@ -45,20 +45,20 @@ void OpenWithPart::fillContextMenu(QPopupMenu *popup, const Context *context) popup->insertSeparator(); - popup->insertItem( i18n("Open as UTF-8"), this, SLOT(openAsUtf8()) ); + popup->insertItem( i18n("Open as UTF-8"), this, TQT_SLOT(openAsUtf8()) ); KPopupMenu * openAsPopup = new KPopupMenu( popup ); int id = popup->insertItem( i18n("Open As"), openAsPopup ); popup->setWhatsThis(id, i18n("<b>Open As</b><p>Lists all encodings that can be used to open the selected file.")); - QStringList encodings = KGlobal::charsets()->descriptiveEncodingNames(); + TQStringList encodings = KGlobal::charsets()->descriptiveEncodingNames(); int i = 0; - QStringList::const_iterator it = encodings.constBegin(); + TQStringList::const_iterator it = encodings.constBegin(); while ( it != encodings.constEnd() ) { - openAsPopup->insertItem( *it, this, SLOT(openAsEncoding(int)), 0, i ); + openAsPopup->insertItem( *it, this, TQT_SLOT(openAsEncoding(int)), 0, i ); ++it; i++; } @@ -66,15 +66,15 @@ void OpenWithPart::fillContextMenu(QPopupMenu *popup, const Context *context) KPopupMenu * openWithPopup = new KPopupMenu( popup ); // hmmm.. what to do here? open every different mimetype seperately? Just go with the first for now.. - QString mimeType = KMimeType::findByURL(m_urls.first(), 0, true, true)->name(); + TQString mimeType = KMimeType::findByURL(m_urls.first(), 0, true, true)->name(); KTrader::OfferList offers = KTrader::self()->query(mimeType, "Type == 'Application'"); if (offers.count() > 0) { KTrader::OfferList::Iterator it; for (it = offers.begin(); it != offers.end(); ++it) { - KAction *action = new KAction((*it)->name(), (*it)->icon(), 0, 0, QFile::encodeName( (*it)->desktopEntryPath() ).data()); - connect(action, SIGNAL(activated()), this, SLOT(openWithService())); + KAction *action = new KAction((*it)->name(), (*it)->icon(), 0, 0, TQFile::encodeName( (*it)->desktopEntryPath() ).data()); + connect(action, TQT_SIGNAL(activated()), this, TQT_SLOT(openWithService())); action->plug( openWithPopup ); } } @@ -85,7 +85,7 @@ void OpenWithPart::fillContextMenu(QPopupMenu *popup, const Context *context) openWithPopup->insertSeparator(); // make sure the generic "Open with ..." entry gets appended to the submenu - id = openWithPopup->insertItem(i18n("Open With..."), this, SLOT(openWithDialog())); + id = openWithPopup->insertItem(i18n("Open With..."), this, TQT_SLOT(openWithDialog())); openWithPopup->setWhatsThis(id, i18n("<b>Open With...</b><p>Provides a dialog to choose the application to open the selected file.")); } @@ -108,8 +108,8 @@ void OpenWithPart::openWithDialog() void OpenWithPart::openAsEncoding( int id ) { - QStringList encodings = KGlobal::charsets()->descriptiveEncodingNames(); - QString encoding; + TQStringList encodings = KGlobal::charsets()->descriptiveEncodingNames(); + TQString encoding; if ( id <= encodings.count() && id >= 0 ) { encoding = KGlobal::charsets()->encodingForName( encodings[ id ] ); diff --git a/parts/openwith/openwithpart.h b/parts/openwith/openwithpart.h index c79ad164..74add82a 100644 --- a/parts/openwith/openwithpart.h +++ b/parts/openwith/openwithpart.h @@ -15,13 +15,13 @@ class OpenWithPart : public KDevPlugin public: - OpenWithPart(QObject *parent, const char *name, const QStringList &); + OpenWithPart(TQObject *parent, const char *name, const TQStringList &); ~OpenWithPart(); private slots: - void fillContextMenu(QPopupMenu *popup, const Context *context); + void fillContextMenu(TQPopupMenu *popup, const Context *context); void openWithService(); void openWithDialog(); |