From 5de42c4b685481ddceff78bd1014232a81c71b1a Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Sat, 24 Sep 2005 12:26:22 +0000 Subject: [PATCH] Remove qt3_support into qstring svn path=/trunk/KDE/kdebase/workspace/; revision=463544 --- client.cpp | 8 ++++---- kcmkwin/kwinrules/ruleswidget.cpp | 10 +++++----- main.cpp | 8 ++++---- plugins.cpp | 2 +- rules.cpp | 2 +- workspace.cpp | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/client.cpp b/client.cpp index d2f1862fbe..7432c636b1 100644 --- a/client.cpp +++ b/client.cpp @@ -1111,7 +1111,7 @@ void Client::killProcess( bool ask, Time timestamp ) process_killer = new KProcess( this ); *process_killer << KStandardDirs::findExe( "kwin_killer_helper" ) << "--pid" << QByteArray().setNum( pid ) << "--hostname" << machine - << "--windowname" << caption().utf8() + << "--windowname" << caption().toUtf8() << "--applicationname" << resourceClass() << "--wid" << QString::number( window() ) << "--timestamp" << QString::number( timestamp ); @@ -1329,7 +1329,7 @@ void Client::setCaption( const QString& _s, bool force ) cap_suffix = machine_suffix + " <" + QString::number(i) + ">" + shortcut_suffix; i++; } while ( workspace()->findClient( FetchNameInternalPredicate( this ))); - info->setVisibleName( caption().utf8() ); + info->setVisibleName( caption().toUtf8() ); reset_name = false; } if(( was_suffix && cap_suffix.isEmpty() @@ -1339,7 +1339,7 @@ void Client::setCaption( const QString& _s, bool force ) info->setVisibleIconName( "" ); // remove } else if( !cap_suffix.isEmpty() && !cap_iconic.isEmpty()) // keep the same suffix in iconic name if it's set - info->setVisibleIconName( ( cap_iconic + cap_suffix ).utf8() ); + info->setVisibleIconName( ( cap_iconic + cap_suffix ).toUtf8() ); if( isManaged() && decoration != NULL ) decoration->captionChange(); @@ -1365,7 +1365,7 @@ void Client::fetchIconicName() if( !cap_suffix.isEmpty()) { if( !cap_iconic.isEmpty()) // keep the same suffix in iconic name if it's set - info->setVisibleIconName( ( s + cap_suffix ).utf8() ); + info->setVisibleIconName( ( s + cap_suffix ).toUtf8() ); else if( was_set ) info->setVisibleIconName( "" ); //remove } diff --git a/kcmkwin/kwinrules/ruleswidget.cpp b/kcmkwin/kwinrules/ruleswidget.cpp index 9db11902d0..ae904360fb 100644 --- a/kcmkwin/kwinrules/ruleswidget.cpp +++ b/kcmkwin/kwinrules/ruleswidget.cpp @@ -113,7 +113,7 @@ RulesWidget::RulesWidget( QWidget* parent, const char* name ) for( i = 1; i <= module.numberOfDesktops(); ++i ) - desktop->insertItem( QString::number( i ).rightJustify( 2 ) + ":" + module.desktopName( i )); + desktop->insertItem( QString::number( i ).rightJustified( 2 ) + ":" + module.desktopName( i )); desktop->insertItem( i18n( "All Desktops" )); } @@ -460,10 +460,10 @@ Rules* RulesWidget::rules() const { Rules* rules = new Rules(); rules->description = description->text(); - rules->wmclass = wmclass->text().utf8(); + rules->wmclass = wmclass->text().toUtf8(); rules->wmclasscomplete = whole_wmclass->isChecked(); rules->wmclassmatch = static_cast< Rules::StringMatch >( wmclass_match->currentItem()); - rules->windowrole = role->text().utf8(); + rules->windowrole = role->text().toUtf8(); rules->windowrolematch = static_cast< Rules::StringMatch >( role_match->currentItem()); rules->types = 0; bool all_types = true; @@ -489,9 +489,9 @@ Rules* RulesWidget::rules() const } rules->title = title->text(); rules->titlematch = static_cast< Rules::StringMatch >( title_match->currentItem()); - rules->extrarole = extra->text().utf8(); + rules->extrarole = extra->text().toUtf8(); rules->extrarolematch = static_cast< Rules::StringMatch >( extra_match->currentItem()); - rules->clientmachine = machine->text().utf8(); + rules->clientmachine = machine->text().toUtf8(); rules->clientmachinematch = static_cast< Rules::StringMatch >( machine_match->currentItem()); LINEEDIT_SET_RULE( position, strToPosition ); LINEEDIT_SET_RULE( size, strToSize ); diff --git a/main.cpp b/main.cpp index 3aa3c7119b..d0a9a0249f 100644 --- a/main.cpp +++ b/main.cpp @@ -59,7 +59,7 @@ int x11ErrorHandler(Display *d, XErrorEvent *e) ) && (e->error_code == BadAccess)) { - fputs(i18n("kwin: it looks like there's already a window manager running. kwin not started.\n").local8Bit(), stderr); + fputs(i18n("kwin: it looks like there's already a window manager running. kwin not started.\n").toLocal8Bit(), stderr); exit(1); } @@ -74,7 +74,7 @@ int x11ErrorHandler(Display *d, XErrorEvent *e) if (initting) { - fputs(i18n("kwin: failure during initialization; aborting").local8Bit(), stderr); + fputs(i18n("kwin: failure during initialization; aborting").toLocal8Bit(), stderr); exit(1); } return 0; @@ -95,7 +95,7 @@ Application::Application( ) if( !owner.claim( args->isSet( "replace" ), true )) { - fputs(i18n("kwin: unable to claim manager selection, another wm running? (try using --replace)\n").local8Bit(), stderr); + fputs(i18n("kwin: unable to claim manager selection, another wm running? (try using --replace)\n").toLocal8Bit(), stderr); ::exit(1); } connect( &owner, SIGNAL( lostOwnership()), SLOT( lostSelection())); @@ -211,7 +211,7 @@ KDE_EXPORT int kdemain( int argc, char * argv[] ) XCloseDisplay( dpy ); dpy = 0; - if ((pos = display_name.findRev('.')) != -1 ) + if ((pos = display_name.lastIndexOf('.')) != -1 ) display_name.remove(pos,10); // 10 is enough to be sure we removed ".s" QString envir; diff --git a/plugins.cpp b/plugins.cpp index c7a4fcc15f..80f81ac549 100644 --- a/plugins.cpp +++ b/plugins.cpp @@ -30,7 +30,7 @@ PluginMgr::PluginMgr() void PluginMgr::error( const QString &error_msg ) { qWarning( "%s", (i18n("KWin: ") + error_msg + - i18n("\nKWin will now exit...")).local8Bit().data() ); + i18n("\nKWin will now exit...")).toLocal8Bit().data() ); exit(1); } diff --git a/rules.cpp b/rules.cpp index a8d52a040c..a55f869263 100644 --- a/rules.cpp +++ b/rules.cpp @@ -71,7 +71,7 @@ Rules::Rules( const QString& str, bool temporary ) QFile* f = file.file(); if( f != NULL ) { - QByteArray s = str.utf8(); + QByteArray s = str.toUtf8(); f->writeBlock( s.data(), s.length()); } file.close(); diff --git a/workspace.cpp b/workspace.cpp index 641ecba08f..76445b6e35 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -919,7 +919,7 @@ void Workspace::loadDesktopSettings() { QString s = c->readEntry(QString("Name_%1").arg(i), i18n("Desktop %1").arg(i)); - rootInfo->setDesktopName( i, s.utf8().data() ); + rootInfo->setDesktopName( i, s.toUtf8().data() ); desktop_focus_chain[i-1] = i; } } @@ -942,7 +942,7 @@ void Workspace::saveDesktopSettings() if ( s.isEmpty() ) { s = defaultvalue; - rootInfo->setDesktopName( i, s.utf8().data() ); + rootInfo->setDesktopName( i, s.toUtf8().data() ); } if (s != defaultvalue)