summaryrefslogtreecommitdiffstats
path: root/kioslave/media/libmediacommon
diff options
context:
space:
mode:
Diffstat (limited to 'kioslave/media/libmediacommon')
-rw-r--r--kioslave/media/libmediacommon/actionlistboxitem.cpp8
-rw-r--r--kioslave/media/libmediacommon/actionlistboxitem.h6
-rw-r--r--kioslave/media/libmediacommon/medium.cpp94
-rw-r--r--kioslave/media/libmediacommon/medium.h84
-rw-r--r--kioslave/media/libmediacommon/notifieraction.cpp28
-rw-r--r--kioslave/media/libmediacommon/notifieraction.h30
-rw-r--r--kioslave/media/libmediacommon/notifiernothingaction.cpp2
-rw-r--r--kioslave/media/libmediacommon/notifiernothingaction.h2
-rw-r--r--kioslave/media/libmediacommon/notifieropenaction.cpp4
-rw-r--r--kioslave/media/libmediacommon/notifieropenaction.h4
-rw-r--r--kioslave/media/libmediacommon/notifierserviceaction.cpp54
-rw-r--r--kioslave/media/libmediacommon/notifierserviceaction.h22
-rw-r--r--kioslave/media/libmediacommon/notifiersettings.cpp104
-rw-r--r--kioslave/media/libmediacommon/notifiersettings.h34
14 files changed, 238 insertions, 238 deletions
diff --git a/kioslave/media/libmediacommon/actionlistboxitem.cpp b/kioslave/media/libmediacommon/actionlistboxitem.cpp
index 3551857c1..271d2e487 100644
--- a/kioslave/media/libmediacommon/actionlistboxitem.cpp
+++ b/kioslave/media/libmediacommon/actionlistboxitem.cpp
@@ -21,13 +21,13 @@
#include <klocale.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
-ActionListBoxItem::ActionListBoxItem(NotifierAction *action, QString mimetype, QListBox *parent)
- : QListBoxPixmap(parent, action->pixmap()),
+ActionListBoxItem::ActionListBoxItem(NotifierAction *action, TQString mimetype, TQListBox *parent)
+ : TQListBoxPixmap(parent, action->pixmap()),
m_action(action)
{
- QString text = m_action->label();
+ TQString text = m_action->label();
if ( m_action->autoMimetypes().contains( mimetype ) )
{
diff --git a/kioslave/media/libmediacommon/actionlistboxitem.h b/kioslave/media/libmediacommon/actionlistboxitem.h
index cdd8a3ff1..0378e1d6f 100644
--- a/kioslave/media/libmediacommon/actionlistboxitem.h
+++ b/kioslave/media/libmediacommon/actionlistboxitem.h
@@ -20,15 +20,15 @@
#ifndef _ACTIONLISTBOXITEM_H_
#define _ACTIONLISTBOXITEM_H_
-#include <qlistbox.h>
-#include <qstring.h>
+#include <tqlistbox.h>
+#include <tqstring.h>
#include "notifieraction.h"
class ActionListBoxItem : public QListBoxPixmap
{
public:
- ActionListBoxItem(NotifierAction *action, QString mimetype, QListBox *parent);
+ ActionListBoxItem(NotifierAction *action, TQString mimetype, TQListBox *parent);
~ActionListBoxItem();
NotifierAction *action() const;
diff --git a/kioslave/media/libmediacommon/medium.cpp b/kioslave/media/libmediacommon/medium.cpp
index 4cba32aeb..e7e91dd54 100644
--- a/kioslave/media/libmediacommon/medium.cpp
+++ b/kioslave/media/libmediacommon/medium.cpp
@@ -21,25 +21,25 @@
#include <kconfig.h>
#include <klocale.h>
-const QString Medium::SEPARATOR = "---";
+const TQString Medium::SEPARATOR = "---";
-Medium::Medium(const QString &id, const QString &name)
+Medium::Medium(const TQString &id, const TQString &name)
{
m_properties+= id; /* ID */
m_properties+= name; /* NAME */
m_properties+= name; /* LABEL */
- m_properties+= QString::null; /* USER_LABEL */
+ m_properties+= TQString::null; /* USER_LABEL */
m_properties+= "false"; /* MOUNTABLE */
- m_properties+= QString::null; /* DEVICE_NODE */
- m_properties+= QString::null; /* MOUNT_POINT */
- m_properties+= QString::null; /* FS_TYPE */
+ m_properties+= TQString::null; /* DEVICE_NODE */
+ m_properties+= TQString::null; /* MOUNT_POINT */
+ m_properties+= TQString::null; /* FS_TYPE */
m_properties+= "false"; /* MOUNTED */
- m_properties+= QString::null; /* BASE_URL */
- m_properties+= QString::null; /* MIME_TYPE */
- m_properties+= QString::null; /* ICON_NAME */
+ m_properties+= TQString::null; /* BASE_URL */
+ m_properties+= TQString::null; /* MIME_TYPE */
+ m_properties+= TQString::null; /* ICON_NAME */
m_properties+= "false"; /* ENCRYPTED */
- m_properties+= QString::null; /* CLEAR_DEVICE_UDI */
+ m_properties+= TQString::null; /* CLEAR_DEVICE_UDI */
loadUserLabel();
@@ -48,26 +48,26 @@ Medium::Medium(const QString &id, const QString &name)
Medium::Medium()
{
- m_properties+= QString::null; /* ID */
- m_properties+= QString::null; /* NAME */
- m_properties+= QString::null; /* LABEL */
- m_properties+= QString::null; /* USER_LABEL */
-
- m_properties+= QString::null; /* MOUNTABLE */
- m_properties+= QString::null; /* DEVICE_NODE */
- m_properties+= QString::null; /* MOUNT_POINT */
- m_properties+= QString::null; /* FS_TYPE */
- m_properties+= QString::null; /* MOUNTED */
- m_properties+= QString::null; /* BASE_URL */
- m_properties+= QString::null; /* MIME_TYPE */
- m_properties+= QString::null; /* ICON_NAME */
- m_properties+= QString::null; /* ENCRYPTED */
- m_properties+= QString::null; /* CLEAR_DEVICE_UDI */
+ m_properties+= TQString::null; /* ID */
+ m_properties+= TQString::null; /* NAME */
+ m_properties+= TQString::null; /* LABEL */
+ m_properties+= TQString::null; /* USER_LABEL */
+
+ m_properties+= TQString::null; /* MOUNTABLE */
+ m_properties+= TQString::null; /* DEVICE_NODE */
+ m_properties+= TQString::null; /* MOUNT_POINT */
+ m_properties+= TQString::null; /* FS_TYPE */
+ m_properties+= TQString::null; /* MOUNTED */
+ m_properties+= TQString::null; /* BASE_URL */
+ m_properties+= TQString::null; /* MIME_TYPE */
+ m_properties+= TQString::null; /* ICON_NAME */
+ m_properties+= TQString::null; /* ENCRYPTED */
+ m_properties+= TQString::null; /* CLEAR_DEVICE_UDI */
m_halmounted = false;
}
-const Medium Medium::create(const QStringList &properties)
+const Medium Medium::create(const TQStringList &properties)
{
Medium m;
@@ -93,7 +93,7 @@ const Medium Medium::create(const QStringList &properties)
return m;
}
-Medium::List Medium::createList(const QStringList &properties)
+Medium::List Medium::createList(const TQStringList &properties)
{
List l;
@@ -101,15 +101,15 @@ Medium::List Medium::createList(const QStringList &properties)
{
int media_count = properties.size()/(PROPERTIES_COUNT+1);
- QStringList props = properties;
+ TQStringList props = properties;
for(int i=0; i<media_count; i++)
{
const Medium m = create(props);
l.append(m);
- QStringList::iterator first = props.begin();
- QStringList::iterator last = props.find(SEPARATOR);
+ TQStringList::iterator first = props.begin();
+ TQStringList::iterator last = props.find(SEPARATOR);
++last;
props.erase(first, last);
}
@@ -119,12 +119,12 @@ Medium::List Medium::createList(const QStringList &properties)
}
-void Medium::setName(const QString &name)
+void Medium::setName(const TQString &name)
{
m_properties[NAME] = name;
}
-void Medium::setLabel(const QString &label)
+void Medium::setLabel(const TQString &label)
{
m_properties[LABEL] = label;
}
@@ -134,12 +134,12 @@ void Medium::setEncrypted(bool state)
m_properties[ENCRYPTED] = ( state ? "true" : "false" );
}
-void Medium::setUserLabel(const QString &label)
+void Medium::setUserLabel(const TQString &label)
{
KConfig cfg("mediamanagerrc");
cfg.setGroup("UserLabels");
- QString entry_name = m_properties[ID];
+ TQString entry_name = m_properties[ID];
if ( label.isNull() )
{
@@ -158,7 +158,7 @@ void Medium::loadUserLabel()
KConfig cfg("mediamanagerrc");
cfg.setGroup("UserLabels");
- QString entry_name = m_properties[ID];
+ TQString entry_name = m_properties[ID];
if ( cfg.hasKey(entry_name) )
{
@@ -166,7 +166,7 @@ void Medium::loadUserLabel()
}
else
{
- m_properties[USER_LABEL] = QString::null;
+ m_properties[USER_LABEL] = TQString::null;
}
}
@@ -185,9 +185,9 @@ bool Medium::mountableState(bool mounted)
return true;
}
-void Medium::mountableState(const QString &deviceNode,
- const QString &mountPoint,
- const QString &fsType, bool mounted)
+void Medium::mountableState(const TQString &deviceNode,
+ const TQString &mountPoint,
+ const TQString &fsType, bool mounted)
{
m_properties[MOUNTABLE] = "true";
m_properties[DEVICE_NODE] = deviceNode;
@@ -196,10 +196,10 @@ void Medium::mountableState(const QString &deviceNode,
m_properties[MOUNTED] = ( mounted ? "true" : "false" );
}
-void Medium::mountableState(const QString &deviceNode,
- const QString &clearDeviceUdi,
- const QString &mountPoint,
- const QString &fsType, bool mounted)
+void Medium::mountableState(const TQString &deviceNode,
+ const TQString &clearDeviceUdi,
+ const TQString &mountPoint,
+ const TQString &fsType, bool mounted)
{
m_properties[MOUNTABLE] = "true";
m_properties[DEVICE_NODE] = deviceNode;
@@ -209,18 +209,18 @@ void Medium::mountableState(const QString &deviceNode,
m_properties[MOUNTED] = ( mounted ? "true" : "false" );
}
-void Medium::unmountableState(const QString &baseURL)
+void Medium::unmountableState(const TQString &baseURL)
{
m_properties[MOUNTABLE] = "false";
m_properties[BASE_URL] = baseURL;
}
-void Medium::setMimeType(const QString &mimeType)
+void Medium::setMimeType(const TQString &mimeType)
{
m_properties[MIME_TYPE] = mimeType;
}
-void Medium::setIconName(const QString &iconName)
+void Medium::setIconName(const TQString &iconName)
{
m_properties[ICON_NAME] = iconName;
}
@@ -243,7 +243,7 @@ KURL Medium::prettyBaseURL() const
return KURL( mountPoint() );
}
-QString Medium::prettyLabel() const
+TQString Medium::prettyLabel() const
{
if ( !userLabel().isEmpty() )
{
diff --git a/kioslave/media/libmediacommon/medium.h b/kioslave/media/libmediacommon/medium.h
index 543bdf596..54e1556dc 100644
--- a/kioslave/media/libmediacommon/medium.h
+++ b/kioslave/media/libmediacommon/medium.h
@@ -19,15 +19,15 @@
#ifndef _MEDIUM_H_
#define _MEDIUM_H_
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <kurl.h>
-#include <qmap.h>
+#include <tqmap.h>
class Medium
{
public:
- typedef QValueList<const Medium> List;
+ typedef TQValueList<const Medium> List;
static const uint ID = 0;
static const uint NAME = 1;
@@ -44,51 +44,51 @@ public:
static const uint ENCRYPTED = 12;
static const uint CLEAR_DEVICE_UDI = 13;
static const uint PROPERTIES_COUNT = 14;
- static const QString SEPARATOR;
+ static const TQString SEPARATOR;
- Medium(const QString &id, const QString &name);
- static const Medium create(const QStringList &properties);
- static List createList(const QStringList &properties);
+ Medium(const TQString &id, const TQString &name);
+ static const Medium create(const TQStringList &properties);
+ static List createList(const TQStringList &properties);
- const QStringList &properties() const { return m_properties; }
+ const TQStringList &properties() const { return m_properties; }
- QString id() const { return m_properties[ID]; }
- QString name() const { return m_properties[NAME]; }
- QString label() const { return m_properties[LABEL]; }
- QString userLabel() const { return m_properties[USER_LABEL]; }
+ TQString id() const { return m_properties[ID]; }
+ TQString name() const { return m_properties[NAME]; }
+ TQString label() const { return m_properties[LABEL]; }
+ TQString userLabel() const { return m_properties[USER_LABEL]; }
bool isMountable() const { return m_properties[MOUNTABLE]=="true"; }
- QString deviceNode() const { return m_properties[DEVICE_NODE]; }
- QString mountPoint() const { return m_properties[MOUNT_POINT]; }
- QString fsType() const { return m_properties[FS_TYPE]; }
+ TQString deviceNode() const { return m_properties[DEVICE_NODE]; }
+ TQString mountPoint() const { return m_properties[MOUNT_POINT]; }
+ TQString fsType() const { return m_properties[FS_TYPE]; }
bool isMounted() const { return m_properties[MOUNTED]=="true"; }
- QString baseURL() const { return m_properties[BASE_URL]; }
- QString mimeType() const { return m_properties[MIME_TYPE]; }
- QString iconName() const { return m_properties[ICON_NAME]; }
+ TQString baseURL() const { return m_properties[BASE_URL]; }
+ TQString mimeType() const { return m_properties[MIME_TYPE]; }
+ TQString iconName() const { return m_properties[ICON_NAME]; }
bool isEncrypted() const { return m_properties[ENCRYPTED]=="true"; };
- QString clearDeviceUdi() const { return m_properties[CLEAR_DEVICE_UDI]; };
+ TQString clearDeviceUdi() const { return m_properties[CLEAR_DEVICE_UDI]; };
bool needMounting() const;
bool needDecryption() const;
KURL prettyBaseURL() const;
- QString prettyLabel() const;
+ TQString prettyLabel() const;
- void setName(const QString &name);
- void setLabel(const QString &label);
- void setUserLabel(const QString &label);
+ void setName(const TQString &name);
+ void setLabel(const TQString &label);
+ void setUserLabel(const TQString &label);
void setEncrypted(bool state);
bool mountableState(bool mounted);
- void mountableState(const QString &deviceNode,
- const QString &mountPoint,
- const QString &fsType, bool mounted);
- void mountableState(const QString &deviceNode,
- const QString &clearDeviceUdi,
- const QString &mountPoint,
- const QString &fsType, bool mounted);
- void unmountableState(const QString &baseURL = QString::null);
-
- void setMimeType(const QString &mimeType);
- void setIconName(const QString &iconName);
+ void mountableState(const TQString &deviceNode,
+ const TQString &mountPoint,
+ const TQString &fsType, bool mounted);
+ void mountableState(const TQString &deviceNode,
+ const TQString &clearDeviceUdi,
+ const TQString &mountPoint,
+ const TQString &fsType, bool mounted);
+ void unmountableState(const TQString &baseURL = TQString::null);
+
+ void setMimeType(const TQString &mimeType);
+ void setIconName(const TQString &iconName);
void setHalMounted(bool flag) const { m_halmounted = flag; }
bool halMounted() const { return m_halmounted; }
@@ -96,21 +96,21 @@ private:
Medium();
void loadUserLabel();
- QStringList m_properties;
+ TQStringList m_properties;
mutable bool m_halmounted;
-friend class QValueListNode<const Medium>;
+friend class TQValueListNode<const Medium>;
};
namespace MediaManagerUtils {
- static inline QMap<QString,QString> splitOptions(const QStringList & options)
+ static inline TQMap<TQString,TQString> splitOptions(const TQStringList & options)
{
- QMap<QString,QString> valids;
+ TQMap<TQString,TQString> valids;
- for (QStringList::ConstIterator it = options.begin(); it != options.end(); ++it)
+ for (TQStringList::ConstIterator it = options.begin(); it != options.end(); ++it)
{
- QString key = (*it).left((*it).find('='));
- QString value = (*it).mid((*it).find('=') + 1);
+ TQString key = (*it).left((*it).find('='));
+ TQString value = (*it).mid((*it).find('=') + 1);
valids[key] = value;
}
return valids;
diff --git a/kioslave/media/libmediacommon/notifieraction.cpp b/kioslave/media/libmediacommon/notifieraction.cpp
index 3eea682d4..d10314701 100644
--- a/kioslave/media/libmediacommon/notifieraction.cpp
+++ b/kioslave/media/libmediacommon/notifieraction.cpp
@@ -19,7 +19,7 @@
#include "notifieraction.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kglobal.h>
#include <kiconloader.h>
#include <kicontheme.h>
@@ -32,42 +32,42 @@ NotifierAction::~NotifierAction()
{
}
-void NotifierAction::setIconName(const QString &iconName)
+void NotifierAction::setIconName(const TQString &iconName)
{
m_iconName = iconName;
}
-void NotifierAction::setLabel(const QString &label)
+void NotifierAction::setLabel(const TQString &label)
{
m_label = label;
}
-QString NotifierAction::iconName() const
+TQString NotifierAction::iconName() const
{
return m_iconName;
}
-QPixmap NotifierAction::pixmap() const
+TQPixmap NotifierAction::pixmap() const
{
- QFile f( m_iconName );
+ TQFile f( m_iconName );
if ( f.exists() )
{
- return QPixmap( m_iconName );
+ return TQPixmap( m_iconName );
}
else
{
- QString path = KGlobal::iconLoader()->iconPath( m_iconName, -32 );
- return QPixmap( path );
+ TQString path = KGlobal::iconLoader()->iconPath( m_iconName, -32 );
+ return TQPixmap( path );
}
}
-QString NotifierAction::label() const
+TQString NotifierAction::label() const
{
return m_label;
}
-void NotifierAction::addAutoMimetype( const QString &mimetype )
+void NotifierAction::addAutoMimetype( const TQString &mimetype )
{
if ( !m_autoMimetypes.contains( mimetype ) )
{
@@ -75,12 +75,12 @@ void NotifierAction::addAutoMimetype( const QString &mimetype )
}
}
-void NotifierAction::removeAutoMimetype( const QString &mimetype )
+void NotifierAction::removeAutoMimetype( const TQString &mimetype )
{
m_autoMimetypes.remove( mimetype );
}
-QStringList NotifierAction::autoMimetypes()
+TQStringList NotifierAction::autoMimetypes()
{
return m_autoMimetypes;
}
@@ -90,7 +90,7 @@ bool NotifierAction::isWritable() const
return false;
}
-bool NotifierAction::supportsMimetype(const QString &/*mimetype*/) const
+bool NotifierAction::supportsMimetype(const TQString &/*mimetype*/) const
{
return true;
}
diff --git a/kioslave/media/libmediacommon/notifieraction.h b/kioslave/media/libmediacommon/notifieraction.h
index 028ce7433..21e2f01f4 100644
--- a/kioslave/media/libmediacommon/notifieraction.h
+++ b/kioslave/media/libmediacommon/notifieraction.h
@@ -21,8 +21,8 @@
#define _NOTIFIERACTION_H_
#include <kfileitem.h>
-#include <qstring.h>
-#include <qpixmap.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
class NotifierSettings;
@@ -32,27 +32,27 @@ public:
NotifierAction();
virtual ~NotifierAction();
- virtual QString label() const;
- virtual QString iconName() const;
- virtual void setLabel( const QString &label );
- virtual void setIconName( const QString &icon );
+ virtual TQString label() const;
+ virtual TQString iconName() const;
+ virtual void setLabel( const TQString &label );
+ virtual void setIconName( const TQString &icon );
- QPixmap pixmap() const;
+ TQPixmap pixmap() const;
- QStringList autoMimetypes();
+ TQStringList autoMimetypes();
- virtual QString id() const = 0;
+ virtual TQString id() const = 0;
virtual bool isWritable() const;
- virtual bool supportsMimetype( const QString &mimetype ) const;
+ virtual bool supportsMimetype( const TQString &mimetype ) const;
virtual void execute( KFileItem &medium ) = 0;
private:
- void addAutoMimetype( const QString &mimetype );
- void removeAutoMimetype( const QString &mimetype );
+ void addAutoMimetype( const TQString &mimetype );
+ void removeAutoMimetype( const TQString &mimetype );
- QString m_label;
- QString m_iconName;
- QStringList m_autoMimetypes;
+ TQString m_label;
+ TQString m_iconName;
+ TQStringList m_autoMimetypes;
friend class NotifierSettings;
};
diff --git a/kioslave/media/libmediacommon/notifiernothingaction.cpp b/kioslave/media/libmediacommon/notifiernothingaction.cpp
index adf7fcf04..6a86ad92f 100644
--- a/kioslave/media/libmediacommon/notifiernothingaction.cpp
+++ b/kioslave/media/libmediacommon/notifiernothingaction.cpp
@@ -28,7 +28,7 @@ NotifierNothingAction::NotifierNothingAction()
setLabel(i18n("Do Nothing"));
}
-QString NotifierNothingAction::id() const
+TQString NotifierNothingAction::id() const
{
return "#NothinAction";
}
diff --git a/kioslave/media/libmediacommon/notifiernothingaction.h b/kioslave/media/libmediacommon/notifiernothingaction.h
index 6fd564f61..2c0d22cfb 100644
--- a/kioslave/media/libmediacommon/notifiernothingaction.h
+++ b/kioslave/media/libmediacommon/notifiernothingaction.h
@@ -26,7 +26,7 @@ class NotifierNothingAction : public NotifierAction
{
public:
NotifierNothingAction();
- virtual QString id() const;
+ virtual TQString id() const;
virtual void execute(KFileItem &medium);
};
diff --git a/kioslave/media/libmediacommon/notifieropenaction.cpp b/kioslave/media/libmediacommon/notifieropenaction.cpp
index 2cf664cc6..4d6d8025c 100644
--- a/kioslave/media/libmediacommon/notifieropenaction.cpp
+++ b/kioslave/media/libmediacommon/notifieropenaction.cpp
@@ -28,7 +28,7 @@ NotifierOpenAction::NotifierOpenAction()
setLabel(i18n("Open in New Window"));
}
-QString NotifierOpenAction::id() const
+TQString NotifierOpenAction::id() const
{
return "#OpenAction";
}
@@ -38,7 +38,7 @@ void NotifierOpenAction::execute(KFileItem &medium)
medium.run();
}
-bool NotifierOpenAction::supportsMimetype( const QString &mimetype ) const
+bool NotifierOpenAction::supportsMimetype( const TQString &mimetype ) const
{
return !mimetype.contains( "blank" ) && !mimetype.contains( "encrypted" );
}
diff --git a/kioslave/media/libmediacommon/notifieropenaction.h b/kioslave/media/libmediacommon/notifieropenaction.h
index 3239e5ca2..4fe8a614e 100644
--- a/kioslave/media/libmediacommon/notifieropenaction.h
+++ b/kioslave/media/libmediacommon/notifieropenaction.h
@@ -26,9 +26,9 @@ class NotifierOpenAction : public NotifierAction
{
public:
NotifierOpenAction();
- virtual QString id() const;
+ virtual TQString id() const;
virtual void execute(KFileItem &medium);
- bool supportsMimetype( const QString &mimetype ) const;
+ bool supportsMimetype( const TQString &mimetype ) const;
};
#endif
diff --git a/kioslave/media/libmediacommon/notifierserviceaction.cpp b/kioslave/media/libmediacommon/notifierserviceaction.cpp
index ee2401945..c7bece4f8 100644
--- a/kioslave/media/libmediacommon/notifierserviceaction.cpp
+++ b/kioslave/media/libmediacommon/notifierserviceaction.cpp
@@ -19,9 +19,9 @@
#include "notifierserviceaction.h"
-#include <qdir.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
#include <kstddirs.h>
#include <kdesktopfile.h>
#include <klocale.h>
@@ -37,11 +37,11 @@ NotifierServiceAction::NotifierServiceAction()
m_service.m_strExec = "konqueror %u";
}
-QString NotifierServiceAction::id() const
+TQString NotifierServiceAction::id() const
{
if (m_filePath.isEmpty() || m_service.m_strName.isEmpty())
{
- return QString();
+ return TQString();
}
else
{
@@ -49,13 +49,13 @@ QString NotifierServiceAction::id() const
}
}
-void NotifierServiceAction::setIconName( const QString &icon )
+void NotifierServiceAction::setIconName( const TQString &icon )
{
m_service.m_strIcon = icon;
NotifierAction::setIconName( icon );
}
-void NotifierServiceAction::setLabel( const QString &label )
+void NotifierServiceAction::setLabel( const TQString &label )
{
m_service.m_strName = label;
NotifierAction::setLabel( label );
@@ -84,12 +84,12 @@ KDEDesktopMimeType::Service NotifierServiceAction::service() const
return m_service;
}
-void NotifierServiceAction::setFilePath(const QString &filePath)
+void NotifierServiceAction::setFilePath(const TQString &filePath)
{
m_filePath = filePath;
}
-QString NotifierServiceAction::filePath() const
+TQString NotifierServiceAction::filePath() const
{
return m_filePath;
}
@@ -98,18 +98,18 @@ void NotifierServiceAction::updateFilePath()
{
if ( !m_filePath.isEmpty() ) return;
- QString action_name = m_service.m_strName;
+ TQString action_name = m_service.m_strName;
action_name.replace( " ", "_" );
- QDir actions_dir( locateLocal( "data", "konqueror/servicemenus/", true ) );
+ TQDir actions_dir( locateLocal( "data", "konqueror/servicemenus/", true ) );
- QString filename = actions_dir.absFilePath( action_name + ".desktop" );
+ TQString filename = actions_dir.absFilePath( action_name + ".desktop" );
int counter = 1;
- while ( QFile::exists( filename ) )
+ while ( TQFile::exists( filename ) )
{
filename = actions_dir.absFilePath( action_name
- + QString::number( counter )
+ + TQString::number( counter )
+ ".desktop" );
counter++;
}
@@ -117,19 +117,19 @@ void NotifierServiceAction::updateFilePath()
m_filePath = filename;
}
-void NotifierServiceAction::setMimetypes(const QStringList &mimetypes)
+void NotifierServiceAction::setMimetypes(const TQStringList &mimetypes)
{
m_mimetypes = mimetypes;
}
-QStringList NotifierServiceAction::mimetypes()
+TQStringList NotifierServiceAction::mimetypes()
{
return m_mimetypes;
}
bool NotifierServiceAction::isWritable() const
{
- QFileInfo info( m_filePath );
+ TQFileInfo info( m_filePath );
if ( info.exists() )
{
@@ -137,30 +137,30 @@ bool NotifierServiceAction::isWritable() const
}
else
{
- info = QFileInfo( info.dirPath() );
+ info = TQFileInfo( info.dirPath() );
return info.isWritable();
}
}
-bool NotifierServiceAction::supportsMimetype(const QString &mimetype) const
+bool NotifierServiceAction::supportsMimetype(const TQString &mimetype) const
{
return m_mimetypes.contains(mimetype);
}
void NotifierServiceAction::save() const
{
- QFile::remove( m_filePath );
+ TQFile::remove( m_filePath );
KDesktopFile desktopFile(m_filePath);
- desktopFile.setGroup(QString("Desktop Action ") + m_service.m_strName);
- desktopFile.writeEntry(QString("Icon"), m_service.m_strIcon);
- desktopFile.writeEntry(QString("Name"), m_service.m_strName);
- desktopFile.writeEntry(QString("Exec"), m_service.m_strExec);
+ desktopFile.setGroup(TQString("Desktop Action ") + m_service.m_strName);
+ desktopFile.writeEntry(TQString("Icon"), m_service.m_strIcon);
+ desktopFile.writeEntry(TQString("Name"), m_service.m_strName);
+ desktopFile.writeEntry(TQString("Exec"), m_service.m_strExec);
desktopFile.setDesktopGroup();
- desktopFile.writeEntry(QString("ServiceTypes"), m_mimetypes, ",");
- desktopFile.writeEntry(QString("Actions"),
- QStringList(m_service.m_strName),";");
+ desktopFile.writeEntry(TQString("ServiceTypes"), m_mimetypes, ",");
+ desktopFile.writeEntry(TQString("Actions"),
+ TQStringList(m_service.m_strName),";");
}
diff --git a/kioslave/media/libmediacommon/notifierserviceaction.h b/kioslave/media/libmediacommon/notifierserviceaction.h
index 4d61a6b74..829193fba 100644
--- a/kioslave/media/libmediacommon/notifierserviceaction.h
+++ b/kioslave/media/libmediacommon/notifierserviceaction.h
@@ -21,7 +21,7 @@
#define _NOTIFIERSERVICEACTION_H_
#include <kmimetype.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "notifieraction.h"
@@ -29,23 +29,23 @@ class NotifierServiceAction : public NotifierAction
{
public:
NotifierServiceAction();
- virtual QString id() const;
+ virtual TQString id() const;
virtual void execute(KFileItem &item);
- virtual void setIconName( const QString &icon );
- virtual void setLabel( const QString &label );
+ virtual void setIconName( const TQString &icon );
+ virtual void setLabel( const TQString &label );
void setService(KDEDesktopMimeType::Service service);
KDEDesktopMimeType::Service service() const;
- void setFilePath(const QString &filePath);
- QString filePath() const;
+ void setFilePath(const TQString &filePath);
+ TQString filePath() const;
- void setMimetypes(const QStringList &mimetypes);
- QStringList mimetypes();
+ void setMimetypes(const TQStringList &mimetypes);
+ TQStringList mimetypes();
virtual bool isWritable() const;
- virtual bool supportsMimetype(const QString &mimetype) const;
+ virtual bool supportsMimetype(const TQString &mimetype) const;
void save() const;
@@ -53,8 +53,8 @@ private:
void updateFilePath();
KDEDesktopMimeType::Service m_service;
- QString m_filePath;
- QStringList m_mimetypes;
+ TQString m_filePath;
+ TQStringList m_mimetypes;
};
#endif
diff --git a/kioslave/media/libmediacommon/notifiersettings.cpp b/kioslave/media/libmediacommon/notifiersettings.cpp
index c7ba40e85..d1ab55d87 100644
--- a/kioslave/media/libmediacommon/notifiersettings.cpp
+++ b/kioslave/media/libmediacommon/notifiersettings.cpp
@@ -22,8 +22,8 @@
#include <kglobal.h>
#include <kdesktopfile.h>
#include <kstandarddirs.h>
-#include <qdir.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqfile.h>
#include "notifieropenaction.h"
#include "notifiernothingaction.h"
@@ -81,22 +81,22 @@ NotifierSettings::~NotifierSettings()
}
}
-QValueList<NotifierAction*> NotifierSettings::actions()
+TQValueList<NotifierAction*> NotifierSettings::actions()
{
return m_actions;
}
-const QStringList &NotifierSettings::supportedMimetypes()
+const TQStringList &NotifierSettings::supportedMimetypes()
{
return m_supportedMimetypes;
}
-QValueList<NotifierAction*> NotifierSettings::actionsForMimetype( const QString &mimetype )
+TQValueList<NotifierAction*> NotifierSettings::actionsForMimetype( const TQString &mimetype )
{
- QValueList<NotifierAction*> result;
+ TQValueList<NotifierAction*> result;
- QValueList<NotifierAction*>::iterator it = m_actions.begin();
- QValueList<NotifierAction*>::iterator end = m_actions.end();
+ TQValueList<NotifierAction*>::iterator it = m_actions.begin();
+ TQValueList<NotifierAction*>::iterator end = m_actions.end();
for ( ; it!=end; ++it )
{
@@ -128,9 +128,9 @@ bool NotifierSettings::deleteAction( NotifierServiceAction *action )
m_idMap.remove( action->id() );
m_deletedActions.append( action );
- QStringList auto_mimetypes = action->autoMimetypes();
- QStringList::iterator it = auto_mimetypes.begin();
- QStringList::iterator end = auto_mimetypes.end();
+ TQStringList auto_mimetypes = action->autoMimetypes();
+ TQStringList::iterator it = auto_mimetypes.begin();
+ TQStringList::iterator end = auto_mimetypes.end();
for ( ; it!=end; ++it )
{
@@ -143,7 +143,7 @@ bool NotifierSettings::deleteAction( NotifierServiceAction *action )
return false;
}
-void NotifierSettings::setAutoAction( const QString &mimetype, NotifierAction *action )
+void NotifierSettings::setAutoAction( const TQString &mimetype, NotifierAction *action )
{
resetAutoAction( mimetype );
m_autoMimetypesMap[mimetype] = action;
@@ -151,7 +151,7 @@ void NotifierSettings::setAutoAction( const QString &mimetype, NotifierAction *a
}
-void NotifierSettings::resetAutoAction( const QString &mimetype )
+void NotifierSettings::resetAutoAction( const TQString &mimetype )
{
if ( m_autoMimetypesMap.contains( mimetype ) )
{
@@ -163,13 +163,13 @@ void NotifierSettings::resetAutoAction( const QString &mimetype )
void NotifierSettings::clearAutoActions()
{
- QMap<QString,NotifierAction*>::iterator it = m_autoMimetypesMap.begin();
- QMap<QString,NotifierAction*>::iterator end = m_autoMimetypesMap.end();
+ TQMap<TQString,NotifierAction*>::iterator it = m_autoMimetypesMap.begin();
+ TQMap<TQString,NotifierAction*>::iterator end = m_autoMimetypesMap.end();
for ( ; it!=end; ++it )
{
NotifierAction *action = it.data();
- QString mimetype = it.key();
+ TQString mimetype = it.key();
if ( action )
action->removeAutoMimetype( mimetype );
@@ -177,7 +177,7 @@ void NotifierSettings::clearAutoActions()
}
}
-NotifierAction *NotifierSettings::autoActionForMimetype( const QString &mimetype )
+NotifierAction *NotifierSettings::autoActionForMimetype( const TQString &mimetype )
{
if ( m_autoMimetypesMap.contains( mimetype ) )
{
@@ -212,10 +212,10 @@ void NotifierSettings::reload()
m_actions.append( open );
m_idMap[ open->id() ] = open;
- QValueList<NotifierServiceAction*> services = listServices();
+ TQValueList<NotifierServiceAction*> services = listServices();
- QValueList<NotifierServiceAction*>::iterator serv_it = services.begin();
- QValueList<NotifierServiceAction*>::iterator serv_end = services.end();
+ TQValueList<NotifierServiceAction*>::iterator serv_it = services.begin();
+ TQValueList<NotifierServiceAction*>::iterator serv_end = services.end();
for ( ; serv_it!=serv_end; ++serv_it )
{
@@ -228,15 +228,15 @@ void NotifierSettings::reload()
m_idMap[ nothing->id() ] = nothing;
KConfig config( "medianotifierrc", true );
- QMap<QString,QString> auto_actions_map = config.entryMap( "Auto Actions" );
+ TQMap<TQString,TQString> auto_actions_map = config.entryMap( "Auto Actions" );
- QMap<QString,QString>::iterator auto_it = auto_actions_map.begin();
- QMap<QString,QString>::iterator auto_end = auto_actions_map.end();
+ TQMap<TQString,TQString>::iterator auto_it = auto_actions_map.begin();
+ TQMap<TQString,TQString>::iterator auto_end = auto_actions_map.end();
for ( ; auto_it!=auto_end; ++auto_it )
{
- QString mime = auto_it.key();
- QString action_id = auto_it.data();
+ TQString mime = auto_it.key();
+ TQString action_id = auto_it.data();
if ( m_idMap.contains( action_id ) )
{
@@ -250,8 +250,8 @@ void NotifierSettings::reload()
}
void NotifierSettings::save()
{
- QValueList<NotifierAction*>::iterator act_it = m_actions.begin();
- QValueList<NotifierAction*>::iterator act_end = m_actions.end();
+ TQValueList<NotifierAction*>::iterator act_it = m_actions.begin();
+ TQValueList<NotifierAction*>::iterator act_end = m_actions.end();
for ( ; act_it!=act_end; ++act_it )
{
@@ -267,15 +267,15 @@ void NotifierSettings::save()
{
NotifierServiceAction *a = m_deletedActions.first();
m_deletedActions.remove( a );
- QFile::remove( a->filePath() );
+ TQFile::remove( a->filePath() );
delete a;
}
KSimpleConfig config( "medianotifierrc" );
config.setGroup( "Auto Actions" );
- QMap<QString,NotifierAction*>::iterator auto_it = m_autoMimetypesMap.begin();
- QMap<QString,NotifierAction*>::iterator auto_end = m_autoMimetypesMap.end();
+ TQMap<TQString,NotifierAction*>::iterator auto_it = m_autoMimetypesMap.begin();
+ TQMap<TQString,NotifierAction*>::iterator auto_end = m_autoMimetypesMap.end();
for ( ; auto_it!=auto_end; ++auto_it )
{
@@ -290,20 +290,20 @@ void NotifierSettings::save()
}
}
-QValueList<NotifierServiceAction*> NotifierSettings::loadActions( KDesktopFile &desktop ) const
+TQValueList<NotifierServiceAction*> NotifierSettings::loadActions( KDesktopFile &desktop ) const
{
desktop.setDesktopGroup();
- QValueList<NotifierServiceAction*> services;
+ TQValueList<NotifierServiceAction*> services;
- const QString filename = desktop.fileName();
- const QStringList mimetypes = desktop.readListEntry( "ServiceTypes" );
+ const TQString filename = desktop.fileName();
+ const TQStringList mimetypes = desktop.readListEntry( "ServiceTypes" );
- QValueList<KDEDesktopMimeType::Service> type_services
+ TQValueList<KDEDesktopMimeType::Service> type_services
= KDEDesktopMimeType::userDefinedServices(filename, true);
- QValueList<KDEDesktopMimeType::Service>::iterator service_it = type_services.begin();
- QValueList<KDEDesktopMimeType::Service>::iterator service_end = type_services.end();
+ TQValueList<KDEDesktopMimeType::Service>::iterator service_it = type_services.begin();
+ TQValueList<KDEDesktopMimeType::Service>::iterator service_end = type_services.end();
for (; service_it!=service_end; ++service_it)
{
NotifierServiceAction *service_action
@@ -320,7 +320,7 @@ QValueList<NotifierServiceAction*> NotifierSettings::loadActions( KDesktopFile &
}
-bool NotifierSettings::shouldLoadActions( KDesktopFile &desktop, const QString &mimetype ) const
+bool NotifierSettings::shouldLoadActions( KDesktopFile &desktop, const TQString &mimetype ) const
{
desktop.setDesktopGroup();
@@ -328,19 +328,19 @@ bool NotifierSettings::shouldLoadActions( KDesktopFile &desktop, const QString &
&& desktop.hasKey( "ServiceTypes" )
&& !desktop.readBoolEntry( "X-KDE-MediaNotifierHide", false ) )
{
- const QStringList actions = desktop.readListEntry( "Actions" );
+ const TQStringList actions = desktop.readListEntry( "Actions" );
if ( actions.size()!=1 )
{
return false;
}
- const QStringList types = desktop.readListEntry( "ServiceTypes" );
+ const TQStringList types = desktop.readListEntry( "ServiceTypes" );
if ( mimetype.isEmpty() )
{
- QStringList::ConstIterator type_it = types.begin();
- QStringList::ConstIterator type_end = types.end();
+ TQStringList::ConstIterator type_it = types.begin();
+ TQStringList::ConstIterator type_end = types.end();
for (; type_it != type_end; ++type_it)
{
if ( (*type_it).startsWith( "media/" ) )
@@ -358,25 +358,25 @@ bool NotifierSettings::shouldLoadActions( KDesktopFile &desktop, const QString &
return false;
}
-QValueList<NotifierServiceAction*> NotifierSettings::listServices( const QString &mimetype ) const
+TQValueList<NotifierServiceAction*> NotifierSettings::listServices( const TQString &mimetype ) const
{
- QValueList<NotifierServiceAction*> services;
- QStringList dirs = KGlobal::dirs()->findDirs("data", "konqueror/servicemenus/");
+ TQValueList<NotifierServiceAction*> services;
+ TQStringList dirs = KGlobal::dirs()->findDirs("data", "konqueror/servicemenus/");
- QStringList::ConstIterator dir_it = dirs.begin();
- QStringList::ConstIterator dir_end = dirs.end();
+ TQStringList::ConstIterator dir_it = dirs.begin();
+ TQStringList::ConstIterator dir_end = dirs.end();
for (; dir_it != dir_end; ++dir_it)
{
- QDir dir( *dir_it );
+ TQDir dir( *dir_it );
- QStringList entries = dir.entryList( "*.desktop", QDir::Files );
+ TQStringList entries = dir.entryList( "*.desktop", TQDir::Files );
- QStringList::ConstIterator entry_it = entries.begin();
- QStringList::ConstIterator entry_end = entries.end();
+ TQStringList::ConstIterator entry_it = entries.begin();
+ TQStringList::ConstIterator entry_end = entries.end();
for (; entry_it != entry_end; ++entry_it )
{
- QString filename = *dir_it + *entry_it;
+ TQString filename = *dir_it + *entry_it;
KDesktopFile desktop( filename, true );
diff --git a/kioslave/media/libmediacommon/notifiersettings.h b/kioslave/media/libmediacommon/notifiersettings.h
index 6ddee318b..dee5c440b 100644
--- a/kioslave/media/libmediacommon/notifiersettings.h
+++ b/kioslave/media/libmediacommon/notifiersettings.h
@@ -20,8 +20,8 @@
#ifndef _NOTIFIERSETTINGS_H_
#define _NOTIFIERSETTINGS_H_
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
#include "notifieraction.h"
#include "notifierserviceaction.h"
@@ -33,31 +33,31 @@ public:
NotifierSettings();
~NotifierSettings();
- QValueList<NotifierAction*> actions();
- QValueList<NotifierAction*> actionsForMimetype( const QString &mimetype );
+ TQValueList<NotifierAction*> actions();
+ TQValueList<NotifierAction*> actionsForMimetype( const TQString &mimetype );
bool addAction( NotifierServiceAction *action );
bool deleteAction( NotifierServiceAction *action );
- void setAutoAction( const QString &mimetype, NotifierAction *action );
- void resetAutoAction( const QString &mimetype );
+ void setAutoAction( const TQString &mimetype, NotifierAction *action );
+ void resetAutoAction( const TQString &mimetype );
void clearAutoActions();
- NotifierAction *autoActionForMimetype( const QString &mimetype );
+ NotifierAction *autoActionForMimetype( const TQString &mimetype );
- const QStringList &supportedMimetypes();
+ const TQStringList &supportedMimetypes();
void reload();
void save();
private:
- QValueList<NotifierServiceAction*> listServices( const QString &mimetype = QString() ) const;
- bool shouldLoadActions( KDesktopFile &desktop, const QString &mimetype ) const;
- QValueList<NotifierServiceAction*> loadActions( KDesktopFile &desktop ) const;
-
- QStringList m_supportedMimetypes;
- QValueList<NotifierAction*> m_actions;
- QValueList<NotifierServiceAction*> m_deletedActions;
- QMap<QString,NotifierAction*> m_idMap;
- QMap<QString,NotifierAction*> m_autoMimetypesMap;
+ TQValueList<NotifierServiceAction*> listServices( const TQString &mimetype = TQString() ) const;
+ bool shouldLoadActions( KDesktopFile &desktop, const TQString &mimetype ) const;
+ TQValueList<NotifierServiceAction*> loadActions( KDesktopFile &desktop ) const;
+
+ TQStringList m_supportedMimetypes;
+ TQValueList<NotifierAction*> m_actions;
+ TQValueList<NotifierServiceAction*> m_deletedActions;
+ TQMap<TQString,NotifierAction*> m_idMap;
+ TQMap<TQString,NotifierAction*> m_autoMimetypesMap;
};
#endif