From d6f8bbb45b267065a6907e71ff9c98bb6d161241 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:56:07 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- parts/openwith/openwithpart.cpp | 30 +++++++++++++++--------------- parts/openwith/openwithpart.h | 4 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) (limited to 'parts/openwith') 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 +#include #include #include @@ -21,13 +21,13 @@ typedef KDevGenericFactory 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("Open As

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("Open With...

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(); -- cgit v1.2.1