generic: avoid use of legacy QString::null, QChar::null, etc.

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2019-05-15 00:24:16 +00:00
parent e2d987fe3b
commit c5b174730b
27 changed files with 54 additions and 54 deletions

View file

@ -67,7 +67,7 @@ class Akregator::Backend::StorageMK4Impl::StorageMK4ImplPrivate
Akregator::Backend::StorageMK4Impl::StorageMK4Impl() : d(new StorageMK4ImplPrivate)
{
d->q = this;
setArchivePath(QString::null); // set path to default //krazy:exclude=nullstrassign for old broken gcc
setArchivePath(QString()); // set path to default //krazy:exclude=nullstrassign for old broken gcc
}
Akregator::Backend::FeedStorageMK4Impl* Akregator::Backend::StorageMK4Impl::StorageMK4ImplPrivate::createFeedStorage( const QString& url )

View file

@ -155,7 +155,7 @@ void FrameManager::slotChangeFrame(int frameId)
emit signalStarted();
break;
case Frame::Canceled:
emit signalCanceled(QString::null); //krazy:exclude=nullstrassign for old broken gcc
emit signalCanceled(QString()); //krazy:exclude=nullstrassign for old broken gcc
break;
case Frame::Idle:
case Frame::Completed:
@ -171,10 +171,10 @@ void FrameManager::slotChangeFrame(int frameId)
else
{
emit signalCompleted();
emit signalCaptionChanged(QString::null); //krazy:exclude=nullstrassign for old broken gcc
emit signalTitleChanged(QString::null); //krazy:exclude=nullstrassign for old broken gcc
emit signalCaptionChanged(QString()); //krazy:exclude=nullstrassign for old broken gcc
emit signalTitleChanged(QString()); //krazy:exclude=nullstrassign for old broken gcc
emit signalLoadingProgress(100);
emit signalStatusText(QString::null); //krazy:exclude=nullstrassign for old broken gcc
emit signalStatusText(QString()); //krazy:exclude=nullstrassign for old broken gcc
}
emit signalCurrentFrameChanged(oldFrame, frame);

View file

@ -537,7 +537,7 @@ void Akregator::MainWidget::slotFeedAdd()
TreeNode* const lastChild = !group->children().isEmpty() ? group->children().last() : 0;
addFeed(QString::null, lastChild, group, false); //krazy:exclude=nullstrassign for old broken gcc
addFeed(QString(), lastChild, group, false); //krazy:exclude=nullstrassign for old broken gcc
}
void Akregator::MainWidget::addFeed(const QString& url, TreeNode *after, Folder* parent, bool autoExec)

View file

@ -149,7 +149,7 @@ Part::openUrl(const KUrl &u)
//TODO everyone hates dialogs, instead render the text in big fonts on the Map
//TODO should have an empty KUrl until scan is confirmed successful
//TODO probably should set caption to QString::null while map is unusable
//TODO probably should set caption to QString() while map is unusable
#define KMSG(s) KMessageBox::information(widget(), s)

View file

@ -636,8 +636,8 @@ void LancelotPart::showSearchBox(bool value)
void LancelotPart::resetSearch()
{
kDebug();
m_searchText->setText(QString::null);
search(QString::null);
m_searchText->setText(QString());
search(QString());
}
void LancelotPart::listSizeChanged()

View file

@ -149,7 +149,7 @@ void LancelotPartConfig::addItem(const QString & itemData)
if (itemData.isEmpty()) return;
int index = listModels->count() - 1;
listModels->insertItem(index, QString::null);
listModels->insertItem(index, QString());
setItemData(listModels->item(index) , itemData);
listModels->clearSelection();

View file

@ -47,78 +47,78 @@ AvailableModels::AvailableModels()
// Applications model
item->children <<
new StandardActionTreeModel::Item(
i18n("Favorite applications"), QString::null,
i18n("Favorite applications"), QString(),
KIcon("favorites"),
"FavoriteApplications");
item->children <<
new StandardActionTreeModel::Item(
i18n("Applications category..."), QString::null,
i18n("Applications category..."), QString(),
KIcon("plasmaapplet-shelf"),
"Applications");
// Places
item->children <<
new StandardActionTreeModel::Item(
i18n("Places"), QString::null,
i18n("Places"), QString(),
KIcon("folder"),
"Places");
item->children <<
new StandardActionTreeModel::Item(
i18n("Folder..."), QString::null,
i18n("Folder..."), QString(),
KIcon("folder"),
"Folder");
// Devices
item->children <<
new StandardActionTreeModel::Item(
i18n("Removable devices"), QString::null,
i18n("Removable devices"), QString(),
KIcon("media-optical"),
"Devices/Removable");
item->children <<
new StandardActionTreeModel::Item(
i18n("Fixed devices"), QString::null,
i18n("Fixed devices"), QString(),
KIcon("drive-harddisk"),
"Devices/Fixed");
// System applications
item->children <<
new StandardActionTreeModel::Item(
i18n("System tools"), QString::null,
i18n("System tools"), QString(),
KIcon("computer"),
"System");
// Documents
item->children <<
new StandardActionTreeModel::Item(
i18n("New documents"), QString::null,
i18n("New documents"), QString(),
KIcon("document-new"),
"NewDocuments");
item->children <<
new StandardActionTreeModel::Item(
i18n("Open documents"), QString::null,
i18n("Open documents"), QString(),
KIcon("document-edit"),
"OpenDocuments");
item->children <<
new StandardActionTreeModel::Item(
i18n("Recent documents"), QString::null,
i18n("Recent documents"), QString(),
KIcon("document-open-recent"),
"RecentDocuemnts");
// Contacts
item->children <<
new StandardActionTreeModel::Item(
i18n("Online contacts"), QString::null,
i18n("Online contacts"), QString(),
KIcon("kopete"),
"Contacts");
item->children <<
new StandardActionTreeModel::Item(
i18n("Unread messages"), QString::null,
i18n("Unread messages"), QString(),
KIcon("kmail"),
"Messages");
@ -159,7 +159,7 @@ QString AvailableModels::serializedDataForItem(int index)
}
if (data["model"] == "Folder ") {
return QString::null;
return QString();
}
return Serializator::serialize(data);

View file

@ -94,7 +94,7 @@ ContactsKopete::ContactsKopete()
// other
kopeteServiceOwnerChanged(QString::null, QString::null, QString::null);
kopeteServiceOwnerChanged(QString(), QString(), QString());
load();
}

View file

@ -229,7 +229,7 @@ CustomListItem * ActionListViewItemFactory::itemForIndex(int index,
item->setDescription(m_model->title(index));
} else {
item->setTitle(m_model->title(index));
item->setDescription(QString::null);
item->setDescription(QString());
}
break;
@ -244,7 +244,7 @@ CustomListItem * ActionListViewItemFactory::itemForIndex(int index,
item->setTitle(m_model->title(index));
}
item->setDescription(QString::null);
item->setDescription(QString());
break;
case ActionListView::SingleLineDescriptionFirst:
@ -258,12 +258,12 @@ CustomListItem * ActionListViewItemFactory::itemForIndex(int index,
item->setTitle(m_model->title(index));
}
item->setDescription(QString::null);
item->setDescription(QString());
break;
case ActionListView::OnlyName:
item->setTitle(m_model->title(index));
item->setDescription(QString::null);
item->setDescription(QString());
break;
case ActionListView::OnlyDescription:
@ -272,7 +272,7 @@ CustomListItem * ActionListViewItemFactory::itemForIndex(int index,
} else {
item->setTitle(m_model->title(index));
}
item->setDescription(QString::null);
item->setDescription(QString());
break;

View file

@ -220,7 +220,7 @@ void TabBar::addTab(const QString & id, const QIcon & icon, const QString & titl
}
Lancelot::ExtenderButton * button = new ExtenderButton(
icon, title, QString::null, this);
icon, title, QString(), this);
d->tabs[id] = button;
d->tabButtons.append(button);

View file

@ -95,7 +95,7 @@ public:
* @param title tab title
*/
void addTab(const QString & id, const QIcon & icon, const QString & title,
const QString & mimeType = QString::null, const QString & mimeData = QString::null);
const QString & mimeType = QString(), const QString & mimeData = QString());
/**
* Removes the specified tab

View file

@ -111,7 +111,7 @@ private:
QChar next()
{
if (m_index >= m_s.size()) {
return QChar::Null;
return QChar();
}
return m_s.at(m_index);
}

View file

@ -549,7 +549,7 @@ void FloppyData::format(){
setEnabled(false);
// Erase text box
frame->setText( QString::null ); //krazy:exclude=nullstrassign for old broken gcc
frame->setText( QString() ); //krazy:exclude=nullstrassign for old broken gcc
if ( !userDevice )
{

View file

@ -336,7 +336,7 @@ void FloppyAction::processDone(KProcess *p)
{
if (p->exitStatus() == 0)
{
emit status(QString::null,100); //krazy:exclude=nullstrassign for old broken gcc
emit status(QString(),100); //krazy:exclude=nullstrassign for old broken gcc
emit done(this,true);
}
else
@ -472,7 +472,7 @@ void FDFormat::processStdOut(KProcess *, char *b, int l)
if (b[0]=='F')
{
formatTrackCount++;
emit status(QString::null, //krazy:exclude=nullstrassign for old broken gcc
emit status(QString(), //krazy:exclude=nullstrassign for old broken gcc
formatTrackCount * 100 / deviceInfo->tracks);
}
else if (b[0]=='E')
@ -541,7 +541,7 @@ void FDFormat::processStdOut(KProcess *, char *b, int l)
const int p = regexp.cap(1).toInt();
if ((p>=0) && (p<deviceInfo->tracks))
{
emit status(QString::null, //krazy:exclude=nullstrassign for old broken gcc
emit status(QString(), //krazy:exclude=nullstrassign for old broken gcc
p * 100 / deviceInfo->tracks);
}
}
@ -616,7 +616,7 @@ void DDZeroOut::processDone(KProcess *p)
*
* ### TODO: really check if the exit is not on an other error and then abort the formatting
*/
emit status(QString::null,100); //krazy:exclude=nullstrassign for old broken gcc
emit status(QString(),100); //krazy:exclude=nullstrassign for old broken gcc
emit done(this,true);
}

View file

@ -96,7 +96,7 @@ void KompareListViewFrame::slotSetModel( const DiffModel* model )
m_label.setText( model->destinationFile() );
}
} else {
m_label.setText( QString::null ); //krazy:exclude=nullstrassign for old broken gcc
m_label.setText( QString() ); //krazy:exclude=nullstrassign for old broken gcc
}
}

View file

@ -309,7 +309,7 @@ void DiffPage::addOptionsTab()
m_ignoreRegExpCheckBox->setToolTip( i18n( "This option corresponds to the -I diff option." ) );
m_ignoreRegExpCheckBox->setWhatsThis( i18n( "When this checkbox is enabled, an option to diff is given that will make diff ignore lines that match the regular expression." ) );
groupLayout->addWidget( m_ignoreRegExpCheckBox );
m_ignoreRegExpEdit = new KLineEdit( QString::null, page); //krazy:exclude=nullstrassign for old broken gcc
m_ignoreRegExpEdit = new KLineEdit( QString(), page); //krazy:exclude=nullstrassign for old broken gcc
m_ignoreRegExpEdit->setObjectName("regexplineedit" );
m_ignoreRegExpEdit->setToolTip( i18n( "Add the regular expression here that you want to use\nto ignore lines that match it." ) );
groupLayout->addWidget( m_ignoreRegExpEdit );

View file

@ -336,7 +336,7 @@ VncClientThread::VncClientThread(QObject *parent)
m_keepalive.failedProbes = 3;
m_keepalive.set = false;
m_keepalive.failed = false;
m_previousDetails = QString::null;
m_previousDetails = QString();
outputErrorMessageString.clear(); //don't deliver error messages of old instances...
QMutexLocker locker(&mutex);

View file

@ -645,7 +645,7 @@ void KSnapshot::closeEvent( QCloseEvent * e )
saveDialogSize(cg);
KUrl url = filename;
url.setPass(QString::null); //krazy:exclude=nullstrassign for old broken gcc
url.setPass(QString()); //krazy:exclude=nullstrassign for old broken gcc
conf.writePathEntry("filename", url.url());
conf.sync();

View file

@ -122,9 +122,9 @@ void CoreSessionEventProcessor::processIrcEventAuthenticate(IrcEvent *e)
if (net->identityPtr()->sslCert().isNull()) {
#endif
QString construct = net->saslAccount();
construct.append(QChar(QChar::Null));
construct.append(QChar());
construct.append(net->saslAccount());
construct.append(QChar(QChar::Null));
construct.append(QChar());
construct.append(net->saslPassword());
QByteArray saslData = QByteArray(construct.toLatin1().toBase64());
saslData.prepend("AUTHENTICATE ");

View file

@ -323,9 +323,9 @@ void KU_EditGroup::accept()
mGroup.setDisplayName( ledispname->text() );
} else {
mGroup.setCaps( 0 );
mGroup.setSID( SID( QString::null ) ); //krazy:exclude=nullstrassign for old broken gcc
mGroup.setDesc( QString::null ); //krazy:exclude=nullstrassign for old broken gcc
mGroup.setDisplayName( QString::null ); //krazy:exclude=nullstrassign for old broken gcc
mGroup.setSID( SID( QString() ) ); //krazy:exclude=nullstrassign for old broken gcc
mGroup.setDesc( QString() ); //krazy:exclude=nullstrassign for old broken gcc
mGroup.setDisplayName( QString() ); //krazy:exclude=nullstrassign for old broken gcc
mGroup.setType( 0 );
}

View file

@ -670,13 +670,13 @@ void KU_EditUser::mergeUser( const KU_User &user, KU_User &newuser )
( leshell->currentIndex() == 0 && !ismoreshells ) ||
( leshell->currentIndex() == 1 && ismoreshells ) ) {
newuser.setShell( QString::null ); //krazy:exclude=nullstrassign for old broken gcc
newuser.setShell( QString() ); //krazy:exclude=nullstrassign for old broken gcc
} else {
// TODO: Check shell.
newuser.setShell( leshell->currentText() );
}
} else
newuser.setShell( QString::null ); //krazy:exclude=nullstrassign for old broken gcc
newuser.setShell( QString() ); //krazy:exclude=nullstrassign for old broken gcc
newuser.setDisabled( (cbdisabled->checkState() == Qt::PartiallyChecked) ? user.getDisabled() : cbdisabled->isChecked() );

View file

@ -194,7 +194,7 @@ void KU_MainView::useradd()
*/
if ( samba ) rid = SID::uid2rid( uid );
bool ok;
QString name = KInputDialog::getText( QString::null, //krazy:exclude=nullstrassign for old broken gcc
QString name = KInputDialog::getText( QString(), //krazy:exclude=nullstrassign for old broken gcc
i18n("Please type the name of the new user:"),
QString(), &ok );

View file

@ -83,7 +83,7 @@ QString KU_SelectConn::connSelected()
void KU_SelectConn::slotUser3()
{
newconn = KInputDialog::getText( QString::null, //krazy:exclude=nullstrassign for old broken gcc
newconn = KInputDialog::getText( QString(), //krazy:exclude=nullstrassign for old broken gcc
i18n("Please type the name of the new connection:") );
if ( newconn.isEmpty() ) return;
if ( KGlobal::config()->groupList().contains( QLatin1String( "connection-" ) + newconn ) ) {

View file

@ -31,7 +31,7 @@ uint SID::mAlgRidBase = 1000;
SID::SID()
{
mRid = 0; mSid = QString::null; mDom = QString::null; //krazy:exclude=nullstrassign for old broken gcc
mRid = 0; mSid = QString(); mDom = QString(); //krazy:exclude=nullstrassign for old broken gcc
}
SID::SID( const SID &sid )

View file

@ -168,7 +168,7 @@ bool KTCLI::loadFromDir(const QString& path)
{
try
{
tc->init(this, path + "/torrent", path, QString::null);
tc->init(this, path + "/torrent", path, QString());
tc->createFiles();
return true;
}

View file

@ -134,7 +134,7 @@ namespace bt
QString Packet::debugString() const
{
if (!data)
return QString::null;
return QString();
switch (data[4])
{

View file

@ -93,7 +93,7 @@ void ghostscript_interface::setBackgroundColor(const PageNumber& page, const QCo
#endif
if (pageList.value(page) == 0) {
pageInfo *info = new pageInfo(QString::null); //krazy:exclude=nullstrassign for old broken gcc
pageInfo *info = new pageInfo(QString()); //krazy:exclude=nullstrassign for old broken gcc
info->background = background_color;
if (permanent)
info->permanentBackground = background_color;