diff options
Diffstat (limited to 'kioslave/media')
56 files changed, 1086 insertions, 1086 deletions
diff --git a/kioslave/media/kcmodule/main.cpp b/kioslave/media/kcmodule/main.cpp index e431e95f8..da52ea119 100644 --- a/kioslave/media/kcmodule/main.cpp +++ b/kioslave/media/kcmodule/main.cpp @@ -19,8 +19,8 @@ #include "main.h" -#include <qtabwidget.h> -#include <qlayout.h> +#include <tqtabwidget.h> +#include <tqlayout.h> #include <klocale.h> #include <kaboutdata.h> @@ -32,16 +32,16 @@ #include "managermodule.h" -typedef KGenericFactory<MediaModule, QWidget> MediaFactory; +typedef KGenericFactory<MediaModule, TQWidget> MediaFactory; K_EXPORT_COMPONENT_FACTORY( kcm_media, MediaFactory( "kcmmedia" ) ) -MediaModule::MediaModule( QWidget *parent, const char *name, const QStringList& ) +MediaModule::MediaModule( TQWidget *parent, const char *name, const TQStringList& ) : KCModule(MediaFactory::instance(), parent, name ) { KGlobal::locale()->insertCatalogue("kio_media"); - QVBoxLayout *layout = new QVBoxLayout( this, 0, KDialog::spacingHint() ); - QTabWidget *tab = new QTabWidget( this ); + TQVBoxLayout *layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); + TQTabWidget *tab = new TQTabWidget( this ); layout->addWidget( tab ); @@ -49,13 +49,13 @@ MediaModule::MediaModule( QWidget *parent, const char *name, const QStringList& m_notifierModule = new NotifierModule( this, "notifier" ); tab->addTab( m_notifierModule, i18n( "&Notifications" ) ); - connect( m_notifierModule, SIGNAL( changed( bool ) ), - this, SLOT( moduleChanged( bool ) ) ); + connect( m_notifierModule, TQT_SIGNAL( changed( bool ) ), + this, TQT_SLOT( moduleChanged( bool ) ) ); m_managerModule = new ManagerModule( this, "manager" ); tab->addTab( m_managerModule, i18n( "&Advanced" ) ); - connect( m_managerModule, SIGNAL( changed( bool ) ), - this, SLOT( moduleChanged( bool ) ) ); + connect( m_managerModule, TQT_SIGNAL( changed( bool ) ), + this, TQT_SLOT( moduleChanged( bool ) ) ); @@ -95,7 +95,7 @@ void MediaModule::moduleChanged( bool state ) emit changed( state ); } -QString MediaModule::quickHelp() const +TQString MediaModule::quickHelp() const { return i18n("FIXME : Write me..."); } diff --git a/kioslave/media/kcmodule/main.h b/kioslave/media/kcmodule/main.h index 1ab909527..14e747bd9 100644 --- a/kioslave/media/kcmodule/main.h +++ b/kioslave/media/kcmodule/main.h @@ -27,12 +27,12 @@ class MediaModule : public KCModule Q_OBJECT public: - MediaModule( QWidget *parent, const char *name, const QStringList& ); + MediaModule( TQWidget *parent, const char *name, const TQStringList& ); virtual void load(); virtual void save(); virtual void defaults(); - virtual QString quickHelp() const; + virtual TQString quickHelp() const; protected slots: void moduleChanged( bool state ); diff --git a/kioslave/media/kcmodule/managermodule.cpp b/kioslave/media/kcmodule/managermodule.cpp index e5f493d27..e0b30b90f 100644 --- a/kioslave/media/kcmodule/managermodule.cpp +++ b/kioslave/media/kcmodule/managermodule.cpp @@ -22,13 +22,13 @@ #include <klocale.h> #include <dcopref.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> #include <kdirnotify_stub.h> #include "managermoduleview.h" #include "mediamanagersettings.h" -ManagerModule::ManagerModule( QWidget* parent, const char* name ) +ManagerModule::ManagerModule( TQWidget* parent, const char* name ) : KCModule( parent, name ) { ManagerModuleView *view = new ManagerModuleView( this ); @@ -36,14 +36,14 @@ ManagerModule::ManagerModule( QWidget* parent, const char* name ) addConfig( MediaManagerSettings::self(), view ); #ifndef COMPILE_HALBACKEND - QString hal_text = view->kcfg_HalBackendEnabled->text(); + TQString hal_text = view->kcfg_HalBackendEnabled->text(); hal_text += " ("+i18n("No support for HAL on this system")+")"; view->kcfg_HalBackendEnabled->setText( hal_text ); #endif view->kcfg_HalBackendEnabled->setEnabled( false ); #ifndef COMPILE_LINUXCDPOLLING - QString poll_text = view->kcfg_CdPollingEnabled->text(); + TQString poll_text = view->kcfg_CdPollingEnabled->text(); poll_text += " ("+i18n("No support for CD polling on this system")+")"; view->kcfg_CdPollingEnabled->setText( poll_text ); #endif diff --git a/kioslave/media/kcmodule/managermodule.h b/kioslave/media/kcmodule/managermodule.h index 7fa3d649a..0b62dfc5e 100644 --- a/kioslave/media/kcmodule/managermodule.h +++ b/kioslave/media/kcmodule/managermodule.h @@ -26,7 +26,7 @@ class ManagerModule : public KCModule Q_OBJECT public: - ManagerModule( QWidget* parent = 0, const char* name = 0); + ManagerModule( TQWidget* parent = 0, const char* name = 0); void save(); }; diff --git a/kioslave/media/kcmodule/mimetypelistboxitem.cpp b/kioslave/media/kcmodule/mimetypelistboxitem.cpp index 86460ed88..e7334248a 100644 --- a/kioslave/media/kcmodule/mimetypelistboxitem.cpp +++ b/kioslave/media/kcmodule/mimetypelistboxitem.cpp @@ -21,14 +21,14 @@ #include <kmimetype.h> -MimetypeListBoxItem::MimetypeListBoxItem(const QString &mimetype, QListBox *parent) - : QListBoxText(parent), m_mimetype(mimetype) +MimetypeListBoxItem::MimetypeListBoxItem(const TQString &mimetype, TQListBox *parent) + : TQListBoxText(parent), m_mimetype(mimetype) { KMimeType::Ptr mime = KMimeType::mimeType( mimetype ); setText( mime->comment() ); } -const QString &MimetypeListBoxItem::mimetype() const +const TQString &MimetypeListBoxItem::mimetype() const { return m_mimetype; } diff --git a/kioslave/media/kcmodule/mimetypelistboxitem.h b/kioslave/media/kcmodule/mimetypelistboxitem.h index fee215ecf..f61afba3d 100644 --- a/kioslave/media/kcmodule/mimetypelistboxitem.h +++ b/kioslave/media/kcmodule/mimetypelistboxitem.h @@ -20,18 +20,18 @@ #ifndef _MIMETYPELISTBOXITEM_H_ #define _MIMETYPELISTBOXITEM_H_ -#include <qlistbox.h> -#include <qstring.h> +#include <tqlistbox.h> +#include <tqstring.h> class MimetypeListBoxItem : public QListBoxText { public: - MimetypeListBoxItem(const QString &mimetype, QListBox *parent); + MimetypeListBoxItem(const TQString &mimetype, TQListBox *parent); - const QString &mimetype() const; + const TQString &mimetype() const; private: - QString m_mimetype; + TQString m_mimetype; }; #endif diff --git a/kioslave/media/kcmodule/notifiermodule.cpp b/kioslave/media/kcmodule/notifiermodule.cpp index 015d7396a..c7871c953 100644 --- a/kioslave/media/kcmodule/notifiermodule.cpp +++ b/kioslave/media/kcmodule/notifiermodule.cpp @@ -21,7 +21,7 @@ #include <klocale.h> -#include <qlayout.h> +#include <tqlayout.h> #include <kcombobox.h> #include <kpushbutton.h> #include <kstdguiitem.h> @@ -31,10 +31,10 @@ #include "actionlistboxitem.h" #include "mimetypelistboxitem.h" -NotifierModule::NotifierModule(QWidget *parent, const char *name) +NotifierModule::NotifierModule(TQWidget *parent, const char *name) : KCModule(parent, name) { - QBoxLayout *layout = new QVBoxLayout( this, 0, KDialog::spacingHint() ); + TQBoxLayout *layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); m_view = new NotifierModuleView( this ); layout->addWidget( m_view ); @@ -45,10 +45,10 @@ NotifierModule::NotifierModule(QWidget *parent, const char *name) m_view->mimetypesCombo->insertItem( i18n("All Mime Types") ); - QStringList mimetypes = m_settings.supportedMimetypes(); + TQStringList mimetypes = m_settings.supportedMimetypes(); - QStringList::iterator it = mimetypes.begin(); - QStringList::iterator end = mimetypes.end(); + TQStringList::iterator it = mimetypes.begin(); + TQStringList::iterator end = mimetypes.end(); for ( ; it!=end; ++it ) { @@ -57,18 +57,18 @@ NotifierModule::NotifierModule(QWidget *parent, const char *name) updateListBox(); - connect( m_view->mimetypesCombo, SIGNAL( activated(int) ), - this, SLOT( slotMimeTypeChanged(int) ) ); - connect( m_view->actionsList, SIGNAL( selectionChanged(QListBoxItem*) ), - this, SLOT( slotActionSelected(QListBoxItem*) ) ); - connect( m_view->addButton, SIGNAL( clicked() ), - this, SLOT( slotAdd() ) ); - connect( m_view->editButton, SIGNAL( clicked() ), - this, SLOT( slotEdit() ) ); - connect( m_view->deleteButton, SIGNAL( clicked() ), - this, SLOT( slotDelete() ) ); - connect( m_view->toggleAutoButton, SIGNAL( clicked() ), - this, SLOT( slotToggleAuto() ) ); + connect( m_view->mimetypesCombo, TQT_SIGNAL( activated(int) ), + this, TQT_SLOT( slotMimeTypeChanged(int) ) ); + connect( m_view->actionsList, TQT_SIGNAL( selectionChanged(TQListBoxItem*) ), + this, TQT_SLOT( slotActionSelected(TQListBoxItem*) ) ); + connect( m_view->addButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotAdd() ) ); + connect( m_view->editButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotEdit() ) ); + connect( m_view->deleteButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotDelete() ) ); + connect( m_view->toggleAutoButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotToggleAuto() ) ); } NotifierModule::~NotifierModule() @@ -97,7 +97,7 @@ void NotifierModule::updateListBox() m_view->actionsList->clear(); slotActionSelected( 0L ); - QValueList<NotifierAction*> services; + TQValueList<NotifierAction*> services; if ( m_mimetype.isEmpty() ) { services = m_settings.actions(); @@ -107,7 +107,7 @@ void NotifierModule::updateListBox() services = m_settings.actionsForMimetype( m_mimetype ); } - QValueList<NotifierAction*>::iterator it; + TQValueList<NotifierAction*>::iterator it; for ( it = services.begin(); it != services.end(); ++it ) { @@ -115,7 +115,7 @@ void NotifierModule::updateListBox() } } -void NotifierModule::slotActionSelected(QListBoxItem *item) +void NotifierModule::slotActionSelected(TQListBoxItem *item) { NotifierAction *action = 0L; @@ -137,11 +137,11 @@ void NotifierModule::slotMimeTypeChanged(int index) { if ( index == 0 ) { - m_mimetype = QString(); + m_mimetype = TQString(); } else { - QListBoxItem *item = m_view->mimetypesCombo->listBox()->item( index ); + TQListBoxItem *item = m_view->mimetypesCombo->listBox()->item( index ); MimetypeListBoxItem *mime_item = static_cast<MimetypeListBoxItem*>( item ); m_mimetype = mime_item->mimetype(); @@ -157,7 +157,7 @@ void NotifierModule::slotAdd() int value = dialog.exec(); - if ( value == QDialog::Accepted ) + if ( value == TQDialog::Accepted ) { m_settings.addAction( action ); updateListBox(); @@ -181,7 +181,7 @@ void NotifierModule::slotEdit() int value = dialog.exec(); - if ( value == QDialog::Accepted ) + if ( value == TQDialog::Accepted ) { updateListBox(); emit changed( true ); diff --git a/kioslave/media/kcmodule/notifiermodule.h b/kioslave/media/kcmodule/notifiermodule.h index 6c71df51f..e284e87fe 100644 --- a/kioslave/media/kcmodule/notifiermodule.h +++ b/kioslave/media/kcmodule/notifiermodule.h @@ -30,7 +30,7 @@ class NotifierModule : public KCModule Q_OBJECT public: - NotifierModule( QWidget* parent = 0, const char* name = 0); + NotifierModule( TQWidget* parent = 0, const char* name = 0); ~NotifierModule(); void load(); @@ -43,13 +43,13 @@ private slots: void slotEdit(); void slotToggleAuto(); - void slotActionSelected( QListBoxItem * item ); + void slotActionSelected( TQListBoxItem * item ); void slotMimeTypeChanged( int index ); private: void updateListBox(); - QString m_mimetype; + TQString m_mimetype; NotifierSettings m_settings; NotifierModuleView *m_view; }; diff --git a/kioslave/media/kcmodule/serviceconfigdialog.cpp b/kioslave/media/kcmodule/serviceconfigdialog.cpp index 1a127d12b..61dd060f2 100644 --- a/kioslave/media/kcmodule/serviceconfigdialog.cpp +++ b/kioslave/media/kcmodule/serviceconfigdialog.cpp @@ -23,20 +23,20 @@ #include <klineedit.h> #include <kactionselector.h> #include <kicondialog.h> -#include <qlistbox.h> +#include <tqlistbox.h> #include <kservice.h> #include <kopenwith.h> #include <kpushbutton.h> #include <kiconloader.h> -#include <qpixmap.h> -#include <qiconset.h> +#include <tqpixmap.h> +#include <tqiconset.h> #include "mimetypelistboxitem.h" ServiceConfigDialog::ServiceConfigDialog(NotifierServiceAction *action, - const QStringList &mimetypesList, - QWidget* parent, const char* name) + const TQStringList &mimetypesList, + TQWidget* parent, const char* name) : KDialogBase(parent, name, true, i18n("Edit Service"), Ok|Cancel, Ok, true), m_action(action) { @@ -46,22 +46,22 @@ ServiceConfigDialog::ServiceConfigDialog(NotifierServiceAction *action, m_view->labelEdit->setText( m_action->label() ); m_view->commandEdit->setText( m_action->service().m_strExec ); - QIconSet iconSet = SmallIconSet("configure"); - QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); + TQIconSet iconSet = SmallIconSet("configure"); + TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); m_view->commandButton->setIconSet( iconSet ); m_view->commandButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); m_iconChanged = false; - QStringList all_mimetypes = mimetypesList; - QStringList action_mimetypes = action->mimetypes(); + TQStringList all_mimetypes = mimetypesList; + TQStringList action_mimetypes = action->mimetypes(); - QStringList::iterator it = all_mimetypes.begin(); - QStringList::iterator end = all_mimetypes.end(); + TQStringList::iterator it = all_mimetypes.begin(); + TQStringList::iterator end = all_mimetypes.end(); for ( ; it!=end; ++it ) { - QListBox *list; + TQListBox *list; if ( action_mimetypes.contains( *it ) ) { @@ -78,10 +78,10 @@ ServiceConfigDialog::ServiceConfigDialog(NotifierServiceAction *action, setMainWidget(m_view); setCaption( m_action->label() ); - connect( m_view->iconButton, SIGNAL( iconChanged(QString) ), - this, SLOT( slotIconChanged() ) ); - connect( m_view->commandButton, SIGNAL( clicked() ), - this, SLOT( slotCommand() ) ); + connect( m_view->iconButton, TQT_SIGNAL( iconChanged(TQString) ), + this, TQT_SLOT( slotIconChanged() ) ); + connect( m_view->commandButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotCommand() ) ); } bool operator==( KDEDesktopMimeType::Service s1, KDEDesktopMimeType::Service s2 ) @@ -103,12 +103,12 @@ void ServiceConfigDialog::slotOk() service.m_strIcon = m_view->iconButton->icon(); service.m_strExec = m_view->commandEdit->text(); - QStringList mimetypes; + TQStringList mimetypes; uint list_count = m_view->mimetypesSelector->selectedListBox()->count(); for( uint i=0; i < list_count; ++i ) { - QListBoxItem *item = m_view->mimetypesSelector->selectedListBox()->item(i); + TQListBoxItem *item = m_view->mimetypesSelector->selectedListBox()->item(i); MimetypeListBoxItem *mime_item = static_cast<MimetypeListBoxItem*>( item ); mimetypes.append( mime_item->mimetype() ); } @@ -134,7 +134,7 @@ void ServiceConfigDialog::slotCommand() { KOpenWithDlg d(this); int value = d.exec(); - if ( value == QDialog::Accepted ) + if ( value == TQDialog::Accepted ) { KService::Ptr service = d.service(); if ( service != 0L ) diff --git a/kioslave/media/kcmodule/serviceconfigdialog.h b/kioslave/media/kcmodule/serviceconfigdialog.h index 090a978d4..24e907205 100644 --- a/kioslave/media/kcmodule/serviceconfigdialog.h +++ b/kioslave/media/kcmodule/serviceconfigdialog.h @@ -31,8 +31,8 @@ class ServiceConfigDialog : public KDialogBase public: ServiceConfigDialog(NotifierServiceAction *action, - const QStringList &mimetypesList, - QWidget* parent = 0, const char* name = 0); + const TQStringList &mimetypesList, + TQWidget* parent = 0, const char* name = 0); public slots: void slotOk(); diff --git a/kioslave/media/kfile-plugin/kfilemediaplugin.cpp b/kioslave/media/kfile-plugin/kfilemediaplugin.cpp index 37aa7d61f..bda34bff2 100644 --- a/kioslave/media/kfile-plugin/kfilemediaplugin.cpp +++ b/kioslave/media/kfile-plugin/kfilemediaplugin.cpp @@ -24,11 +24,11 @@ #include <dcopref.h> -#include <qpixmap.h> -#include <qpainter.h> -#include <qstyle.h> -#include <qapplication.h> -#include <qfile.h> +#include <tqpixmap.h> +#include <tqpainter.h> +#include <tqstyle.h> +#include <tqapplication.h> +#include <tqfile.h> #ifdef HAVE_STATVFS # include <sys/statvfs.h> @@ -41,8 +41,8 @@ typedef KGenericFactory<KFileMediaPlugin> KFileMediaPluginFactory; K_EXPORT_COMPONENT_FACTORY(kfile_media, KFileMediaPluginFactory("kio_media")) -KFileMediaPlugin::KFileMediaPlugin(QObject *parent, const char *name, - const QStringList& args) +KFileMediaPlugin::KFileMediaPlugin(TQObject *parent, const char *name, + const TQStringList& args) : KFilePlugin(parent, name, args) { addMimeType( "media/audiocd" ); @@ -94,9 +94,9 @@ bool KFileMediaPlugin::readInfo(KFileMetaInfo &info, uint /*what*/) if (medium.id().isNull()) return false; - QString mount_point = medium.mountPoint(); + TQString mount_point = medium.mountPoint(); KURL base_url = medium.prettyBaseURL(); - QString device_node = medium.deviceNode(); + TQString device_node = medium.deviceNode(); KFileMetaInfoGroup group = appendGroup(info, "mediumInfo"); @@ -119,7 +119,7 @@ bool KFileMediaPlugin::readInfo(KFileMetaInfo &info, uint /*what*/) struct statvfs vfs; memset(&vfs, 0, sizeof(vfs)); - if ( ::statvfs(QFile::encodeName(mount_point), &vfs) != -1 ) + if ( ::statvfs(TQFile::encodeName(mount_point), &vfs) != -1 ) { m_total = static_cast<KIO::filesize_t>(vfs.f_blocks) * static_cast<KIO::filesize_t>(vfs.f_frsize); m_free = static_cast<KIO::filesize_t>(vfs.f_bavail) * static_cast<KIO::filesize_t>(vfs.f_frsize); @@ -140,19 +140,19 @@ bool KFileMediaPlugin::readInfo(KFileMetaInfo &info, uint /*what*/) group = appendGroup(info, "mediumSummary"); - appendItem(group, "percent", QString("%1%").arg(percent)); + appendItem(group, "percent", TQString("%1%").arg(percent)); - QPixmap bar(150, 20); - QPainter p(&bar); + TQPixmap bar(150, 20); + TQPainter p(&bar); p.fillRect(0, 0, length, 20, Qt::red); p.fillRect(length, 0, 150-length, 20, Qt::green); - QColorGroup cg = QApplication::palette().active(); + TQColorGroup cg = TQApplication::palette().active(); - QApplication::style().drawPrimitive(QStyle::PE_Panel, &p, - QRect(0, 0, 150, 20), cg, - QStyle::Style_Sunken); + TQApplication::style().drawPrimitive(TQStyle::PE_Panel, &p, + TQRect(0, 0, 150, 20), cg, + TQStyle::Style_Sunken); appendItem( group, "thumbnail", bar ); } @@ -169,7 +169,7 @@ const Medium KFileMediaPlugin::askMedium(KFileMetaInfo &info) if ( !reply.isValid() ) { - return Medium(QString::null, QString::null); + return Medium(TQString::null, TQString::null); } return Medium::create(reply); @@ -183,24 +183,24 @@ void KFileMediaPlugin::addMimeType(const char *mimeType) = addGroupInfo(info, "mediumInfo", i18n("Medium Information")); KFileMimeTypeInfo::ItemInfo *item - = addItemInfo(group, "free", i18n("Free"), QVariant::ULongLong); + = addItemInfo(group, "free", i18n("Free"), TQVariant::ULongLong); setUnit(item, KFileMimeTypeInfo::Bytes); - item = addItemInfo(group, "used", i18n("Used"), QVariant::ULongLong); + item = addItemInfo(group, "used", i18n("Used"), TQVariant::ULongLong); setUnit(item, KFileMimeTypeInfo::Bytes); - item = addItemInfo(group, "total", i18n("Total"), QVariant::ULongLong); + item = addItemInfo(group, "total", i18n("Total"), TQVariant::ULongLong); setUnit(item, KFileMimeTypeInfo::Bytes); - item = addItemInfo(group, "baseURL", i18n("Base URL"), QVariant::String); - item = addItemInfo(group, "mountPoint", i18n("Mount Point"), QVariant::String); - item = addItemInfo(group, "deviceNode", i18n("Device Node"), QVariant::String); + item = addItemInfo(group, "baseURL", i18n("Base URL"), TQVariant::String); + item = addItemInfo(group, "mountPoint", i18n("Mount Point"), TQVariant::String); + item = addItemInfo(group, "deviceNode", i18n("Device Node"), TQVariant::String); group = addGroupInfo(info, "mediumSummary", i18n("Medium Summary")); - item = addItemInfo(group, "percent", i18n("Usage"), QVariant::String); + item = addItemInfo(group, "percent", i18n("Usage"), TQVariant::String); - item = addItemInfo( group, "thumbnail", i18n("Bar Graph"), QVariant::Image ); + item = addItemInfo( group, "thumbnail", i18n("Bar Graph"), TQVariant::Image ); setHint( item, KFileMimeTypeInfo::Thumbnail ); } diff --git a/kioslave/media/kfile-plugin/kfilemediaplugin.h b/kioslave/media/kfile-plugin/kfilemediaplugin.h index 666f75df3..7799ffc3d 100644 --- a/kioslave/media/kfile-plugin/kfilemediaplugin.h +++ b/kioslave/media/kfile-plugin/kfilemediaplugin.h @@ -30,8 +30,8 @@ class KFileMediaPlugin : public KFilePlugin { Q_OBJECT public: - KFileMediaPlugin(QObject *parent, const char *name, - const QStringList &args); + KFileMediaPlugin(TQObject *parent, const char *name, + const TQStringList &args); bool readInfo(KFileMetaInfo &info, uint what = KFileMetaInfo::Fastest); diff --git a/kioslave/media/kio_media.cpp b/kioslave/media/kio_media.cpp index b9283592c..6aff0ae1a 100644 --- a/kioslave/media/kio_media.cpp +++ b/kioslave/media/kio_media.cpp @@ -25,7 +25,7 @@ #include <dcopclient.h> #include <kcmdlineargs.h> -#include <qeventloop.h> +#include <tqeventloop.h> #include "kio_media.h" @@ -57,12 +57,12 @@ extern "C" { } -MediaProtocol::MediaProtocol(const QCString &protocol, - const QCString &pool, const QCString &app) +MediaProtocol::MediaProtocol(const TQCString &protocol, + const TQCString &pool, const TQCString &app) : ForwardingSlaveBase(protocol, pool, app) { - connect( &m_impl, SIGNAL( warning( const QString & ) ), - this, SLOT( slotWarning( const QString & ) ) ); + connect( &m_impl, TQT_SIGNAL( warning( const TQString & ) ), + this, TQT_SLOT( slotWarning( const TQString & ) ) ); } MediaProtocol::~MediaProtocol() @@ -71,7 +71,7 @@ MediaProtocol::~MediaProtocol() bool MediaProtocol::rewriteURL(const KURL &url, KURL &newUrl) { - QString name, path; + TQString name, path; if ( !m_impl.parseURL(url, name, path) ) { @@ -94,7 +94,7 @@ void MediaProtocol::put(const KURL &url, int permissions, { kdDebug(1219) << "MediaProtocol::put: " << url << endl; - QString name, path; + TQString name, path; bool ok = m_impl.parseURL(url, name, path); if ( ok && path.isEmpty() ) @@ -112,9 +112,9 @@ void MediaProtocol::rename(const KURL &src, const KURL &dest, bool overwrite) kdDebug(1219) << "MediaProtocol::rename: " << src << ", " << dest << ", " << overwrite << endl; - QString src_name, src_path; + TQString src_name, src_path; bool ok = m_impl.parseURL(src, src_name, src_path); - QString dest_name, dest_path; + TQString dest_name, dest_path; ok &= m_impl.parseURL(dest, dest_name, dest_path); if ( ok && src_path.isEmpty() && dest_path.isEmpty() @@ -139,7 +139,7 @@ void MediaProtocol::mkdir(const KURL &url, int permissions) { kdDebug(1219) << "MediaProtocol::mkdir: " << url << endl; - QString name, path; + TQString name, path; bool ok = m_impl.parseURL(url, name, path); if ( ok && path.isEmpty() ) @@ -156,7 +156,7 @@ void MediaProtocol::del(const KURL &url, bool isFile) { kdDebug(1219) << "MediaProtocol::del: " << url << endl; - QString name, path; + TQString name, path; bool ok = m_impl.parseURL(url, name, path); if ( ok && path.isEmpty() ) @@ -172,7 +172,7 @@ void MediaProtocol::del(const KURL &url, bool isFile) void MediaProtocol::stat(const KURL &url) { kdDebug(1219) << "MediaProtocol::stat: " << url << endl; - QString path = url.path(); + TQString path = url.path(); if( path.isEmpty() || path == "/" ) { // The root is "virtual" - it's not a single physical directory @@ -183,7 +183,7 @@ void MediaProtocol::stat(const KURL &url) return; } - QString name; + TQString name; bool ok = m_impl.parseURL(url, name, path); if ( !ok ) @@ -223,7 +223,7 @@ void MediaProtocol::listDir(const KURL &url) return; } - QString name, path; + TQString name, path; bool ok = m_impl.parseURL(url, name, path); if ( !ok ) @@ -267,7 +267,7 @@ void MediaProtocol::listRoot() finished(); } -void MediaProtocol::slotWarning( const QString &msg ) +void MediaProtocol::slotWarning( const TQString &msg ) { warning( msg ); } diff --git a/kioslave/media/kio_media.h b/kioslave/media/kio_media.h index 55b3ae670..80da4a6cc 100644 --- a/kioslave/media/kio_media.h +++ b/kioslave/media/kio_media.h @@ -28,8 +28,8 @@ class MediaProtocol : public KIO::ForwardingSlaveBase { Q_OBJECT public: - MediaProtocol(const QCString &protocol, const QCString &pool, - const QCString &app); + MediaProtocol(const TQCString &protocol, const TQCString &pool, + const TQCString &app); virtual ~MediaProtocol(); virtual bool rewriteURL(const KURL &url, KURL &newUrl); @@ -43,7 +43,7 @@ public: virtual void listDir(const KURL &url); private slots: - void slotWarning( const QString &msg ); + void slotWarning( const TQString &msg ); private: void listRoot(); 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 diff --git a/kioslave/media/mediaimpl.cpp b/kioslave/media/mediaimpl.cpp index 516bcdb01..fb9e01480 100644 --- a/kioslave/media/mediaimpl.cpp +++ b/kioslave/media/mediaimpl.cpp @@ -28,20 +28,20 @@ #include <kmimetype.h> #include <kapplication.h> -#include <qeventloop.h> +#include <tqeventloop.h> #include <sys/stat.h> #include "medium.h" -MediaImpl::MediaImpl() : QObject(), DCOPObject("mediaimpl"), mp_mounting(0L) +MediaImpl::MediaImpl() : TQObject(), DCOPObject("mediaimpl"), mp_mounting(0L) { } -bool MediaImpl::parseURL(const KURL &url, QString &name, QString &path) const +bool MediaImpl::parseURL(const KURL &url, TQString &name, TQString &path) const { - QString url_path = url.path(); + TQString url_path = url.path(); int i = url_path.find('/', 1); if (i > 0) @@ -52,13 +52,13 @@ bool MediaImpl::parseURL(const KURL &url, QString &name, QString &path) const else { name = url_path.mid(1); - path = QString::null; + path = TQString::null; } - return name != QString::null; + return name != TQString::null; } -bool MediaImpl::realURL(const QString &name, const QString &path, KURL &url) +bool MediaImpl::realURL(const TQString &name, const TQString &path, KURL &url) { bool ok; Medium m = findMediumByName(name, ok); @@ -73,7 +73,7 @@ bool MediaImpl::realURL(const QString &name, const QString &path, KURL &url) } -bool MediaImpl::statMedium(const QString &name, KIO::UDSEntry &entry) +bool MediaImpl::statMedium(const TQString &name, KIO::UDSEntry &entry) { kdDebug(1219) << "MediaImpl::statMedium: " << name << endl; @@ -100,7 +100,7 @@ bool MediaImpl::statMedium(const QString &name, KIO::UDSEntry &entry) return true; } -bool MediaImpl::statMediumByLabel(const QString &label, KIO::UDSEntry &entry) +bool MediaImpl::statMediumByLabel(const TQString &label, KIO::UDSEntry &entry) { kdDebug(1219) << "MediaImpl::statMediumByLabel: " << label << endl; @@ -114,7 +114,7 @@ bool MediaImpl::statMediumByLabel(const QString &label, KIO::UDSEntry &entry) return false; } - QString name = reply; + TQString name = reply; if (name.isEmpty()) { @@ -126,7 +126,7 @@ bool MediaImpl::statMediumByLabel(const QString &label, KIO::UDSEntry &entry) } -bool MediaImpl::listMedia(QValueList<KIO::UDSEntry> &list) +bool MediaImpl::listMedia(TQValueList<KIO::UDSEntry> &list) { kdDebug(1219) << "MediaImpl::listMedia" << endl; @@ -159,7 +159,7 @@ bool MediaImpl::listMedia(QValueList<KIO::UDSEntry> &list) return true; } -bool MediaImpl::setUserLabel(const QString &name, const QString &label) +bool MediaImpl::setUserLabel(const TQString &name, const TQString &label) { kdDebug(1219) << "MediaImpl::setUserLabel: " << name << ", " << label << endl; @@ -175,7 +175,7 @@ bool MediaImpl::setUserLabel(const QString &name, const QString &label) } else { - QString returned_name = reply; + TQString returned_name = reply; if (!returned_name.isEmpty() && returned_name!=name) { @@ -199,7 +199,7 @@ bool MediaImpl::setUserLabel(const QString &name, const QString &label) } } -const Medium MediaImpl::findMediumByName(const QString &name, bool &ok) +const Medium MediaImpl::findMediumByName(const TQString &name, bool &ok) { DCOPRef mediamanager("kded", "mediamanager"); DCOPReply reply = mediamanager.call( "properties", name ); @@ -246,16 +246,16 @@ bool MediaImpl::ensureMediumMounted(Medium &medium) medium.deviceNode(), medium.mountPoint()); job->setAutoWarningHandlingEnabled(false); - connect( job, SIGNAL( result( KIO::Job * ) ), - this, SLOT( slotMountResult( KIO::Job * ) ) ); - connect( job, SIGNAL( warning( KIO::Job *, const QString & ) ), - this, SLOT( slotWarning( KIO::Job *, const QString & ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), + this, TQT_SLOT( slotMountResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( warning( KIO::Job *, const TQString & ) ), + this, TQT_SLOT( slotWarning( KIO::Job *, const TQString & ) ) ); */ kapp->dcopClient() ->connectDCOPSignal("kded", "mediamanager", - "mediumChanged(QString, bool)", + "mediumChanged(TQString, bool)", "mediaimpl", - "slotMediumChanged(QString)", + "slotMediumChanged(TQString)", false); DCOPRef mediamanager("kded", "mediamanager"); @@ -274,9 +274,9 @@ bool MediaImpl::ensureMediumMounted(Medium &medium) kapp->dcopClient() ->disconnectDCOPSignal("kded", "mediamanager", - "mediumChanged(QString, bool)", + "mediumChanged(TQString, bool)", "mediaimpl", - "slotMediumChanged(QString)"); + "slotMediumChanged(TQString)"); return m_lastErrorCode==0; } @@ -284,7 +284,7 @@ bool MediaImpl::ensureMediumMounted(Medium &medium) return true; } -void MediaImpl::slotWarning( KIO::Job * /*job*/, const QString &msg ) +void MediaImpl::slotWarning( KIO::Job * /*job*/, const TQString &msg ) { emit warning( msg ); } @@ -301,7 +301,7 @@ void MediaImpl::slotMountResult(KIO::Job *job) } } -void MediaImpl::slotMediumChanged(const QString &name) +void MediaImpl::slotMediumChanged(const TQString &name) { kdDebug(1219) << "MediaImpl::slotMediumChanged:" << name << endl; @@ -315,7 +315,7 @@ void MediaImpl::slotMediumChanged(const QString &name) } static void addAtom(KIO::UDSEntry &entry, unsigned int ID, long l, - const QString &s = QString::null) + const TQString &s = TQString::null) { KIO::UDSAtom atom; atom.m_uds = ID; @@ -353,10 +353,10 @@ KIO::UDSEntry MediaImpl::extractUrlInfos(const KURL &url) KIO::StatJob *job = KIO::stat(url, false); job->setAutoWarningHandlingEnabled( false ); - connect( job, SIGNAL( result(KIO::Job *) ), - this, SLOT( slotStatResult(KIO::Job *) ) ); - connect( job, SIGNAL( warning( KIO::Job *, const QString & ) ), - this, SLOT( slotWarning( KIO::Job *, const QString & ) ) ); + connect( job, TQT_SIGNAL( result(KIO::Job *) ), + this, TQT_SLOT( slotStatResult(KIO::Job *) ) ); + connect( job, TQT_SIGNAL( warning( KIO::Job *, const TQString & ) ), + this, TQT_SLOT( slotWarning( KIO::Job *, const TQString & ) ) ); qApp->eventLoop()->enterLoop(); KIO::UDSEntry::iterator it = m_entryBuffer.begin(); @@ -395,7 +395,7 @@ void MediaImpl::createMediumEntry(KIO::UDSEntry& entry, { kdDebug(1219) << "MediaProtocol::createMedium" << endl; - QString url = "media:/"+medium.name(); + TQString url = "media:/"+medium.name(); kdDebug(1219) << "url = " << url << ", mime = " << medium.mimeType() << endl; @@ -403,7 +403,7 @@ void MediaImpl::createMediumEntry(KIO::UDSEntry& entry, addAtom(entry, KIO::UDS_URL, 0, url); - QString label = KIO::encodeFileName( medium.prettyLabel() ); + TQString label = KIO::encodeFileName( medium.prettyLabel() ); addAtom(entry, KIO::UDS_NAME, 0, label); addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); @@ -417,8 +417,8 @@ void MediaImpl::createMediumEntry(KIO::UDSEntry& entry, } else { - QString mime = medium.mimeType(); - QString icon = KMimeType::mimeType(mime)->icon(mime, false); + TQString mime = medium.mimeType(); + TQString icon = KMimeType::mimeType(mime)->icon(mime, false); addAtom(entry, KIO::UDS_ICON_NAME, 0, icon); } diff --git a/kioslave/media/mediaimpl.h b/kioslave/media/mediaimpl.h index 2d82aefda..92b1d0202 100644 --- a/kioslave/media/mediaimpl.h +++ b/kioslave/media/mediaimpl.h @@ -25,43 +25,43 @@ #include <kurl.h> #include <dcopobject.h> -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> #include "medium.h" -class MediaImpl : public QObject, public DCOPObject +class MediaImpl : public TQObject, public DCOPObject { Q_OBJECT K_DCOP public: MediaImpl(); - bool parseURL(const KURL &url, QString &name, QString &path) const; - bool realURL(const QString &name, const QString &path, KURL &url); + bool parseURL(const KURL &url, TQString &name, TQString &path) const; + bool realURL(const TQString &name, const TQString &path, KURL &url); - bool statMedium(const QString &name, KIO::UDSEntry &entry); - bool statMediumByLabel(const QString &label, KIO::UDSEntry &entry); - bool listMedia(QValueList<KIO::UDSEntry> &list); - bool setUserLabel(const QString &name, const QString &label); + bool statMedium(const TQString &name, KIO::UDSEntry &entry); + bool statMediumByLabel(const TQString &label, KIO::UDSEntry &entry); + bool listMedia(TQValueList<KIO::UDSEntry> &list); + bool setUserLabel(const TQString &name, const TQString &label); void createTopLevelEntry(KIO::UDSEntry& entry) const; int lastErrorCode() const { return m_lastErrorCode; } - QString lastErrorMessage() const { return m_lastErrorMessage; } + TQString lastErrorMessage() const { return m_lastErrorMessage; } k_dcop: - void slotMediumChanged(const QString &name); + void slotMediumChanged(const TQString &name); signals: - void warning(const QString &msg); + void warning(const TQString &msg); private slots: - void slotWarning(KIO::Job *job, const QString &msg); + void slotWarning(KIO::Job *job, const TQString &msg); void slotMountResult(KIO::Job *job); void slotStatResult(KIO::Job *job); private: - const Medium findMediumByName(const QString &name, bool &ok); + const Medium findMediumByName(const TQString &name, bool &ok); bool ensureMediumMounted(Medium &medium); KIO::UDSEntry extractUrlInfos(const KURL &url); @@ -75,7 +75,7 @@ private: /// Last error code stored in class to simplify API. /// Note that this means almost no method can be const. int m_lastErrorCode; - QString m_lastErrorMessage; + TQString m_lastErrorMessage; }; #endif diff --git a/kioslave/media/mediamanager/fstabbackend.cpp b/kioslave/media/mediamanager/fstabbackend.cpp index 4ffcf4b2d..189f52aee 100644 --- a/kioslave/media/mediamanager/fstabbackend.cpp +++ b/kioslave/media/mediamanager/fstabbackend.cpp @@ -33,7 +33,7 @@ #define CDC_CD_R 0x2000 /* drive is a CD-R */ #define CDC_CD_RW 0x4000 /* drive is a CD-RW */ #define CDC_DVD 0x8000 /* drive is a DVD */ -#include <qfile.h> +#include <tqfile.h> #endif #include <klocale.h> @@ -56,13 +56,13 @@ FstabBackend::FstabBackend(MediaList &list, bool networkSharesOnly) - : QObject(), BackendBase(list), m_networkSharesOnly(networkSharesOnly) + : TQObject(), BackendBase(list), m_networkSharesOnly(networkSharesOnly) { KDirWatch::self()->addFile(MTAB); KDirWatch::self()->addFile(FSTAB); - connect( KDirWatch::self(), SIGNAL( dirty(const QString&) ), - this, SLOT( slotDirty(const QString&) ) ); + connect( KDirWatch::self(), TQT_SIGNAL( dirty(const TQString&) ), + this, TQT_SLOT( slotDirty(const TQString&) ) ); handleFstabChange(false); handleMtabChange(false); @@ -70,16 +70,16 @@ FstabBackend::FstabBackend(MediaList &list, bool networkSharesOnly) KDirWatch::self()->startScan(); #ifdef Q_OS_FREEBSD - connect( &m_mtabTimer, SIGNAL( timeout() ), - this, SLOT( handleMtabChange() ) ); + connect( &m_mtabTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( handleMtabChange() ) ); m_mtabTimer.start(250); #endif } FstabBackend::~FstabBackend() { - QStringList::iterator it = m_mtabIds.begin(); - QStringList::iterator end = m_mtabIds.end(); + TQStringList::iterator it = m_mtabIds.begin(); + TQStringList::iterator end = m_mtabIds.end(); for (; it!=end; ++it) { @@ -97,27 +97,27 @@ FstabBackend::~FstabBackend() KDirWatch::self()->removeFile(MTAB); } -QString FstabBackend::mount( const QString &_udi ) +TQString FstabBackend::mount( const TQString &_udi ) { const Medium* medium = m_mediaList.findById(_udi); if (!medium) return i18n("No such medium: %1").arg(_udi); KIO::Job* job = KIO::mount( false, 0, medium->deviceNode(), medium->mountPoint()); KIO::NetAccess::synchronousRun( job, 0 ); - return QString::null; + return TQString::null; } -QString FstabBackend::unmount( const QString &_udi ) +TQString FstabBackend::unmount( const TQString &_udi ) { const Medium* medium = m_mediaList.findById(_udi); if (!medium) return i18n("No such medium: %1").arg(_udi); KIO::Job* job = KIO::unmount( medium->mountPoint(), false); KIO::NetAccess::synchronousRun( job, 0 ); - return QString::null; + return TQString::null; } -void FstabBackend::slotDirty(const QString &path) +void FstabBackend::slotDirty(const TQString &path) { if (path==MTAB) { @@ -169,7 +169,7 @@ bool inExclusionPattern(KMountPoint *mount, bool networkSharesOnly) void FstabBackend::handleMtabChange(bool allowNotification) { - QStringList new_mtabIds; + TQStringList new_mtabIds; KMountPoint::List mtab = KMountPoint::currentMountPoints(); KMountPoint::List::iterator it = mtab.begin(); @@ -177,28 +177,28 @@ void FstabBackend::handleMtabChange(bool allowNotification) for (; it!=end; ++it) { - QString dev = (*it)->mountedFrom(); - QString mp = (*it)->mountPoint(); - QString fs = (*it)->mountType(); + TQString dev = (*it)->mountedFrom(); + TQString mp = (*it)->mountPoint(); + TQString fs = (*it)->mountType(); if ( ::inExclusionPattern(*it, m_networkSharesOnly) ) continue; /* Did we know this already before ? If yes, then nothing has changed, do not stat the mount point. Avoids hang if network shares are stalling */ - QString mtabEntry = dev + "*" + mp + "*" + fs; + TQString mtabEntry = dev + "*" + mp + "*" + fs; if(m_mtabEntries.contains(mtabEntry)) { new_mtabIds += m_mtabEntries[mtabEntry]; continue; } - QString id = generateId(dev, mp); + TQString id = generateId(dev, mp); new_mtabIds+=id; m_mtabEntries[mtabEntry] = id; if ( !m_mtabIds.contains(id) && m_fstabIds.contains(id) ) { - QString mime, icon, label; + TQString mime, icon, label; guess(dev, mp, fs, true, mime, icon, label); m_mediaList.changeMediumState(id, true, false, mime, icon, label); @@ -206,13 +206,13 @@ void FstabBackend::handleMtabChange(bool allowNotification) #if 0 else if ( !m_mtabIds.contains(id) ) { - QString name = generateName(dev, fs); + TQString name = generateName(dev, fs); Medium *m = new Medium(id, name); m->mountableState(dev, mp, fs, true); - QString mime, icon, label; + TQString mime, icon, label; guess(dev, mp, fs, true, mime, icon, label); m->setMimeType(mime); @@ -224,8 +224,8 @@ void FstabBackend::handleMtabChange(bool allowNotification) #endif } - QStringList::iterator it2 = m_mtabIds.begin(); - QStringList::iterator end2 = m_mtabIds.end(); + TQStringList::iterator it2 = m_mtabIds.begin(); + TQStringList::iterator end2 = m_mtabIds.end(); for (; it2!=end2; ++it2) { @@ -233,15 +233,15 @@ void FstabBackend::handleMtabChange(bool allowNotification) { const Medium *medium = m_mediaList.findById(*it2); - QString dev = medium->deviceNode(); - QString mp = medium->mountPoint(); - QString fs = medium->fsType(); + TQString dev = medium->deviceNode(); + TQString mp = medium->mountPoint(); + TQString fs = medium->fsType(); - QString mtabEntry = dev + "*" + mp + "*" + fs; + TQString mtabEntry = dev + "*" + mp + "*" + fs; m_mtabEntries.remove(mtabEntry); - QString mime, icon, label; + TQString mime, icon, label; guess(dev, mp, fs, false, mime, icon, label); m_mediaList.changeMediumState(*it2, false, false, @@ -260,7 +260,7 @@ void FstabBackend::handleMtabChange(bool allowNotification) void FstabBackend::handleFstabChange(bool allowNotification) { - QStringList new_fstabIds; + TQStringList new_fstabIds; KMountPoint::List fstab = KMountPoint::possibleMountPoints(); KMountPoint::List::iterator it = fstab.begin(); @@ -268,24 +268,24 @@ void FstabBackend::handleFstabChange(bool allowNotification) for (; it!=end; ++it) { - QString dev = (*it)->mountedFrom(); - QString mp = (*it)->mountPoint(); - QString fs = (*it)->mountType(); + TQString dev = (*it)->mountedFrom(); + TQString mp = (*it)->mountPoint(); + TQString fs = (*it)->mountType(); if ( ::inExclusionPattern(*it, m_networkSharesOnly) ) continue; - QString id = generateId(dev, mp); + TQString id = generateId(dev, mp); new_fstabIds+=id; if ( !m_fstabIds.contains(id) ) { - QString name = generateName(dev, fs); + TQString name = generateName(dev, fs); Medium *m = new Medium(id, name); m->mountableState(dev, mp, fs, false); - QString mime, icon, label; + TQString mime, icon, label; guess(dev, mp, fs, false, mime, icon, label); m->setMimeType(mime); @@ -296,8 +296,8 @@ void FstabBackend::handleFstabChange(bool allowNotification) } } - QStringList::iterator it2 = m_fstabIds.begin(); - QStringList::iterator end2 = m_fstabIds.end(); + TQStringList::iterator it2 = m_fstabIds.begin(); + TQStringList::iterator end2 = m_fstabIds.end(); for (; it2!=end2; ++it2) { @@ -310,18 +310,18 @@ void FstabBackend::handleFstabChange(bool allowNotification) m_fstabIds = new_fstabIds; } -QString FstabBackend::generateId(const QString &devNode, - const QString &mountPoint) +TQString FstabBackend::generateId(const TQString &devNode, + const TQString &mountPoint) { - QString d = KStandardDirs::realFilePath(devNode); - QString m = KStandardDirs::realPath(mountPoint); + TQString d = KStandardDirs::realFilePath(devNode); + TQString m = KStandardDirs::realPath(mountPoint); return "/org/kde/mediamanager/fstab/" +d.replace("/", "") +m.replace("/", ""); } -QString FstabBackend::generateName(const QString &devNode, const QString &fsType) +TQString FstabBackend::generateName(const TQString &devNode, const TQString &fsType) { KURL url( devNode ); @@ -335,19 +335,19 @@ QString FstabBackend::generateName(const QString &devNode, const QString &fsType } } -void FstabBackend::guess(const QString &devNode, const QString &mountPoint, - const QString &fsType, bool mounted, - QString &mimeType, QString &iconName, QString &label) +void FstabBackend::guess(const TQString &devNode, const TQString &mountPoint, + const TQString &fsType, bool mounted, + TQString &mimeType, TQString &iconName, TQString &label) { enum { UNKNOWN, CD, CDWRITER, DVD, DVDWRITER } devType = UNKNOWN; #ifdef __linux__ // Guessing device types by mount point is not exactly accurate... // Do something accurate first, and fall back if necessary. - int device=open(QFile::encodeName(devNode), O_RDONLY|O_NONBLOCK); + int device=open(TQFile::encodeName(devNode), O_RDONLY|O_NONBLOCK); if(device>=0) { bool isCd=false; - QString devname=devNode.section('/', -1); + TQString devname=devNode.section('/', -1); if(devname.startsWith("scd") || devname.startsWith("sr")) { // SCSI CD/DVD drive @@ -358,10 +358,10 @@ void FstabBackend::guess(const QString &devNode, const QString &mountPoint, // IDE device -- we can't tell if this is a // CD/DVD drive or harddisk by just looking at the // filename - QFile m(QString("/proc/ide/") + devname + "/media"); + TQFile m(TQString("/proc/ide/") + devname + "/media"); if(m.open(IO_ReadOnly)) { - QString buf; + TQString buf; m.readLine(buf, 1024); if(buf.contains("cdrom")) isCd=true; @@ -469,7 +469,7 @@ void FstabBackend::guess(const QString &devNode, const QString &mountPoint, } else { - QString tmp = devNode; + TQString tmp = devNode; if ( tmp.startsWith("/dev/") ) { tmp = tmp.mid(5); @@ -477,7 +477,7 @@ void FstabBackend::guess(const QString &devNode, const QString &mountPoint, label+= " (" + tmp + ")"; } mimeType+= (mounted ? "_mounted" : "_unmounted"); - iconName = QString::null; + iconName = TQString::null; } #include "fstabbackend.moc" diff --git a/kioslave/media/mediamanager/fstabbackend.h b/kioslave/media/mediamanager/fstabbackend.h index ceb2f23ef..e43ed48c0 100644 --- a/kioslave/media/mediamanager/fstabbackend.h +++ b/kioslave/media/mediamanager/fstabbackend.h @@ -21,15 +21,15 @@ #include "backendbase.h" -#include <qobject.h> -#include <qstringlist.h> -#include <qmap.h> +#include <tqobject.h> +#include <tqstringlist.h> +#include <tqmap.h> #ifdef Q_OS_FREEBSD -#include <qtimer.h> +#include <tqtimer.h> #endif -class FstabBackend : public QObject, public BackendBase +class FstabBackend : public TQObject, public BackendBase { Q_OBJECT @@ -37,31 +37,31 @@ public: FstabBackend(MediaList &list, bool networkSharesOnly = false); virtual ~FstabBackend(); - static void guess(const QString &devNode, const QString &mountPoint, - const QString &fsType, bool mounted, - QString &mimeType, QString &iconName, - QString &label); + static void guess(const TQString &devNode, const TQString &mountPoint, + const TQString &fsType, bool mounted, + TQString &mimeType, TQString &iconName, + TQString &label); - QString mount(const QString &id); - QString unmount(const QString &id); + TQString mount(const TQString &id); + TQString unmount(const TQString &id); private slots: - void slotDirty(const QString &path); + void slotDirty(const TQString &path); void handleFstabChange(bool allowNotification = true); void handleMtabChange(bool allowNotification = true); private: - static QString generateId(const QString &devNode, - const QString &mountPoint); - static QString generateName(const QString &devNode, - const QString &fsType); + static TQString generateId(const TQString &devNode, + const TQString &mountPoint); + static TQString generateName(const TQString &devNode, + const TQString &fsType); bool m_networkSharesOnly; - QStringList m_mtabIds; - QMap<QString, QString> m_mtabEntries; - QStringList m_fstabIds; + TQStringList m_mtabIds; + TQMap<TQString, TQString> m_mtabEntries; + TQStringList m_fstabIds; #ifdef Q_OS_FREEBSD - QTimer m_mtabTimer; + TQTimer m_mtabTimer; #endif }; diff --git a/kioslave/media/mediamanager/halbackend.cpp b/kioslave/media/mediamanager/halbackend.cpp index 4d6d9b19d..b6763ee84 100644 --- a/kioslave/media/mediamanager/halbackend.cpp +++ b/kioslave/media/mediamanager/halbackend.cpp @@ -24,14 +24,14 @@ #include <kapplication.h> #include <kmessagebox.h> -#include <qeventloop.h> -#include <qfile.h> +#include <tqeventloop.h> +#include <tqfile.h> #include <klocale.h> #include <kurl.h> #include <kdebug.h> #include <kprocess.h> #include <kconfig.h> -#include <qstylesheet.h> +#include <tqstylesheet.h> #include <kmountpoint.h> #include <kmessagebox.h> #include <kio/job.h> @@ -39,22 +39,22 @@ #include <kprocess.h> #define MOUNT_SUFFIX ( \ - (medium->isMounted() ? QString("_mounted") : QString("_unmounted")) + \ + (medium->isMounted() ? TQString("_mounted") : TQString("_unmounted")) + \ (medium->isEncrypted() ? (halClearVolume ? "_decrypted" : "_encrypted") : "" ) \ ) #define MOUNT_ICON_SUFFIX ( \ - (medium->isMounted() ? QString("_mount") : QString("_unmount")) + \ + (medium->isMounted() ? TQString("_mount") : TQString("_unmount")) + \ (medium->isEncrypted() ? (halClearVolume ? "_decrypt" : "_encrypt") : "" ) \ ) /* Static instance of this class, for static HAL callbacks */ static HALBackend* s_HALBackend; -/* A macro function to convert HAL string properties to QString */ -QString libhal_device_get_property_QString(LibHalContext *ctx, const char* udi, const char *key) +/* A macro function to convert HAL string properties to TQString */ +TQString libhal_device_get_property_QString(LibHalContext *ctx, const char* udi, const char *key) { char* _ppt_string; - QString _ppt_QString; + TQString _ppt_QString; DBusError error; dbus_error_init(&error); _ppt_string = libhal_device_get_property_string(ctx, udi, key, &error); @@ -65,8 +65,8 @@ QString libhal_device_get_property_QString(LibHalContext *ctx, const char* udi, } /* Constructor */ -HALBackend::HALBackend(MediaList &list, QObject* parent) - : QObject() +HALBackend::HALBackend(MediaList &list, TQObject* parent) + : TQObject() , BackendBase(list) , m_halContext(NULL) , m_halStoragePolicy(NULL) @@ -81,8 +81,8 @@ HALBackend::~HALBackend() /* Close HAL connection */ if (m_halContext) { - const QPtrList<Medium> medlist = m_mediaList.list(); - QPtrListIterator<Medium> it (medlist); + const TQPtrList<Medium> medlist = m_mediaList.list(); + TQPtrListIterator<Medium> it (medlist); for ( const Medium *current_medium = it.current(); current_medium; current_medium = ++it) { if( !current_medium->id().startsWith( "/org/kde" )) @@ -235,7 +235,7 @@ void HALBackend::AddDevice(const char *udi, bool allowNotification) return; /* Query drive udi */ - QString driveUdi = libhal_device_get_property_QString(m_halContext, udi, "block.storage_device"); + TQString driveUdi = libhal_device_get_property_QString(m_halContext, udi, "block.storage_device"); if ( driveUdi.isNull() ) // no storage - no fun return; @@ -284,10 +284,10 @@ void HALBackend::AddDevice(const char *udi, bool allowNotification) m_mediaList.addMedium(medium, allowNotification); // finally check for automount - QMap<QString,QString> options = MediaManagerUtils::splitOptions(mountoptions(udi)); + TQMap<TQString,TQString> options = MediaManagerUtils::splitOptions(mountoptions(udi)); kdDebug() << "automount " << options["automount"] << endl; if (options["automount"] == "true" && allowNotification ) { - QString error = mount(medium); + TQString error = mount(medium); if (!error.isEmpty()) kdDebug() << "error " << error << endl; } @@ -354,20 +354,20 @@ void HALBackend::ModifyDevice(const char *udi, const char* key) void HALBackend::DeviceCondition(const char* udi, const char* condition) { - QString conditionName = QString(condition); + TQString conditionName = TQString(condition); kdDebug(1219) << "Processing device condition " << conditionName << " for " << udi << endl; if (conditionName == "EjectPressed") { const Medium* medium = m_mediaList.findById(udi); if (!medium) { /* the ejectpressed appears on the drive and we need to find the volume */ - const QPtrList<Medium> medlist = m_mediaList.list(); - QPtrListIterator<Medium> it (medlist); + const TQPtrList<Medium> medlist = m_mediaList.list(); + TQPtrListIterator<Medium> it (medlist); for ( const Medium *current_medium = it.current(); current_medium; current_medium = ++it) { if( current_medium->id().startsWith( "/org/kde" )) continue; - QString driveUdi = libhal_device_get_property_QString(m_halContext, current_medium->id().latin1(), "block.storage_device"); + TQString driveUdi = libhal_device_get_property_QString(m_halContext, current_medium->id().latin1(), "block.storage_device"); if (driveUdi == udi) { medium = current_medium; @@ -436,7 +436,7 @@ const char* HALBackend::findMediumUdiFromUdi(const char* udi) libhal_volume_free(halVolume); /* this is a volume whose drive is registered */ - QString driveUdi = libhal_device_get_property_QString(m_halContext, udi, "block.storage_device"); + TQString driveUdi = libhal_device_get_property_QString(m_halContext, udi, "block.storage_device"); return findMediumUdiFromUdi(driveUdi.ascii()); } @@ -446,7 +446,7 @@ const char* HALBackend::findMediumUdiFromUdi(const char* udi) void HALBackend::ResetProperties(const char* mediumUdi, bool allowNotification) { kdDebug(1219) << "HALBackend::setProperties" << endl; - if ( QString::fromLatin1( mediumUdi ).startsWith( "/org/kde/" ) ) + if ( TQString::fromLatin1( mediumUdi ).startsWith( "/org/kde/" ) ) { const Medium *cmedium = m_mediaList.findById(mediumUdi); if ( cmedium ) @@ -487,7 +487,7 @@ void HALBackend::setVolumeProperties(Medium* medium) LibHalVolume* halVolume = libhal_volume_from_udi(m_halContext, udi); if (!halVolume) return; - QString driveUdi = libhal_volume_get_storage_device_udi(halVolume); + TQString driveUdi = libhal_volume_get_storage_device_udi(halVolume); LibHalDrive* halDrive = 0; if ( !driveUdi.isNull() ) halDrive = libhal_drive_from_udi(m_halContext, driveUdi.ascii()); @@ -507,7 +507,7 @@ void HALBackend::setVolumeProperties(Medium* medium) medium->setEncrypted(true); char* clearUdi = libhal_volume_crypto_get_clear_volume_udi(m_halContext, halVolume); - QString clearUdiString; + TQString clearUdiString; if (clearUdi != NULL) { kdDebug(1219) << "HALBackend::setVolumeProperties : crypto clear volume avail - " << clearUdi << endl; halClearVolume = libhal_volume_from_udi(m_halContext, clearUdi); @@ -526,9 +526,9 @@ void HALBackend::setVolumeProperties(Medium* medium) else medium->mountableState( libhal_volume_get_device_file(halVolume), /* Device node */ - QString::null, - QString::null, /* Mount point */ - QString::null, /* Filesystem type */ + TQString::null, + TQString::null, /* Mount point */ + TQString::null, /* Filesystem type */ false ); /* Mounted ? */ } else @@ -543,12 +543,12 @@ void HALBackend::setVolumeProperties(Medium* medium) char* name = libhal_volume_policy_compute_display_name(halDrive, halVolume, m_halStoragePolicy); - QString volume_name = QString::fromUtf8(name); - QString media_name = volume_name; + TQString volume_name = TQString::fromUtf8(name); + TQString media_name = volume_name; medium->setLabel(media_name); free(name); - QString mimeType; + TQString mimeType; if (libhal_volume_is_disc(halVolume)) { mimeType = "media/cdrom" + MOUNT_SUFFIX; @@ -579,10 +579,10 @@ void HALBackend::setVolumeProperties(Medium* medium) if (libhal_volume_disc_has_audio(halVolume) && !libhal_volume_disc_has_data(halVolume)) { mimeType = "media/audiocd"; - medium->unmountableState( "audiocd:/?device=" + QString(libhal_volume_get_device_file(halVolume)) ); + medium->unmountableState( "audiocd:/?device=" + TQString(libhal_volume_get_device_file(halVolume)) ); } - medium->setIconName(QString::null); + medium->setIconName(TQString::null); /* check if the disc id a vcd or a video dvd */ DiscType type = LinuxCDPolling::identifyDiscType(libhal_volume_get_device_file(halVolume)); @@ -602,7 +602,7 @@ void HALBackend::setVolumeProperties(Medium* medium) else { mimeType = "media/hdd" + MOUNT_SUFFIX; - medium->setIconName(QString::null); // reset icon + medium->setIconName(TQString::null); // reset icon if (libhal_drive_is_hotpluggable(halDrive)) { mimeType = "media/removable" + MOUNT_SUFFIX; @@ -640,13 +640,13 @@ void HALBackend::setVolumeProperties(Medium* medium) break; } case LIBHAL_DRIVE_TYPE_TAPE: - medium->setIconName(QString::null); //FIXME need icon + medium->setIconName(TQString::null); //FIXME need icon break; default: - medium->setIconName(QString::null); + medium->setIconName(TQString::null); } - if (medium->isMounted() && QFile::exists(medium->mountPoint() + "/dcim")) + if (medium->isMounted() && TQFile::exists(medium->mountPoint() + "/dcim")) { mimeType = "media/camera" + MOUNT_SUFFIX; } @@ -660,7 +660,7 @@ void HALBackend::setVolumeProperties(Medium* medium) bool HALBackend::setFstabProperties( Medium *medium ) { - QString mp = isInFstab(medium); + TQString mp = isInFstab(medium); if (!mp.isNull() && !medium->id().startsWith( "/org/kde" ) ) { @@ -682,7 +682,7 @@ bool HALBackend::setFstabProperties( Medium *medium ) } kdDebug() << mp << " " << mounted << " " << medium->deviceNode() << " " << endl; - QString fstype = medium->fsType(); + TQString fstype = medium->fsType(); if ( fstype.isNull() ) fstype = "auto"; @@ -713,7 +713,7 @@ bool HALBackend::setFloppyProperties(Medium* medium) if (!halDrive) return false; - QString drive_type = libhal_device_get_property_QString(m_halContext, udi, "storage.drive_type"); + TQString drive_type = libhal_device_get_property_QString(m_halContext, udi, "storage.drive_type"); if (drive_type == "zip") { int numVolumes; @@ -731,7 +731,7 @@ bool HALBackend::setFloppyProperties(Medium* medium) medium->setLabel(i18n("Unknown Drive")); // HAL hates floppies - so we have to do it twice ;( - medium->mountableState(libhal_drive_get_device_file(halDrive), QString::null, QString::null, false); + medium->mountableState(libhal_drive_get_device_file(halDrive), TQString::null, TQString::null, false); setFloppyMountState(medium); if (drive_type == "floppy") @@ -753,7 +753,7 @@ bool HALBackend::setFloppyProperties(Medium* medium) /** @todo And mimtype for JAZ drives ? */ - medium->setIconName(QString::null); + medium->setIconName(TQString::null); libhal_drive_free(halDrive); @@ -768,8 +768,8 @@ void HALBackend::setFloppyMountState( Medium *medium ) KMountPoint::List::iterator it = mtab.begin(); KMountPoint::List::iterator end = mtab.end(); - QString fstype; - QString mountpoint; + TQString fstype; + TQString mountpoint; for (; it!=end; ++it) { if ((*it)->mountedFrom() == medium->deviceNode() ) @@ -795,7 +795,7 @@ void HALBackend::setCameraProperties(Medium* medium) /** @todo find name */ medium->setName("camera"); - QString device = "camera:/"; + TQString device = "camera:/"; char *cam = libhal_device_get_property_string(m_halContext, udi, "camera.libgphoto2.name", NULL); DBusError error; @@ -812,7 +812,7 @@ void HALBackend::setCameraProperties(Medium* medium) /** @todo find the rest of this URL */ medium->unmountableState(device); medium->setMimeType("media/gphoto2camera"); - medium->setIconName(QString::null); + medium->setIconName(TQString::null); if (libhal_device_property_exists(m_halContext, udi, "usb_device.product", NULL)) medium->setLabel(libhal_device_get_property_QString(m_halContext, udi, "usb_device.product")); else if (libhal_device_property_exists(m_halContext, udi, "usb.product", NULL)) @@ -821,7 +821,7 @@ void HALBackend::setCameraProperties(Medium* medium) medium->setLabel(i18n("Camera")); } -QString HALBackend::generateName(const QString &devNode) +TQString HALBackend::generateName(const TQString &devNode) { return KURL(devNode).fileName(); } @@ -865,15 +865,15 @@ void HALBackend::hal_device_condition(LibHalContext *ctx, const char *udi, s_HALBackend->DeviceCondition(udi, condition_name); } -QStringList HALBackend::mountoptions(const QString &name) +TQStringList HALBackend::mountoptions(const TQString &name) { const Medium* medium = m_mediaList.findById(name); if (!medium) - return QStringList(); // we don't know about that one + return TQStringList(); // we don't know about that one if (!isInFstab(medium).isNull()) - return QStringList(); // not handled by HAL - fstab entry + return TQStringList(); // not handled by HAL - fstab entry - QString volume_udi = name; + TQString volume_udi = name; if (medium->isEncrypted()) { // see if we have a clear volume LibHalVolume* halVolume = libhal_volume_from_udi(m_halContext, medium->id().latin1()); @@ -884,12 +884,12 @@ QStringList HALBackend::mountoptions(const QString &name) libhal_free_string(clearUdi); } else { // if not decrypted yet then no mountoptions - return QStringList(); + return TQStringList(); } libhal_volume_free(halVolume); } else { // strange... - return QStringList(); + return TQStringList(); } } @@ -897,24 +897,24 @@ QStringList HALBackend::mountoptions(const QString &name) config.setGroup(name); char ** array = libhal_device_get_property_strlist(m_halContext, volume_udi.latin1(), "volume.mount.valid_options", NULL); - QMap<QString,bool> valids; + TQMap<TQString,bool> valids; for (int index = 0; array && array[index]; ++index) { - QString t = array[index]; + TQString t = array[index]; if (t.endsWith("=")) t = t.left(t.length() - 1); valids[t] = true; kdDebug() << "valid " << t << endl; } libhal_free_string_array(array); - QStringList result; - QString tmp; + TQStringList result; + TQString tmp; - QString fstype = libhal_device_get_property_QString(m_halContext, volume_udi.latin1(), "volume.fstype"); + TQString fstype = libhal_device_get_property_QString(m_halContext, volume_udi.latin1(), "volume.fstype"); if (fstype.isNull()) fstype = libhal_device_get_property_QString(m_halContext, volume_udi.latin1(), "volume.policy.mount_filesystem"); - QString drive_udi = libhal_device_get_property_QString(m_halContext, volume_udi.latin1(), "block.storage_device"); + TQString drive_udi = libhal_device_get_property_QString(m_halContext, volume_udi.latin1(), "block.storage_device"); bool removable = false; if ( !drive_udi.isNull() ) @@ -932,12 +932,12 @@ QStringList HALBackend::mountoptions(const QString &name) || libhal_device_get_property_bool(m_halContext, volume_udi.latin1(), "volume.disc.has_audio", NULL)) value = false; - result << QString("automount=%1").arg(value ? "true" : "false"); + result << TQString("automount=%1").arg(value ? "true" : "false"); if (valids.contains("ro")) { value = config.readBoolEntry("ro", false); - tmp = QString("ro=%1").arg(value ? "true" : "false"); + tmp = TQString("ro=%1").arg(value ? "true" : "false"); if (fstype != "iso9660") // makes no sense result << tmp; } @@ -945,7 +945,7 @@ QStringList HALBackend::mountoptions(const QString &name) if (valids.contains("quiet")) { value = config.readBoolEntry("quiet", false); - tmp = QString("quiet=%1").arg(value ? "true" : "false"); + tmp = TQString("quiet=%1").arg(value ? "true" : "false"); if (fstype != "iso9660") // makes no sense result << tmp; } @@ -953,27 +953,27 @@ QStringList HALBackend::mountoptions(const QString &name) if (valids.contains("flush")) { value = config.readBoolEntry("flush", fstype.endsWith("fat")); - tmp = QString("flush=%1").arg(value ? "true" : "false"); + tmp = TQString("flush=%1").arg(value ? "true" : "false"); result << tmp; } if (valids.contains("uid")) { value = config.readBoolEntry("uid", true); - tmp = QString("uid=%1").arg(value ? "true" : "false"); + tmp = TQString("uid=%1").arg(value ? "true" : "false"); result << tmp; } if (valids.contains("utf8")) { value = config.readBoolEntry("utf8", true); - tmp = QString("utf8=%1").arg(value ? "true" : "false"); + tmp = TQString("utf8=%1").arg(value ? "true" : "false"); result << tmp; } if (valids.contains("shortname")) { - QString svalue = config.readEntry("shortname", "lower").lower(); + TQString svalue = config.readEntry("shortname", "lower").lower(); if (svalue == "winnt") result << "shortname=winnt"; else if (svalue == "win95") @@ -991,14 +991,14 @@ QStringList HALBackend::mountoptions(const QString &name) // check in the same order as `locale` does char *cType; if ( (cType = getenv("LC_ALL")) || (cType = getenv("LC_CTYPE")) || (cType = getenv("LANG")) ) { - result << QString("locale=%1").arg(cType); + result << TQString("locale=%1").arg(cType); } } if (valids.contains("sync")) { value = config.readBoolEntry("sync", ( valids.contains("flush") && !fstype.endsWith("fat") ) && removable); - tmp = QString("sync=%1").arg(value ? "true" : "false"); + tmp = TQString("sync=%1").arg(value ? "true" : "false"); if (fstype != "iso9660") // makes no sense result << tmp; } @@ -1006,12 +1006,12 @@ QStringList HALBackend::mountoptions(const QString &name) if (valids.contains("noatime")) { value = config.readBoolEntry("atime", !fstype.endsWith("fat")); - tmp = QString("atime=%1").arg(value ? "true" : "false"); + tmp = TQString("atime=%1").arg(value ? "true" : "false"); if (fstype != "iso9660") // makes no sense result << tmp; } - QString mount_point = libhal_device_get_property_QString(m_halContext, volume_udi.latin1(), "volume.mount_point"); + TQString mount_point = libhal_device_get_property_QString(m_halContext, volume_udi.latin1(), "volume.mount_point"); if (mount_point.isEmpty()) mount_point = libhal_device_get_property_QString(m_halContext, volume_udi.latin1(), "volume.policy.desired_mount_point"); @@ -1020,12 +1020,12 @@ QStringList HALBackend::mountoptions(const QString &name) if (!mount_point.startsWith("/")) mount_point = "/media/" + mount_point; - result << QString("mountpoint=%1").arg(mount_point); - result << QString("filesystem=%1").arg(fstype); + result << TQString("mountpoint=%1").arg(mount_point); + result << TQString("filesystem=%1").arg(fstype); if (valids.contains("data")) { - QString svalue = config.readEntry("journaling").lower(); + TQString svalue = config.readEntry("journaling").lower(); if (svalue == "ordered") result << "journaling=ordered"; else if (svalue == "writeback") @@ -1039,14 +1039,14 @@ QStringList HALBackend::mountoptions(const QString &name) return result; } -bool HALBackend::setMountoptions(const QString &name, const QStringList &options ) +bool HALBackend::setMountoptions(const TQString &name, const TQStringList &options ) { kdDebug() << "setMountoptions " << name << " " << options << endl; KConfig config("mediamanagerrc"); config.setGroup(name); - QMap<QString,QString> valids = MediaManagerUtils::splitOptions(options); + TQMap<TQString,TQString> valids = MediaManagerUtils::splitOptions(options); const char *names[] = { "ro", "quiet", "atime", "uid", "utf8", "flush", "sync", 0 }; for (int index = 0; names[index]; ++index) @@ -1059,11 +1059,11 @@ bool HALBackend::setMountoptions(const QString &name, const QStringList &options if (valids.contains("journaling")) config.writeEntry("journaling", valids["journaling"]); - if (!mountoptions(name).contains(QString("mountpoint=%1").arg(valids["mountpoint"]))) + if (!mountoptions(name).contains(TQString("mountpoint=%1").arg(valids["mountpoint"]))) config.writeEntry("mountpoint", valids["mountpoint"]); if (valids.contains("automount")) { - QString drive_udi = libhal_device_get_property_QString(m_halContext, name.latin1(), "block.storage_device"); + TQString drive_udi = libhal_device_get_property_QString(m_halContext, name.latin1(), "block.storage_device"); config.setGroup(drive_udi); config.writeEntry("automount", valids["automount"]); } @@ -1071,8 +1071,8 @@ bool HALBackend::setMountoptions(const QString &name, const QStringList &options return true; } -QString startKdeSudoProcess(const QString& kdesudoPath, const QString& command, - const QString& dialogCaption, const QString& dialogComment) +TQString startKdeSudoProcess(const TQString& kdesudoPath, const TQString& command, + const TQString& dialogCaption, const TQString& dialogComment) { KProcess kdesudoProcess; @@ -1086,11 +1086,11 @@ QString startKdeSudoProcess(const QString& kdesudoPath, const QString& command, // @todo handle kdesudo output kdesudoProcess.start(KProcess::Block); - return QString(); + return TQString(); } -QString startKdeSuProcess(const QString& kdesuPath, const QString& command, - const QString& dialogCaption) +TQString startKdeSuProcess(const TQString& kdesuPath, const TQString& command, + const TQString& dialogCaption) { KProcess kdesuProcess; @@ -1103,19 +1103,19 @@ QString startKdeSuProcess(const QString& kdesuPath, const QString& command, // @todo handle kdesu output kdesuProcess.start(KProcess::Block); - return QString(); + return TQString(); } -QString startPrivilegedProcess(const QString& command, const QString& dialogCaption, const QString& dialogComment) +TQString startPrivilegedProcess(const TQString& command, const TQString& dialogCaption, const TQString& dialogComment) { - QString error; + TQString error; - QString kdesudoPath = KStandardDirs::findExe("kdesudo"); + TQString kdesudoPath = KStandardDirs::findExe("kdesudo"); if (!kdesudoPath.isEmpty()) error = startKdeSudoProcess(kdesudoPath, command, dialogCaption, dialogComment); else { - QString kdesuPath = KStandardDirs::findExe("kdesu"); + TQString kdesuPath = KStandardDirs::findExe("kdesu"); if (!kdesuPath.isEmpty()) error = startKdeSuProcess(kdesuPath, command, dialogCaption); @@ -1124,28 +1124,28 @@ QString startPrivilegedProcess(const QString& command, const QString& dialogCapt return error; } -QString privilegedMount(const char* udi, const char* mountPoint, const char** options, int numberOfOptions) +TQString privilegedMount(const char* udi, const char* mountPoint, const char** options, int numberOfOptions) { - QString error; + TQString error; kdDebug() << "run privileged mount for " << udi << endl; - QString dbusSendPath = KStandardDirs::findExe("dbus-send"); + TQString dbusSendPath = KStandardDirs::findExe("dbus-send"); // @todo return error message if (dbusSendPath.isEmpty()) - return QString(); + return TQString(); - QString mountOptions; - QTextOStream optionsStream(&mountOptions); + TQString mountOptions; + TQTextOStream optionsStream(&mountOptions); for (int optionIndex = 0; optionIndex < numberOfOptions; optionIndex++) { optionsStream << options[optionIndex]; if (optionIndex < numberOfOptions - 1) optionsStream << ","; } - QString command; - QTextOStream(&command) << dbusSendPath + TQString command; + TQTextOStream(&command) << dbusSendPath << " --system --print-reply --dest=org.freedesktop.Hal " << udi << " org.freedesktop.Hal.Device.Volume.Mount string:" << mountPoint << " string: array:string:" << mountOptions; @@ -1159,20 +1159,20 @@ QString privilegedMount(const char* udi, const char* mountPoint, const char** op return error; } -QString privilegedUnmount(const char* udi) +TQString privilegedUnmount(const char* udi) { - QString error; + TQString error; kdDebug() << "run privileged unmount for " << udi << endl; - QString dbusSendPath = KStandardDirs::findExe("dbus-send"); + TQString dbusSendPath = KStandardDirs::findExe("dbus-send"); // @todo return error message if (dbusSendPath.isEmpty()) - return QString(); + return TQString(); - QString command; - QTextOStream(&command) << dbusSendPath + TQString command; + TQTextOStream(&command) << dbusSendPath << " --system --print-reply --dest=org.freedesktop.Hal " << udi << " org.freedesktop.Hal.Device.Volume.Unmount array:string:force"; @@ -1185,7 +1185,7 @@ QString privilegedUnmount(const char* udi) return error; } -static QString mount_priv(const char *udi, const char *mount_point, const char **poptions, int noptions, +static TQString mount_priv(const char *udi, const char *mount_point, const char **poptions, int noptions, DBusConnection *dbus_connection) { DBusMessage *dmesg, *reply; @@ -1208,12 +1208,12 @@ static QString mount_priv(const char *udi, const char *mount_point, const char * return i18n("Internal Error"); } - QString qerror; + TQString qerror; dbus_error_init (&error); if (!(reply = dbus_connection_send_with_reply_and_block (dbus_connection, dmesg, -1, &error))) { - QString qerror = error.message; + TQString qerror = error.message; kdError() << "mount failed for " << udi << ": " << error.name << " - " << qerror << endl; if ( !strcmp(error.name, "org.freedesktop.Hal.Device.Volume.UnknownFilesystemType")) qerror = i18n("Invalid filesystem type"); @@ -1242,20 +1242,20 @@ static QString mount_priv(const char *udi, const char *mount_point, const char * } -QString HALBackend::listUsingProcesses(const Medium* medium) +TQString HALBackend::listUsingProcesses(const Medium* medium) { - QString proclist, fullmsg; - QString cmdline = QString("/usr/bin/env fuser -vm %1 2>&1").arg(KProcess::quote(medium->mountPoint())); + TQString proclist, fullmsg; + TQString cmdline = TQString("/usr/bin/env fuser -vm %1 2>&1").arg(KProcess::quote(medium->mountPoint())); FILE *fuser = popen(cmdline.latin1(), "r"); uint counter = 0; if (fuser) { proclist += "<pre>"; - QTextIStream is(fuser); - QString tmp; + TQTextIStream is(fuser); + TQString tmp; while (!is.atEnd()) { tmp = is.readLine(); - tmp = QStyleSheet::escape(tmp) + "\n"; + tmp = TQStyleSheet::escape(tmp) + "\n"; proclist += tmp; if (counter++ > 10) @@ -1275,24 +1275,24 @@ QString HALBackend::listUsingProcesses(const Medium* medium) fullmsg += "<br>" + proclist; return fullmsg; } else { - return QString::null; + return TQString::null; } } -QString HALBackend::killUsingProcesses(const Medium* medium) +TQString HALBackend::killUsingProcesses(const Medium* medium) { - QString proclist, fullmsg; - QString cmdline = QString("/usr/bin/env fuser -vmk %1 2>&1").arg(KProcess::quote(medium->mountPoint())); + TQString proclist, fullmsg; + TQString cmdline = TQString("/usr/bin/env fuser -vmk %1 2>&1").arg(KProcess::quote(medium->mountPoint())); FILE *fuser = popen(cmdline.latin1(), "r"); uint counter = 0; if (fuser) { proclist += "<pre>"; - QTextIStream is(fuser); - QString tmp; + TQTextIStream is(fuser); + TQString tmp; while (!is.atEnd()) { tmp = is.readLine(); - tmp = QStyleSheet::escape(tmp) + "\n"; + tmp = TQStyleSheet::escape(tmp) + "\n"; proclist += tmp; if (counter++ > 10) @@ -1310,7 +1310,7 @@ QString HALBackend::killUsingProcesses(const Medium* medium) fullmsg += "<br>" + proclist; return fullmsg; } else { - return QString::null; + return TQString::null; } } @@ -1319,11 +1319,11 @@ void HALBackend::slotResult(KIO::Job *job) kdDebug() << "slotResult " << mount_jobs[job] << endl; struct mount_job_data *data = mount_jobs[job]; - QString& qerror = data->errorMessage; + TQString& qerror = data->errorMessage; const Medium* medium = data->medium; if (job->error() == KIO::ERR_COULD_NOT_UNMOUNT) { - QString proclist(listUsingProcesses(medium)); + TQString proclist(listUsingProcesses(medium)); qerror = "<qt>"; qerror += "<p>" + i18n("Unfortunately, the device <b>%1</b> (%2) named <b>'%3'</b> and " @@ -1352,7 +1352,7 @@ void HALBackend::slotResult(KIO::Job *job) kapp->eventLoop()->exitLoop(); } -QString HALBackend::isInFstab(const Medium *medium) +TQString HALBackend::isInFstab(const Medium *medium) { KMountPoint::List fstab = KMountPoint::possibleMountPoints(KMountPoint::NeedMountOptions|KMountPoint::NeedRealDeviceName); @@ -1361,27 +1361,27 @@ QString HALBackend::isInFstab(const Medium *medium) for (; it!=end; ++it) { - QString reald = (*it)->realDeviceName(); + TQString reald = (*it)->realDeviceName(); if ( reald.endsWith( "/" ) ) reald = reald.left( reald.length() - 1 ); kdDebug() << "isInFstab -" << medium->deviceNode() << "- -" << reald << "- -" << (*it)->mountedFrom() << "-" << endl; if ((*it)->mountedFrom() == medium->deviceNode() || ( !medium->deviceNode().isEmpty() && reald == medium->deviceNode() ) ) { - QStringList opts = (*it)->mountOptions(); + TQStringList opts = (*it)->mountOptions(); if (opts.contains("user") || opts.contains("users")) return (*it)->mountPoint(); } } - return QString::null; + return TQString::null; } -QString HALBackend::mount(const Medium *medium) +TQString HALBackend::mount(const Medium *medium) { if (medium->isMounted()) - return QString(); // that was easy + return TQString(); // that was easy - QString mountPoint = isInFstab(medium); + TQString mountPoint = isInFstab(medium); if (!mountPoint.isNull()) { struct mount_job_data data; @@ -1390,8 +1390,8 @@ QString HALBackend::mount(const Medium *medium) kdDebug() << "triggering user mount " << medium->deviceNode() << " " << mountPoint << " " << medium->id() << endl; KIO::Job *job = KIO::mount( false, 0, medium->deviceNode(), mountPoint ); - connect(job, SIGNAL( result (KIO::Job *)), - SLOT( slotResult( KIO::Job *))); + connect(job, TQT_SIGNAL( result (KIO::Job *)), + TQT_SLOT( slotResult( KIO::Job *))); mount_jobs[job] = &data; // The caller expects the device to be mounted when the function // completes. Thus block until the job completes. @@ -1399,22 +1399,22 @@ QString HALBackend::mount(const Medium *medium) kapp->eventLoop()->enterLoop(); } // Return the error message (if any) to the caller - return (data.error) ? data.errorMessage : QString::null; + return (data.error) ? data.errorMessage : TQString::null; } else if (medium->id().startsWith("/org/kde/") ) return i18n("Permissions denied"); - QStringList soptions; + TQStringList soptions; kdDebug() << "mounting " << medium->id() << "..." << endl; - QMap<QString,QString> valids = MediaManagerUtils::splitOptions(mountoptions(medium->id())); + TQMap<TQString,TQString> valids = MediaManagerUtils::splitOptions(mountoptions(medium->id())); if (valids["flush"] == "true") soptions << "flush"; if ((valids["uid"] == "true") && (medium->fsType() != "ntfs")) { - soptions << QString("uid=%1").arg(getuid()); + soptions << TQString("uid=%1").arg(getuid()); } if (valids["ro"] == "true") @@ -1433,44 +1433,44 @@ QString HALBackend::mount(const Medium *medium) soptions << "sync"; if (medium->fsType() == "ntfs") { - QString fsLocale("locale="); + TQString fsLocale("locale="); fsLocale += setlocale(LC_ALL, ""); soptions << fsLocale; } - QString mount_point = valids["mountpoint"]; + TQString mount_point = valids["mountpoint"]; if (mount_point.startsWith("/media/")) mount_point = mount_point.mid(7); if (valids.contains("shortname")) { - soptions << QString("shortname=%1").arg(valids["shortname"]); + soptions << TQString("shortname=%1").arg(valids["shortname"]); } if (valids.contains("locale")) { - soptions << QString("locale=%1").arg(valids["locale"]); + soptions << TQString("locale=%1").arg(valids["locale"]); } if (valids.contains("journaling")) { - QString option = valids["journaling"]; + TQString option = valids["journaling"]; if (option == "data") - soptions << QString("data=journal"); + soptions << TQString("data=journal"); else if (option == "writeback") - soptions << QString("data=writeback"); + soptions << TQString("data=writeback"); else - soptions << QString("data=ordered"); + soptions << TQString("data=ordered"); } const char **options = new const char*[soptions.size() + 1]; uint noptions = 0; - for (QStringList::ConstIterator it = soptions.begin(); it != soptions.end(); ++it, ++noptions) + for (TQStringList::ConstIterator it = soptions.begin(); it != soptions.end(); ++it, ++noptions) options[noptions] = (*it).latin1(); options[noptions] = NULL; - QString qerror = i18n("Cannot mount encrypted drives!"); + TQString qerror = i18n("Cannot mount encrypted drives!"); if (!medium->isEncrypted()) { // normal volume @@ -1496,10 +1496,10 @@ QString HALBackend::mount(const Medium *medium) medium->setHalMounted(true); ResetProperties(medium->id().latin1()); - return QString(); + return TQString(); } -QString HALBackend::mount(const QString &_udi) +TQString HALBackend::mount(const TQString &_udi) { const Medium* medium = m_mediaList.findById(_udi); if (!medium) @@ -1508,7 +1508,7 @@ QString HALBackend::mount(const QString &_udi) return mount(medium); } -QString HALBackend::unmount(const QString &_udi) +TQString HALBackend::unmount(const TQString &_udi) { const Medium* medium = m_mediaList.findById(_udi); if (!medium) @@ -1528,9 +1528,9 @@ QString HALBackend::unmount(const QString &_udi) return i18n("No such medium: %1").arg(_udi); if (!medium->isMounted()) - return QString(); // that was easy + return TQString(); // that was easy - QString mountPoint = isInFstab(medium); + TQString mountPoint = isInFstab(medium); if (!mountPoint.isNull()) { struct mount_job_data data; @@ -1539,8 +1539,8 @@ QString HALBackend::unmount(const QString &_udi) kdDebug() << "triggering user unmount " << medium->deviceNode() << " " << mountPoint << endl; KIO::Job *job = KIO::unmount( medium->mountPoint(), false ); - connect(job, SIGNAL( result (KIO::Job *)), - SLOT( slotResult( KIO::Job *))); + connect(job, TQT_SIGNAL( result (KIO::Job *)), + TQT_SLOT( slotResult( KIO::Job *))); mount_jobs[job] = &data; // The caller expects the device to be unmounted when the function // completes. Thus block until the job completes. @@ -1548,13 +1548,13 @@ QString HALBackend::unmount(const QString &_udi) kapp->eventLoop()->enterLoop(); } // Return the error message (if any) to the caller - return (data.error) ? data.errorMessage : QString::null; + return (data.error) ? data.errorMessage : TQString::null; } DBusMessage *dmesg, *reply; DBusError error; const char *options[2]; - QString udi = QString::null; + TQString udi = TQString::null; if (!medium->isEncrypted()) { // normal volume @@ -1607,7 +1607,7 @@ QString HALBackend::unmount(const QString &_udi) if (!(reply = dbus_connection_send_with_reply_and_block (dbus_connection, dmesg, -1, &error))) { thisunmounthasfailed = 1; - QString qerror, reason, origqerror; + TQString qerror, reason, origqerror; if (!strcmp(error.name, "org.freedesktop.Hal.Device.PermissionDeniedByPolicy")) { qerror = privilegedUnmount(udi.latin1()); @@ -1615,7 +1615,7 @@ QString HALBackend::unmount(const QString &_udi) if (qerror.isEmpty()) { dbus_message_unref(dmesg); dbus_error_free(&error); - return QString(); + return TQString(); } // @todo handle unmount error message @@ -1675,17 +1675,17 @@ QString HALBackend::unmount(const QString &_udi) while (dbus_connection_dispatch(dbus_connection) == DBUS_DISPATCH_DATA_REMAINS) ; - return QString(); + return TQString(); } -QString HALBackend::decrypt(const QString &_udi, const QString &password) +TQString HALBackend::decrypt(const TQString &_udi, const TQString &password) { const Medium* medium = m_mediaList.findById(_udi); if (!medium) return i18n("No such medium: %1").arg(_udi); if (!medium->isEncrypted() || !medium->clearDeviceUdi().isNull()) - return QString(); + return TQString(); const char *udi = medium->id().latin1(); DBusMessage *msg = NULL; @@ -1702,7 +1702,7 @@ QString HALBackend::decrypt(const QString &_udi, const QString &password) return i18n("Internal Error"); } - QCString pwdUtf8 = password.utf8(); + TQCString pwdUtf8 = password.utf8(); const char *pwd_utf8 = pwdUtf8; if (!dbus_message_append_args (msg, DBUS_TYPE_STRING, &pwd_utf8, DBUS_TYPE_INVALID)) { kdDebug() << "decrypt failed for " << udi << ": could not append args to dbus message\n"; @@ -1714,7 +1714,7 @@ QString HALBackend::decrypt(const QString &_udi, const QString &password) if (!(reply = dbus_connection_send_with_reply_and_block (dbus_connection, msg, -1, &error)) || dbus_error_is_set (&error)) { - QString qerror = i18n("Internal Error"); + TQString qerror = i18n("Internal Error"); kdDebug() << "decrypt failed for " << udi << ": " << error.name << " " << error.message << endl; if (strcmp (error.name, "org.freedesktop.Hal.Device.Volume.Crypto.SetupPasswordError") == 0) { qerror = i18n("Wrong password"); @@ -1730,17 +1730,17 @@ QString HALBackend::decrypt(const QString &_udi, const QString &password) while (dbus_connection_dispatch(dbus_connection) == DBUS_DISPATCH_DATA_REMAINS) ; - return QString(); + return TQString(); } -QString HALBackend::undecrypt(const QString &_udi) +TQString HALBackend::undecrypt(const TQString &_udi) { const Medium* medium = m_mediaList.findById(_udi); if (!medium) return i18n("No such medium: %1").arg(_udi); if (!medium->isEncrypted() || medium->clearDeviceUdi().isNull()) - return QString(); + return TQString(); const char *udi = medium->id().latin1(); DBusMessage *msg = NULL; @@ -1767,7 +1767,7 @@ QString HALBackend::undecrypt(const QString &_udi) if (!(reply = dbus_connection_send_with_reply_and_block (dbus_connection, msg, -1, &error)) || dbus_error_is_set (&error)) { - QString qerror = i18n("Internal Error"); + TQString qerror = i18n("Internal Error"); kdDebug() << "teardown failed for " << udi << ": " << error.name << " " << error.message << endl; dbus_error_free (&error); dbus_message_unref (msg); @@ -1782,7 +1782,7 @@ QString HALBackend::undecrypt(const QString &_udi) while (dbus_connection_dispatch(dbus_connection) == DBUS_DISPATCH_DATA_REMAINS) ; - return QString(); + return TQString(); } #include "halbackend.moc" diff --git a/kioslave/media/mediamanager/halbackend.h b/kioslave/media/mediamanager/halbackend.h index c5bdd532c..59c7aa366 100644 --- a/kioslave/media/mediamanager/halbackend.h +++ b/kioslave/media/mediamanager/halbackend.h @@ -31,9 +31,9 @@ #include "backendbase.h" -#include <qobject.h> -#include <qstringlist.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstringlist.h> +#include <tqstring.h> #include <config.h> @@ -49,7 +49,7 @@ namespace KIO { class Job; } -class HALBackend : public QObject, public BackendBase +class HALBackend : public TQObject, public BackendBase { Q_OBJECT @@ -57,7 +57,7 @@ public: /** * Constructor */ - HALBackend(MediaList &list, QObject* parent); + HALBackend(MediaList &list, TQObject* parent); /** * Destructor @@ -78,15 +78,15 @@ public: */ bool ListDevices(); - QStringList mountoptions(const QString &id); + TQStringList mountoptions(const TQString &id); - bool setMountoptions(const QString &id, const QStringList &options); + bool setMountoptions(const TQString &id, const TQStringList &options); - QString mount(const QString &id); - QString mount(const Medium *medium); - QString unmount(const QString &id); - QString decrypt(const QString &id, const QString &password); - QString undecrypt(const QString &id); + TQString mount(const TQString &id); + TQString mount(const Medium *medium); + TQString unmount(const TQString &id); + TQString decrypt(const TQString &id, const TQString &password); + TQString undecrypt(const TQString &id); private: /** @@ -142,10 +142,10 @@ private: void setFloppyMountState( Medium* medium ); bool setFstabProperties(Medium* medium); void setCameraProperties(Medium* medium); - QString generateName(const QString &devNode); - static QString isInFstab(const Medium *medium); - static QString listUsingProcesses(const Medium *medium); - static QString killUsingProcesses(const Medium *medium); + TQString generateName(const TQString &devNode); + static TQString isInFstab(const Medium *medium); + static TQString listUsingProcesses(const Medium *medium); + static TQString killUsingProcesses(const Medium *medium); private slots: void slotResult(KIO::Job *job); @@ -207,7 +207,7 @@ private: /** * Object for the kded module */ - QObject* m_parent; + TQObject* m_parent; DBusConnection *dbus_connection; @@ -222,10 +222,10 @@ private: // [out] KIO::Error if an error occured during operation. Otherwise, 0 int error; // [out] Error message to be displayed to the user - QString errorMessage; + TQString errorMessage; }; - QMap<KIO::Job *, struct mount_job_data*> mount_jobs; + TQMap<KIO::Job *, struct mount_job_data*> mount_jobs; }; #endif /* _HALBACKEND_H_ */ diff --git a/kioslave/media/mediamanager/linuxcdpolling.cpp b/kioslave/media/mediamanager/linuxcdpolling.cpp index 7519023fe..945fd950a 100644 --- a/kioslave/media/mediamanager/linuxcdpolling.cpp +++ b/kioslave/media/mediamanager/linuxcdpolling.cpp @@ -21,9 +21,9 @@ #include "linuxcdpolling.h" -#include <qthread.h> -#include <qmutex.h> -#include <qfile.h> +#include <tqthread.h> +#include <tqmutex.h> +#include <tqfile.h> #include <kdebug.h> @@ -113,7 +113,7 @@ DiscType::operator int() const class PollingThread : public QThread { public: - PollingThread(const QCString &devNode) : m_dev(devNode) + PollingThread(const TQCString &devNode) : m_dev(devNode) { kdDebug(1219) << "PollingThread::PollingThread(" << devNode << ")" << endl; @@ -125,20 +125,20 @@ public: void stop() { - QMutexLocker locker(&m_mutex); + TQMutexLocker locker(&m_mutex); m_stop = true; } bool hasChanged() { - QMutexLocker locker(&m_mutex); + TQMutexLocker locker(&m_mutex); return m_currentType!=m_lastPollType; } DiscType type() { - QMutexLocker locker(&m_mutex); + TQMutexLocker locker(&m_mutex); m_currentType = m_lastPollType; return m_currentType; } @@ -165,36 +165,36 @@ protected: } private: - QMutex m_mutex; + TQMutex m_mutex; bool m_stop; - const QCString m_dev; + const TQCString m_dev; DiscType m_currentType; DiscType m_lastPollType; }; LinuxCDPolling::LinuxCDPolling(MediaList &list) - : QObject(), BackendBase(list) + : TQObject(), BackendBase(list) { - connect(&m_mediaList, SIGNAL(mediumAdded(const QString &, - const QString &, bool)), - this, SLOT(slotMediumAdded(const QString &)) ); + connect(&m_mediaList, TQT_SIGNAL(mediumAdded(const TQString &, + const TQString &, bool)), + this, TQT_SLOT(slotMediumAdded(const TQString &)) ); - connect(&m_mediaList, SIGNAL(mediumRemoved(const QString &, - const QString &, bool)), - this, SLOT(slotMediumRemoved(const QString &)) ); + connect(&m_mediaList, TQT_SIGNAL(mediumRemoved(const TQString &, + const TQString &, bool)), + this, TQT_SLOT(slotMediumRemoved(const TQString &)) ); - connect(&m_mediaList, SIGNAL(mediumStateChanged(const QString &, - const QString &, bool, bool)), - this, SLOT(slotMediumStateChanged(const QString &)) ); + connect(&m_mediaList, TQT_SIGNAL(mediumStateChanged(const TQString &, + const TQString &, bool, bool)), + this, TQT_SLOT(slotMediumStateChanged(const TQString &)) ); - connect(&m_timer, SIGNAL(timeout()), this, SLOT(slotTimeout())); + connect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout())); } LinuxCDPolling::~LinuxCDPolling() { - QMap<QString, PollingThread*>::iterator it = m_threads.begin(); - QMap<QString, PollingThread*>::iterator end = m_threads.end(); + TQMap<TQString, PollingThread*>::iterator it = m_threads.begin(); + TQMap<TQString, PollingThread*>::iterator end = m_threads.end(); for(; it!=end; ++it) { @@ -205,7 +205,7 @@ LinuxCDPolling::~LinuxCDPolling() } } -void LinuxCDPolling::slotMediumAdded(const QString &id) +void LinuxCDPolling::slotMediumAdded(const TQString &id) { kdDebug(1219) << "LinuxCDPolling::slotMediumAdded(" << id << ")" << endl; @@ -213,7 +213,7 @@ void LinuxCDPolling::slotMediumAdded(const QString &id) const Medium *medium = m_mediaList.findById(id); - QString mime = medium->mimeType(); + TQString mime = medium->mimeType(); kdDebug(1219) << "mime == " << mime << endl; if (mime.find("dvd")==-1 && mime.find("cd")==-1) return; @@ -222,7 +222,7 @@ void LinuxCDPolling::slotMediumAdded(const QString &id) { m_excludeNotification.append( id ); - QCString dev = QFile::encodeName( medium->deviceNode() ).data(); + TQCString dev = TQFile::encodeName( medium->deviceNode() ).data(); PollingThread *thread = new PollingThread(dev); m_threads[id] = thread; thread->start(); @@ -230,7 +230,7 @@ void LinuxCDPolling::slotMediumAdded(const QString &id) } } -void LinuxCDPolling::slotMediumRemoved(const QString &id) +void LinuxCDPolling::slotMediumRemoved(const TQString &id) { kdDebug(1219) << "LinuxCDPolling::slotMediumRemoved(" << id << ")" << endl; @@ -245,14 +245,14 @@ void LinuxCDPolling::slotMediumRemoved(const QString &id) m_excludeNotification.remove(id); } -void LinuxCDPolling::slotMediumStateChanged(const QString &id) +void LinuxCDPolling::slotMediumStateChanged(const TQString &id) { kdDebug(1219) << "LinuxCDPolling::slotMediumStateChanged(" << id << ")" << endl; const Medium *medium = m_mediaList.findById(id); - QString mime = medium->mimeType(); + TQString mime = medium->mimeType(); kdDebug(1219) << "mime == " << mime << endl; if (mime.find("dvd")==-1 && mime.find("cd")==-1) return; @@ -262,7 +262,7 @@ void LinuxCDPolling::slotMediumStateChanged(const QString &id) // It is just a mount state change, no need to notify m_excludeNotification.append( id ); - QCString dev = QFile::encodeName( medium->deviceNode() ).data(); + TQCString dev = TQFile::encodeName( medium->deviceNode() ).data(); PollingThread *thread = new PollingThread(dev); m_threads[id] = thread; thread->start(); @@ -288,12 +288,12 @@ void LinuxCDPolling::slotTimeout() return; } - QMap<QString, PollingThread*>::iterator it = m_threads.begin(); - QMap<QString, PollingThread*>::iterator end = m_threads.end(); + TQMap<TQString, PollingThread*>::iterator it = m_threads.begin(); + TQMap<TQString, PollingThread*>::iterator end = m_threads.end(); for(; it!=end; ++it) { - QString id = it.key(); + TQString id = it.key(); PollingThread *thread = it.data(); if (thread->hasChanged()) @@ -305,16 +305,16 @@ void LinuxCDPolling::slotTimeout() } } -static QString baseType(const Medium *medium) +static TQString baseType(const Medium *medium) { kdDebug(1219) << "baseType(" << medium->id() << ")" << endl; - QString devNode = medium->deviceNode(); - QString mountPoint = medium->mountPoint(); - QString fsType = medium->fsType(); + TQString devNode = medium->deviceNode(); + TQString mountPoint = medium->mountPoint(); + TQString fsType = medium->fsType(); bool mounted = medium->isMounted(); - QString mimeType, iconName, label; + TQString mimeType, iconName, label; FstabBackend::guess(devNode, mountPoint, fsType, mounted, mimeType, iconName, label); @@ -336,13 +336,13 @@ static void restoreEmptyState(MediaList &list, const Medium *medium, { kdDebug(1219) << "restoreEmptyState(" << medium->id() << ")" << endl; - QString id = medium->id(); - QString devNode = medium->deviceNode(); - QString mountPoint = medium->mountPoint(); - QString fsType = medium->fsType(); + TQString id = medium->id(); + TQString devNode = medium->deviceNode(); + TQString mountPoint = medium->mountPoint(); + TQString fsType = medium->fsType(); bool mounted = medium->isMounted(); - QString mimeType, iconName, label; + TQString mimeType, iconName, label; FstabBackend::guess(devNode, mountPoint, fsType, mounted, mimeType, iconName, label); @@ -357,8 +357,8 @@ void LinuxCDPolling::applyType(DiscType type, const Medium *medium) kdDebug(1219) << "LinuxCDPolling::applyType(" << type << ", " << medium->id() << ")" << endl; - QString id = medium->id(); - QString dev = medium->deviceNode(); + TQString id = medium->id(); + TQString dev = medium->deviceNode(); bool notify = !m_excludeNotification.contains(id); m_excludeNotification.remove(id); @@ -402,7 +402,7 @@ void LinuxCDPolling::applyType(DiscType type, const Medium *medium) } } -DiscType LinuxCDPolling::identifyDiscType(const QCString &devNode, +DiscType LinuxCDPolling::identifyDiscType(const TQCString &devNode, const DiscType ¤t) { //kdDebug(1219) << "LinuxCDPolling::identifyDiscType(" @@ -475,7 +475,7 @@ DiscType LinuxCDPolling::identifyDiscType(const QCString &devNode, } } -bool LinuxCDPolling::hasDirectory(const QCString &devNode, const QCString &dir) +bool LinuxCDPolling::hasDirectory(const TQCString &devNode, const TQCString &dir) { bool ret = false; // return value int fd = 0; // file descriptor for drive @@ -487,7 +487,7 @@ bool LinuxCDPolling::hasDirectory(const QCString &devNode, const QCString &dir) char dirname[256]; // filename for the current path table entry int pos = 0; // our position into the path table int curr_record = 1; // the path table record we're on - QCString fixed_directory = dir.upper(); // the uppercase version of the "directory" parameter + TQCString fixed_directory = dir.upper(); // the uppercase version of the "directory" parameter // open the drive fd = open(devNode, O_RDONLY | O_NONBLOCK); @@ -555,7 +555,7 @@ bool LinuxCDPolling::hasDirectory(const QCString &devNode, const QCString &dir) break; } dirname[len_di] = 0; - qstrcpy(dirname, QCString(dirname).upper()); + qstrcpy(dirname, TQCString(dirname).upper()); // if we found a folder that has the root as a parent, and the directory name matches // then return success diff --git a/kioslave/media/mediamanager/linuxcdpolling.h b/kioslave/media/mediamanager/linuxcdpolling.h index 1df113962..3dec7e3ee 100644 --- a/kioslave/media/mediamanager/linuxcdpolling.h +++ b/kioslave/media/mediamanager/linuxcdpolling.h @@ -21,10 +21,10 @@ #include "backendbase.h" -#include <qobject.h> -#include <qcstring.h> -#include <qmap.h> -#include <qtimer.h> +#include <tqobject.h> +#include <tqcstring.h> +#include <tqmap.h> +#include <tqtimer.h> class DiscType { @@ -47,7 +47,7 @@ private: class PollingThread; -class LinuxCDPolling : public QObject, public BackendBase +class LinuxCDPolling : public TQObject, public BackendBase { Q_OBJECT @@ -64,23 +64,23 @@ public: * @param current the current known state of the drive * @return the disc type */ - static DiscType identifyDiscType(const QCString &devNode, + static DiscType identifyDiscType(const TQCString &devNode, const DiscType ¤t = DiscType::Unknown); private slots: - void slotMediumAdded(const QString &id); - void slotMediumRemoved(const QString &id); - void slotMediumStateChanged(const QString &id); + void slotMediumAdded(const TQString &id); + void slotMediumRemoved(const TQString &id); + void slotMediumStateChanged(const TQString &id); void slotTimeout(); private: void applyType(DiscType type, const Medium *medium); - static bool hasDirectory(const QCString &devNode, const QCString &dir); + static bool hasDirectory(const TQCString &devNode, const TQCString &dir); - QMap<QString, PollingThread*> m_threads; - QStringList m_excludeNotification; - QTimer m_timer; + TQMap<TQString, PollingThread*> m_threads; + TQStringList m_excludeNotification; + TQTimer m_timer; }; #endif diff --git a/kioslave/media/mediamanager/mediadirnotify.cpp b/kioslave/media/mediamanager/mediadirnotify.cpp index 340414634..9e6658153 100644 --- a/kioslave/media/mediamanager/mediadirnotify.cpp +++ b/kioslave/media/mediamanager/mediadirnotify.cpp @@ -36,10 +36,10 @@ KURL::List MediaDirNotify::toMediaURL(const KURL &url) KURL::List result; - const QPtrList<Medium> list = m_mediaList.list(); + const TQPtrList<Medium> list = m_mediaList.list(); - QPtrList<Medium>::const_iterator it = list.begin(); - QPtrList<Medium>::const_iterator end = list.end(); + TQPtrList<Medium>::const_iterator it = list.begin(); + TQPtrList<Medium>::const_iterator end = list.end(); for (; it!=end; ++it) { @@ -48,7 +48,7 @@ KURL::List MediaDirNotify::toMediaURL(const KURL &url) if ( base.isParentOf(url) ) { - QString path = KURL::relativePath(base.path(), + TQString path = KURL::relativePath(base.path(), url.path()); KURL new_url("media:/"+m->name()+"/"+path ); diff --git a/kioslave/media/mediamanager/medialist.cpp b/kioslave/media/mediamanager/medialist.cpp index 974eddbf6..bb0de6248 100644 --- a/kioslave/media/mediamanager/medialist.cpp +++ b/kioslave/media/mediamanager/medialist.cpp @@ -27,14 +27,14 @@ MediaList::MediaList() m_media.setAutoDelete(true); } -const QPtrList<Medium> MediaList::list() const +const TQPtrList<Medium> MediaList::list() const { kdDebug(1219) << "MediaList::list()" << endl; return m_media; } -const Medium *MediaList::findById(const QString &id) const +const Medium *MediaList::findById(const TQString &id) const { kdDebug(1219) << "MediaList::findById(" << id << ")" << endl; @@ -43,7 +43,7 @@ const Medium *MediaList::findById(const QString &id) const return m_idMap[id]; } -const Medium *MediaList::findByName(const QString &name) const +const Medium *MediaList::findByName(const TQString &name) const { kdDebug(1219) << "MediaList::findByName(" << name << ")" << endl; @@ -52,7 +52,7 @@ const Medium *MediaList::findByName(const QString &name) const return m_nameMap[name]; } -const Medium *MediaList::findByClearUdi(const QString &name) +const Medium *MediaList::findByClearUdi(const TQString &name) { kdDebug(1219) << "MediaList::findByClearUdi(" << name << ")" << endl; @@ -65,17 +65,17 @@ const Medium *MediaList::findByClearUdi(const QString &name) } -QString MediaList::addMedium(Medium *medium, bool allowNotification) +TQString MediaList::addMedium(Medium *medium, bool allowNotification) { kdDebug(1219) << "MediaList::addMedium(@" << medium->id() << ")" << endl; - QString id = medium->id(); - if ( m_idMap.contains(id) ) return QString::null; + TQString id = medium->id(); + if ( m_idMap.contains(id) ) return TQString::null; m_media.append( medium ); m_idMap[id] = medium; - QString name = medium->name(); + TQString name = medium->name(); if ( !m_nameMap.contains(name) ) { m_nameMap[name] = medium; @@ -87,15 +87,15 @@ QString MediaList::addMedium(Medium *medium, bool allowNotification) return name; } - QString base_name = name+"_"; + TQString base_name = name+"_"; int i = 1; - while ( m_nameMap.contains(base_name+QString::number(i)) ) + while ( m_nameMap.contains(base_name+TQString::number(i)) ) { i++; } - name = base_name+QString::number(i); + name = base_name+TQString::number(i); medium->setName(name); m_nameMap[name] = medium; @@ -105,14 +105,14 @@ QString MediaList::addMedium(Medium *medium, bool allowNotification) return name; } -bool MediaList::removeMedium(const QString &id, bool allowNotification) +bool MediaList::removeMedium(const TQString &id, bool allowNotification) { kdDebug(1219) << "MediaList::removeMedium(" << id << ")" << endl; if ( !m_idMap.contains(id) ) return false; Medium *medium = m_idMap[id]; - QString name = medium->name(); + TQString name = medium->name(); m_idMap.remove(id); m_nameMap.remove( medium->name() ); @@ -132,10 +132,10 @@ bool MediaList::changeMediumState(const Medium &medium, bool allowNotification) if ( medium.isMountable() ) { - QString device_node = medium.deviceNode(); - QString clear_device_udi = medium.clearDeviceUdi(); - QString mount_point = medium.mountPoint(); - QString fs_type = medium.fsType(); + TQString device_node = medium.deviceNode(); + TQString clear_device_udi = medium.clearDeviceUdi(); + TQString mount_point = medium.mountPoint(); + TQString fs_type = medium.fsType(); bool mounted = medium.isMounted(); m->mountableState( device_node, clear_device_udi, mount_point, @@ -166,12 +166,12 @@ bool MediaList::changeMediumState(const Medium &medium, bool allowNotification) return true; } -bool MediaList::changeMediumState(const QString &id, - const QString &baseURL, +bool MediaList::changeMediumState(const TQString &id, + const TQString &baseURL, bool allowNotification, - const QString &mimeType, - const QString &iconName, - const QString &label) + const TQString &mimeType, + const TQString &iconName, + const TQString &label) { kdDebug(1219) << "MediaList::changeMediumState(" << id << ", " << baseURL << ", " << mimeType << ", " << iconName << ")" @@ -204,14 +204,14 @@ bool MediaList::changeMediumState(const QString &id, return true; } -bool MediaList::changeMediumState(const QString &id, - const QString &deviceNode, - const QString &mountPoint, - const QString &fsType, bool mounted, +bool MediaList::changeMediumState(const TQString &id, + const TQString &deviceNode, + const TQString &mountPoint, + const TQString &fsType, bool mounted, bool allowNotification, - const QString &mimeType, - const QString &iconName, - const QString &label) + const TQString &mimeType, + const TQString &iconName, + const TQString &label) { kdDebug(1219) << "MediaList::changeMediumState(" << id << ", " << deviceNode << ", " << mountPoint << ", " << fsType << ", " @@ -245,11 +245,11 @@ bool MediaList::changeMediumState(const QString &id, return true; } -bool MediaList::changeMediumState(const QString &id, bool mounted, +bool MediaList::changeMediumState(const TQString &id, bool mounted, bool allowNotification, - const QString &mimeType, - const QString &iconName, - const QString &label) + const TQString &mimeType, + const TQString &iconName, + const TQString &label) { kdDebug(1219) << "MediaList::changeMediumState(" << id << ", " << mounted << ", " << mimeType << ", " << iconName << ")" @@ -282,7 +282,7 @@ bool MediaList::changeMediumState(const QString &id, bool mounted, return true; } -bool MediaList::setUserLabel(const QString &name, const QString &label) +bool MediaList::setUserLabel(const TQString &name, const TQString &label) { kdDebug(1219) << "MediaList::setUserLabel(" << name << ", " << label << ")" << endl; diff --git a/kioslave/media/mediamanager/medialist.h b/kioslave/media/mediamanager/medialist.h index 4de333875..59ddb6bd2 100644 --- a/kioslave/media/mediamanager/medialist.h +++ b/kioslave/media/mediamanager/medialist.h @@ -19,7 +19,7 @@ #ifndef _MEDIALIST_H_ #define _MEDIALIST_H_ -#include <qobject.h> +#include <tqobject.h> #include "medium.h" @@ -31,50 +31,50 @@ public: MediaList(); // FIXME: should be <const Medium> or something similar... - const QPtrList<Medium> list() const; - const Medium *findById(const QString &id) const; - const Medium *findByName(const QString &name) const; - const Medium *findByClearUdi(const QString &name); + const TQPtrList<Medium> list() const; + const Medium *findById(const TQString &id) const; + const Medium *findByName(const TQString &name) const; + const Medium *findByClearUdi(const TQString &name); public: - QString addMedium(Medium *medium, bool allowNotification = true); - bool removeMedium(const QString &id, bool allowNotification = true); + TQString addMedium(Medium *medium, bool allowNotification = true); + bool removeMedium(const TQString &id, bool allowNotification = true); bool changeMediumState(const Medium &medium, bool allowNotification); - bool changeMediumState(const QString &id, - const QString &baseURL, + bool changeMediumState(const TQString &id, + const TQString &baseURL, bool allowNotification = true, - const QString &mimeType = QString::null, - const QString &iconName = QString::null, - const QString &label = QString::null); - bool changeMediumState(const QString &id, - const QString &deviceNode, - const QString &mountPoint, - const QString &fsType, bool mounted, + const TQString &mimeType = TQString::null, + const TQString &iconName = TQString::null, + const TQString &label = TQString::null); + bool changeMediumState(const TQString &id, + const TQString &deviceNode, + const TQString &mountPoint, + const TQString &fsType, bool mounted, bool allowNotification = true, - const QString &mimeType = QString::null, - const QString &iconName = QString::null, - const QString &label = QString::null); - bool changeMediumState(const QString &id, bool mounted, + const TQString &mimeType = TQString::null, + const TQString &iconName = TQString::null, + const TQString &label = TQString::null); + bool changeMediumState(const TQString &id, bool mounted, bool allowNotification = true, - const QString &mimeType = QString::null, - const QString &iconName = QString::null, - const QString &label = QString::null); + const TQString &mimeType = TQString::null, + const TQString &iconName = TQString::null, + const TQString &label = TQString::null); - bool setUserLabel(const QString &name, const QString &label); + bool setUserLabel(const TQString &name, const TQString &label); signals: - void mediumAdded(const QString &id, const QString &name, + void mediumAdded(const TQString &id, const TQString &name, bool allowNotification); - void mediumRemoved(const QString &id, const QString &name, + void mediumRemoved(const TQString &id, const TQString &name, bool allowNotification); - void mediumStateChanged(const QString &id, const QString &name, + void mediumStateChanged(const TQString &id, const TQString &name, bool mounted, bool allowNotification); private: - QPtrList<Medium> m_media; - QMap<QString,Medium*> m_nameMap; - QMap<QString,Medium*> m_idMap; + TQPtrList<Medium> m_media; + TQMap<TQString,Medium*> m_nameMap; + TQMap<TQString,Medium*> m_idMap; }; #endif diff --git a/kioslave/media/mediamanager/mediamanager.cpp b/kioslave/media/mediamanager/mediamanager.cpp index f1569e817..5d8eb4143 100644 --- a/kioslave/media/mediamanager/mediamanager.cpp +++ b/kioslave/media/mediamanager/mediamanager.cpp @@ -19,7 +19,7 @@ #include "mediamanager.h" #include <config.h> -#include <qtimer.h> +#include <tqtimer.h> #include <kdebug.h> #include <kglobal.h> @@ -41,18 +41,18 @@ #endif //COMPILE_LINUXCDPOLLING -MediaManager::MediaManager(const QCString &obj) +MediaManager::MediaManager(const TQCString &obj) : KDEDModule(obj), m_dirNotify(m_mediaList) { - connect( &m_mediaList, SIGNAL(mediumAdded(const QString&, const QString&, bool)), - SLOT(slotMediumAdded(const QString&, const QString&, bool)) ); - connect( &m_mediaList, SIGNAL(mediumRemoved(const QString&, const QString&, bool)), - SLOT(slotMediumRemoved(const QString&, const QString&, bool)) ); + connect( &m_mediaList, TQT_SIGNAL(mediumAdded(const TQString&, const TQString&, bool)), + TQT_SLOT(slotMediumAdded(const TQString&, const TQString&, bool)) ); + connect( &m_mediaList, TQT_SIGNAL(mediumRemoved(const TQString&, const TQString&, bool)), + TQT_SLOT(slotMediumRemoved(const TQString&, const TQString&, bool)) ); connect( &m_mediaList, - SIGNAL(mediumStateChanged(const QString&, const QString&, bool, bool)), - SLOT(slotMediumChanged(const QString&, const QString&, bool, bool)) ); + TQT_SIGNAL(mediumStateChanged(const TQString&, const TQString&, bool, bool)), + TQT_SLOT(slotMediumChanged(const TQString&, const TQString&, bool, bool)) ); - QTimer::singleShot( 10, this, SLOT( loadBackends() ) ); + TQTimer::singleShot( 10, this, TQT_SLOT( loadBackends() ) ); } MediaManager::~MediaManager() @@ -117,14 +117,14 @@ void MediaManager::loadBackends() } -QStringList MediaManager::fullList() +TQStringList MediaManager::fullList() { - QPtrList<Medium> list = m_mediaList.list(); + TQPtrList<Medium> list = m_mediaList.list(); - QStringList result; + TQStringList result; - QPtrList<Medium>::const_iterator it = list.begin(); - QPtrList<Medium>::const_iterator end = list.end(); + TQPtrList<Medium>::const_iterator it = list.begin(); + TQPtrList<Medium>::const_iterator end = list.end(); for (; it!=end; ++it) { result+= (*it)->properties(); @@ -134,7 +134,7 @@ QStringList MediaManager::fullList() return result; } -QStringList MediaManager::properties(const QString &name) +TQStringList MediaManager::properties(const TQString &name) { const Medium *m = m_mediaList.findByName(name); @@ -146,7 +146,7 @@ QStringList MediaManager::properties(const QString &name) { if (u.protocol() == "system") { - QString path = u.path(); + TQString path = u.path(); if (path.startsWith("/media/")) path = path.mid(strlen("/media/")); m = m_mediaList.findByName(path); @@ -160,10 +160,10 @@ QStringList MediaManager::properties(const QString &name) else if (u.protocol() == "file") { // look for the mount point - QPtrList<Medium> list = m_mediaList.list(); - QPtrList<Medium>::const_iterator it = list.begin(); - QPtrList<Medium>::const_iterator end = list.end(); - QString path; + TQPtrList<Medium> list = m_mediaList.list(); + TQPtrList<Medium>::const_iterator it = list.begin(); + TQPtrList<Medium>::const_iterator end = list.end(); + TQString path; for (; it!=end; ++it) { @@ -181,21 +181,21 @@ QStringList MediaManager::properties(const QString &name) if (m) return m->properties(); else - return QStringList(); + return TQStringList(); } -QStringList MediaManager::mountoptions(const QString &name) +TQStringList MediaManager::mountoptions(const TQString &name) { #ifdef COMPILE_HALBACKEND if (!m_halbackend) - return QStringList(); + return TQStringList(); return m_halbackend->mountoptions(name); #else - return QStringList(); + return TQStringList(); #endif } -bool MediaManager::setMountoptions(const QString &name, const QStringList &options) +bool MediaManager::setMountoptions(const TQString &name, const TQStringList &options) { #ifdef COMPILE_HALBACKEND if (!m_halbackend) @@ -206,7 +206,7 @@ bool MediaManager::setMountoptions(const QString &name, const QStringList &optio #endif } -QString MediaManager::mount(const QString &name) +TQString MediaManager::mount(const TQString &name) { #ifdef COMPILE_HALBACKEND if (!m_halbackend) @@ -219,7 +219,7 @@ QString MediaManager::mount(const QString &name) #endif } -QString MediaManager::unmount(const QString &name) +TQString MediaManager::unmount(const TQString &name) { #ifdef COMPILE_HALBACKEND if (!m_halbackend) @@ -232,7 +232,7 @@ QString MediaManager::unmount(const QString &name) #endif } -QString MediaManager::decrypt(const QString &name, const QString &password) +TQString MediaManager::decrypt(const TQString &name, const TQString &password) { #ifdef COMPILE_HALBACKEND if (!m_halbackend) @@ -243,7 +243,7 @@ QString MediaManager::decrypt(const QString &name, const QString &password) #endif } -QString MediaManager::undecrypt(const QString &name) +TQString MediaManager::undecrypt(const TQString &name) { #ifdef COMPILE_HALBACKEND if (!m_halbackend) @@ -254,12 +254,12 @@ QString MediaManager::undecrypt(const QString &name) #endif } -QString MediaManager::nameForLabel(const QString &label) +TQString MediaManager::nameForLabel(const TQString &label) { - const QPtrList<Medium> media = m_mediaList.list(); + const TQPtrList<Medium> media = m_mediaList.list(); - QPtrList<Medium>::const_iterator it = media.begin(); - QPtrList<Medium>::const_iterator end = media.end(); + TQPtrList<Medium>::const_iterator it = media.begin(); + TQPtrList<Medium>::const_iterator end = media.end(); for (; it!=end; ++it) { const Medium *m = *it; @@ -270,10 +270,10 @@ QString MediaManager::nameForLabel(const QString &label) } } - return QString::null; + return TQString::null; } -ASYNC MediaManager::setUserLabel(const QString &name, const QString &label) +ASYNC MediaManager::setUserLabel(const TQString &name, const TQString &label) { m_mediaList.setUserLabel(name, label); } @@ -284,7 +284,7 @@ ASYNC MediaManager::reloadBackends() loadBackends(); } -bool MediaManager::removablePlug(const QString &devNode, const QString &label) +bool MediaManager::removablePlug(const TQString &devNode, const TQString &label) { if (mp_removableBackend) { @@ -293,7 +293,7 @@ bool MediaManager::removablePlug(const QString &devNode, const QString &label) return false; } -bool MediaManager::removableUnplug(const QString &devNode) +bool MediaManager::removableUnplug(const TQString &devNode) { if (mp_removableBackend) { @@ -302,7 +302,7 @@ bool MediaManager::removableUnplug(const QString &devNode) return false; } -bool MediaManager::removableCamera(const QString &devNode) +bool MediaManager::removableCamera(const TQString &devNode) { if (mp_removableBackend) { @@ -312,7 +312,7 @@ bool MediaManager::removableCamera(const QString &devNode) } -void MediaManager::slotMediumAdded(const QString &/*id*/, const QString &name, +void MediaManager::slotMediumAdded(const TQString &/*id*/, const TQString &name, bool allowNotification) { kdDebug(1219) << "MediaManager::slotMediumAdded: " << name << endl; @@ -324,7 +324,7 @@ void MediaManager::slotMediumAdded(const QString &/*id*/, const QString &name, emit mediumAdded(name); } -void MediaManager::slotMediumRemoved(const QString &/*id*/, const QString &name, +void MediaManager::slotMediumRemoved(const TQString &/*id*/, const TQString &name, bool allowNotification) { kdDebug(1219) << "MediaManager::slotMediumRemoved: " << name << endl; @@ -336,7 +336,7 @@ void MediaManager::slotMediumRemoved(const QString &/*id*/, const QString &name, emit mediumRemoved(name); } -void MediaManager::slotMediumChanged(const QString &/*id*/, const QString &name, +void MediaManager::slotMediumChanged(const TQString &/*id*/, const TQString &name, bool mounted, bool allowNotification) { kdDebug(1219) << "MediaManager::slotMediumChanged: " << name << endl; @@ -354,7 +354,7 @@ void MediaManager::slotMediumChanged(const QString &/*id*/, const QString &name, extern "C" { - KDE_EXPORT KDEDModule *create_mediamanager(const QCString &obj) + KDE_EXPORT KDEDModule *create_mediamanager(const TQCString &obj) { KGlobal::locale()->insertCatalogue("kio_media"); return new MediaManager(obj); diff --git a/kioslave/media/mediamanager/mediamanager.h b/kioslave/media/mediamanager/mediamanager.h index 36942362d..2cc46f8cf 100644 --- a/kioslave/media/mediamanager/mediamanager.h +++ b/kioslave/media/mediamanager/mediamanager.h @@ -20,8 +20,8 @@ #define _MEDIAMANAGER_H_ #include <kdedmodule.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include "medialist.h" #include "backendbase.h" @@ -36,53 +36,53 @@ class MediaManager : public KDEDModule Q_OBJECT K_DCOP public: - MediaManager(const QCString &obj); + MediaManager(const TQCString &obj); ~MediaManager(); k_dcop: - QStringList fullList(); - QStringList properties(const QString &name); - QStringList mountoptions(const QString &name); - bool setMountoptions(const QString &name, const QStringList &options); + TQStringList fullList(); + TQStringList properties(const TQString &name); + TQStringList mountoptions(const TQString &name); + bool setMountoptions(const TQString &name, const TQStringList &options); - QString mount(const QString &uid); - QString unmount(const QString &uid); - QString decrypt(const QString &uid, const QString &password); - QString undecrypt(const QString &uid); + TQString mount(const TQString &uid); + TQString unmount(const TQString &uid); + TQString decrypt(const TQString &uid, const TQString &password); + TQString undecrypt(const TQString &uid); - QString nameForLabel(const QString &label); - ASYNC setUserLabel(const QString &name, const QString &label); + TQString nameForLabel(const TQString &label); + ASYNC setUserLabel(const TQString &name, const TQString &label); ASYNC reloadBackends(); // Removable media handling (for people not having HAL) - bool removablePlug(const QString &devNode, const QString &label); - bool removableUnplug(const QString &devNode); - bool removableCamera(const QString &devNode); + bool removablePlug(const TQString &devNode, const TQString &label); + bool removableUnplug(const TQString &devNode); + bool removableCamera(const TQString &devNode); k_dcop_signals: - void mediumAdded(const QString &name, bool allowNotification); - void mediumRemoved(const QString &name, bool allowNotification); - void mediumChanged(const QString &name, bool allowNotification); + void mediumAdded(const TQString &name, bool allowNotification); + void mediumRemoved(const TQString &name, bool allowNotification); + void mediumChanged(const TQString &name, bool allowNotification); // For compatibility purpose, not needed for KDE4 - void mediumAdded(const QString &name); - void mediumRemoved(const QString &name); - void mediumChanged(const QString &name); + void mediumAdded(const TQString &name); + void mediumRemoved(const TQString &name); + void mediumChanged(const TQString &name); private slots: void loadBackends(); - void slotMediumAdded(const QString &id, const QString &name, + void slotMediumAdded(const TQString &id, const TQString &name, bool allowNotification); - void slotMediumRemoved(const QString &id, const QString &name, + void slotMediumRemoved(const TQString &id, const TQString &name, bool allowNotification); - void slotMediumChanged(const QString &id, const QString &name, + void slotMediumChanged(const TQString &id, const TQString &name, bool mounted, bool allowNotification); private: MediaList m_mediaList; - QValueList<BackendBase*> m_backends; + TQValueList<BackendBase*> m_backends; RemovableBackend *mp_removableBackend; HALBackend *m_halbackend; MediaDirNotify m_dirNotify; diff --git a/kioslave/media/mediamanager/removablebackend.cpp b/kioslave/media/mediamanager/removablebackend.cpp index ea8318ecf..f307ee2f8 100644 --- a/kioslave/media/mediamanager/removablebackend.cpp +++ b/kioslave/media/mediamanager/removablebackend.cpp @@ -33,19 +33,19 @@ RemovableBackend::RemovableBackend(MediaList &list) - : QObject(), BackendBase(list) + : TQObject(), BackendBase(list) { KDirWatch::self()->addFile(MTAB); - connect( KDirWatch::self(), SIGNAL( dirty(const QString&) ), - this, SLOT( slotDirty(const QString&) ) ); + connect( KDirWatch::self(), TQT_SIGNAL( dirty(const TQString&) ), + this, TQT_SLOT( slotDirty(const TQString&) ) ); KDirWatch::self()->startScan(); } RemovableBackend::~RemovableBackend() { - QStringList::iterator it = m_removableIds.begin(); - QStringList::iterator end = m_removableIds.end(); + TQStringList::iterator it = m_removableIds.begin(); + TQStringList::iterator end = m_removableIds.end(); for (; it!=end; ++it) { @@ -55,25 +55,25 @@ RemovableBackend::~RemovableBackend() KDirWatch::self()->removeFile(MTAB); } -bool RemovableBackend::plug(const QString &devNode, const QString &label) +bool RemovableBackend::plug(const TQString &devNode, const TQString &label) { - QString name = generateName(devNode); - QString id = generateId(devNode); + TQString name = generateName(devNode); + TQString id = generateId(devNode); if (!m_removableIds.contains(id)) { Medium *medium = new Medium(id, name); - medium->mountableState(devNode, QString::null, - QString::null, false); + medium->mountableState(devNode, TQString::null, + TQString::null, false); - QStringList words = QStringList::split(" ", label); + TQStringList words = TQStringList::split(" ", label); - QStringList::iterator it = words.begin(); - QStringList::iterator end = words.end(); + TQStringList::iterator it = words.begin(); + TQStringList::iterator end = words.end(); - QString tmp = (*it).lower(); + TQString tmp = (*it).lower(); tmp[0] = tmp[0].upper(); - QString new_label = tmp; + TQString new_label = tmp; ++it; for (; it!=end; ++it) @@ -92,9 +92,9 @@ bool RemovableBackend::plug(const QString &devNode, const QString &label) return false; } -bool RemovableBackend::unplug(const QString &devNode) +bool RemovableBackend::unplug(const TQString &devNode) { - QString id = generateId(devNode); + TQString id = generateId(devNode); if (m_removableIds.contains(id)) { m_removableIds.remove(id); @@ -103,18 +103,18 @@ bool RemovableBackend::unplug(const QString &devNode) return false; } -bool RemovableBackend::camera(const QString &devNode) +bool RemovableBackend::camera(const TQString &devNode) { - QString id = generateId(devNode); + TQString id = generateId(devNode); if (m_removableIds.contains(id)) { return m_mediaList.changeMediumState(id, - QString("camera:/"), false, "media/gphoto2camera"); + TQString("camera:/"), false, "media/gphoto2camera"); } return false; } -void RemovableBackend::slotDirty(const QString &path) +void RemovableBackend::slotDirty(const TQString &path) { if (path==MTAB) { @@ -125,7 +125,7 @@ void RemovableBackend::slotDirty(const QString &path) void RemovableBackend::handleMtabChange() { - QStringList new_mtabIds; + TQStringList new_mtabIds; KMountPoint::List mtab = KMountPoint::currentMountPoints(); KMountPoint::List::iterator it = mtab.begin(); @@ -133,11 +133,11 @@ void RemovableBackend::handleMtabChange() for (; it!=end; ++it) { - QString dev = (*it)->mountedFrom(); - QString mp = (*it)->mountPoint(); - QString fs = (*it)->mountType(); + TQString dev = (*it)->mountedFrom(); + TQString mp = (*it)->mountPoint(); + TQString fs = (*it)->mountType(); - QString id = generateId(dev); + TQString id = generateId(dev); new_mtabIds+=id; if ( !m_mtabIds.contains(id) @@ -148,8 +148,8 @@ void RemovableBackend::handleMtabChange() } } - QStringList::iterator it2 = m_mtabIds.begin(); - QStringList::iterator end2 = m_mtabIds.end(); + TQStringList::iterator it2 = m_mtabIds.begin(); + TQStringList::iterator end2 = m_mtabIds.end(); for (; it2!=end2; ++it2) { @@ -164,15 +164,15 @@ void RemovableBackend::handleMtabChange() m_mtabIds = new_mtabIds; } -QString RemovableBackend::generateId(const QString &devNode) +TQString RemovableBackend::generateId(const TQString &devNode) { - QString dev = KStandardDirs::realFilePath(devNode); + TQString dev = KStandardDirs::realFilePath(devNode); return "/org/kde/mediamanager/removable/" +dev.replace("/", ""); } -QString RemovableBackend::generateName(const QString &devNode) +TQString RemovableBackend::generateName(const TQString &devNode) { return KURL(devNode).fileName(); } diff --git a/kioslave/media/mediamanager/removablebackend.h b/kioslave/media/mediamanager/removablebackend.h index 02fc0409e..fa16a391b 100644 --- a/kioslave/media/mediamanager/removablebackend.h +++ b/kioslave/media/mediamanager/removablebackend.h @@ -21,10 +21,10 @@ #include "backendbase.h" -#include <qobject.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqstringlist.h> -class RemovableBackend : public QObject, public BackendBase +class RemovableBackend : public TQObject, public BackendBase { Q_OBJECT @@ -32,21 +32,21 @@ public: RemovableBackend(MediaList &list); virtual ~RemovableBackend(); - bool plug(const QString &devNode, const QString &label); - bool unplug(const QString &devNode); - bool camera(const QString &devNode); + bool plug(const TQString &devNode, const TQString &label); + bool unplug(const TQString &devNode); + bool camera(const TQString &devNode); private slots: - void slotDirty(const QString &path); + void slotDirty(const TQString &path); private: void handleMtabChange(); - static QString generateId(const QString &devNode); - static QString generateName(const QString &devNode); + static TQString generateId(const TQString &devNode); + static TQString generateName(const TQString &devNode); - QStringList m_removableIds; - QStringList m_mtabIds; + TQStringList m_removableIds; + TQStringList m_mtabIds; }; #endif diff --git a/kioslave/media/medianotifier/medianotifier.cpp b/kioslave/media/medianotifier/medianotifier.cpp index ce39215d9..b0596e31d 100644 --- a/kioslave/media/medianotifier/medianotifier.cpp +++ b/kioslave/media/medianotifier/medianotifier.cpp @@ -21,10 +21,10 @@ #include <sys/vfs.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qdir.h> -#include <qcheckbox.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqdir.h> +#include <tqcheckbox.h> #include <kapplication.h> #include <kglobal.h> @@ -41,30 +41,30 @@ #include "notifieraction.h" #include "mediamanagersettings.h" -MediaNotifier::MediaNotifier(const QCString &name) : KDEDModule(name) +MediaNotifier::MediaNotifier(const TQCString &name) : KDEDModule(name) { - connectDCOPSignal( "kded", "mediamanager", "mediumAdded(QString, bool)", - "onMediumChange(QString, bool)", true ); + connectDCOPSignal( "kded", "mediamanager", "mediumAdded(TQString, bool)", + "onMediumChange(TQString, bool)", true ); - connectDCOPSignal( "kded", "mediamanager", "mediumChanged(QString, bool)", - "onMediumChange(QString, bool)", true ); + connectDCOPSignal( "kded", "mediamanager", "mediumChanged(TQString, bool)", + "onMediumChange(TQString, bool)", true ); - m_freeTimer = new QTimer( this ); - connect( m_freeTimer, SIGNAL( timeout() ), SLOT( checkFreeDiskSpace() ) ); + m_freeTimer = new TQTimer( this ); + connect( m_freeTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( checkFreeDiskSpace() ) ); m_freeTimer->start( 1000*6*2 /* 20 minutes */ ); m_freeDialog = 0; } MediaNotifier::~MediaNotifier() { - disconnectDCOPSignal( "kded", "mediamanager", "mediumAdded(QString, bool)", - "onMediumChange(QString, bool)" ); + disconnectDCOPSignal( "kded", "mediamanager", "mediumAdded(TQString, bool)", + "onMediumChange(TQString, bool)" ); - disconnectDCOPSignal( "kded", "mediamanager", "mediumChanged(QString, bool)", - "onMediumChange(QString, bool)" ); + disconnectDCOPSignal( "kded", "mediamanager", "mediumChanged(TQString, bool)", + "onMediumChange(TQString, bool)" ); } -void MediaNotifier::onMediumChange( const QString &name, bool allowNotification ) +void MediaNotifier::onMediumChange( const TQString &name, bool allowNotification ) { kdDebug() << "MediaNotifier::onMediumChange( " << name << ", " << allowNotification << ")" << endl; @@ -85,8 +85,8 @@ void MediaNotifier::onMediumChange( const QString &name, bool allowNotification m_allowNotificationMap[job] = allowNotification; - connect( job, SIGNAL( result( KIO::Job * ) ), - this, SLOT( slotStatResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), + this, TQT_SLOT( slotStatResult( KIO::Job * ) ) ); } void MediaNotifier::slotStatResult( KIO::Job *job ) @@ -110,7 +110,7 @@ void MediaNotifier::slotStatResult( KIO::Job *job ) bool MediaNotifier::autostart( const KFileItem &medium ) { - QString mimetype = medium.mimetype(); + TQString mimetype = medium.mimetype(); bool is_cdrom = mimetype.startsWith( "media/cd" ) || mimetype.startsWith( "media/dvd" ); bool is_mounted = mimetype.contains( "_mounted" ); @@ -136,20 +136,20 @@ bool MediaNotifier::autostart( const KFileItem &medium ) // From now we're sure the medium is already mounted. // We can use the local path for stating, no need to use KIO here. bool local; - QString path = medium.mostLocalURL( local ).path(); // local is always true here... + TQString path = medium.mostLocalURL( local ).path(); // local is always true here... // When a new medium is mounted the root directory of the medium should // be checked for the following Autostart files in order of precedence: // .autorun, autorun, autorun.sh - QStringList autorun_list; + TQStringList autorun_list; autorun_list << ".autorun" << "autorun" << "autorun.sh"; - QStringList::iterator it = autorun_list.begin(); - QStringList::iterator end = autorun_list.end(); + TQStringList::iterator it = autorun_list.begin(); + TQStringList::iterator end = autorun_list.end(); for ( ; it!=end; ++it ) { - if ( QFile::exists( path + "/" + *it ) ) + if ( TQFile::exists( path + "/" + *it ) ) { return execAutorun( medium, path, *it ); } @@ -158,7 +158,7 @@ bool MediaNotifier::autostart( const KFileItem &medium ) // When a new medium is mounted the root directory of the medium should // be checked for the following Autoopen files in order of precedence: // .autoopen, autoopen - QStringList autoopen_list; + TQStringList autoopen_list; autoopen_list << ".autoopen" << "autoopen"; it = autoopen_list.begin(); @@ -166,7 +166,7 @@ bool MediaNotifier::autostart( const KFileItem &medium ) for ( ; it!=end; ++it ) { - if ( QFile::exists( path + "/" + *it ) ) + if ( TQFile::exists( path + "/" + *it ) ) { return execAutoopen( medium, path, *it ); } @@ -175,23 +175,23 @@ bool MediaNotifier::autostart( const KFileItem &medium ) return false; } -bool MediaNotifier::execAutorun( const KFileItem &medium, const QString &path, - const QString &autorunFile ) +bool MediaNotifier::execAutorun( const KFileItem &medium, const TQString &path, + const TQString &autorunFile ) { // The desktop environment MUST prompt the user for confirmation // before automatically starting an application. - QString mediumType = medium.mimeTypePtr()->name(); - QString text = i18n( "An autorun file has been found on your '%1'." + TQString mediumType = medium.mimeTypePtr()->name(); + TQString text = i18n( "An autorun file has been found on your '%1'." " Do you want to execute it?\n" "Note that executing a file on a medium may compromise" " your system's security").arg( mediumType ); - QString caption = i18n( "Autorun - %1" ).arg( medium.url().prettyURL() ); + TQString caption = i18n( "Autorun - %1" ).arg( medium.url().prettyURL() ); KGuiItem yes = KStdGuiItem::yes(); KGuiItem no = KStdGuiItem::no(); int options = KMessageBox::Notify | KMessageBox::Dangerous; int answer = KMessageBox::warningYesNo( 0L, text, caption, yes, no, - QString::null, options ); + TQString::null, options ); if ( answer == KMessageBox::Yes ) { @@ -209,16 +209,16 @@ bool MediaNotifier::execAutorun( const KFileItem &medium, const QString &path, return true; } -bool MediaNotifier::execAutoopen( const KFileItem &medium, const QString &path, - const QString &autoopenFile ) +bool MediaNotifier::execAutoopen( const KFileItem &medium, const TQString &path, + const TQString &autoopenFile ) { // An Autoopen file MUST contain a single relative path that points // to a non-executable file contained on the medium. [...] - QFile file( path+"/"+autoopenFile ); + TQFile file( path+"/"+autoopenFile ); file.open( IO_ReadOnly ); - QTextStream stream( &file ); + TQTextStream stream( &file ); - QString relative_path = stream.readLine().stripWhiteSpace(); + TQString relative_path = stream.readLine().stripWhiteSpace(); // The relative path MUST NOT contain path components that // refer to a parent directory ( ../ ) @@ -229,7 +229,7 @@ bool MediaNotifier::execAutoopen( const KFileItem &medium, const QString &path, // The desktop environment MUST verify that the relative path points // to a file that is actually located on the medium [...] - QString resolved_path + TQString resolved_path = KStandardDirs::realFilePath( path+"/"+relative_path ); if ( !resolved_path.startsWith( path ) ) @@ -238,12 +238,12 @@ bool MediaNotifier::execAutoopen( const KFileItem &medium, const QString &path, } - QFile document( resolved_path ); + TQFile document( resolved_path ); // TODO: What about FAT all files are executable... // If the relative path points to an executable file then the desktop // environment MUST NOT execute the file. - if ( !document.exists() /*|| QFileInfo(document).isExecutable()*/ ) + if ( !document.exists() /*|| TQFileInfo(document).isExecutable()*/ ) { return false; } @@ -253,19 +253,19 @@ bool MediaNotifier::execAutoopen( const KFileItem &medium, const QString &path, // The desktop environment MUST prompt the user for confirmation // before opening the file. - QString mediumType = medium.mimeTypePtr()->name(); - QString filename = url.filename(); - QString text = i18n( "An autoopen file has been found on your '%1'." + TQString mediumType = medium.mimeTypePtr()->name(); + TQString filename = url.filename(); + TQString text = i18n( "An autoopen file has been found on your '%1'." " Do you want to open '%2'?\n" "Note that opening a file on a medium may compromise" " your system's security").arg( mediumType ).arg( filename ); - QString caption = i18n( "Autoopen - %1" ).arg( medium.url().prettyURL() ); + TQString caption = i18n( "Autoopen - %1" ).arg( medium.url().prettyURL() ); KGuiItem yes = KStdGuiItem::yes(); KGuiItem no = KStdGuiItem::no(); int options = KMessageBox::Notify | KMessageBox::Dangerous; int answer = KMessageBox::warningYesNo( 0L, text, caption, yes, no, - QString::null, options ); + TQString::null, options ); // TODO: Take case of the "UNLESS" part? // When an Autoopen file has been detected and the user has confirmed @@ -289,7 +289,7 @@ void MediaNotifier::notify( KFileItem &medium ) if ( settings->autoActionForMimetype( medium.mimetype() )==0L ) { - QValueList<NotifierAction*> actions + TQValueList<NotifierAction*> actions = settings->actionsForMimetype( medium.mimetype() ); // If only one action remains, it's the "do nothing" action @@ -311,7 +311,7 @@ void MediaNotifier::notify( KFileItem &medium ) extern "C" { - KDE_EXPORT KDEDModule *create_medianotifier(const QCString &name) + KDE_EXPORT KDEDModule *create_medianotifier(const TQCString &name) { KGlobal::locale()->insertCatalogue("kay"); return new MediaNotifier(name); @@ -325,7 +325,7 @@ void MediaNotifier::checkFreeDiskSpace() if ( m_freeDialog ) return; - if ( statfs( QFile::encodeName( QDir::homeDirPath() ), &sfs ) == 0 ) + if ( statfs( TQFile::encodeName( TQDir::homeDirPath() ), &sfs ) == 0 ) { total = sfs.f_blocks; avail = ( getuid() ? sfs.f_bavail : sfs.f_bfree ); @@ -344,15 +344,15 @@ void MediaNotifier::checkFreeDiskSpace() 0, "warningYesNo", false, true, i18n( "Start Konqueror" ), KStdGuiItem::cancel()); - QString text = i18n( "You are running low on disk space on your home partition (currently %1% free), would you like to " + TQString text = i18n( "You are running low on disk space on your home partition (currently %1% free), would you like to " "run Konqueror to free some disk space and fix the problem?" ).arg( freeperc ); bool checkboxResult = false; - KMessageBox::createKMessageBox(m_freeDialog, QMessageBox::Warning, text, QStringList(), + KMessageBox::createKMessageBox(m_freeDialog, TQMessageBox::Warning, text, TQStringList(), i18n("Do not ask again"), &checkboxResult, KMessageBox::Notify | KMessageBox::NoExec); m_freeDialog->show(); - connect( m_freeDialog, SIGNAL( yesClicked() ), SLOT( slotFreeContinue() ) ); - connect( m_freeDialog, SIGNAL( noClicked() ), SLOT( slotFreeCancel() ) ); + connect( m_freeDialog, TQT_SIGNAL( yesClicked() ), TQT_SLOT( slotFreeContinue() ) ); + connect( m_freeDialog, TQT_SIGNAL( noClicked() ), TQT_SLOT( slotFreeCancel() ) ); } } } @@ -369,7 +369,7 @@ void MediaNotifier::slotFreeCancel() void MediaNotifier::slotFreeFinished( KMessageBox::ButtonCode res ) { - QCheckBox *checkbox = ::qt_cast<QCheckBox*>( m_freeDialog->child( 0, "QCheckBox" ) ); + TQCheckBox *checkbox = ::qt_cast<TQCheckBox*>( m_freeDialog->child( 0, "TQCheckBox" ) ); if ( checkbox && checkbox->isChecked() ) KMessageBox::saveDontShowAgainYesNo("dontagainfreespace", res); m_freeDialog->delayedDestruct(); @@ -377,7 +377,7 @@ void MediaNotifier::slotFreeFinished( KMessageBox::ButtonCode res ) if ( res == KMessageBox::Continue ) // start Konqi { - ( void ) new KRun( KURL::fromPathOrURL( QDir::homeDirPath() ) ); + ( void ) new KRun( KURL::fromPathOrURL( TQDir::homeDirPath() ) ); } else // people don't want to be bothered, at least stop the timer; there's no way to save the dontshowagain entry in this case m_freeTimer->stop(); diff --git a/kioslave/media/medianotifier/medianotifier.h b/kioslave/media/medianotifier/medianotifier.h index e070ac7ac..23f203f97 100644 --- a/kioslave/media/medianotifier/medianotifier.h +++ b/kioslave/media/medianotifier/medianotifier.h @@ -25,8 +25,8 @@ #include <kio/job.h> #include <kmessagebox.h> -#include <qstring.h> -#include <qmap.h> +#include <tqstring.h> +#include <tqmap.h> class KDialogBase; @@ -36,11 +36,11 @@ class MediaNotifier: public KDEDModule K_DCOP public: - MediaNotifier( const QCString &name ); + MediaNotifier( const TQCString &name ); virtual ~MediaNotifier(); k_dcop: - void onMediumChange( const QString &name, bool allowNotification ); + void onMediumChange( const TQString &name, bool allowNotification ); private slots: void slotStatResult( KIO::Job *job ); @@ -53,13 +53,13 @@ private: bool autostart( const KFileItem &medium ); void notify( KFileItem &medium ); - bool execAutorun( const KFileItem &medium, const QString &path, - const QString &autorunFile ); - bool execAutoopen( const KFileItem &medium, const QString &path, - const QString &autoopenFile ); + bool execAutorun( const KFileItem &medium, const TQString &path, + const TQString &autorunFile ); + bool execAutoopen( const KFileItem &medium, const TQString &path, + const TQString &autoopenFile ); - QMap<KIO::Job*,bool> m_allowNotificationMap; - QTimer * m_freeTimer; + TQMap<KIO::Job*,bool> m_allowNotificationMap; + TQTimer * m_freeTimer; KDialogBase * m_freeDialog; }; #endif diff --git a/kioslave/media/medianotifier/notificationdialog.cpp b/kioslave/media/medianotifier/notificationdialog.cpp index a4dab0245..7ba172601 100644 --- a/kioslave/media/medianotifier/notificationdialog.cpp +++ b/kioslave/media/medianotifier/notificationdialog.cpp @@ -18,31 +18,31 @@ */ #include "notificationdialog.h" -#include <qlayout.h> +#include <tqlayout.h> #include <krun.h> #include <klocale.h> #include <kstandarddirs.h> #include <kio/global.h> #include <klistbox.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> #include "actionlistboxitem.h" #include "notificationdialogview.h" NotificationDialog::NotificationDialog( KFileItem medium, NotifierSettings *settings, - QWidget* parent, const char* name ) + TQWidget* parent, const char* name ) : KDialogBase( parent, name, false, i18n( "Medium Detected" ), Ok|Cancel|User1, Ok, true), m_medium(medium), m_settings( settings ) { setCaption( KIO::decodeFileName(m_medium.name()) ); clearWState( WState_Polished ); - QWidget *page = new QWidget( this ); + TQWidget *page = new TQWidget( this ); setMainWidget(page); - QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() ); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() ); m_view = new NotificationDialogView( page ); @@ -53,30 +53,30 @@ NotificationDialog::NotificationDialog( KFileItem medium, NotifierSettings *sett updateActionsListBox(); - resize( QSize(400,400).expandedTo( minimumSizeHint() ) ); + resize( TQSize(400,400).expandedTo( minimumSizeHint() ) ); m_actionWatcher = new KDirWatch(); - QString services_dir + TQString services_dir = locateLocal( "data", "konqueror/servicemenus", true ); m_actionWatcher->addDir( services_dir ); setButtonText( User1, i18n("Configure...") ); - connect( m_actionWatcher, SIGNAL( dirty( const QString & ) ), - this, SLOT( slotActionsChanged( const QString & ) ) ); - connect( this , SIGNAL( okClicked() ), - this, SLOT( slotOk() ) ); - connect( this, SIGNAL( user1Clicked() ), - this, SLOT( slotConfigure() ) ); - connect( m_view->actionsList, SIGNAL( doubleClicked ( QListBoxItem*, const QPoint & ) ), - this, SLOT( slotOk() ) ); + connect( m_actionWatcher, TQT_SIGNAL( dirty( const TQString & ) ), + this, TQT_SLOT( slotActionsChanged( const TQString & ) ) ); + connect( this , TQT_SIGNAL( okClicked() ), + this, TQT_SLOT( slotOk() ) ); + connect( this, TQT_SIGNAL( user1Clicked() ), + this, TQT_SLOT( slotConfigure() ) ); + connect( m_view->actionsList, TQT_SIGNAL( doubleClicked ( TQListBoxItem*, const TQPoint & ) ), + this, TQT_SLOT( slotOk() ) ); - connect( this, SIGNAL( finished() ), - this, SLOT( delayedDestruct() ) ); + connect( this, TQT_SIGNAL( finished() ), + this, TQT_SLOT( delayedDestruct() ) ); m_actionWatcher->startScan(); - QPushButton * btn = actionButton( Ok ); + TQPushButton * btn = actionButton( Ok ); btn->setFocus(); } @@ -90,11 +90,11 @@ void NotificationDialog::updateActionsListBox() { m_view->actionsList->clear(); - QValueList<NotifierAction*> actions + TQValueList<NotifierAction*> actions = m_settings->actionsForMimetype( m_medium.mimetype() ); - QValueList<NotifierAction*>::iterator it = actions.begin(); - QValueList<NotifierAction*>::iterator end = actions.end(); + TQValueList<NotifierAction*>::iterator it = actions.begin(); + TQValueList<NotifierAction*>::iterator end = actions.end(); for ( ; it!=end; ++it ) { @@ -106,7 +106,7 @@ void NotificationDialog::updateActionsListBox() } -void NotificationDialog::slotActionsChanged(const QString &/*dir*/) +void NotificationDialog::slotActionsChanged(const TQString &/*dir*/) { m_settings->reload(); updateActionsListBox(); @@ -114,7 +114,7 @@ void NotificationDialog::slotActionsChanged(const QString &/*dir*/) void NotificationDialog::slotOk() { - QListBoxItem *item = m_view->actionsList->selectedItem(); + TQListBoxItem *item = m_view->actionsList->selectedItem(); if ( item != 0L ) { @@ -136,7 +136,7 @@ void NotificationDialog::launchAction( NotifierAction *action ) action->execute(m_medium); - QDialog::accept(); + TQDialog::accept(); } void NotificationDialog::slotConfigure() diff --git a/kioslave/media/medianotifier/notificationdialog.h b/kioslave/media/medianotifier/notificationdialog.h index 94db1fee0..f073676e3 100644 --- a/kioslave/media/medianotifier/notificationdialog.h +++ b/kioslave/media/medianotifier/notificationdialog.h @@ -35,13 +35,13 @@ class NotificationDialog : public KDialogBase public: NotificationDialog( KFileItem medium, NotifierSettings *settings, - QWidget* parent = 0, const char* name = 0 ); + TQWidget* parent = 0, const char* name = 0 ); ~NotificationDialog(); private slots: void slotOk(); void slotConfigure(); - void slotActionsChanged(const QString& dir); + void slotActionsChanged(const TQString& dir); private: void launchAction( NotifierAction *action ); diff --git a/kioslave/media/mounthelper/dialog.cpp b/kioslave/media/mounthelper/dialog.cpp index 74bcfb388..549bbdc4a 100644 --- a/kioslave/media/mounthelper/dialog.cpp +++ b/kioslave/media/mounthelper/dialog.cpp @@ -22,7 +22,7 @@ #include "dialog.h" -Dialog::Dialog(QString url, QString iconName) : +Dialog::Dialog(TQString url, TQString iconName) : KDialogBase(NULL, "Dialog", true, "Decrypt Storage Device", (Cancel|User1), User1, false, KGuiItem(i18n("Decrypt"), "decrypted" )) { decryptDialog = new DecryptDialog(this); @@ -34,10 +34,10 @@ Dialog::Dialog(QString url, QString iconName) : enableButton( User1, false ); - QPixmap pixmap = KGlobal::iconLoader()->loadIcon(iconName, KIcon::NoGroup, KIcon::SizeLarge); + TQPixmap pixmap = KGlobal::iconLoader()->loadIcon(iconName, KIcon::NoGroup, KIcon::SizeLarge); decryptDialog->encryptedIcon->setPixmap( pixmap ); - connect(decryptDialog->passwordEdit, SIGNAL (textChanged(const QString &)), this, SLOT (slotPasswordChanged(const QString &))); + connect(decryptDialog->passwordEdit, TQT_SIGNAL (textChanged(const TQString &)), this, TQT_SLOT (slotPasswordChanged(const TQString &))); setMainWidget(decryptDialog); } @@ -47,20 +47,20 @@ Dialog::~Dialog() delete decryptDialog; } -QString Dialog::getPassword() +TQString Dialog::getPassword() { return decryptDialog->passwordEdit->text(); } -void Dialog::slotDialogError(QString errorMsg) +void Dialog::slotDialogError(TQString errorMsg) { kdDebug() << __func__ << "(" << errorMsg << " )" << endl; - decryptDialog->errorLabel->setText(QString("<b>%1</b>").arg(errorMsg)); + decryptDialog->errorLabel->setText(TQString("<b>%1</b>").arg(errorMsg)); decryptDialog->errorBox->show(); } -void Dialog::slotPasswordChanged(const QString &text) +void Dialog::slotPasswordChanged(const TQString &text) { enableButton( User1, !text.isEmpty() ); } diff --git a/kioslave/media/mounthelper/dialog.h b/kioslave/media/mounthelper/dialog.h index 1f544c370..872486f5b 100644 --- a/kioslave/media/mounthelper/dialog.h +++ b/kioslave/media/mounthelper/dialog.h @@ -30,9 +30,9 @@ #include <kdialogbase.h> #include <kiconloader.h> -#include <qlineedit.h> -#include <qlabel.h> -#include <qgroupbox.h> +#include <tqlineedit.h> +#include <tqlabel.h> +#include <tqgroupbox.h> #include "decryptdialog.h" @@ -44,14 +44,14 @@ class Dialog : public KDialogBase Q_OBJECT public: - Dialog(QString url, QString iconName); + Dialog(TQString url, TQString iconName); ~Dialog(); - QString getPassword(); + TQString getPassword(); public slots: - void slotDialogError(QString errorMsg); - void slotPasswordChanged(const QString &text); + void slotDialogError(TQString errorMsg); + void slotPasswordChanged(const TQString &text); private: DecryptDialog *decryptDialog; diff --git a/kioslave/media/mounthelper/kio_media_mounthelper.cpp b/kioslave/media/mounthelper/kio_media_mounthelper.cpp index 5dae9e0d3..01448f79d 100644 --- a/kioslave/media/mounthelper/kio_media_mounthelper.cpp +++ b/kioslave/media/mounthelper/kio_media_mounthelper.cpp @@ -26,7 +26,7 @@ #include <kmessagebox.h> #include <dcopclient.h> #include <dcopref.h> -#include <qtimer.h> +#include <tqtimer.h> #include <stdlib.h> #include <kdebug.h> #include <kglobal.h> @@ -45,7 +45,7 @@ const Medium MountHelper::findMedium(const KURL &url) DCOPReply reply = mediamanager.call( "properties", url.fileName() ); if ( !reply.isValid() ) { m_errorStr = i18n("The KDE mediamanager is not running.")+"\n"; - return Medium(QString::null, QString::null); + return Medium(TQString::null, TQString::null); } const Medium& medium = Medium::create(reply); if ( medium.id().isEmpty() ) { @@ -53,7 +53,7 @@ const Medium MountHelper::findMedium(const KURL &url) reply = mediamanager.call( "properties", url.prettyURL() ); if ( !reply.isValid() ) { m_errorStr = i18n("Internal Error"); - return Medium(QString::null, QString::null); + return Medium(TQString::null, TQString::null); } return Medium::create(reply); } else { @@ -65,7 +65,7 @@ MountHelper::MountHelper() : KApplication() { KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - m_errorStr = QString::null; + m_errorStr = TQString::null; KURL url(args->url(0)); const Medium medium = findMedium(url); @@ -74,19 +74,19 @@ MountHelper::MountHelper() : KApplication() { if (m_errorStr.isEmpty()) m_errorStr+= i18n("%1 cannot be found.").arg(url.prettyURL()); - QTimer::singleShot(0, this, SLOT(error()) ); + TQTimer::singleShot(0, this, TQT_SLOT(error()) ); return; } if ( !medium.isMountable() && !args->isSet("e") && !args->isSet("s")) { m_errorStr = i18n("%1 is not a mountable media.").arg(url.prettyURL()); - QTimer::singleShot(0, this, SLOT(error()) ); + TQTimer::singleShot(0, this, TQT_SLOT(error()) ); return; } - QString device = medium.deviceNode(); - QString mount_point = medium.mountPoint(); + TQString device = medium.deviceNode(); + TQString mount_point = medium.mountPoint(); m_isCdrom = medium.mimeType().find("dvd")!=-1 || medium.mimeType().find("cd")!=-1; @@ -96,20 +96,20 @@ MountHelper::MountHelper() : KApplication() if (!medium.isEncrypted()) { m_errorStr = i18n("%1 is not an encrypted media.").arg(url.prettyURL()); - QTimer::singleShot(0, this, SLOT(error()) ); + TQTimer::singleShot(0, this, TQT_SLOT(error()) ); return; } if (!medium.needDecryption()) { m_errorStr = i18n("%1 is already decrypted.").arg(url.prettyURL()); - QTimer::singleShot(0, this, SLOT(error()) ); + TQTimer::singleShot(0, this, TQT_SLOT(error()) ); return; } - QString iconName = medium.iconName(); + TQString iconName = medium.iconName(); if (iconName.isEmpty()) { - QString mime = medium.mimeType(); + TQString mime = medium.mimeType(); iconName = KMimeType::mimeType(mime)->icon(mime, false); } @@ -117,9 +117,9 @@ MountHelper::MountHelper() : KApplication() dialog = new Dialog(url.prettyURL(), iconName); dialog->show(); - connect(dialog, SIGNAL (user1Clicked()), this, SLOT (slotSendPassword())); - connect(dialog, SIGNAL (cancelClicked()), this, SLOT (slotCancel())); - connect(this, SIGNAL (signalPasswordError(QString)), dialog, SLOT (slotDialogError(QString))); + connect(dialog, TQT_SIGNAL (user1Clicked()), this, TQT_SLOT (slotSendPassword())); + connect(dialog, TQT_SIGNAL (cancelClicked()), this, TQT_SLOT (slotCancel())); + connect(this, TQT_SIGNAL (signalPasswordError(TQString)), dialog, TQT_SLOT (slotDialogError(TQString))); } else if (args->isSet("u")) { @@ -180,7 +180,7 @@ MountHelper::MountHelper() : KApplication() } } -void MountHelper::invokeEject(const QString &device, bool quiet) +void MountHelper::invokeEject(const TQString &device, bool quiet) { KProcess *proc = new KProcess(this); *proc << "kdeeject"; @@ -189,8 +189,8 @@ void MountHelper::invokeEject(const QString &device, bool quiet) *proc << "-q"; } *proc << device; - connect( proc, SIGNAL(processExited(KProcess *)), - this, SLOT( ejectFinished(KProcess *) ) ); + connect( proc, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT( ejectFinished(KProcess *) ) ); proc->start(); } @@ -209,7 +209,7 @@ void MountHelper::ejectFinished(KProcess* proc) m_errorStr = i18n("The device was successfully unmounted, but could not be ejected"); } //X Comment this because the error is useless as long as the unmount is successfull. -//X QTimer::singleShot(0, this, SLOT(error())); +//X TQTimer::singleShot(0, this, TQT_SLOT(error())); ::exit(0); } } @@ -229,7 +229,7 @@ void MountHelper::slotSendPassword() m_errorStr = i18n("The KDE mediamanager is not running."); error(); } else { - QString errorMsg = reply; + TQString errorMsg = reply; if (errorMsg.isNull()) { exit(0); } else { diff --git a/kioslave/media/mounthelper/kio_media_mounthelper.h b/kioslave/media/mounthelper/kio_media_mounthelper.h index ed5884d4f..4779c75ec 100644 --- a/kioslave/media/mounthelper/kio_media_mounthelper.h +++ b/kioslave/media/mounthelper/kio_media_mounthelper.h @@ -23,7 +23,7 @@ #define _KIO_MEDIA_MOUNTHELPER_H_ #include <kapplication.h> -#include <qstring.h> +#include <tqstring.h> #include <kio/job.h> #include "medium.h" @@ -38,10 +38,10 @@ public: private: const Medium findMedium(const KURL &url); - void invokeEject(const QString &device, bool quiet=false); - QString m_errorStr; + void invokeEject(const TQString &device, bool quiet=false); + TQString m_errorStr; bool m_isCdrom; - QString m_mediumId; + TQString m_mediumId; Dialog *dialog; private slots: @@ -51,7 +51,7 @@ private slots: void error(); signals: - void signalPasswordError(QString errorMsg); + void signalPasswordError(TQString errorMsg); }; #endif diff --git a/kioslave/media/propsdlgplugin/propertiespage.cpp b/kioslave/media/propsdlgplugin/propertiespage.cpp index 455d1e2e3..14ac2b33f 100644 --- a/kioslave/media/propsdlgplugin/propertiespage.cpp +++ b/kioslave/media/propsdlgplugin/propertiespage.cpp @@ -17,18 +17,18 @@ Boston, MA 02110-1301, USA. */ -#include <qcheckbox.h> -#include <qtooltip.h> -#include <qbuttongroup.h> -#include <qlineedit.h> -#include <qfileinfo.h> -#include <qlabel.h> -#include <qregexp.h> +#include <tqcheckbox.h> +#include <tqtooltip.h> +#include <tqbuttongroup.h> +#include <tqlineedit.h> +#include <tqfileinfo.h> +#include <tqlabel.h> +#include <tqregexp.h> #include <kpushbutton.h> #include <kmessagebox.h> #include <klocale.h> -#include <qcombobox.h> -#include <qtimer.h> +#include <tqcombobox.h> +#include <tqtimer.h> #include <kdebug.h> #include "propertiespage.h" #include <dcopref.h> @@ -37,14 +37,14 @@ const char *short_names[] = {"lower", "win95", "winnt", "mixed", 0 }; const char *journales[] = {"data", "ordered", "writeback", 0 }; -PropertiesPage::PropertiesPage(QWidget* parent, const QString &_id) +PropertiesPage::PropertiesPage(TQWidget* parent, const TQString &_id) : PropertiesPageGUI(parent), id(_id) { kdDebug() << "props page " << id << endl; DCOPRef mediamanager("kded", "mediamanager"); DCOPReply reply = mediamanager.call( "mountoptions", id); - QStringList list; + TQStringList list; if (reply.isValid()) list = reply; @@ -52,10 +52,10 @@ PropertiesPage::PropertiesPage(QWidget* parent, const QString &_id) if (list.size()) { kdDebug() << "list " << list << endl; - for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) + for (TQStringList::ConstIterator it = list.begin(); it != list.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); kdDebug() << "key '" << key << "' value '" << value << "'\n"; options[key] = value; } @@ -64,43 +64,43 @@ PropertiesPage::PropertiesPage(QWidget* parent, const QString &_id) option_ro->hide(); else option_ro->setChecked(options["ro"] == "true"); - connect( option_ro, SIGNAL( stateChanged(int) ), SIGNAL( changed() ) ); + connect( option_ro, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); if (!options.contains("quiet")) option_quiet->hide(); else option_quiet->setChecked(options["quiet"] == "true"); - connect( option_quiet, SIGNAL( stateChanged(int) ), SIGNAL( changed() ) ); + connect( option_quiet, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); if (!options.contains("sync")) option_sync->hide(); else option_sync->setChecked(options["sync"] == "true"); - connect( option_sync, SIGNAL( stateChanged(int) ), SIGNAL( changed() ) ); + connect( option_sync, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); if (!options.contains("atime")) option_atime->hide(); else option_atime->setChecked(options["atime"] == "true"); - connect( option_atime, SIGNAL( stateChanged(int) ), SIGNAL( changed() ) ); + connect( option_atime, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); if (!options.contains("flush")) option_flush->hide(); else option_flush->setChecked(options["flush"] == "true"); - connect( option_flush, SIGNAL( stateChanged(int) ), SIGNAL( changed() ) ); + connect( option_flush, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); if (!options.contains("utf8")) option_utf8->hide(); else option_utf8->setChecked(options["utf8"] == "true"); - connect( option_utf8, SIGNAL( stateChanged(int) ), SIGNAL( changed() ) ); + connect( option_utf8, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); if (!options.contains("uid")) option_uid->hide(); else option_uid->setChecked(options["uid"] == "true"); - connect( option_uid, SIGNAL( stateChanged(int) ), SIGNAL( changed() ) ); + connect( option_uid, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); if (!options.contains("shortname")) { @@ -115,7 +115,7 @@ PropertiesPage::PropertiesPage(QWidget* parent, const QString &_id) option_shortname->setCurrentItem(index); break; } - connect( option_shortname, SIGNAL( activated(int) ), SIGNAL( changed() ) ); + connect( option_shortname, TQT_SIGNAL( activated(int) ), TQT_SIGNAL( changed() ) ); } if (!options.contains("journaling")) @@ -131,14 +131,14 @@ PropertiesPage::PropertiesPage(QWidget* parent, const QString &_id) option_journaling->setCurrentItem(index); break; } - connect( option_journaling, SIGNAL( activated(int) ), SIGNAL( changed() ) ); + connect( option_journaling, TQT_SIGNAL( activated(int) ), TQT_SIGNAL( changed() ) ); } label_filesystem->setText(i18n("Filesystem: %1").arg(options["filesystem"])); option_mountpoint->setText(options["mountpoint"]); - connect( option_mountpoint, SIGNAL( textChanged( const QString &) ), SIGNAL( changed() ) ); + connect( option_mountpoint, TQT_SIGNAL( textChanged( const TQString &) ), TQT_SIGNAL( changed() ) ); option_automount->setChecked(options["automount"] == "true"); - connect( option_automount, SIGNAL( stateChanged(int) ), SIGNAL( changed() ) ); + connect( option_automount, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); if (!options.contains("journaling") && !options.contains("shortname") && @@ -161,43 +161,43 @@ PropertiesPage::~PropertiesPage() bool PropertiesPage::save() { - QStringList result; + TQStringList result; if (options.contains("ro")) - result << QString("ro=%1").arg(option_ro->isChecked() ? "true" : "false"); + result << TQString("ro=%1").arg(option_ro->isChecked() ? "true" : "false"); if (options.contains("quiet")) - result << QString("quiet=%1").arg(option_quiet->isChecked() ? "true" : "false"); + result << TQString("quiet=%1").arg(option_quiet->isChecked() ? "true" : "false"); if (options.contains("sync")) - result << QString("sync=%1").arg(option_sync->isChecked() ? "true" : "false"); + result << TQString("sync=%1").arg(option_sync->isChecked() ? "true" : "false"); if (options.contains("atime")) - result << QString("atime=%1").arg(option_atime->isChecked() ? "true" : "false"); + result << TQString("atime=%1").arg(option_atime->isChecked() ? "true" : "false"); if (options.contains("flush")) - result << QString("flush=%1").arg(option_flush->isChecked() ? "true" : "false"); + result << TQString("flush=%1").arg(option_flush->isChecked() ? "true" : "false"); if (options.contains("utf8")) - result << QString("utf8=%1").arg(option_utf8->isChecked() ? "true" : "false"); + result << TQString("utf8=%1").arg(option_utf8->isChecked() ? "true" : "false"); if (options.contains("uid")) - result << QString("uid=%1").arg(option_uid->isChecked() ? "true" : "false"); + result << TQString("uid=%1").arg(option_uid->isChecked() ? "true" : "false"); if (options.contains("shortname")) - result << QString("shortname=%1").arg(short_names[option_shortname->currentItem()]); + result << TQString("shortname=%1").arg(short_names[option_shortname->currentItem()]); if (options.contains("journaling")) - result << QString("journaling=%1").arg(journales[option_journaling->currentItem()]); + result << TQString("journaling=%1").arg(journales[option_journaling->currentItem()]); - QString mp = option_mountpoint->text(); + TQString mp = option_mountpoint->text(); if (!mp.startsWith("/media/")) { KMessageBox::sorry(this, i18n("Mountpoint has to be below /media")); return false; } - result << QString("mountpoint=%1").arg(mp); - result << QString("automount=%1").arg(option_automount->isChecked() ? "true" : "false"); + result << TQString("mountpoint=%1").arg(mp); + result << TQString("automount=%1").arg(option_automount->isChecked() ? "true" : "false"); kdDebug() << result << endl; diff --git a/kioslave/media/propsdlgplugin/propertiespage.h b/kioslave/media/propsdlgplugin/propertiespage.h index fa23c7873..f36e27ded 100644 --- a/kioslave/media/propsdlgplugin/propertiespage.h +++ b/kioslave/media/propsdlgplugin/propertiespage.h @@ -21,7 +21,7 @@ #define PROPERTIESPAGE_H #include "propertiespagegui.h" -#include <qmap.h> +#include <tqmap.h> class QCheckBox; class Medium; @@ -31,15 +31,15 @@ class PropertiesPage : public PropertiesPageGUI Q_OBJECT public: - PropertiesPage(QWidget* parent, const QString &_id); + PropertiesPage(TQWidget* parent, const TQString &_id); virtual ~PropertiesPage(); bool save(); protected: - QMap<QString,QString> options; - QString id; + TQMap<TQString,TQString> options; + TQString id; }; diff --git a/kioslave/media/propsdlgplugin/propsdlgshareplugin.cpp b/kioslave/media/propsdlgplugin/propsdlgshareplugin.cpp index dbaf6e898..59433a5da 100644 --- a/kioslave/media/propsdlgplugin/propsdlgshareplugin.cpp +++ b/kioslave/media/propsdlgplugin/propsdlgshareplugin.cpp @@ -17,11 +17,11 @@ Boston, MA 02110-1301, USA. */ -#include <qstring.h> -#include <qvbox.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qtimer.h> +#include <tqstring.h> +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqtimer.h> #include <kgenericfactory.h> #include <kdebug.h> @@ -50,7 +50,7 @@ class PropsDlgSharePlugin::Private }; PropsDlgSharePlugin::PropsDlgSharePlugin( KPropertiesDialog *dlg, - const char *, const QStringList & ) + const char *, const TQStringList & ) : KPropsDlgPlugin(dlg), d(0) { if (properties->items().count() != 1) @@ -65,15 +65,15 @@ PropsDlgSharePlugin::PropsDlgSharePlugin( KPropertiesDialog *dlg, if ( !reply.isValid() ) return; - QVBox* vbox = properties->addVBoxPage(i18n("&Mounting")); + TQVBox* vbox = properties->addVBoxPage(i18n("&Mounting")); d = new Private(); d->page = new PropertiesPage(vbox, Medium::create(reply).id()); - connect(d->page, SIGNAL(changed()), - SLOT(slotChanged())); + connect(d->page, TQT_SIGNAL(changed()), + TQT_SLOT(slotChanged())); - // QTimer::singleShot(100, this, SLOT(slotChanged())); + // TQTimer::singleShot(100, this, TQT_SLOT(slotChanged())); } diff --git a/kioslave/media/propsdlgplugin/propsdlgshareplugin.h b/kioslave/media/propsdlgplugin/propsdlgshareplugin.h index cb9fdfaab..87b7d1e13 100644 --- a/kioslave/media/propsdlgplugin/propsdlgshareplugin.h +++ b/kioslave/media/propsdlgplugin/propsdlgshareplugin.h @@ -26,7 +26,7 @@ class PropsDlgSharePlugin : public KPropsDlgPlugin { Q_OBJECT public: - PropsDlgSharePlugin( KPropertiesDialog *dlg, const char *, const QStringList & ); + PropsDlgSharePlugin( KPropertiesDialog *dlg, const char *, const TQStringList & ); virtual ~PropsDlgSharePlugin(); virtual void applyChanges(); diff --git a/kioslave/media/testmedia.cpp b/kioslave/media/testmedia.cpp index d3f19512c..89ced4ba1 100644 --- a/kioslave/media/testmedia.cpp +++ b/kioslave/media/testmedia.cpp @@ -28,12 +28,12 @@ #include <stdlib.h> -static bool check(const QString& txt, QString a, QString b) +static bool check(const TQString& txt, TQString a, TQString b) { if (a.isEmpty()) - a = QString::null; + a = TQString::null; if (b.isEmpty()) - b = QString::null; + b = TQString::null; if (a == b) { kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl; } |