From d8cc8bdfa7fa624a526d5aa1626974e1444cb799 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 27 May 2011 19:21:21 +0000 Subject: TQt4 port k3b This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k3b@1233803 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/k3blsofwrapperdialog.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/k3blsofwrapperdialog.cpp') diff --git a/src/k3blsofwrapperdialog.cpp b/src/k3blsofwrapperdialog.cpp index e081e38..280def8 100644 --- a/src/k3blsofwrapperdialog.cpp +++ b/src/k3blsofwrapperdialog.cpp @@ -23,28 +23,28 @@ #include #include -#include +#include #include #include -static QString joinProcessNames( const QValueList& apps ) +static TQString joinProcessNames( const TQValueList& apps ) { - QStringList l; - for( QValueList::const_iterator it = apps.begin(); + TQStringList l; + for( TQValueList::const_iterator it = apps.begin(); it != apps.end(); ++it ) l.append( (*it).name ); return l.join( ", " ); } -K3bLsofWrapperDialog::K3bLsofWrapperDialog( QWidget* parent ) +K3bLsofWrapperDialog::K3bLsofWrapperDialog( TQWidget* tqparent ) : KDialogBase( KDialogBase::Swallow, i18n("Device in use"), Close|User1|User2, Close, - parent, + tqparent, 0, true, true, @@ -56,8 +56,8 @@ K3bLsofWrapperDialog::K3bLsofWrapperDialog( QWidget* parent ) m_label = new K3bRichTextLabel( this ); setMainWidget( m_label ); - connect( this, SIGNAL(user1Clicked()), SLOT(slotQuitOtherApps()) ); - connect( this, SIGNAL(user2Clicked()), SLOT(slotCheckDevice()) ); + connect( this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(slotQuitOtherApps()) ); + connect( this, TQT_SIGNAL(user2Clicked()), TQT_SLOT(slotCheckDevice()) ); } @@ -70,7 +70,7 @@ bool K3bLsofWrapperDialog::slotCheckDevice() { K3bLsofWrapper lsof; if( lsof.checkDevice( m_device ) ) { - const QValueList& apps = lsof.usingApplications(); + const TQValueList& apps = lsof.usingApplications(); if( apps.count() > 0 ) { m_label->setText( i18n("

Device '%1' is already in use by other applications " "(%2)." @@ -79,9 +79,9 @@ bool K3bLsofWrapperDialog::slotCheckDevice() "

Hint: Sometimes shutting down an application does not " "happen instantly. In that case you might have to use the '%3' " "button.") - .arg( m_device->vendor() + " - " + m_device->description() ) - .arg( joinProcessNames(apps) ) - .arg( actionButton( User2 )->text() ) ); + .tqarg( m_device->vendor() + " - " + m_device->description() ) + .tqarg( joinProcessNames(apps) ) + .tqarg( actionButton( User2 )->text() ) ); return true; } } @@ -97,12 +97,12 @@ void K3bLsofWrapperDialog::slotQuitOtherApps() { K3bLsofWrapper lsof; if( lsof.checkDevice( m_device ) ) { - const QValueList& apps = lsof.usingApplications(); + const TQValueList& apps = lsof.usingApplications(); if( apps.count() > 0 ) { if( KMessageBox::warningYesNo( this, i18n("

Do you really want K3b to kill the following processes: ") + joinProcessNames(apps) ) == KMessageBox::Yes ) { - for( QValueList::const_iterator it = apps.begin(); + for( TQValueList::const_iterator it = apps.begin(); it != apps.end(); ++it ) ::kill( (*it).pid, SIGTERM ); } @@ -116,9 +116,9 @@ void K3bLsofWrapperDialog::slotQuitOtherApps() } -void K3bLsofWrapperDialog::checkDevice( K3bDevice::Device* dev, QWidget* parent ) +void K3bLsofWrapperDialog::checkDevice( K3bDevice::Device* dev, TQWidget* tqparent ) { - K3bLsofWrapperDialog dlg( parent ); + K3bLsofWrapperDialog dlg( tqparent ); dlg.m_device = dev; if( dlg.slotCheckDevice() ) dlg.exec(); -- cgit v1.2.3