From a48328e5bc631ed04fbe28d73674b550857ba346 Mon Sep 17 00:00:00 2001
From: Laurent Montel
Date: Mon, 2 Jan 2006 16:27:55 +0000
Subject: [PATCH] QString::null->QString() .clear() etc
svn path=/trunk/KDE/kdebase/workspace/; revision=493536
---
clients/kwmtheme/kwmthemeclient.cpp | 2 +-
kcmkwin/kwindecoration/kwindecoration.h | 2 +-
kcmkwin/kwindecoration/preview.cpp | 4 ++--
kcmkwin/kwinrules/ruleswidget.cpp | 8 ++++----
killer/killer.cpp | 2 +-
kwinbindings.cpp | 8 ++++----
manage.cpp | 2 +-
notifications.h | 2 +-
workspace.cpp | 2 +-
9 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/clients/kwmtheme/kwmthemeclient.cpp b/clients/kwmtheme/kwmthemeclient.cpp
index 390f9b8490..0cc7824084 100644
--- a/clients/kwmtheme/kwmthemeclient.cpp
+++ b/clients/kwmtheme/kwmthemeclient.cpp
@@ -232,7 +232,7 @@ void MyButton::drawButtonLabel(QPainter *p)
(pixmap()->height() >= height()))) ? 1 : 0;
style().drawItem(p, QRect( offset, offset, width(), height() ),
AlignCenter, colorGroup(),
- true, pixmap(), QString::null);
+ true, pixmap(), QString());
}
}
diff --git a/kcmkwin/kwindecoration/kwindecoration.h b/kcmkwin/kwindecoration/kwindecoration.h
index ec9aa712de..f10f839968 100644
--- a/kcmkwin/kwindecoration/kwindecoration.h
+++ b/kcmkwin/kwindecoration/kwindecoration.h
@@ -98,7 +98,7 @@ class KWinDecorationModule : public KCModule, virtual public KWinDecorationIface
QString decorationLibName( const QString& name );
QString decorationName ( QString& libName );
static QString styleToConfigLib( QString& styleLib );
- void resetPlugin( KConfig* conf, const QString& currentDecoName = QString::null );
+ void resetPlugin( KConfig* conf, const QString& currentDecoName = QString() );
void resetKWin();
void checkSupportedBorderSizes();
static int borderSizeToIndex( BorderSize size, QList< BorderSize > sizes );
diff --git a/kcmkwin/kwindecoration/preview.cpp b/kcmkwin/kwindecoration/preview.cpp
index ec11a2b7b1..b3df211031 100644
--- a/kcmkwin/kwindecoration/preview.cpp
+++ b/kcmkwin/kwindecoration/preview.cpp
@@ -443,8 +443,8 @@ KDecorationPreviewOptions::KDecorationPreviewOptions()
customBorderSize = BordersCount; // invalid
customButtonsChanged = false; // invalid
customButtons = true;
- customTitleButtonsLeft = QString::null; // invalid
- customTitleButtonsRight = QString::null; // invalid
+ customTitleButtonsLeft.clear(); // invalid
+ customTitleButtonsRight.clear(); // invalid
d = new KDecorationOptionsPrivate;
d->defaultKWinSettings();
diff --git a/kcmkwin/kwinrules/ruleswidget.cpp b/kcmkwin/kwinrules/ruleswidget.cpp
index 0fd8aa66e2..17dec959b9 100644
--- a/kcmkwin/kwinrules/ruleswidget.cpp
+++ b/kcmkwin/kwinrules/ruleswidget.cpp
@@ -205,7 +205,7 @@ static const Rules::ForceRule combo_to_force_rule[] =
static QString positionToStr( const QPoint& p )
{
if( p == invalidPoint )
- return QString::null;
+ return QString();
return QString::number( p.x()) + "," + QString::number( p.y());
}
@@ -220,7 +220,7 @@ static QPoint strToPosition( const QString& str )
static QString sizeToStr( const QSize& s )
{
if( !s.isValid())
- return QString::null;
+ return QString();
return QString::number( s.width()) + "," + QString::number( s.height());
}
@@ -236,7 +236,7 @@ static QSize strToSize( const QString& str )
static QString intToStr( const int& s )
{
if( s < 1 || s > 100 )
- return QString::null;
+ return QString();
return QString::number(s);
}
@@ -717,7 +717,7 @@ void RulesDialog::displayHints()
str += "
" + i18n( "Consult the documentation for more details." );
#endif
str += "
";
- KMessageBox::information( this, str, QString::null, "displayhints" );
+ KMessageBox::information( this, str, QString(), "displayhints" );
}
void RulesDialog::accept()
diff --git a/killer/killer.cpp b/killer/killer.cpp
index b464eeafaa..f33249c422 100644
--- a/killer/killer.cpp
+++ b/killer/killer.cpp
@@ -74,7 +74,7 @@ int main( int argc, char* argv[] )
"Do you wish to terminate this application? (All unsaved data in this application will be lost.)" )
.arg( appname ).arg( caption ).arg( pid ).arg( QString( hostname ) );
app.updateUserTimestamp( timestamp );
- if( KMessageBox::warningYesNoWId( id, question, QString::null, i18n("Terminate"), i18n("Keep Running") ) == KMessageBox::Yes )
+ if( KMessageBox::warningYesNoWId( id, question, QString(), i18n("Terminate"), i18n("Keep Running") ) == KMessageBox::Yes )
{
if( hostname != "localhost" )
{
diff --git a/kwinbindings.cpp b/kwinbindings.cpp
index 10caac757f..e30a42ead6 100644
--- a/kwinbindings.cpp
+++ b/kwinbindings.cpp
@@ -1,13 +1,13 @@
#ifndef NOSLOTS
# define DEF2( name, descr, key, fnSlot ) \
- keys->insert( name, i18n(descr), QString::null, key, this, SLOT(fnSlot) )
+ keys->insert( name, i18n(descr), QString(), key, this, SLOT(fnSlot) )
# define DEF( name, key, fnSlot ) \
- keys->insert( name, i18n(name), QString::null, key, this, SLOT(fnSlot) )
+ keys->insert( name, i18n(name), QString(), key, this, SLOT(fnSlot) )
#else
# define DEF2( name, descr, key, fnSlot ) \
- keys->insert( name, i18n(descr), QString::null, key )
+ keys->insert( name, i18n(descr), QString(), key )
# define DEF( name, key, fnSlot ) \
- keys->insert( name, i18n(name), QString::null, key )
+ keys->insert( name, i18n(name), QString(), key )
#endif
#define WIN Qt::META
diff --git a/manage.cpp b/manage.cpp
index 5e6fa187e2..f6aa4d92be 100644
--- a/manage.cpp
+++ b/manage.cpp
@@ -134,7 +134,7 @@ bool Client::manage( Window w, bool isMapped )
setUserNoBorder( true );
}
- setShortcut( rules()->checkShortcut( session ? session->shortcut : QString::null, true ));
+ setShortcut( rules()->checkShortcut( session ? session->shortcut : QString(), true ));
init_minimize = rules()->checkMinimize( init_minimize, !isMapped );
if( rules()->checkNoBorder( false, !isMapped ))
diff --git a/notifications.h b/notifications.h
index e8d3cbee4d..ad892ecd7b 100644
--- a/notifications.h
+++ b/notifications.h
@@ -50,7 +50,7 @@ class Notify
DesktopChange = 100
};
- static bool raise( Event, const QString& message = QString::null, Client* c = NULL );
+ static bool raise( Event, const QString& message = QString(), Client* c = NULL );
static bool makeDemandAttention( Event );
static void sendPendingEvents();
private:
diff --git a/workspace.cpp b/workspace.cpp
index fca5f57c8d..2b3f4a6ecc 100644
--- a/workspace.cpp
+++ b/workspace.cpp
@@ -551,7 +551,7 @@ void Workspace::removeClient( Client* c, allowed_t )
if( client_keys_client == c )
setupWindowShortcutDone( false );
if( !c->shortcut().isNull())
- c->setShortcut( QString::null ); // remove from client_keys
+ c->setShortcut( QString() ); // remove from client_keys
if( c->isDialog())
Notify::raise( Notify::TransDelete );