Replace NULL with nullptr in tabbox folder

Replacing all NULL to nullptr in all the files in tabbox folder
(also substituting some "0" used as nullptr with nullptr)

REVIEW: 115917
icc-effect-5.14.5
Matteo De Carlo 2014-02-24 16:42:43 +01:00
parent c01446583e
commit 8a9cdba6ae
6 changed files with 26 additions and 26 deletions

View File

@ -213,7 +213,7 @@ void ClientModel::createClientList(int desktop, bool partialReset)
}
}
if (index >= stacking.size() - 1) {
c = NULL;
c = nullptr;
} else {
c = stacking[++index].data();
}

View File

@ -57,7 +57,7 @@ public:
MinimizedRole = Qt::UserRole + 6, ///< TabBoxClient is minimized
CloseableRole = Qt::UserRole + 7 ///< TabBoxClient can be closed
};
explicit ClientModel(QObject* parent = 0);
explicit ClientModel(QObject* parent = nullptr);
~ClientModel();
virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
virtual int columnCount(const QModelIndex& parent = QModelIndex()) const;

View File

@ -88,7 +88,7 @@ class DesktopChainManager : public QObject
Q_OBJECT
public:
explicit DesktopChainManager(QObject *parent = 0);
explicit DesktopChainManager(QObject *parent = nullptr);
virtual ~DesktopChainManager();
/**

View File

@ -51,7 +51,7 @@ public:
DesktopNameRole = Qt::UserRole + 1, ///< Desktop name
ClientModelRole = Qt::UserRole + 2 ///< Clients on this desktop
};
explicit DesktopModel(QObject* parent = 0);
explicit DesktopModel(QObject* parent = nullptr);
~DesktopModel();
virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;

View File

@ -249,7 +249,7 @@ QWeakPointer<TabBoxClient> TabBoxHandlerImpl::clientToAddToList(TabBoxClient* cl
if (!client) {
return QWeakPointer<TabBoxClient>();
}
Client* ret = NULL;
Client* ret = nullptr;
Client* current = (static_cast< TabBoxClientImpl* >(client))->client();
bool addClient = checkDesktop(client, desktop)
@ -261,7 +261,7 @@ QWeakPointer<TabBoxClient> TabBoxHandlerImpl::clientToAddToList(TabBoxClient* cl
if (addClient) {
// don't add windows that have modal dialogs
Client* modal = current->findModal();
if (modal == NULL || modal == current)
if (modal == nullptr || modal == current)
ret = current;
else if (!clientList().contains(modal->tabBoxClient()))
ret = modal;
@ -405,7 +405,7 @@ bool TabBoxClientImpl::isFirstInTabBox() const
/*********************************************************
* TabBox
*********************************************************/
TabBox *TabBox::s_self = NULL;
TabBox *TabBox::s_self = nullptr;
TabBox *TabBox::create(QObject *parent)
{
@ -474,7 +474,7 @@ TabBox::TabBox(QObject *parent)
TabBox::~TabBox()
{
QDBusConnection::sessionBus().unregisterObject(QStringLiteral("/TabBox"));
s_self = NULL;
s_self = nullptr;
}
void TabBox::handlerReady()
@ -635,10 +635,10 @@ Client* TabBox::currentClient()
{
if (TabBoxClientImpl* client = static_cast< TabBoxClientImpl* >(m_tabBox->client(m_tabBox->currentIndex()))) {
if (!Workspace::self()->hasClient(client->client()))
return NULL;
return nullptr;
return client->client();
} else
return NULL;
return nullptr;
}
/*!
@ -1202,7 +1202,7 @@ void TabBox::walkThroughDesktops(bool forward)
void TabBox::CDEWalkThroughWindows(bool forward)
{
Client* c = NULL;
Client* c = nullptr;
// this function find the first suitable client for unreasonable focus
// policies - the topmost one, with some exceptions (can't be keepabove/below,
// otherwise it gets stuck on them)
@ -1225,7 +1225,7 @@ void TabBox::CDEWalkThroughWindows(bool forward)
options_traverse_all = group.readEntry("TraverseAll", false);
}
Client* firstClient = 0;
Client* firstClient = nullptr;
do {
nc = forward ? nextClientStatic(nc) : previousClientStatic(nc);
if (!firstClient) {
@ -1234,7 +1234,7 @@ void TabBox::CDEWalkThroughWindows(bool forward)
firstClient = nc;
} else if (nc == firstClient) {
// No candidates found.
nc = 0;
nc = nullptr;
break;
}
} while (nc && nc != c &&
@ -1581,7 +1581,7 @@ bool TabBox::establishTabBoxGrab()
// the active client, which may not have it.
assert(!m_forcedGlobalMouseGrab);
m_forcedGlobalMouseGrab = true;
if (Workspace::self()->activeClient() != NULL)
if (Workspace::self()->activeClient() != nullptr)
Workspace::self()->activeClient()->updateMouseGrab();
return true;
}
@ -1592,7 +1592,7 @@ void TabBox::removeTabBoxGrab()
ungrabXKeyboard();
assert(m_forcedGlobalMouseGrab);
m_forcedGlobalMouseGrab = false;
if (Workspace::self()->activeClient() != NULL)
if (Workspace::self()->activeClient() != nullptr)
Workspace::self()->activeClient()->updateMouseGrab();
}
} // namespace TabBox

View File

@ -113,8 +113,8 @@ TabBoxHandlerPrivate::TabBoxHandlerPrivate(TabBoxHandler *q)
{
this->q = q;
isShown = false;
lastRaisedClient = 0;
lastRaisedClientSucc = 0;
lastRaisedClient = nullptr;
lastRaisedClientSucc = nullptr;
config = TabBoxConfig();
m_clientModel = new ClientModel(q);
m_desktopModel = new DesktopModel(q);
@ -197,7 +197,7 @@ void TabBoxHandlerPrivate::updateHighlightWindows()
break;
}
}
lastRaisedClientSucc = (succIdx < order.count()) ? order.at(succIdx).data() : 0;
lastRaisedClientSucc = (succIdx < order.count()) ? order.at(succIdx).data() : nullptr;
q->raiseClient(lastRaisedClient);
}
}
@ -225,8 +225,8 @@ void TabBoxHandlerPrivate::endHighlightWindows(bool abort)
q->elevateClient(currentClient, w ? w->winId() : 0, false);
if (abort && lastRaisedClient && lastRaisedClientSucc)
q->restack(lastRaisedClient, lastRaisedClientSucc);
lastRaisedClient = 0;
lastRaisedClientSucc = 0;
lastRaisedClient = nullptr;
lastRaisedClientSucc = nullptr;
// highlight windows
xcb_delete_property(connection(), config.isShowTabBox() && w ? w->winId() : rootWindow(), m_highlightWindowsAtom);
}
@ -361,8 +361,8 @@ void TabBoxHandler::setConfig(const TabBoxConfig& config)
void TabBoxHandler::show()
{
d->isShown = true;
d->lastRaisedClient = 0;
d->lastRaisedClientSucc = 0;
d->lastRaisedClient = nullptr;
d->lastRaisedClientSucc = nullptr;
if (d->config.isShowTabBox()) {
d->show();
}
@ -531,7 +531,7 @@ TabBoxClient* TabBoxHandler::client(const QModelIndex& index) const
{
if ((!index.isValid()) ||
(d->config.tabBoxMode() != TabBoxConfig::ClientTabBox))
return NULL;
return nullptr;
TabBoxClient* c = static_cast< TabBoxClient* >(
d->clientModel()->data(index, ClientModel::ClientRole).value<void *>());
return c;
@ -558,9 +558,9 @@ void TabBoxHandler::createModel(bool partialReset)
}
}
if (d->lastRaisedClient && !lastRaised)
d->lastRaisedClient = 0;
d->lastRaisedClient = nullptr;
if (d->lastRaisedClientSucc && !lastRaisedSucc)
d->lastRaisedClientSucc = 0;
d->lastRaisedClientSucc = nullptr;
break;
}
case TabBoxConfig::DesktopTabBox:
@ -637,7 +637,7 @@ void TabBoxHandler::resetEmbedded()
emit embeddedChanged(false);
}
TabBoxHandler* tabBox = 0;
TabBoxHandler* tabBox = nullptr;
TabBoxClient::TabBoxClient()
{