summaryrefslogtreecommitdiffstats
path: root/parts/openwith/openwithpart.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parts/openwith/openwithpart.cpp')
-rw-r--r--parts/openwith/openwithpart.cpp30
1 files changed, 15 insertions, 15 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 ] );