· 6 years ago · Mar 25, 2019, 01:38 PM
1diff --git a/iris/src/irisnet/appledns/qdnssd.cpp b/iris/src/irisnet/appledns/qdnssd.cpp
2index 9be138e2..c42917e3 100644
3--- a/iris/src/irisnet/appledns/qdnssd.cpp
4+++ b/iris/src/irisnet/appledns/qdnssd.cpp
5@@ -409,7 +409,7 @@ public:
6
7 DNSServiceErrorType err = DNSServiceBrowse(
8 req->_sdref->data(), 0, 0, serviceType.constData(),
9- !domain.isEmpty() ? domain.constData() : NULL,
10+ !domain.isEmpty() ? domain.constData() : nullptr,
11 cb_browseReply, req);
12 if(err != kDNSServiceErr_NoError)
13 {
14@@ -498,7 +498,7 @@ public:
15 DNSServiceErrorType err = DNSServiceRegister(
16 req->_sdref->data(), kDNSServiceFlagsNoAutoRename, 0,
17 serviceName.constData(), serviceType.constData(),
18- domain.constData(), NULL, sport, txtRecord.size(),
19+ domain.constData(), nullptr, sport, txtRecord.size(),
20 txtRecord.data(), cb_regReply, req);
21 if(err != kDNSServiceErr_NoError)
22 {
23@@ -585,7 +585,7 @@ public:
24
25 DNSServiceErrorType err = DNSServiceUpdateRecord(
26 *(req->_sdref->data()),
27- srec ? *(srec->_sdref->data()) : NULL, 0,
28+ srec ? *(srec->_sdref->data()) : nullptr, 0,
29 rec.rdata.size(), rec.rdata.data(), rec.ttl);
30 if(err != kDNSServiceErr_NoError)
31 {
32diff --git a/iris/src/irisnet/noncore/processquit.cpp b/iris/src/irisnet/noncore/processquit.cpp
33index cc6935c8..b58940cb 100644
34--- a/iris/src/irisnet/noncore/processquit.cpp
35+++ b/iris/src/irisnet/noncore/processquit.cpp
36@@ -174,7 +174,7 @@ public:
37 void unixWatchAdd(int sig)
38 {
39 struct sigaction sa;
40- sigaction(sig, NULL, &sa);
41+ sigaction(sig, nullptr, &sa);
42 // if the signal is ignored, don't take it over. this is
43 // recommended by the glibc manual
44 if(sa.sa_handler == SIG_IGN)
45@@ -188,7 +188,7 @@ public:
46 void unixWatchRemove(int sig)
47 {
48 struct sigaction sa;
49- sigaction(sig, NULL, &sa);
50+ sigaction(sig, nullptr, &sa);
51 // ignored means we skipped it earlier, so we should
52 // skip it again
53 if(sa.sa_handler == SIG_IGN)
54diff --git a/iris/src/jdns/src/qjdns/qjdns.cpp b/iris/src/jdns/src/qjdns/qjdns.cpp
55index a6e61d15..ea7ba886 100644
56--- a/iris/src/jdns/src/qjdns/qjdns.cpp
57+++ b/iris/src/jdns/src/qjdns/qjdns.cpp
58@@ -295,7 +295,7 @@ static void my_srand()
59 return;
60
61 // lame attempt at randomizing without srand
62- int count = ::time(NULL) % 128;
63+ int count = ::time(nullptr) % 128;
64 for(int n = 0; n < count; ++n)
65 rand();
66
67diff --git a/iris/src/xmpp/xmpp-im/jingle.cpp b/iris/src/xmpp/xmpp-im/jingle.cpp
68index 6151f6e1..ba718fe8 100644
69--- a/iris/src/xmpp/xmpp-im/jingle.cpp
70+++ b/iris/src/xmpp/xmpp-im/jingle.cpp
71@@ -1137,7 +1137,7 @@ ApplicationManagerPad *Manager::applicationPad(Session *session, const QString &
72 {
73 auto am = d->applicationManagers.value(ns);
74 if (!am) {
75- return NULL;
76+ return nullptr;
77 }
78 return am->pad(session);
79 }
80@@ -1185,7 +1185,7 @@ TransportManagerPad* Manager::transportPad(Session *session, const QString &ns)
81 {
82 auto transportManager = d->transportManagers.value(ns);
83 if (!transportManager) {
84- return NULL;
85+ return nullptr;
86 }
87 return transportManager->pad(session);
88 }
89@@ -1205,7 +1205,7 @@ Session* Manager::incomingSessionInitiate(const Jid &from, const Jingle &jingle,
90 {
91 if (d->maxSessions > 0 && d->sessions.size() == d->maxSessions) {
92 d->lastError = XMPP::Stanza::Error(XMPP::Stanza::Error::Wait, XMPP::Stanza::Error::ResourceConstraint);
93- return NULL;
94+ return nullptr;
95 }
96 auto key = qMakePair(from, jingle.sid());
97 auto s = new Session(this, from);
98@@ -1217,7 +1217,7 @@ Session* Manager::incomingSessionInitiate(const Jid &from, const Jingle &jingle,
99 }
100 d->lastError = s->lastError();
101 delete s;
102- return NULL;
103+ return nullptr;
104 }
105
106 XMPP::Stanza::Error Manager::lastError() const
107diff --git a/iris/src/xmpp/xmpp-im/xmpp_ibb.cpp b/iris/src/xmpp/xmpp-im/xmpp_ibb.cpp
108index cf37f7f2..75288fc9 100644
109--- a/iris/src/xmpp/xmpp-im/xmpp_ibb.cpp
110+++ b/iris/src/xmpp/xmpp-im/xmpp_ibb.cpp
111@@ -452,7 +452,7 @@ void IBBManager::ibb_closeRequest(const Jid &from, const QString &id,
112
113 bool IBBManager::isAcceptableSID(const XMPP::Jid &jid, const QString&sid) const
114 {
115- return findConnection(sid, jid) == NULL;
116+ return findConnection(sid, jid) == nullptr;
117 }
118
119 const char* IBBManager::sidPrefix() const
120diff --git a/iris/src/xmpp/xmpp-im/xmpp_xmlcommon.cpp b/iris/src/xmpp/xmpp-im/xmpp_xmlcommon.cpp
121index 8440ff13..824a0d18 100644
122--- a/iris/src/xmpp/xmpp-im/xmpp_xmlcommon.cpp
123+++ b/iris/src/xmpp/xmpp-im/xmpp_xmlcommon.cpp
124@@ -231,8 +231,8 @@ QString queryNS(const QDomElement &e)
125
126 \param e the element representing stanza
127 \param baseNS the base namespace of the stream
128- \param code if not NULL, will be filled with numeric error code
129- \param str if not NULL, will be filled with human readable error description
130+ \param code if not nullptr, will be filled with numeric error code
131+ \param str if not nullptr, will be filled with human readable error description
132 */
133
134 void getErrorFromElement(const QDomElement &e, const QString &baseNS, int *code, QString *str)
135diff --git a/iris/tools/icetunnel/main.cpp b/iris/tools/icetunnel/main.cpp
136index aff007af..3e55b57f 100644
137--- a/iris/tools/icetunnel/main.cpp
138+++ b/iris/tools/icetunnel/main.cpp
139@@ -388,7 +388,7 @@ private slots:
140 while(1)
141 {
142 QByteArray line(1024, 0);
143- if(fgets(line.data(), line.size(), fp) == NULL)
144+ if(fgets(line.data(), line.size(), fp) == nullptr)
145 return QStringList();
146 if(feof(fp))
147 break;
148@@ -408,7 +408,7 @@ private slots:
149 /*static void wait_for_enter()
150 {
151 QByteArray buf(1024, 0);
152- if(fgets(buf.data(), buf.size(), stdin) == NULL)
153+ if(fgets(buf.data(), buf.size(), stdin) == nullptr)
154 return;
155 }*/
156
157diff --git a/iris/tools/nettool/main.cpp b/iris/tools/nettool/main.cpp
158index 6e03d5e4..57cf68f1 100644
159--- a/iris/tools/nettool/main.cpp
160+++ b/iris/tools/nettool/main.cpp
161@@ -157,7 +157,7 @@ static void print_record(const NameRecord &r)
162 printf("HINFO: [%s] [%s] (ttl=%d)\n", r.cpu().data(), r.os().data(), r.ttl());
163 break;
164 case NameRecord::Null:
165- printf("NULL: %d bytes (ttl=%d)\n", r.rawData().size(), r.ttl());
166+ printf("nullptr: %d bytes (ttl=%d)\n", r.rawData().size(), r.ttl());
167 break;
168 default:
169 printf("(Unknown): type=%d (ttl=%d)\n", r.type(), r.ttl());
170diff --git a/iris/tools/xmpptest/xmpptest.cpp b/iris/tools/xmpptest/xmpptest.cpp
171index 497ab6a3..18404c95 100644
172--- a/iris/tools/xmpptest/xmpptest.cpp
173+++ b/iris/tools/xmpptest/xmpptest.cpp
174@@ -954,7 +954,7 @@ int main(int argc, char **argv)
175 QApplication app(argc, argv);
176
177 // seed the random number generator (needed at least for HttpPoll)
178- srand(time(NULL));
179+ srand(time(nullptr));
180
181 TestDlg *w = new TestDlg(0);
182 td_glob = w;
183diff --git a/qa/guitest/guitestmanager.cpp b/qa/guitest/guitestmanager.cpp
184index 3284dfb1..3d62c3ef 100644
185--- a/qa/guitest/guitestmanager.cpp
186+++ b/qa/guitest/guitestmanager.cpp
187@@ -40,4 +40,4 @@ QStringList GUITestManager::getTestNames() const
188 }
189
190
191-GUITestManager* GUITestManager::instance_ = NULL;
192+GUITestManager* GUITestManager::instance_ = nullptr;
193diff --git a/src/CocoaUtilities/CocoaTrayClick.cpp b/src/CocoaUtilities/CocoaTrayClick.cpp
194index bac103fb..5483c292 100644
195--- a/src/CocoaUtilities/CocoaTrayClick.cpp
196+++ b/src/CocoaUtilities/CocoaTrayClick.cpp
197@@ -48,7 +48,7 @@ CocoaTrayClick::CocoaTrayClick()
198 Class cls = objc_getClass("NSApplication");
199 objc_object *appInst = objc_msgSend((objc_object*)cls, sel_registerName("sharedApplication"));
200
201- if(appInst != NULL) {
202+ if(appInst != nullptr) {
203 objc_object* delegate = objc_msgSend(appInst, sel_registerName("delegate"));
204 Class delClass = (Class)objc_msgSend(delegate, sel_registerName("class"));
205 SEL shouldHandle = sel_registerName("applicationShouldHandleReopen:hasVisibleWindows:");
206@@ -84,4 +84,4 @@ void CocoaTrayClick::emitTrayClicked()
207 emit trayClicked();
208 }
209
210-CocoaTrayClick* CocoaTrayClick::instance_ = NULL;
211+CocoaTrayClick* CocoaTrayClick::instance_ = nullptr;
212diff --git a/src/accountmodifydlg.cpp b/src/accountmodifydlg.cpp
213index 3685c9ad..d50839ae 100644
214--- a/src/accountmodifydlg.cpp
215+++ b/src/accountmodifydlg.cpp
216@@ -44,7 +44,7 @@ AccountModifyDlg::AccountModifyDlg(PsiCon *_psi, QWidget *parent)
217 acc.name = "";
218 setupUi(this);
219 setModal(true);
220- pa = NULL;
221+ pa = nullptr;
222 psi = _psi;
223 init();
224 }
225@@ -670,7 +670,7 @@ void AccountModifyDlg::addBlockClicked()
226 return;
227
228 bool ok;
229- QString input = QInputDialog::getText(NULL, tr("Block contact"), tr("Enter the XMPP Address of the contact to block:"), QLineEdit::Normal, "", &ok);
230+ QString input = QInputDialog::getText(nullptr, tr("Block contact"), tr("Enter the XMPP Address of the contact to block:"), QLineEdit::Normal, "", &ok);
231 Jid jid(input);
232 if (ok && !jid.isEmpty()) {
233 privacyModel.insertItem(0, PrivacyListItem::blockItem(jid.full()));
234diff --git a/src/accountregdlg.cpp b/src/accountregdlg.cpp
235index 838f9aa2..7f32f82a 100644
236--- a/src/accountregdlg.cpp
237+++ b/src/accountregdlg.cpp
238@@ -84,7 +84,7 @@ AccountRegDlg::AccountRegDlg(PsiCon *psi, QWidget *parent) :
239 fields_layout->addWidget(fields_container_);
240 fields_container_->setWidgetResizable(true);
241 fields_layout->addStretch(20);
242- fields_ = NULL;
243+ fields_ = nullptr;
244
245 ui_.le_port->setText(QString::number(port_));
246 ui_.le_host->setFocus();
247@@ -248,7 +248,7 @@ void AccountRegDlg::client_error()
248 if (ui_.sw_register->currentWidget() == ui_.page_fields) {
249 // Start over
250 delete fields_;
251- fields_ = NULL;
252+ fields_ = nullptr;
253 ui_.sw_register->setCurrentWidget(ui_.page_server);
254 }
255 }
256diff --git a/src/activeprofiles_win.cpp b/src/activeprofiles_win.cpp
257index 8958b7e2..83bb7c4a 100644
258--- a/src/activeprofiles_win.cpp
259+++ b/src/activeprofiles_win.cpp
260@@ -247,7 +247,7 @@ bool ActiveProfiles::setThisProfile(const QString &profile)
261 m = CreateMutexA(0, TRUE, (LPCSTR)a.constData());
262 )
263
264- if (m == NULL)
265+ if (m == nullptr)
266 {
267 d->endChanges();
268 return false;
269@@ -294,14 +294,14 @@ bool ActiveProfiles::isActive(const QString &profile) const
270 QByteArray a = d->mutexName(profile).toLocal8Bit();
271 m = OpenMutexA(SYNCHRONIZE, FALSE, (LPCSTR)a.constData());
272 )
273- if (m != NULL) {
274+ if (m != nullptr) {
275 CloseHandle(m);
276 return true;
277 }
278 else {
279 DWORD e = GetLastError();
280
281- // strangely it seems possible for OpenMutex to return NULL and
282+ // strangely it seems possible for OpenMutex to return nullptr and
283 // yet GetLastError returns ERROR_SUCCESS (seen with
284 // Windows 7 + MinGW 64). we'll assume this to mean "not
285 // found"
286diff --git a/src/applicationinfo.cpp b/src/applicationinfo.cpp
287index 98bb89ab..e7cec465 100644
288--- a/src/applicationinfo.cpp
289+++ b/src/applicationinfo.cpp
290@@ -153,10 +153,10 @@ QString ApplicationInfo::resourcesDir()
291 // in the Resources directory.
292 QString resourcePath;
293 CFBundleRef mainBundle = CFBundleGetMainBundle();
294- CFStringRef resourceCFStringRef = CFStringCreateWithCString(NULL,
295+ CFStringRef resourceCFStringRef = CFStringCreateWithCString(nullptr,
296 "application.icns", kCFStringEncodingASCII);
297 CFURLRef resourceURLRef = CFBundleCopyResourceURL(mainBundle,
298- resourceCFStringRef, NULL, NULL);
299+ resourceCFStringRef, nullptr, NULL);
300 if (resourceURLRef) {
301 CFStringRef resourcePathStringRef = CFURLCopyFileSystemPath(
302 resourceURLRef, kCFURLPOSIXPathStyle);
303@@ -217,7 +217,7 @@ QString ApplicationInfo::homeDir(ApplicationInfo::HomedirType type)
304 QString base = ApplicationInfo::isPortable()? QCoreApplication::applicationDirPath() : "";
305 if (base.isEmpty()) {
306 wchar_t path[MAX_PATH];
307- if (SHGetFolderPathW(NULL, CSIDL_APPDATA, NULL, 0, path) == S_OK) {
308+ if (SHGetFolderPathW(nullptr, CSIDL_APPDATA, NULL, 0, path) == S_OK) {
309 configDir_ = QString::fromWCharArray(path) + "\\" + name();
310 } else {
311 configDir_ = QDir::homePath() + "/" + name();
312diff --git a/src/contactlistdragmodel.cpp b/src/contactlistdragmodel.cpp
313index 4c022253..3f4474c9 100644
314--- a/src/contactlistdragmodel.cpp
315+++ b/src/contactlistdragmodel.cpp
316@@ -59,7 +59,7 @@ ContactListModelOperationList::Action ContactListModelOperationList::action() co
317 void ContactListModelOperationList::addOperation(PsiContact* contact, const QString& groupFrom, const QString& groupTo)
318 {
319 if (!contact) {
320- qWarning("ContactListModelOperationList::addOperation(): contact is NULL");
321+ qWarning("ContactListModelOperationList::addOperation(): contact is nullptr");
322 return;
323 }
324
325diff --git a/src/contactlistmodel.cpp b/src/contactlistmodel.cpp
326index 86cf6f86..513c84fc 100644
327--- a/src/contactlistmodel.cpp
328+++ b/src/contactlistmodel.cpp
329@@ -443,7 +443,7 @@ void ContactListModel::Private::updateAccount()
330
331 void ContactListModel::Private::cleanUpAccount(PsiAccount *account)
332 {
333- disconnect(account, 0, this, NULL);
334+ disconnect(account, 0, this, nullptr);
335 ContactListItem *root = static_cast<ContactListItem*>(q->root());
336 ContactListItem *item = root->findAccount(account);
337 if (!item) {
338diff --git a/src/edbflatfile.cpp b/src/edbflatfile.cpp
339index 9796eea5..b228a633 100644
340--- a/src/edbflatfile.cpp
341+++ b/src/edbflatfile.cpp
342@@ -590,7 +590,7 @@ PsiEvent::Ptr EDBFlatFile::File::lineToEvent(const QString &line)
343 break;
344 }
345 if (s.at(1) != '-') {
346- int subflag = QString(s.at(1)).toInt(NULL, 16);
347+ int subflag = QString(s.at(1)).toInt(nullptr, 16);
348 if (subflag & 1) // have subject?
349 max = Subj;
350 else // Skip subject
351diff --git a/src/edbsqlite.cpp b/src/edbsqlite.cpp
352index 1c56fa5b..6f708205 100644
353--- a/src/edbsqlite.cpp
354+++ b/src/edbsqlite.cpp
355@@ -41,8 +41,8 @@ using namespace XMPP;
356 EDBSqLite::EDBSqLite(PsiCon *psi) : EDB(psi),
357 transactionsCounter(0),
358 lastCommitTime(QDateTime::currentDateTime()),
359- commitTimer(NULL),
360- mirror_(NULL)
361+ commitTimer(nullptr),
362+ mirror_(nullptr)
363 {
364 status = NotActive;
365 QString path = ApplicationInfo::historyDir() + "/history.db";
366@@ -67,15 +67,15 @@ EDBSqLite::EDBSqLite(PsiCon *psi) : EDB(psi),
367 "`lifetime` INTEGER"
368 ");");
369 query.exec("CREATE TABLE `contacts` ("
370- "`id` INTEGER NOT NULL PRIMARY KEY ASC, "
371+ "`id` INTEGER NOT nullptr PRIMARY KEY ASC, "
372 "`acc_id` TEXT, "
373 "`type` INTEGER, "
374 "`jid` TEXT, "
375 "`lifetime` INTEGER"
376 ");");
377 query.exec("CREATE TABLE `events` ("
378- "`id` INTEGER NOT NULL PRIMARY KEY ASC, "
379- "`contact_id` INTEGER NOT NULL REFERENCES `contacts`(`id`) ON DELETE CASCADE, "
380+ "`id` INTEGER NOT nullptr PRIMARY KEY ASC, "
381+ "`contact_id` INTEGER NOT nullptr REFERENCES `contacts`(`id`) ON DELETE CASCADE, "
382 "`resource` TEXT, "
383 "`date` TEXT, "
384 "`type` INTEGER, "
385@@ -761,8 +761,8 @@ EDBSqLite::QueryStorage::~QueryStorage()
386 EDBSqLite::PreparedQuery *EDBSqLite::QueryStorage::getPreparedQuery(QueryType type, bool allAccounts, bool allContacts)
387 {
388 QueryProperty queryProp(type, allAccounts, allContacts);
389- EDBSqLite::PreparedQuery *q = queryList.value(queryProp, NULL);
390- if (q != NULL)
391+ EDBSqLite::PreparedQuery *q = queryList.value(queryProp, nullptr);
392+ if (q != nullptr)
393 return q;
394
395 q = new EDBSqLite::PreparedQuery(QSqlDatabase::database("history"));
396@@ -832,7 +832,7 @@ QString EDBSqLite::QueryStorage::getQueryString(QueryType type, bool allAccounts
397 queryStr.append(" AND `jid` = :jid");
398 if (!allAccounts)
399 queryStr.append(" AND `acc_id` = :acc_id");
400- queryStr.append(" AND `m_text` IS NOT NULL");
401+ queryStr.append(" AND `m_text` IS NOT nullptr");
402 queryStr.append(" ORDER BY `date`;");
403 break;
404 case QueryInsertEvent:
405diff --git a/src/globaleventqueue.cpp b/src/globaleventqueue.cpp
406index 1cda58ce..8c46ff89 100644
407--- a/src/globaleventqueue.cpp
408+++ b/src/globaleventqueue.cpp
409@@ -79,4 +79,4 @@ GlobalEventQueue::GlobalEventQueue()
410 : QObject(QCoreApplication::instance())
411 {}
412
413-GlobalEventQueue* GlobalEventQueue::instance_ = NULL;
414+GlobalEventQueue* GlobalEventQueue::instance_ = nullptr;
415diff --git a/src/googleftmanager.cpp b/src/googleftmanager.cpp
416index ebb56621..d835de93 100644
417--- a/src/googleftmanager.cpp
418+++ b/src/googleftmanager.cpp
419@@ -214,7 +214,7 @@ void GoogleFileTransferListener::progressChanged(cricket::FileShareSession* sess
420 void GoogleFileTransferListener::resampleImage(std::string, int, int, talk_base::HttpTransaction* trans)
421 {
422 // From PCP
423- session_->session_->ResampleComplete(NULL, trans, false);
424+ session_->session_->ResampleComplete(nullptr, trans, false);
425 }
426
427 // ----------------------------------------------------------------------------
428@@ -310,7 +310,7 @@ void GoogleFTManager::initialize()
429 buzz::Jid j(jid.ascii()); // FIXME: Ascii is evil
430
431 // Static stuff
432- if (socket_server_ == NULL) {
433+ if (socket_server_ == nullptr) {
434 //talk_base::InitializeSSL();
435 cricket::InitRandom(j.Str().c_str(),j.Str().size());
436 socket_server_ = new talk_base::PhysicalSocketServer();
437@@ -322,7 +322,7 @@ void GoogleFTManager::initialize()
438 }
439
440 listener_ = new GoogleSessionListener(this);
441- session_manager_.reset(new cricket::SessionManager(port_allocator_.get(), NULL));
442+ session_manager_.reset(new cricket::SessionManager(port_allocator_.get(), nullptr));
443 session_manager_->SignalOutgoingMessage.connect(listener_, &GoogleSessionListener::sendStanza);
444 //session_manager_->SignalRequestSignaling.connect(session_manager_, &cricket::SessionManager::OnSignalingReady);
445 session_manager_->SignalRequestSignaling.connect(listener_, &GoogleSessionListener::signalingReady);
446@@ -389,7 +389,7 @@ void GoogleFTManager::receiveStanza(const QString& sstanza)
447 session_manager_->OnIncomingMessage(e);
448 }
449
450-talk_base::PhysicalSocketServer* GoogleFTManager::socket_server_ = NULL;
451-talk_base::Thread *GoogleFTManager::thread_ = NULL;
452-talk_base::NetworkManager* GoogleFTManager::network_manager_ = NULL;
453+talk_base::PhysicalSocketServer* GoogleFTManager::socket_server_ = nullptr;
454+talk_base::Thread *GoogleFTManager::thread_ = nullptr;
455+talk_base::NetworkManager* GoogleFTManager::network_manager_ = nullptr;
456 talk_base::scoped_ptr<cricket::HttpPortAllocator> GoogleFTManager::port_allocator_;
457diff --git a/src/groupchatdlg.cpp b/src/groupchatdlg.cpp
458index 003996d9..d06e279e 100644
459--- a/src/groupchatdlg.cpp
460+++ b/src/groupchatdlg.cpp
461@@ -1819,7 +1819,7 @@ void GCMainDlg::presence(const QString &nick, const Status &s)
462 }
463
464 auto contact = d->usersModel->findEntry(nick);
465- if (contact == NULL) {
466+ if (contact == nullptr) {
467 //contact joining
468 //ui_.log->updateAvatar(jid().withResource(nick), isSelf? ChatViewCommon::LocalParty: ChatViewCommon::Participant);
469
470diff --git a/src/historycontactlistmodel.cpp b/src/historycontactlistmodel.cpp
471index e336df23..41f82adf 100644
472--- a/src/historycontactlistmodel.cpp
473+++ b/src/historycontactlistmodel.cpp
474@@ -28,10 +28,10 @@
475
476 HistoryContactListModel::HistoryContactListModel(QObject *parent)
477 : QAbstractItemModel(parent)
478- , rootItem(NULL)
479- , generalGroup(NULL)
480- , notInList(NULL)
481- , confPrivate(NULL)
482+ , rootItem(nullptr)
483+ , generalGroup(nullptr)
484+ , notInList(nullptr)
485+ , confPrivate(nullptr)
486 , dispPrivateContacts(false)
487 , dispAllContacts(false)
488 {
489@@ -45,10 +45,10 @@ HistoryContactListModel::~HistoryContactListModel()
490 void HistoryContactListModel::clear()
491 {
492 delete rootItem;
493- rootItem = NULL;
494- generalGroup = NULL;
495- notInList = NULL;
496- confPrivate = NULL;
497+ rootItem = nullptr;
498+ generalGroup = nullptr;
499+ notInList = nullptr;
500+ confPrivate = nullptr;
501 }
502
503 void HistoryContactListModel::updateContacts(PsiCon *psi, const QString &id)
504@@ -167,7 +167,7 @@ void HistoryContactListModel::loadContacts(PsiCon *psi, const QString &acc_id)
505 if (c_list.value(cId))
506 continue;
507
508- TreeItem *groupItem = NULL;
509+ TreeItem *groupItem = nullptr;
510 if (contact->groups().count() > 0)
511 {
512 QString g = contact->groups().at(0);
513@@ -274,7 +274,7 @@ QString HistoryContactListModel::makeContactToolTip(PsiCon *psi, const QString &
514 }
515
516 HistoryContactListModel::TreeItem::TreeItem(ItemType type, const QString &text, const QString &id, int pos)
517- : _parent(NULL)
518+ : _parent(nullptr)
519 , _type(type)
520 , _text(text)
521 , _id(id)
522@@ -283,7 +283,7 @@ HistoryContactListModel::TreeItem::TreeItem(ItemType type, const QString &text,
523 }
524
525 HistoryContactListModel::TreeItem::TreeItem(ItemType type, const QString &text, const QString &tooltip, const QString &id, int pos)
526- : _parent(NULL)
527+ : _parent(nullptr)
528 , _type(type)
529 , _text(text)
530 , _tooltip(tooltip)
531diff --git a/src/historydlg.cpp b/src/historydlg.cpp
532index 39ee3fc2..8fa6a2f2 100644
533--- a/src/historydlg.cpp
534+++ b/src/historydlg.cpp
535@@ -562,7 +562,7 @@ void DisplayProxy::displayResult(const EDBResult &r, int dir)
536 d = -1;
537 }
538
539- PsiAccount *acc = NULL;
540+ PsiAccount *acc = nullptr;
541 if ((psi->edb()->features() & EDB::SeparateAccounts) == 0) {
542 acc = psi->contactList()->getAccount(acc_);
543 Q_ASSERT(acc);
544@@ -636,7 +636,7 @@ public:
545
546 HistoryDlg::HistoryDlg(const Jid &jid, PsiAccount *pa)
547 : AdvancedWidget<QDialog>(0, Qt::Window)
548- , lastFocus(NULL)
549+ , lastFocus(nullptr)
550 {
551 ui_.setupUi(this);
552 setAttribute(Qt::WA_DeleteOnClose);
553@@ -863,7 +863,7 @@ void HistoryDlg::selectDefaultContact(const QModelIndex &prefer_parent, int pref
554
555 void HistoryDlg::saveFocus()
556 {
557- lastFocus = ui_.contactList->hasFocus() ? ui_.contactList : NULL;
558+ lastFocus = ui_.contactList->hasFocus() ? ui_.contactList : nullptr;
559 }
560
561 void HistoryDlg::restoreFocus()
562@@ -921,7 +921,7 @@ void HistoryDlg::openSelectedContact()
563 }
564 else
565 {
566- d->pa = NULL;
567+ d->pa = nullptr;
568 d->jid = Jid();
569 QString paId = ui_.accountsBox->itemData(ui_.accountsBox->currentIndex()).toString();
570 if (!paId.isEmpty())
571@@ -1024,9 +1024,9 @@ void HistoryDlg::exportHistory()
572 }
573 QTextStream stream(&f);
574
575- EDB *edb = NULL;
576+ EDB *edb = nullptr;
577 QString us;
578- //PsiAccount *pa = NULL;
579+ //PsiAccount *pa = nullptr;
580 if (d->pa) {
581 edb = d->pa->edb();
582 us = d->pa->nick();
583@@ -1049,7 +1049,7 @@ void HistoryDlg::exportHistory()
584 showProgress(max);
585 }
586 }
587- PsiAccount *acc = NULL;
588+ PsiAccount *acc = nullptr;
589 if ((d->psi->edb()->features() & EDB::SeparateAccounts) == 0) {
590 Q_ASSERT(d->pa);
591 acc = d->pa;
592diff --git a/src/historyimp.cpp b/src/historyimp.cpp
593index c86d0e07..3b650b2c 100644
594--- a/src/historyimp.cpp
595+++ b/src/historyimp.cpp
596@@ -32,15 +32,15 @@
597
598 HistoryImport::HistoryImport(PsiCon *psi) : QObject(),
599 psi_(psi),
600- srcEdb(NULL),
601- dstEdb(NULL),
602- hErase(NULL),
603- hRead(NULL),
604- hWrite(NULL),
605+ srcEdb(nullptr),
606+ dstEdb(nullptr),
607+ hErase(nullptr),
608+ hRead(nullptr),
609+ hWrite(nullptr),
610 active(false),
611 result_(ResultNone),
612 recordsCount(0),
613- dlg(NULL)
614+ dlg(nullptr)
615 {
616 }
617
618@@ -76,23 +76,23 @@ void HistoryImport::clear()
619 }
620 if (hErase) {
621 delete hErase;
622- hErase = NULL;
623+ hErase = nullptr;
624 }
625 if (hRead) {
626 delete hRead;
627- hRead = NULL;
628+ hRead = nullptr;
629 }
630 if (srcEdb) {
631 delete srcEdb;
632- srcEdb = NULL;
633+ srcEdb = nullptr;
634 }
635 if (hWrite) {
636 delete hWrite;
637- hWrite = NULL;
638+ hWrite = nullptr;
639 }
640 if (dlg) {
641 delete dlg;
642- dlg = NULL;
643+ dlg = nullptr;
644 }
645 }
646
647@@ -101,7 +101,7 @@ int HistoryImport::exec()
648 active = true;
649
650 dstEdb = psi_->edb();
651- ((EDBSqLite *)dstEdb)->setMirror(NULL);
652+ ((EDBSqLite *)dstEdb)->setMirror(nullptr);
653 ((EDBSqLite *)dstEdb)->setInsertingMode(EDBSqLite::Import);
654
655 dstEdb->setStorageParam("import_start", "yes");
656@@ -165,13 +165,13 @@ void HistoryImport::readFromFiles()
657 {
658 if (!active)
659 return;
660- if (hWrite != NULL) {
661+ if (hWrite != nullptr) {
662 if (!hWrite->writeSuccess()) {
663 stop(ResultError); // Write error
664 return;
665 }
666 }
667- else if (hErase != NULL && !hErase->writeSuccess()) {
668+ else if (hErase != nullptr && !hErase->writeSuccess()) {
669 stop(ResultError);
670 return;
671 }
672@@ -179,7 +179,7 @@ void HistoryImport::readFromFiles()
673 stop(ResultNormal);
674 return;
675 }
676- if (hRead == NULL) {
677+ if (hRead == nullptr) {
678 hRead = new EDBHandle(srcEdb);
679 connect(hRead, SIGNAL(finished()), this, SLOT(writeToSqlite()));
680 }
681@@ -210,7 +210,7 @@ void HistoryImport::writeToSqlite()
682 QTimer::singleShot(0, this, SLOT(readFromFiles()));
683 return;
684 }
685- if (hWrite == NULL) {
686+ if (hWrite == nullptr) {
687 hWrite = new EDBHandle(dstEdb);
688 connect(hWrite, SIGNAL(finished()), this, SLOT(readFromFiles()));
689 }
690diff --git a/src/jidutil.cpp b/src/jidutil.cpp
691index d26ca829..eb4a7d46 100644
692--- a/src/jidutil.cpp
693+++ b/src/jidutil.cpp
694@@ -158,8 +158,8 @@ QString JIDUtil::decode822(const QString &s)
695 if(s[x] != 'x')
696 continue;
697 ushort val = 0;
698- val += QString(s[x+1]).toInt(NULL,16);
699- val += QString(s[x+2]).toInt(NULL,16);
700+ val += QString(s[x+1]).toInt(nullptr,16);
701+ val += QString(s[x+2]).toInt(nullptr,16);
702 QChar c(val);
703 out += c;
704 }
705diff --git a/src/jinglevoicecaller.cpp b/src/jinglevoicecaller.cpp
706index 64d77c61..41ad5e0a 100644
707--- a/src/jinglevoicecaller.cpp
708+++ b/src/jinglevoicecaller.cpp
709@@ -228,7 +228,7 @@ void JingleVoiceCaller::initialize()
710
711 stun_addr_ = new cricket::SocketAddress("64.233.167.126",19302);
712 network_manager_ = new cricket::NetworkManager();
713- port_allocator_ = new cricket::BasicPortAllocator((cricket::NetworkManager*)(network_manager_), (cricket::SocketAddress*)(stun_addr_), /* relay server */ NULL);
714+ port_allocator_ = new cricket::BasicPortAllocator((cricket::NetworkManager*)(network_manager_), (cricket::SocketAddress*)(stun_addr_), /* relay server */ nullptr);
715 }
716
717 // Session manager
718@@ -295,7 +295,7 @@ void JingleVoiceCaller::accept(const Jid& j)
719 {
720 qDebug("jinglevoicecaller.cpp: Accepting call");
721 cricket::Call* call = calls_[j.full()];
722- if (call != NULL) {
723+ if (call != nullptr) {
724 call->AcceptSession(call->sessions()[0]);
725 phone_client_->SetFocus(call);
726 }
727@@ -305,7 +305,7 @@ void JingleVoiceCaller::reject(const Jid& j)
728 {
729 qDebug("jinglevoicecaller.cpp: Rejecting call");
730 cricket::Call* call = calls_[j.full()];
731- if (call != NULL) {
732+ if (call != nullptr) {
733 call->RejectSession(call->sessions()[0]);
734 calls_.remove(j.full());
735 }
736@@ -315,7 +315,7 @@ void JingleVoiceCaller::terminate(const Jid& j)
737 {
738 qDebug() << "jinglevoicecaller.cpp: Terminating call to " << j.full();
739 cricket::Call* call = calls_[j.full()];
740- if (call != NULL) {
741+ if (call != nullptr) {
742 call->Terminate();
743 calls_.remove(j.full());
744 }
745@@ -382,8 +382,8 @@ void JingleVoiceCaller::receiveStanza(const QString& stanza)
746 }
747 }
748
749-cricket::SocketServer* JingleVoiceCaller::socket_server_ = NULL;
750-cricket::Thread* JingleVoiceCaller::thread_ = NULL;
751-cricket::NetworkManager* JingleVoiceCaller::network_manager_ = NULL;
752-cricket::BasicPortAllocator* JingleVoiceCaller::port_allocator_ = NULL;
753-cricket::SocketAddress* JingleVoiceCaller::stun_addr_ = NULL;
754+cricket::SocketServer* JingleVoiceCaller::socket_server_ = nullptr;
755+cricket::Thread* JingleVoiceCaller::thread_ = nullptr;
756+cricket::NetworkManager* JingleVoiceCaller::network_manager_ = nullptr;
757+cricket::BasicPortAllocator* JingleVoiceCaller::port_allocator_ = nullptr;
758+cricket::SocketAddress* JingleVoiceCaller::stun_addr_ = nullptr;
759diff --git a/src/libpsi/tools/globalshortcut/globalshortcutmanager_haiku.cpp b/src/libpsi/tools/globalshortcut/globalshortcutmanager_haiku.cpp
760index 71f40de5..4f9695fa 100644
761--- a/src/libpsi/tools/globalshortcut/globalshortcutmanager_haiku.cpp
762+++ b/src/libpsi/tools/globalshortcut/globalshortcutmanager_haiku.cpp
763@@ -188,7 +188,7 @@ public:
764 };
765
766
767-HKeyTriggerManager* HKeyTriggerManager::instance_ = NULL;
768+HKeyTriggerManager* HKeyTriggerManager::instance_ = nullptr;
769 class GlobalShortcutManager::KeyTrigger::Impl : public HKeyTrigger
770 {
771 private:
772diff --git a/src/libpsi/tools/globalshortcut/globalshortcutmanager_x11.cpp b/src/libpsi/tools/globalshortcut/globalshortcutmanager_x11.cpp
773index 2437b509..a769ca3f 100644
774--- a/src/libpsi/tools/globalshortcut/globalshortcutmanager_x11.cpp
775+++ b/src/libpsi/tools/globalshortcut/globalshortcutmanager_x11.cpp
776@@ -252,7 +252,7 @@ public:
777 }
778 };
779
780-X11KeyTriggerManager* X11KeyTriggerManager::instance_ = NULL;
781+X11KeyTriggerManager* X11KeyTriggerManager::instance_ = nullptr;
782
783 class GlobalShortcutManager::KeyTrigger::Impl : public X11KeyTrigger
784 {
785diff --git a/src/libpsi/tools/simplecli/simplecli.cpp b/src/libpsi/tools/simplecli/simplecli.cpp
786index e9ac3e9e..76c835a4 100644
787--- a/src/libpsi/tools/simplecli/simplecli.cpp
788+++ b/src/libpsi/tools/simplecli/simplecli.cpp
789@@ -72,7 +72,7 @@ void SimpleCli::defineAlias(const QByteArray& alias, const QByteArray& originalN
790 /**
791 * \brief Parse \a argv into a name,value map.
792 * \param terminalArgs stop parsing when one of these options is found (it will be included in result)
793- * \param safeArgs if not NULL, will be used to pass number of arguments before terminal argument (or argc if there was no terminal argument)
794+ * \param safeArgs if not nullptr, will be used to pass number of arguments before terminal argument (or argc if there was no terminal argument)
795 *
796 * Supported options syntax: --switch; --param=value; --param value; -switch; -param=value; -param value.
797 * Additionally on Windows: /switch; /param:value; /param value.
798diff --git a/src/libpsi/tools/spellchecker/aspellchecker.cpp b/src/libpsi/tools/spellchecker/aspellchecker.cpp
799index f5069dab..9816f2cf 100644
800--- a/src/libpsi/tools/spellchecker/aspellchecker.cpp
801+++ b/src/libpsi/tools/spellchecker/aspellchecker.cpp
802@@ -47,7 +47,7 @@ ASpellChecker::~ASpellChecker()
803 {
804 if(config_) {
805 delete_aspell_config(config_);
806- config_ = NULL;
807+ config_ = nullptr;
808 }
809
810 clearSpellers();
811@@ -73,7 +73,7 @@ QList<QString> ASpellChecker::suggestions(const QString& word)
812 const AspellWordList* list = aspell_speller_suggest(speller, word.toUtf8(), -1);
813 AspellStringEnumeration* elements = aspell_word_list_elements(list);
814 const char *c_word;
815- while ((c_word = aspell_string_enumeration_next(elements)) != NULL) {
816+ while ((c_word = aspell_string_enumeration_next(elements)) != nullptr) {
817 QString suggestion = QString::fromUtf8(c_word);
818 if(suggestion.size() > 2)
819 words.append(suggestion);
820diff --git a/src/libpsi/tools/spellchecker/spellchecker.cpp b/src/libpsi/tools/spellchecker/spellchecker.cpp
821index 58513f6c..c6ece204 100644
822--- a/src/libpsi/tools/spellchecker/spellchecker.cpp
823+++ b/src/libpsi/tools/spellchecker/spellchecker.cpp
824@@ -89,4 +89,4 @@ bool SpellChecker::add(const QString&)
825 return false;
826 }
827
828-SpellChecker* SpellChecker::instance_ = NULL;
829+SpellChecker* SpellChecker::instance_ = nullptr;
830diff --git a/src/libpsi/tools/zip/zip.cpp b/src/libpsi/tools/zip/zip.cpp
831index 256233c8..bbf6bcd0 100644
832--- a/src/libpsi/tools/zip/zip.cpp
833+++ b/src/libpsi/tools/zip/zip.cpp
834@@ -112,7 +112,7 @@ bool UnZip::getList()
835 for(int n = 0; n < (int)gi.number_entry; ++n) {
836 char filename_inzip[256];
837 unz_file_info file_info;
838- int err = unzGetCurrentFileInfo(d->uf, &file_info, filename_inzip, sizeof(filename_inzip), NULL, 0, NULL, 0);
839+ int err = unzGetCurrentFileInfo(d->uf, &file_info, filename_inzip, sizeof(filename_inzip), nullptr, 0, NULL, 0);
840 if(err != UNZ_OK)
841 return false;
842
843@@ -138,7 +138,7 @@ bool UnZip::readFile(const QString &fname, QByteArray *buf, int max)
844
845 char filename_inzip[256];
846 unz_file_info file_info;
847- err = unzGetCurrentFileInfo(d->uf, &file_info, filename_inzip, sizeof(filename_inzip), NULL, 0, NULL, 0);
848+ err = unzGetCurrentFileInfo(d->uf, &file_info, filename_inzip, sizeof(filename_inzip), nullptr, 0, NULL, 0);
849 if(err != UNZ_OK)
850 return false;
851
852diff --git a/src/main.cpp b/src/main.cpp
853index eda4273c..1980d962 100644
854--- a/src/main.cpp
855+++ b/src/main.cpp
856@@ -565,7 +565,7 @@ PSI_EXPORT_FUNC int main(int argc, char *argv[])
857 #endif
858
859 // seed the random number generator
860- srand(time(NULL));
861+ srand(time(nullptr));
862
863 //dtcp_port = 8000;
864
865diff --git a/src/mucconfigdlg.cpp b/src/mucconfigdlg.cpp
866index c475a386..b0a4e92a 100644
867--- a/src/mucconfigdlg.cpp
868+++ b/src/mucconfigdlg.cpp
869@@ -54,7 +54,7 @@ MUCConfigDlg::MUCConfigDlg(MUCManager* manager, QWidget* parent)
870 ui_.pb_close->setDefault(true);
871
872 // General tab
873- data_ = NULL;
874+ data_ = nullptr;
875 connect(manager_, SIGNAL(getConfiguration_success(const XData&)), SLOT(getConfiguration_success(const XData&)));
876 connect(manager_, SIGNAL(getConfiguration_error(int, const QString&)), SLOT(getConfiguration_error(int, const QString&)));
877 connect(manager_, SIGNAL(setConfiguration_success()), SLOT(setConfiguration_success()));
878@@ -125,7 +125,7 @@ void MUCConfigDlg::refreshGeneral()
879 {
880 if (affiliation_ == MUCItem::Owner) {
881 delete data_;
882- data_ = NULL;
883+ data_ = nullptr;
884 ui_.lb_general_message->setText(tr("Requesting room configuration ..."));
885 ui_.sw_general->setCurrentWidget(ui_.pg_general_message);
886 ui_.busy->start();
887diff --git a/src/pgputil.cpp b/src/pgputil.cpp
888index 7909e303..d783d558 100644
889--- a/src/pgputil.cpp
890+++ b/src/pgputil.cpp
891@@ -10,7 +10,7 @@
892
893 PGPUtil* PGPUtil::instance_ = 0;
894
895-PGPUtil::PGPUtil() : qcaEventHandler_(NULL), passphraseDlg_(NULL), cache_no_pgp_(false)
896+PGPUtil::PGPUtil() : qcaEventHandler_(nullptr), passphraseDlg_(NULL), cache_no_pgp_(false)
897 {
898 qcaEventHandler_ = new QCA::EventHandler(this);
899 connect(qcaEventHandler_,SIGNAL(eventReady(int,const QCA::Event&)),SLOT(handleEvent(int,const QCA::Event&)));
900@@ -122,7 +122,7 @@ void PGPUtil::passphraseDone(int result)
901 }
902 }
903 passphraseDlg_->deleteLater();
904- passphraseDlg_ = NULL;
905+ passphraseDlg_ = nullptr;
906 }
907
908 bool PGPUtil::pgpAvailable()
909diff --git a/src/pluginhost.cpp b/src/pluginhost.cpp
910index 3fa5c9a7..61db7415 100644
911--- a/src/pluginhost.cpp
912+++ b/src/pluginhost.cpp
913@@ -819,7 +819,7 @@ void PluginHost::setPluginOption( const QString& option, const QVariant& value)
914 {
915 // TODO(mck)
916
917- //PsiPlugin* plugin=NULL;
918+ //PsiPlugin* plugin=nullptr;
919 //
920 //if (!plugin)
921 // return;
922diff --git a/src/pluginmanager.cpp b/src/pluginmanager.cpp
923index 4eb76658..638f96be 100644
924--- a/src/pluginmanager.cpp
925+++ b/src/pluginmanager.cpp
926@@ -94,7 +94,7 @@ PluginManager* PluginManager::instance()
927 * Default constructor. Locates all plugins, sets watchers on those directories to
928 * locate new ones and loads those enabled in the config.
929 */
930-PluginManager::PluginManager() : QObject(NULL), psi_(nullptr)
931+PluginManager::PluginManager() : QObject(nullptr), psi_(nullptr)
932 {
933 updatePluginsList();
934 foreach (QString path, pluginDirs()) {
935@@ -357,7 +357,7 @@ QStringList PluginManager::availablePlugins() const
936
937 /**
938 * Provides a pointer to a QWidget providing the options dialog for the
939- * named plugin, if it exists, else NULL.
940+ * named plugin, if it exists, else nullptr.
941 * \param plugin Name of the plugin.
942 * \return Pointer to the options widget for the named plugin.
943 */
944diff --git a/src/plugins/deprecated/chess/chessplugin.cpp b/src/plugins/deprecated/chess/chessplugin.cpp
945index 648f998b..5d4d8e26 100644
946--- a/src/plugins/deprecated/chess/chessplugin.cpp
947+++ b/src/plugins/deprecated/chess/chessplugin.cpp
948@@ -63,7 +63,7 @@ Q_EXPORT_PLUGIN(ChessPlugin);
949
950 ChessPlugin::ChessPlugin() : PsiPlugin()
951 {
952- game_ = NULL;
953+ game_ = nullptr;
954 }
955
956 QString ChessPlugin::name() const
957@@ -154,7 +154,7 @@ void ChessPlugin::startGame(const QString& jid, bool meFirst, const PsiAccount*
958 if (meFirst)
959 {
960 GameBoard::GameType type=GameBoard::WHITE;
961- game_ = new GameBoard(type, jid, NULL);
962+ game_ = new GameBoard(type, jid, nullptr);
963 } else {
964 game_ = new GameBoard(1);
965 }
966@@ -168,7 +168,7 @@ void ChessPlugin::startGame(const QString& jid, bool meFirst, const PsiAccount*
967 void ChessPlugin::stopGame()
968 {
969 delete game_;
970- game_=NULL;
971+ game_=nullptr;
972 }
973
974 /*void ChessPlugin::gameOver(TicTacGameBoard::State state)
975diff --git a/src/plugins/deprecated/chess/gameboard.cpp b/src/plugins/deprecated/chess/gameboard.cpp
976index d604cdac..e9288096 100644
977--- a/src/plugins/deprecated/chess/gameboard.cpp
978+++ b/src/plugins/deprecated/chess/gameboard.cpp
979@@ -1242,7 +1242,7 @@ GameBoard::saveImage()
980 {
981 QString fn;
982
983- fn = Q3FileDialog::getSaveFileName(QString::null, "*.png", this, NULL,
984+ fn = Q3FileDialog::getSaveFileName(QString::null, "*.png", this, nullptr,
985 tr("Save image"));
986
987 if (!fn.isEmpty()) {
988@@ -1441,9 +1441,9 @@ Drawer::drawMap(QPainter *p, int x, int y)
989 xpm = &fig[2];
990 break;
991 default:
992- xpm = NULL;
993+ xpm = nullptr;
994 }
995- if (xpm != NULL)
996+ if (xpm != nullptr)
997 p->drawPixmap(x, y, *xpm);
998 }
999 }
1000diff --git a/src/plugins/deprecated/chess/main.cpp b/src/plugins/deprecated/chess/main.cpp
1001index 13972155..586711d1 100644
1002--- a/src/plugins/deprecated/chess/main.cpp
1003+++ b/src/plugins/deprecated/chess/main.cpp
1004@@ -39,7 +39,7 @@ main(int argc, const char *argv[])
1005 mw->setMinimumSize(mw->size());
1006 result = app->exec();
1007 } else
1008- QMessageBox::critical(NULL, QObject::tr("Socket Error"),
1009+ QMessageBox::critical(nullptr, QObject::tr("Socket Error"),
1010 QObject::tr("Cannot create a server socket!"));
1011
1012 delete mw;
1013diff --git a/src/plugins/deprecated/chess/mainwindow.cpp b/src/plugins/deprecated/chess/mainwindow.cpp
1014index 816323a2..3ef523c5 100644
1015--- a/src/plugins/deprecated/chess/mainwindow.cpp
1016+++ b/src/plugins/deprecated/chess/mainwindow.cpp
1017@@ -141,8 +141,8 @@ MainWindow::activated(QWidget *w)
1018 {
1019 GameBoard *brd = (GameBoard *)w;
1020
1021- game->setItemEnabled(id, brd != NULL);
1022- if (brd != NULL)
1023+ game->setItemEnabled(id, brd != nullptr);
1024+ if (brd != nullptr)
1025 showStatus(brd->status());
1026 else
1027 showStatus(ready_txt);
1028@@ -154,7 +154,7 @@ MainWindow::saveImage()
1029 {
1030 GameBoard *brd = (GameBoard *)wrk->activeWindow();
1031
1032- if (brd != NULL)
1033+ if (brd != nullptr)
1034 brd->saveImage();
1035 }
1036
1037diff --git a/src/plugins/deprecated/noughtsandcrosses/noughtsandcrossesplugin.cpp b/src/plugins/deprecated/noughtsandcrosses/noughtsandcrossesplugin.cpp
1038index 7b3ecdde..2596eafb 100644
1039--- a/src/plugins/deprecated/noughtsandcrosses/noughtsandcrossesplugin.cpp
1040+++ b/src/plugins/deprecated/noughtsandcrosses/noughtsandcrossesplugin.cpp
1041@@ -74,7 +74,7 @@ Q_EXPORT_PLUGIN(NoughtsAndCrossesPlugin);
1042
1043 NoughtsAndCrossesPlugin::NoughtsAndCrossesPlugin()
1044 {
1045- game = NULL;
1046+ game = nullptr;
1047 enabled_ = false;
1048 stanzaSender_ = 0;
1049 }
1050@@ -202,7 +202,7 @@ void NoughtsAndCrossesPlugin::startGame(QString jid, int size, bool meFirst, int
1051 void NoughtsAndCrossesPlugin::stopGame()
1052 {
1053 delete game;
1054- game=NULL;
1055+ game=nullptr;
1056 }
1057
1058 void NoughtsAndCrossesPlugin::gameOver(TicTacGameBoard::State state)
1059diff --git a/src/plugins/deprecated/python/pythonplugin.cpp b/src/plugins/deprecated/python/pythonplugin.cpp
1060index e4e1050d..afe91a41 100644
1061--- a/src/plugins/deprecated/python/pythonplugin.cpp
1062+++ b/src/plugins/deprecated/python/pythonplugin.cpp
1063@@ -125,14 +125,14 @@ void PythonPlugin::loadScripts()
1064 QString PythonPlugin::loadScript(const QString& fileName)
1065 {
1066 FILE *file;
1067- if ((file = fopen(qPrintable(fileName),"r")) == NULL )
1068+ if ((file = fopen(qPrintable(fileName),"r")) == nullptr )
1069 return "";
1070 qDebug() << (qPrintable(QString("Found script file %1").arg(fileName)));
1071 PyObject* pyName = PyRun_File(file, qPrintable(fileName), Py_file_input, main_dict_, main_dict_);
1072 qDebug("well, we got this far");
1073 fclose(file);
1074 pyName = PyDict_GetItemString( main_dict_, "name" );
1075- if (pyName == NULL || !PyString_Check(pyName))
1076+ if (pyName == nullptr || !PyString_Check(pyName))
1077 {
1078 qWarning(qPrintable(QString("Tried to load %1 but it didn't return a string for its name").arg(fileName)));
1079 return "";
1080diff --git a/src/plugins/deprecated/yandexnarodplugin/options.cpp b/src/plugins/deprecated/yandexnarodplugin/options.cpp
1081index 7ce4cd7b..04c6fdb2 100644
1082--- a/src/plugins/deprecated/yandexnarodplugin/options.cpp
1083+++ b/src/plugins/deprecated/yandexnarodplugin/options.cpp
1084@@ -193,10 +193,10 @@ QString Options::decodePassword(const QString &pass)
1085 if(n1 + 4 > pass.length()) {
1086 break;
1087 }
1088- x += QString(pass.at(n1)).toInt(NULL,16)*4096;
1089- x += QString(pass.at(n1+1)).toInt(NULL,16)*256;
1090- x += QString(pass.at(n1+2)).toInt(NULL,16)*16;
1091- x += QString(pass.at(n1+3)).toInt(NULL,16);
1092+ x += QString(pass.at(n1)).toInt(nullptr,16)*4096;
1093+ x += QString(pass.at(n1+1)).toInt(nullptr,16)*256;
1094+ x += QString(pass.at(n1+2)).toInt(nullptr,16)*16;
1095+ x += QString(pass.at(n1+3)).toInt(nullptr,16);
1096 QChar c(x ^ passwordKey.at(n2++).unicode());
1097 result += c;
1098 if(n2 >= passwordKey.length()) {
1099diff --git a/src/plugins/deprecated/yandexnarodplugin/yandexnarodsettings.cpp b/src/plugins/deprecated/yandexnarodplugin/yandexnarodsettings.cpp
1100index 41e34f86..8d54bf29 100644
1101--- a/src/plugins/deprecated/yandexnarodplugin/yandexnarodsettings.cpp
1102+++ b/src/plugins/deprecated/yandexnarodplugin/yandexnarodsettings.cpp
1103@@ -22,7 +22,7 @@ yandexnarodSettings::yandexnarodSettings(QWidget *p)
1104 : QWidget(p)
1105 {
1106 ui.setupUi(this);
1107- ui.labelStatus->setText(NULL);
1108+ ui.labelStatus->setText(nullptr);
1109
1110 restoreSettings();
1111
1112diff --git a/src/plugins/dev/battleshipgameplugin/battleshipgameplugin.cpp b/src/plugins/dev/battleshipgameplugin/battleshipgameplugin.cpp
1113index e1fb6976..f0ddbf90 100644
1114--- a/src/plugins/dev/battleshipgameplugin/battleshipgameplugin.cpp
1115+++ b/src/plugins/dev/battleshipgameplugin/battleshipgameplugin.cpp
1116@@ -36,16 +36,16 @@
1117 BattleshipGamePlugin::BattleshipGamePlugin(QObject *parent) :
1118 QObject(parent),
1119 enabled_(false),
1120- psiTab(NULL),
1121- psiIcon(NULL),
1122- psiAccInfo(NULL),
1123- psiContactInfo(NULL),
1124- psiSender(NULL),
1125- psiEvent(NULL),
1126- psiSound(NULL),
1127- psiPopup(NULL)
1128+ psiTab(nullptr),
1129+ psiIcon(nullptr),
1130+ psiAccInfo(nullptr),
1131+ psiContactInfo(nullptr),
1132+ psiSender(nullptr),
1133+ psiEvent(nullptr),
1134+ psiSound(nullptr),
1135+ psiPopup(nullptr)
1136 {
1137- Options::psiOptions = NULL;
1138+ Options::psiOptions = nullptr;
1139 }
1140
1141 QString BattleshipGamePlugin::name() const
1142@@ -335,7 +335,7 @@ QList<QVariantHash> BattleshipGamePlugin::getButtonParam()
1143
1144 QAction* BattleshipGamePlugin::getAction(QObject* /*parent*/, int /*account*/, const QString& /*contact*/)
1145 {
1146- return NULL;
1147+ return nullptr;
1148 }
1149
1150 // --------------------- Activetab accessor ---------------------------
1151@@ -422,12 +422,12 @@ QList<QVariantHash> BattleshipGamePlugin::getContactMenuParam()
1152
1153 QAction* BattleshipGamePlugin::getContactAction(QObject*, int, const QString&)
1154 {
1155- return NULL;
1156+ return nullptr;
1157 }
1158
1159 QAction* BattleshipGamePlugin::getAccountAction(QObject*, int)
1160 {
1161- return NULL;
1162+ return nullptr;
1163 }
1164
1165 // --------------------- Popup accessor ---------------------------
1166diff --git a/src/plugins/dev/battleshipgameplugin/boardmodel.cpp b/src/plugins/dev/battleshipgameplugin/boardmodel.cpp
1167index dc3b510e..50f52f70 100644
1168--- a/src/plugins/dev/battleshipgameplugin/boardmodel.cpp
1169+++ b/src/plugins/dev/battleshipgameplugin/boardmodel.cpp
1170@@ -24,7 +24,7 @@
1171
1172 BoardModel::BoardModel(QObject *parent)
1173 : QAbstractTableModel(parent)
1174- , gameModel_(NULL)
1175+ , gameModel_(nullptr)
1176 {
1177 }
1178
1179diff --git a/src/plugins/dev/battleshipgameplugin/boardview.cpp b/src/plugins/dev/battleshipgameplugin/boardview.cpp
1180index 8be5bfe5..871d3996 100644
1181--- a/src/plugins/dev/battleshipgameplugin/boardview.cpp
1182+++ b/src/plugins/dev/battleshipgameplugin/boardview.cpp
1183@@ -23,7 +23,7 @@
1184
1185 BoardView::BoardView(QWidget *parent)
1186 : QTableView(parent)
1187- , bmodel_(NULL)
1188+ , bmodel_(nullptr)
1189 {
1190 }
1191
1192diff --git a/src/plugins/dev/battleshipgameplugin/gamemodel.cpp b/src/plugins/dev/battleshipgameplugin/gamemodel.cpp
1193index 7465cb07..875f4978 100644
1194--- a/src/plugins/dev/battleshipgameplugin/gamemodel.cpp
1195+++ b/src/plugins/dev/battleshipgameplugin/gamemodel.cpp
1196@@ -610,7 +610,7 @@ GameShip *GameBoard::findShip(int length, const QString &digest)
1197 foreach (GameShip *ship, ships_)
1198 if (ship->length() == length && ship->digest() == digest)
1199 return ship;
1200- return NULL;
1201+ return nullptr;
1202 }
1203
1204 bool GameBoard::isShipPositionLegal(int shipNum)
1205diff --git a/src/plugins/dev/battleshipgameplugin/gamesessions.cpp b/src/plugins/dev/battleshipgameplugin/gamesessions.cpp
1206index 93255bbf..bc67d605 100644
1207--- a/src/plugins/dev/battleshipgameplugin/gamesessions.cpp
1208+++ b/src/plugins/dev/battleshipgameplugin/gamesessions.cpp
1209@@ -39,7 +39,7 @@ GameSessionList::~GameSessionList()
1210 delete vals.takeFirst();
1211 }
1212
1213-GameSessionList *GameSessionList::instance_ = NULL;
1214+GameSessionList *GameSessionList::instance_ = nullptr;
1215
1216 GameSessionList *GameSessionList::instance()
1217 {
1218@@ -53,14 +53,14 @@ void GameSessionList::reset()
1219 if (instance_)
1220 {
1221 delete instance_;
1222- instance_ = NULL;
1223+ instance_ = nullptr;
1224 }
1225 }
1226
1227 GameSession *GameSessionList::createSession(int account, const QString &jid, bool first, const QString &gameId)
1228 {
1229 if (findGame(account, jid, gameId))
1230- return NULL;
1231+ return nullptr;
1232 GameSession *gs = new GameSession(this, account, jid, first, gameId);
1233 list_[generateKey(account, jid, gameId)] = gs;
1234 connect(gs, SIGNAL(sendStanza(int,QString)), this, SIGNAL(sendStanza(int,QString)));
1235@@ -79,7 +79,7 @@ void GameSessionList::removeGame(GameSession *gs)
1236 GameSession *GameSessionList::findGame(int account, const QString &jid, const QString &gameId)
1237 {
1238 QString key = generateKey(account, jid, gameId);
1239- GameSession *gs = list_.value(key, NULL);
1240+ GameSession *gs = list_.value(key, nullptr);
1241 return gs;
1242 }
1243
1244@@ -89,7 +89,7 @@ GameSession *GameSessionList::findGameByStanzaId(int account, const QString &jid
1245 foreach (GameSession *gs, l)
1246 if (gs->account_ == account && gs->jid_ == jid && gs->stanzaId_ == stanzaId)
1247 return gs;
1248- return NULL;
1249+ return nullptr;
1250 }
1251
1252 bool GameSessionList::processIncomingIqStanza(int account, const QDomElement &xml, const QString &accStatus, bool fromPrivate)
1253@@ -106,7 +106,7 @@ bool GameSessionList::processIncomingIqStanza(int account, const QDomElement &xm
1254 if (gameId.isEmpty())
1255 return true;
1256
1257- GameSession *gs = NULL;
1258+ GameSession *gs = nullptr;
1259 const QString tagName = childEl.tagName();
1260 if (tagName == "create")
1261 {
1262@@ -128,7 +128,7 @@ bool GameSessionList::processIncomingIqStanza(int account, const QDomElement &xm
1263 gs = createSession(account, from, first, gameId);
1264 }
1265 }
1266- else if ((gs = findGame(account, from, gameId)) != NULL)
1267+ else if ((gs = findGame(account, from, gameId)) != nullptr)
1268 {
1269 if (tagName == "board")
1270 {
1271@@ -219,7 +219,7 @@ bool GameSessionList::processIncomingIqStanza(int account, const QDomElement &xm
1272 msg.append(QString(" (%1)").arg(errMsg));
1273 doPopup(msg);
1274 gs->endSession();
1275- gs = NULL;
1276+ gs = nullptr;
1277 }
1278 else
1279 gs->status_ = GameSession::StatusError;
1280@@ -294,7 +294,7 @@ QString XML::iqErrorString(const QString &jid, const QString &id)
1281 // -------------- GameSession -------------------
1282
1283 GameSession::GameSession(GameSessionList *gsl, int account, const QString &jid, bool first, const QString &gameId)
1284- : QObject(NULL)
1285+ : QObject(nullptr)
1286 , gsl_(gsl)
1287 , stage_(StageNone)
1288 , status_(StatusNone)
1289@@ -303,8 +303,8 @@ GameSession::GameSession(GameSessionList *gsl, int account, const QString &jid,
1290 , first_(first)
1291 , gameId_(gameId)
1292 , modifTime_(QDateTime::currentDateTime())
1293- , inviteDlg_(NULL)
1294- , boardWid_(NULL)
1295+ , inviteDlg_(nullptr)
1296+ , boardWid_(nullptr)
1297 , myBoardChecked_(false)
1298 , opBoardChecked_(false)
1299 , resign_(false)
1300@@ -459,7 +459,7 @@ void GameSession::rejectInvitation()
1301
1302 void GameSession::invite(const QStringList &resList)
1303 {
1304- QWidget *parent = NULL;
1305+ QWidget *parent = nullptr;
1306 if (!boardWid_.isNull())
1307 parent = boardWid_.data();
1308 InviteDialog *dlg = new InviteDialog(jid_.section('/', 0, 0), resList, parent);
1309diff --git a/src/plugins/dev/battleshipgameplugin/options.cpp b/src/plugins/dev/battleshipgameplugin/options.cpp
1310index 4963579b..8f441837 100644
1311--- a/src/plugins/dev/battleshipgameplugin/options.cpp
1312+++ b/src/plugins/dev/battleshipgameplugin/options.cpp
1313@@ -61,22 +61,22 @@ Options::Options(QObject *parent) :
1314 }
1315 }
1316
1317-OptionAccessingHost *Options::psiOptions = NULL;
1318+OptionAccessingHost *Options::psiOptions = nullptr;
1319
1320-Options *Options::instance_ = NULL;
1321+Options *Options::instance_ = nullptr;
1322
1323 Options *Options::instance()
1324 {
1325- if (instance_ == NULL)
1326+ if (instance_ == nullptr)
1327 Options::instance_ = new Options();
1328 return Options::instance_;
1329 }
1330
1331 void Options::reset()
1332 {
1333- if (instance_ != NULL) {
1334+ if (instance_ != nullptr) {
1335 delete Options::instance_;
1336- Options::instance_ = NULL;
1337+ Options::instance_ = nullptr;
1338 }
1339 }
1340
1341diff --git a/src/plugins/dev/battleshipgameplugin/pluginwindow.cpp b/src/plugins/dev/battleshipgameplugin/pluginwindow.cpp
1342index 80d05b0f..a1f66ee8 100644
1343--- a/src/plugins/dev/battleshipgameplugin/pluginwindow.cpp
1344+++ b/src/plugins/dev/battleshipgameplugin/pluginwindow.cpp
1345@@ -22,7 +22,7 @@
1346
1347 PluginWindow::PluginWindow(const QString &jid, QWidget *parent)
1348 : QMainWindow(parent)
1349- , gm_(NULL)
1350+ , gm_(nullptr)
1351 {
1352 setAttribute(Qt::WA_DeleteOnClose);
1353 ui.setupUi(this);
1354diff --git a/src/plugins/dev/pstoplugin/preferenceswidget.cpp b/src/plugins/dev/pstoplugin/preferenceswidget.cpp
1355index 54b45573..d8b3ce1b 100644
1356--- a/src/plugins/dev/pstoplugin/preferenceswidget.cpp
1357+++ b/src/plugins/dev/pstoplugin/preferenceswidget.cpp
1358@@ -7,7 +7,7 @@ PreferencesWidget::PreferencesWidget(const QColor &username_color,
1359 const QColor &message_color,
1360 QWidget *parent)
1361 : QWidget(parent),
1362- now_changing_button(NULL),
1363+ now_changing_button(nullptr),
1364 color_dialog(this),
1365 curr_username_color(username_color),
1366 curr_post_id_color(post_id_color),
1367@@ -93,9 +93,9 @@ void PreferencesWidget::colorDialogOk() {
1368 }
1369 }
1370
1371- now_changing_button = NULL;
1372+ now_changing_button = nullptr;
1373 }
1374
1375 void PreferencesWidget::colorDialogCancel() {
1376- now_changing_button = NULL;
1377+ now_changing_button = nullptr;
1378 }
1379diff --git a/src/plugins/dev/ripperccplugin/qjsonwrapper.cpp b/src/plugins/dev/ripperccplugin/qjsonwrapper.cpp
1380index 4ede407c..449bb561 100644
1381--- a/src/plugins/dev/ripperccplugin/qjsonwrapper.cpp
1382+++ b/src/plugins/dev/ripperccplugin/qjsonwrapper.cpp
1383@@ -40,7 +40,7 @@ qobject2qvariant( const QObject* object )
1384 {
1385 #if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
1386 QVariantMap map;
1387- if ( object == NULL )
1388+ if ( object == nullptr )
1389 {
1390 return map;
1391 }
1392@@ -93,7 +93,7 @@ parseJson( const QByteArray& jsonData, bool* ok )
1393 #if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
1394 QJsonParseError error;
1395 QJsonDocument doc = QJsonDocument::fromJson( jsonData, &error );
1396- if ( ok != NULL )
1397+ if ( ok != nullptr )
1398 {
1399 *ok = ( error.error == QJsonParseError::NoError );
1400 }
1401@@ -125,7 +125,7 @@ toJson( const QVariant &variant, bool* ok )
1402 }
1403
1404 QJsonDocument doc = QJsonDocument::fromVariant( _variant );
1405- if ( ok != NULL )
1406+ if ( ok != nullptr )
1407 {
1408 *ok = !doc.isNull();
1409 }
1410diff --git a/src/plugins/generic/clientswitcherplugin/clientswitcherplugin.cpp b/src/plugins/generic/clientswitcherplugin/clientswitcherplugin.cpp
1411index ebf64798..53f6c76e 100644
1412--- a/src/plugins/generic/clientswitcherplugin/clientswitcherplugin.cpp
1413+++ b/src/plugins/generic/clientswitcherplugin/clientswitcherplugin.cpp
1414@@ -784,7 +784,7 @@ AccountSettings* ClientSwitcherPlugin::getAccountSetting(const QString &acc_id)
1415 if (as && as->account_id == acc_id)
1416 return as;
1417 }
1418- return NULL;
1419+ return nullptr;
1420 }
1421
1422 /**
1423diff --git a/src/plugins/generic/contentdownloaderplugin/cditemmodel.cpp b/src/plugins/generic/contentdownloaderplugin/cditemmodel.cpp
1424index e9be92c8..3b340c88 100644
1425--- a/src/plugins/generic/contentdownloaderplugin/cditemmodel.cpp
1426+++ b/src/plugins/generic/contentdownloaderplugin/cditemmodel.cpp
1427@@ -183,7 +183,7 @@ void CDItemModel::addRecord(QString group, QString name, QString url, QString ht
1428 QStringList subGroups = group.split("/");
1429
1430 while(!subGroups.isEmpty()) {
1431- ContentItem *newParent = NULL;
1432+ ContentItem *newParent = nullptr;
1433 for(int i = parent->childCount() - 1; i >= 0; i--) {
1434 if(parent->child(i)->name() == subGroups.first()) {
1435 newParent = parent->child(i);
1436@@ -191,7 +191,7 @@ void CDItemModel::addRecord(QString group, QString name, QString url, QString ht
1437 }
1438 }
1439
1440- if(newParent == NULL) {
1441+ if(newParent == nullptr) {
1442 newParent = new ContentItem(subGroups.first(), parent);
1443 parent->appendChild(newParent);
1444 }
1445diff --git a/src/plugins/generic/contentdownloaderplugin/contentdownloader.cpp b/src/plugins/generic/contentdownloaderplugin/contentdownloader.cpp
1446index 44cf6646..df1a4c66 100644
1447--- a/src/plugins/generic/contentdownloaderplugin/contentdownloader.cpp
1448+++ b/src/plugins/generic/contentdownloaderplugin/contentdownloader.cpp
1449@@ -29,7 +29,7 @@ ContentDownloader::ContentDownloader()
1450 : enabled(false)
1451 , psiOptions(nullptr)
1452 , appInfoHost(nullptr)
1453- , form_(NULL)
1454+ , form_(nullptr)
1455 {
1456 }
1457
1458diff --git a/src/plugins/generic/extendedmenuplugin/extendedmenuplugin.cpp b/src/plugins/generic/extendedmenuplugin/extendedmenuplugin.cpp
1459index de136494..f97afac5 100644
1460--- a/src/plugins/generic/extendedmenuplugin/extendedmenuplugin.cpp
1461+++ b/src/plugins/generic/extendedmenuplugin/extendedmenuplugin.cpp
1462@@ -486,7 +486,7 @@ void ExtendedMenuPlugin::showPopup(const QString &text, const QString &title)
1463
1464 void ExtendedMenuPlugin::showDialog(const QString &text, const QString &title)
1465 {
1466- QMessageBox mb(QMessageBox::Information, title, text, QMessageBox::Ok, NULL,
1467+ QMessageBox mb(QMessageBox::Information, title, text, QMessageBox::Ok, nullptr,
1468 Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint);
1469 mb.exec();
1470 }
1471diff --git a/src/plugins/generic/gnupgplugin/gpgprocess.cpp b/src/plugins/generic/gnupgplugin/gpgprocess.cpp
1472index 81bca198..d01e412c 100644
1473--- a/src/plugins/generic/gnupgplugin/gpgprocess.cpp
1474+++ b/src/plugins/generic/gnupgplugin/gpgprocess.cpp
1475@@ -48,7 +48,7 @@ static bool getRegKey(HKEY root, const char *path, QString &value)
1476 DWORD dwLen = 256;
1477 char szValue[256];
1478
1479- if (RegQueryValueExA(hkey, "Install Directory", NULL, NULL, (LPBYTE)szValue, &dwLen) == ERROR_SUCCESS) {
1480+ if (RegQueryValueExA(hkey, "Install Directory", nullptr, NULL, (LPBYTE)szValue, &dwLen) == ERROR_SUCCESS) {
1481 value = QString::fromLocal8Bit(szValue);
1482 res = true;
1483 }
1484diff --git a/src/plugins/generic/gomokugameplugin/boarddelegate.cpp b/src/plugins/generic/gomokugameplugin/boarddelegate.cpp
1485index d8875b7a..1cdc11a8 100644
1486--- a/src/plugins/generic/gomokugameplugin/boarddelegate.cpp
1487+++ b/src/plugins/generic/gomokugameplugin/boarddelegate.cpp
1488@@ -59,8 +59,8 @@ QPixmap *BoardPixmaps::getBoardPixmap(int x, int y, double w, double h)
1489 height = h;
1490 clearPix();
1491 }
1492- QPixmap *scPixmap = scaledPixmap.value(0, NULL);
1493- if (scPixmap == NULL) {
1494+ QPixmap *scPixmap = scaledPixmap.value(0, nullptr);
1495+ if (scPixmap == nullptr) {
1496 // МаÑштабирование картинки под целое количеÑтво единиц ширины и выÑоты
1497 scPixmap = new QPixmap();
1498 w_cnt = boardPixmap->width() / w;
1499@@ -71,8 +71,8 @@ QPixmap *BoardPixmaps::getBoardPixmap(int x, int y, double w, double h)
1500 scaledPixmap[0] = scPixmap;
1501 }
1502 int curr_key = (x % w_cnt) * 100 + (y % h_cnt) + 1;
1503- QPixmap *scPixmap2 = scaledPixmap.value(curr_key, NULL);
1504- if (scPixmap2 == NULL) {
1505+ QPixmap *scPixmap2 = scaledPixmap.value(curr_key, nullptr);
1506+ if (scPixmap2 == nullptr) {
1507 // Вырезаем необходимый куÑок картинки
1508 scPixmap2 = new QPixmap();
1509 int xpixpos = (x % w_cnt) * w;
1510@@ -89,7 +89,7 @@ BoardDelegate::BoardDelegate(BoardModel *model, QObject *parent) :
1511 QItemDelegate(parent),
1512 model_(model),
1513 skin(0),
1514- pixmaps(NULL)
1515+ pixmaps(nullptr)
1516 {
1517 }
1518
1519@@ -98,12 +98,12 @@ void BoardDelegate::setSkin(int skin_num)
1520 if (skin != skin_num) {
1521 skin = skin_num;
1522 if (skin == 0) {
1523- if (pixmaps != NULL) {
1524+ if (pixmaps != nullptr) {
1525 delete pixmaps;
1526- pixmaps = NULL;
1527+ pixmaps = nullptr;
1528 }
1529 } else {
1530- if (pixmaps == NULL) {
1531+ if (pixmaps == nullptr) {
1532 pixmaps = new BoardPixmaps(this);
1533 }
1534 }
1535diff --git a/src/plugins/generic/gomokugameplugin/boardmodel.cpp b/src/plugins/generic/gomokugameplugin/boardmodel.cpp
1536index 7a3281a8..c14aaa94 100644
1537--- a/src/plugins/generic/gomokugameplugin/boardmodel.cpp
1538+++ b/src/plugins/generic/gomokugameplugin/boardmodel.cpp
1539@@ -33,7 +33,7 @@ BoardModel::BoardModel(QObject *parent) :
1540 selectY(-1),
1541 columnCount_(0),
1542 rowCount_(0),
1543- gameModel(NULL)
1544+ gameModel(nullptr)
1545 {
1546 }
1547
1548diff --git a/src/plugins/generic/gomokugameplugin/boardview.cpp b/src/plugins/generic/gomokugameplugin/boardview.cpp
1549index ddf5947c..315d4935 100644
1550--- a/src/plugins/generic/gomokugameplugin/boardview.cpp
1551+++ b/src/plugins/generic/gomokugameplugin/boardview.cpp
1552@@ -30,7 +30,7 @@ using namespace GomokuGame;
1553
1554 BoardView::BoardView(QWidget *parent) :
1555 QTableView(parent),
1556- model_(NULL)
1557+ model_(nullptr)
1558 {
1559 }
1560
1561diff --git a/src/plugins/generic/gomokugameplugin/gameelement.cpp b/src/plugins/generic/gomokugameplugin/gameelement.cpp
1562index aa62d2cb..9e942966 100644
1563--- a/src/plugins/generic/gomokugameplugin/gameelement.cpp
1564+++ b/src/plugins/generic/gomokugameplugin/gameelement.cpp
1565@@ -47,11 +47,11 @@ GameElement::~GameElement()
1566 if (!GameElement::usesCnt) {
1567 if (GameElement::blackstonePixmap) {
1568 delete GameElement::blackstonePixmap;
1569- GameElement::blackstonePixmap = NULL;
1570+ GameElement::blackstonePixmap = nullptr;
1571 }
1572 if (GameElement::whitestonePixmap) {
1573 delete GameElement::whitestonePixmap;
1574- GameElement::whitestonePixmap = NULL;
1575+ GameElement::whitestonePixmap = nullptr;
1576 }
1577 }
1578 }
1579@@ -92,7 +92,7 @@ void GameElement::paint(QPainter *painter, const QRectF &rect) const
1580
1581 int GameElement::usesCnt = 0;
1582
1583-QPixmap *GameElement::blackstonePixmap = NULL;
1584+QPixmap *GameElement::blackstonePixmap = nullptr;
1585
1586 QPixmap *GameElement::getBlackstonePixmap() const
1587 {
1588@@ -102,7 +102,7 @@ QPixmap *GameElement::getBlackstonePixmap() const
1589 return GameElement::blackstonePixmap;
1590 }
1591
1592-QPixmap *GameElement::whitestonePixmap = NULL;
1593+QPixmap *GameElement::whitestonePixmap = nullptr;
1594
1595 QPixmap *GameElement::getWhitestonePixmap() const
1596 {
1597diff --git a/src/plugins/generic/gomokugameplugin/gamemodel.cpp b/src/plugins/generic/gomokugameplugin/gamemodel.cpp
1598index ac3d94dd..46888792 100644
1599--- a/src/plugins/generic/gomokugameplugin/gamemodel.cpp
1600+++ b/src/plugins/generic/gomokugameplugin/gamemodel.cpp
1601@@ -215,7 +215,7 @@ const GameElement *GameModel::getElement(int x, int y) const
1602 {
1603 const int idx = getElementIndex(x, y);
1604 if (idx == -1)
1605- return NULL;
1606+ return nullptr;
1607 return elementsList.at(idx);
1608
1609 }
1610@@ -510,7 +510,7 @@ bool GameModel::checkForDraw()
1611 QString GameModel::toString() const
1612 {
1613 QString res_str = "gomokugameplugin.save.1;\n";
1614- GameElement *lastEl = NULL;
1615+ GameElement *lastEl = nullptr;
1616 if (!elementsList.isEmpty())
1617 lastEl = elementsList.last();
1618 foreach (GameElement *el, elementsList) {
1619diff --git a/src/plugins/generic/gomokugameplugin/gamesessions.cpp b/src/plugins/generic/gomokugameplugin/gamesessions.cpp
1620index ec55f5ea..7036af37 100644
1621--- a/src/plugins/generic/gomokugameplugin/gamesessions.cpp
1622+++ b/src/plugins/generic/gomokugameplugin/gamesessions.cpp
1623@@ -49,7 +49,7 @@ GameSessions::~GameSessions()
1624 }
1625 }
1626
1627-GameSessions *GameSessions::instance_ = NULL;
1628+GameSessions *GameSessions::instance_ = nullptr;
1629
1630 GameSessions *GameSessions::instance()
1631 {
1632@@ -63,7 +63,7 @@ void GameSessions::reset()
1633 {
1634 if (instance_) {
1635 delete instance_;
1636- instance_ = NULL;
1637+ instance_ = nullptr;
1638 }
1639 }
1640
1641@@ -292,7 +292,7 @@ void GameSessions::startGame(const int sess_index)
1642 newId(true);
1643 GameSession *sess = &gameSessions[sess_index];
1644 if (sess->wnd.isNull()) {
1645- PluginWindow *wnd = new PluginWindow(sess->full_jid, NULL);
1646+ PluginWindow *wnd = new PluginWindow(sess->full_jid, nullptr);
1647 connect(wnd, SIGNAL(changeGameSession(QString)), this, SLOT(setSessionStatus(QString)));
1648 connect(wnd, SIGNAL(closeBoard(bool, int, int, int, int)), this, SLOT(closeGameWindow(bool, int, int, int, int)));
1649 connect(wnd, SIGNAL(setElement(int, int)), this, SLOT(sendMove(int, int)));
1650@@ -745,7 +745,7 @@ bool GameSessions::regGameSession(const SessionStatus status, const int account,
1651 session.my_acc = account;
1652 session.full_jid = jid;
1653 session.last_iq_id = id;
1654- session.wnd = NULL;
1655+ session.wnd = nullptr;
1656 session.element = element;
1657 gameSessions.push_back(session);
1658 return true;
1659diff --git a/src/plugins/generic/gomokugameplugin/gomokugameplugin.cpp b/src/plugins/generic/gomokugameplugin/gomokugameplugin.cpp
1660index 7a37ef67..190dcb25 100644
1661--- a/src/plugins/generic/gomokugameplugin/gomokugameplugin.cpp
1662+++ b/src/plugins/generic/gomokugameplugin/gomokugameplugin.cpp
1663@@ -34,16 +34,16 @@
1664 GomokuGamePlugin::GomokuGamePlugin(QObject *parent) :
1665 QObject(parent),
1666 enabled_(false),
1667- psiTab(NULL),
1668- psiIcon(NULL),
1669- psiAccInfo(NULL),
1670- psiContactInfo(NULL),
1671- psiSender(NULL),
1672- psiEvent(NULL),
1673- psiSound(NULL),
1674- psiPopup(NULL)
1675+ psiTab(nullptr),
1676+ psiIcon(nullptr),
1677+ psiAccInfo(nullptr),
1678+ psiContactInfo(nullptr),
1679+ psiSender(nullptr),
1680+ psiEvent(nullptr),
1681+ psiSound(nullptr),
1682+ psiPopup(nullptr)
1683 {
1684- Options::psiOptions = NULL;
1685+ Options::psiOptions = nullptr;
1686 }
1687
1688 QString GomokuGamePlugin::name() const
1689@@ -328,7 +328,7 @@ QList<QVariantHash> GomokuGamePlugin::getButtonParam()
1690
1691 QAction* GomokuGamePlugin::getAction(QObject* /*parent*/, int /*account*/, const QString& /*contact*/)
1692 {
1693- return NULL;
1694+ return nullptr;
1695 }
1696
1697 // --------------------- Activetab accessor ---------------------------
1698@@ -415,12 +415,12 @@ QList<QVariantHash> GomokuGamePlugin::getContactMenuParam()
1699
1700 QAction* GomokuGamePlugin::getContactAction(QObject*, int, const QString&)
1701 {
1702- return NULL;
1703+ return nullptr;
1704 }
1705
1706 QAction* GomokuGamePlugin::getAccountAction(QObject*, int)
1707 {
1708- return NULL;
1709+ return nullptr;
1710 }
1711
1712 // --------------------- Popup accessor ---------------------------
1713diff --git a/src/plugins/generic/gomokugameplugin/options.cpp b/src/plugins/generic/gomokugameplugin/options.cpp
1714index 8deee36c..72375a86 100644
1715--- a/src/plugins/generic/gomokugameplugin/options.cpp
1716+++ b/src/plugins/generic/gomokugameplugin/options.cpp
1717@@ -61,22 +61,22 @@ Options::Options(QObject *parent) :
1718 }
1719 }
1720
1721-OptionAccessingHost *Options::psiOptions = NULL;
1722+OptionAccessingHost *Options::psiOptions = nullptr;
1723
1724-Options *Options::instance_ = NULL;
1725+Options *Options::instance_ = nullptr;
1726
1727 Options *Options::instance()
1728 {
1729- if (instance_ == NULL)
1730+ if (instance_ == nullptr)
1731 Options::instance_ = new Options();
1732 return Options::instance_;
1733 }
1734
1735 void Options::reset()
1736 {
1737- if (instance_ != NULL) {
1738+ if (instance_ != nullptr) {
1739 delete Options::instance_;
1740- Options::instance_ = NULL;
1741+ Options::instance_ = nullptr;
1742 }
1743 }
1744
1745diff --git a/src/plugins/generic/gomokugameplugin/pluginwindow.cpp b/src/plugins/generic/gomokugameplugin/pluginwindow.cpp
1746index 15f8096b..0a3f087a 100644
1747--- a/src/plugins/generic/gomokugameplugin/pluginwindow.cpp
1748+++ b/src/plugins/generic/gomokugameplugin/pluginwindow.cpp
1749@@ -39,7 +39,7 @@ const QString fileFilter = "Gomoku save files (*.gmk)";
1750
1751 HintElementWidget::HintElementWidget(QWidget *parent) :
1752 QFrame(parent),
1753- hintElement(NULL)
1754+ hintElement(nullptr)
1755 {
1756 }
1757
1758@@ -72,8 +72,8 @@ void HintElementWidget::paintEvent(QPaintEvent *event)
1759 PluginWindow::PluginWindow(const QString &full_jid, QWidget *parent) :
1760 QMainWindow(parent),
1761 ui(new Ui::PluginWindow),
1762- bmodel(NULL),
1763- delegate(NULL),
1764+ bmodel(nullptr),
1765+ delegate(nullptr),
1766 gameActive(false)
1767 {
1768 ui->setupUi(this);
1769@@ -95,7 +95,7 @@ void PluginWindow::init(const QString &element)
1770 elemType = GameElement::TypeBlack;
1771 }
1772 // Инициируем модель доÑки
1773- if (bmodel == NULL) {
1774+ if (bmodel == nullptr) {
1775 bmodel = new BoardModel(this);
1776 connect(bmodel, SIGNAL(changeGameStatus(GameModel::GameStatus)), this, SLOT(changeGameStatus(GameModel::GameStatus)));
1777 connect(bmodel, SIGNAL(setupElement(int, int)), this, SLOT(setupElement(int, int)));
1778@@ -107,7 +107,7 @@ void PluginWindow::init(const QString &element)
1779 bmodel->init(new GameModel(elemType, 15, 15)); // GameModel убиваетÑÑ Ð¿Ñ€Ð¸ уничтожении BoardModel
1780 ui->board->setModel(bmodel);
1781 // Создаем делегат
1782- if (delegate == NULL) {
1783+ if (delegate == nullptr) {
1784 delegate = new BoardDelegate(bmodel, ui->board); // ПропиÑан родитель
1785 }
1786 // Инициируем BoardView
1787diff --git a/src/plugins/generic/omemoplugin/src/storage.cpp b/src/plugins/generic/omemoplugin/src/storage.cpp
1788index cdac0c07..dfec8d4e 100644
1789--- a/src/plugins/generic/omemoplugin/src/storage.cpp
1790+++ b/src/plugins/generic/omemoplugin/src/storage.cpp
1791@@ -100,12 +100,12 @@ namespace psiomemo {
1792
1793 QString error;
1794 if (!_db.exec("PRAGMA table_info(simple_store)").next()) {
1795- _db.exec("CREATE TABLE IF NOT EXISTS enabled_buddies (jid TEXT NOT NULL PRIMARY KEY)");
1796- _db.exec("CREATE TABLE IF NOT EXISTS devices (jid TEXT NOT NULL, device_id INTEGER NOT NULL, trust INTEGER NOT NULL, PRIMARY KEY(jid, device_id))");
1797- _db.exec("CREATE TABLE IF NOT EXISTS identity_key_store (jid TEXT NOT NULL, device_id INTEGER NOT NULL, key BLOB NOT NULL, PRIMARY KEY(jid, device_id))");
1798- _db.exec("CREATE TABLE IF NOT EXISTS pre_key_store (id INTEGER NOT NULL PRIMARY KEY, pre_key BLOB NOT NULL)");
1799- _db.exec("CREATE TABLE IF NOT EXISTS session_store (jid TEXT NOT NULL, device_id INTEGER NOT NULL, session BLOB NOT NULL, PRIMARY KEY(jid, device_id))");
1800- _db.exec("CREATE TABLE IF NOT EXISTS simple_store (key TEXT NOT NULL PRIMARY KEY, value BLOB NOT NULL)");
1801+ _db.exec("CREATE TABLE IF NOT EXISTS enabled_buddies (jid TEXT NOT nullptr PRIMARY KEY)");
1802+ _db.exec("CREATE TABLE IF NOT EXISTS devices (jid TEXT NOT nullptr, device_id INTEGER NOT NULL, trust INTEGER NOT NULL, PRIMARY KEY(jid, device_id))");
1803+ _db.exec("CREATE TABLE IF NOT EXISTS identity_key_store (jid TEXT NOT nullptr, device_id INTEGER NOT NULL, key BLOB NOT NULL, PRIMARY KEY(jid, device_id))");
1804+ _db.exec("CREATE TABLE IF NOT EXISTS pre_key_store (id INTEGER NOT nullptr PRIMARY KEY, pre_key BLOB NOT NULL)");
1805+ _db.exec("CREATE TABLE IF NOT EXISTS session_store (jid TEXT NOT nullptr, device_id INTEGER NOT NULL, session BLOB NOT NULL, PRIMARY KEY(jid, device_id))");
1806+ _db.exec("CREATE TABLE IF NOT EXISTS simple_store (key TEXT NOT nullptr PRIMARY KEY, value BLOB NOT NULL)");
1807
1808 storeValue("db_ver", 2);
1809
1810@@ -181,7 +181,7 @@ namespace psiomemo {
1811
1812 void Storage::migrateDatabase() {
1813 QSqlDatabase _db = db();
1814- _db.exec("CREATE TABLE IF NOT EXISTS enabled_buddies (jid TEXT NOT NULL PRIMARY KEY)");
1815+ _db.exec("CREATE TABLE IF NOT EXISTS enabled_buddies (jid TEXT NOT nullptr PRIMARY KEY)");
1816 _db.exec("DROP TABLE disabled_buddies");
1817 storeValue("db_ver", 2);
1818 }
1819diff --git a/src/plugins/generic/otrplugin/src/otrinternal.cpp b/src/plugins/generic/otrplugin/src/otrinternal.cpp
1820index 4ce32908..f82bb936 100644
1821--- a/src/plugins/generic/otrplugin/src/otrinternal.cpp
1822+++ b/src/plugins/generic/otrplugin/src/otrinternal.cpp
1823@@ -80,7 +80,7 @@ OtrInternal::OtrInternal(psiotr::OtrCallback* callback,
1824 m_uiOps.still_secure = (*OtrInternal::cb_still_secure);
1825
1826 #if (OTRL_VERSION_MAJOR > 3 || (OTRL_VERSION_MAJOR == 3 && OTRL_VERSION_MINOR >= 2))
1827- m_uiOps.max_message_size = NULL;
1828+ m_uiOps.max_message_size = nullptr;
1829 m_uiOps.account_name = (*OtrInternal::cb_account_name);
1830 m_uiOps.account_name_free = (*OtrInternal::cb_account_name_free);
1831 #endif
1832@@ -102,7 +102,7 @@ OtrInternal::OtrInternal(psiotr::OtrCallback* callback,
1833 otrl_privkey_read(m_userstate, QFile::encodeName(m_keysFile).constData());
1834 otrl_privkey_read_fingerprints(m_userstate,
1835 QFile::encodeName(m_fingerprintFile).constData(),
1836- NULL, NULL);
1837+ nullptr, NULL);
1838 #if (OTRL_VERSION_MAJOR >= 4)
1839 otrl_instag_read(m_userstate, QFile::encodeName(m_instagsFile).constData());
1840 #endif
1841@@ -120,7 +120,7 @@ OtrInternal::~OtrInternal()
1842 QString OtrInternal::encryptMessage(const QString& account, const QString& contact,
1843 const QString& message)
1844 {
1845- char* encMessage = NULL;
1846+ char* encMessage = nullptr;
1847 gcry_error_t err;
1848
1849 err = otrl_message_sending(m_userstate, &m_uiOps, this,
1850@@ -130,12 +130,12 @@ QString OtrInternal::encryptMessage(const QString& account, const QString& conta
1851 OTRL_INSTAG_BEST,
1852 #endif
1853 message.toUtf8().constData(),
1854- NULL, &encMessage,
1855+ nullptr, &encMessage,
1856 #if (OTRL_VERSION_MAJOR >= 4)
1857 OTRL_FRAGMENT_SEND_SKIP,
1858- NULL,
1859+ nullptr,
1860 #endif
1861- NULL, NULL);
1862+ nullptr, NULL);
1863 if (err)
1864 {
1865 QString err_message = QObject::tr("Encrypting message to %1 "
1866@@ -172,9 +172,9 @@ psiotr::OtrMessageType OtrInternal::decryptMessage(const QString& account,
1867 const char* userName = userArray.constData();
1868
1869 int ignoreMessage = 0;
1870- char* newMessage = NULL;
1871- OtrlTLV* tlvs = NULL;
1872- OtrlTLV* tlv = NULL;
1873+ char* newMessage = nullptr;
1874+ OtrlTLV* tlvs = nullptr;
1875+ OtrlTLV* tlv = nullptr;
1876
1877 ignoreMessage = otrl_message_receiving(m_userstate, &m_uiOps, this,
1878 accountName,
1879@@ -182,11 +182,11 @@ psiotr::OtrMessageType OtrInternal::decryptMessage(const QString& account,
1880 userName,
1881 cryptedMessage.toUtf8().constData(),
1882 &newMessage,
1883- &tlvs, NULL,
1884+ &tlvs, nullptr,
1885 #if (OTRL_VERSION_MAJOR >= 4)
1886- NULL,
1887+ nullptr,
1888 #endif
1889- NULL);
1890+ nullptr);
1891 tlv = otrl_tlv_find(tlvs, OTRL_TLV_DISCONNECTED);
1892 if (tlv) {
1893 m_callback->stateChange(accountName, userName,
1894@@ -204,7 +204,7 @@ psiotr::OtrMessageType OtrInternal::decryptMessage(const QString& account,
1895 // Check for SMP data (required only with libotr < 4.0.0)
1896 ConnContext* context = otrl_context_find(m_userstate, userName, accountName,
1897 OTR_PROTOCOL_STRING,
1898- false, NULL, NULL, NULL);
1899+ false, nullptr, NULL, NULL);
1900 if (context) {
1901 NextExpectedSMP nextMsg = context->smstate->nextExpected;
1902
1903@@ -324,7 +324,7 @@ QList<psiotr::Fingerprint> OtrInternal::getFingerprints()
1904 ConnContext* context;
1905 ::Fingerprint* fingerprint;
1906
1907- for (context = m_userstate->context_root; context != NULL;
1908+ for (context = m_userstate->context_root; context != nullptr;
1909 context = context->next)
1910 {
1911 fingerprint = context->fingerprint_root.next;
1912@@ -354,12 +354,12 @@ void OtrInternal::verifyFingerprint(const psiotr::Fingerprint& fingerprint,
1913 #if (OTRL_VERSION_MAJOR >= 4)
1914 OTRL_INSTAG_BEST,
1915 #endif
1916- false, NULL, NULL, NULL);
1917+ false, nullptr, NULL, NULL);
1918 if (context)
1919 {
1920 ::Fingerprint* fp = otrl_context_find_fingerprint(context,
1921 fingerprint.fingerprint,
1922- 0, NULL);
1923+ 0, nullptr);
1924 if (fp)
1925 {
1926 otrl_context_set_trust(fp, verified? "verified" : "");
1927@@ -386,12 +386,12 @@ void OtrInternal::deleteFingerprint(const psiotr::Fingerprint& fingerprint)
1928 #if (OTRL_VERSION_MAJOR >= 4)
1929 OTRL_INSTAG_BEST,
1930 #endif
1931- false, NULL, NULL, NULL);
1932+ false, nullptr, NULL, NULL);
1933 if (context)
1934 {
1935 ::Fingerprint* fp = otrl_context_find_fingerprint(context,
1936 fingerprint.fingerprint,
1937- 0, NULL);
1938+ 0, nullptr);
1939 if (fp)
1940 {
1941 if (context->active_fingerprint == fp)
1942@@ -411,7 +411,7 @@ QHash<QString, QString> OtrInternal::getPrivateKeys()
1943 QHash<QString, QString> privKeyList;
1944 OtrlPrivKey* privKey;
1945
1946- for (privKey = m_userstate->privkey_root; privKey != NULL;
1947+ for (privKey = m_userstate->privkey_root; privKey != nullptr;
1948 privKey = privKey->next)
1949 {
1950 char fingerprintBuf[OTRL_PRIVKEY_FPRINT_HUMAN_LEN];
1951@@ -474,7 +474,7 @@ void OtrInternal::endSession(const QString& account, const QString& contact)
1952 #if (OTRL_VERSION_MAJOR >= 4)
1953 OTRL_INSTAG_BEST,
1954 #endif
1955- false, NULL, NULL, NULL);
1956+ false, nullptr, NULL, NULL);
1957 if (context && (context->msgstate != OTRL_MSGSTATE_PLAINTEXT))
1958 {
1959 m_callback->stateChange(account, contact, psiotr::OTR_STATECHANGE_CLOSE);
1960@@ -499,7 +499,7 @@ void OtrInternal::expireSession(const QString& account, const QString& contact)
1961 #if (OTRL_VERSION_MAJOR >= 4)
1962 OTRL_INSTAG_BEST,
1963 #endif
1964- false, NULL, NULL, NULL);
1965+ false, nullptr, NULL, NULL);
1966 if (context && (context->msgstate == OTRL_MSGSTATE_ENCRYPTED))
1967 {
1968 otrl_context_force_finished(context);
1969@@ -520,7 +520,7 @@ void OtrInternal::startSMP(const QString& account, const QString& contact,
1970 #if (OTRL_VERSION_MAJOR >= 4)
1971 OTRL_INSTAG_BEST,
1972 #endif
1973- false, NULL, NULL, NULL);
1974+ false, nullptr, NULL, NULL);
1975 if (context)
1976 {
1977 QByteArray secretArray = secret.toUtf8();
1978@@ -553,7 +553,7 @@ void OtrInternal::continueSMP(const QString& account, const QString& contact,
1979 #if (OTRL_VERSION_MAJOR >= 4)
1980 OTRL_INSTAG_BEST,
1981 #endif
1982- false, NULL, NULL, NULL);
1983+ false, nullptr, NULL, NULL);
1984 if (context)
1985 {
1986 QByteArray secretArray = secret.toUtf8();
1987@@ -575,7 +575,7 @@ void OtrInternal::abortSMP(const QString& account, const QString& contact)
1988 #if (OTRL_VERSION_MAJOR >= 4)
1989 OTRL_INSTAG_BEST,
1990 #endif
1991- false, NULL, NULL, NULL);
1992+ false, nullptr, NULL, NULL);
1993 if (context)
1994 {
1995 abortSMP(context);
1996@@ -599,7 +599,7 @@ psiotr::OtrMessageState OtrInternal::getMessageState(const QString& account,
1997 #if (OTRL_VERSION_MAJOR >= 4)
1998 OTRL_INSTAG_BEST,
1999 #endif
2000- false, NULL, NULL, NULL);
2001+ false, nullptr, NULL, NULL);
2002 if (context)
2003 {
2004 if (context->msgstate == OTRL_MSGSTATE_PLAINTEXT)
2005@@ -653,7 +653,7 @@ QString OtrInternal::getSessionId(const QString& account,
2006 #if (OTRL_VERSION_MAJOR >= 4)
2007 OTRL_INSTAG_BEST,
2008 #endif
2009- false, NULL, NULL, NULL);
2010+ false, nullptr, NULL, NULL);
2011 if (context && (context->sessionid_len > 0))
2012 {
2013 QString firstHalf;
2014@@ -701,7 +701,7 @@ psiotr::Fingerprint OtrInternal::getActiveFingerprint(const QString& account,
2015 #if (OTRL_VERSION_MAJOR >= 4)
2016 OTRL_INSTAG_BEST,
2017 #endif
2018- false, NULL, NULL, NULL);
2019+ false, nullptr, NULL, NULL);
2020
2021 if (context && context->active_fingerprint)
2022 {
2023@@ -726,7 +726,7 @@ bool OtrInternal::isVerified(const QString& account,
2024 #if (OTRL_VERSION_MAJOR >= 4)
2025 OTRL_INSTAG_BEST,
2026 #endif
2027- false, NULL, NULL, NULL);
2028+ false, nullptr, NULL, NULL);
2029
2030 return isVerified(context);
2031 }
2032@@ -756,7 +756,7 @@ bool OtrInternal::smpSucceeded(const QString& account,
2033 #if (OTRL_VERSION_MAJOR >= 4)
2034 OTRL_INSTAG_BEST,
2035 #endif
2036- false, NULL, NULL, NULL);
2037+ false, nullptr, NULL, NULL);
2038
2039 if (context)
2040 {
2041diff --git a/src/plugins/generic/otrplugin/src/otrmessaging.cpp b/src/plugins/generic/otrplugin/src/otrmessaging.cpp
2042index c46f62af..396c6a62 100644
2043--- a/src/plugins/generic/otrplugin/src/otrmessaging.cpp
2044+++ b/src/plugins/generic/otrplugin/src/otrmessaging.cpp
2045@@ -32,7 +32,7 @@ namespace psiotr
2046 {
2047
2048 Fingerprint::Fingerprint()
2049- : fingerprint(NULL)
2050+ : fingerprint(nullptr)
2051 {
2052
2053 }
2054diff --git a/src/plugins/generic/otrplugin/src/psiotrclosure.cpp b/src/plugins/generic/otrplugin/src/psiotrclosure.cpp
2055index 354cc109..e29b8548 100644
2056--- a/src/plugins/generic/otrplugin/src/psiotrclosure.cpp
2057+++ b/src/plugins/generic/otrplugin/src/psiotrclosure.cpp
2058@@ -143,8 +143,8 @@ AuthenticationDialog::AuthenticationDialog(OtrMessaging* otrc,
2059 ssLayout->addSpacing(20);
2060 m_methodWidget[METHOD_SHARED_SECRET]->setLayout(ssLayout);
2061
2062- m_methodWidget[METHOD_FINGERPRINT] = NULL;
2063- QLabel* authenticatedLabel = NULL;
2064+ m_methodWidget[METHOD_FINGERPRINT] = nullptr;
2065+ QLabel* authenticatedLabel = nullptr;
2066 if (m_isSender)
2067 {
2068 if (m_otr->isVerified(m_account, m_contact))
2069@@ -690,7 +690,7 @@ QAction* PsiOtrClosure::getChatDlgMenu(QObject* parent)
2070 connect(m_endSessionAction, SIGNAL(triggered(bool)),
2071 this, SLOT(endSession(bool)));
2072
2073- m_chatDlgMenu->insertSeparator(NULL);
2074+ m_chatDlgMenu->insertSeparator(nullptr);
2075
2076 m_authenticateAction = m_chatDlgMenu->addAction(tr("&Authenticate contact"));
2077 connect(m_authenticateAction, SIGNAL(triggered(bool)),
2078diff --git a/src/plugins/generic/otrplugin/src/psiotrplugin.cpp b/src/plugins/generic/otrplugin/src/psiotrplugin.cpp
2079index e3d1c793..b116bf18 100644
2080--- a/src/plugins/generic/otrplugin/src/psiotrplugin.cpp
2081+++ b/src/plugins/generic/otrplugin/src/psiotrplugin.cpp
2082@@ -105,16 +105,16 @@ QString htmlToPlain(const QString& html)
2083
2084 PsiOtrPlugin::PsiOtrPlugin()
2085 : m_enabled(false),
2086- m_otrConnection(NULL),
2087+ m_otrConnection(nullptr),
2088 m_onlineUsers(),
2089- m_optionHost(NULL),
2090- m_senderHost(NULL),
2091- m_applicationInfo(NULL),
2092- m_accountHost(NULL),
2093- m_accountInfo(NULL),
2094- m_contactInfo(NULL),
2095- m_iconHost(NULL),
2096- m_psiEvent(NULL),
2097+ m_optionHost(nullptr),
2098+ m_senderHost(nullptr),
2099+ m_applicationInfo(nullptr),
2100+ m_accountHost(nullptr),
2101+ m_accountInfo(nullptr),
2102+ m_contactInfo(nullptr),
2103+ m_iconHost(nullptr),
2104+ m_psiEvent(nullptr),
2105 m_messageBoxList()
2106 {
2107 }
2108@@ -686,7 +686,7 @@ void PsiOtrPlugin::notifyUser(const QString& account, const QString& contact,
2109 }
2110
2111 QMessageBox *messageBox = new QMessageBox(messageBoxIcon, tr("Psi OTR"), message,
2112- QMessageBox::Ok, NULL,
2113+ QMessageBox::Ok, nullptr,
2114 Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint);
2115 m_messageBoxList.enqueue(messageBox);
2116
2117diff --git a/src/plugins/generic/screenshotplugin/qxt/gui/qxtwindowsystem_win.cpp b/src/plugins/generic/screenshotplugin/qxt/gui/qxtwindowsystem_win.cpp
2118index 21882a8d..371ad085 100644
2119--- a/src/plugins/generic/screenshotplugin/qxt/gui/qxtwindowsystem_win.cpp
2120+++ b/src/plugins/generic/screenshotplugin/qxt/gui/qxtwindowsystem_win.cpp
2121@@ -63,12 +63,12 @@ WId QxtWindowSystem::findWindow(const QString& title)
2122 {
2123 #if QT_VERSION < QT_VERSION_CHECK(5,0,0)
2124 QT_WA({
2125- return (WId)::FindWindow(NULL, (TCHAR*)title.utf16());
2126+ return (WId)::FindWindow(nullptr, (TCHAR*)title.utf16());
2127 }, {
2128- return (WId)::FindWindowA(NULL, title.toLocal8Bit());
2129+ return (WId)::FindWindowA(nullptr, title.toLocal8Bit());
2130 });
2131 #else
2132- return (WId)::FindWindow(NULL, (TCHAR*)title.utf16());
2133+ return (WId)::FindWindow(nullptr, (TCHAR*)title.utf16());
2134 #endif
2135 }
2136
2137diff --git a/src/plugins/generic/screenshotplugin/qxt/gui/x11info.cpp b/src/plugins/generic/screenshotplugin/qxt/gui/x11info.cpp
2138index 5861fde2..1d8c6cb3 100644
2139--- a/src/plugins/generic/screenshotplugin/qxt/gui/x11info.cpp
2140+++ b/src/plugins/generic/screenshotplugin/qxt/gui/x11info.cpp
2141@@ -28,7 +28,7 @@
2142 Display* X11Info::display()
2143 {
2144 if (!_display) {
2145- _display = XOpenDisplay(NULL);
2146+ _display = XOpenDisplay(nullptr);
2147 }
2148 return _display;
2149 }
2150@@ -48,7 +48,7 @@ int X11Info::appScreen()
2151 xcb_connection_t *X11Info::xcbConnection()
2152 {
2153 if (!_xcb) {
2154- _xcb = xcb_connect(NULL, &_xcbPreferredScreen);
2155+ _xcb = xcb_connect(nullptr, &_xcbPreferredScreen);
2156 Q_ASSERT(_xcb);
2157 }
2158 return _xcb;
2159diff --git a/src/plugins/generic/skinsplugin/optionsparser.cpp b/src/plugins/generic/skinsplugin/optionsparser.cpp
2160index fe7a0571..608cbb01 100644
2161--- a/src/plugins/generic/skinsplugin/optionsparser.cpp
2162+++ b/src/plugins/generic/skinsplugin/optionsparser.cpp
2163@@ -203,7 +203,7 @@ QVariant OptionsParser::elementToVariant(const QDomElement& e)
2164 return value;
2165 }
2166
2167-OptionsParser *OptionsParser::instance_ = NULL;
2168+OptionsParser *OptionsParser::instance_ = nullptr;
2169
2170
2171 //-----------------------
2172diff --git a/src/plugins/windows/snarl/SnarlInterface.cpp b/src/plugins/windows/snarl/SnarlInterface.cpp
2173index cccc5c2a..38c38f96 100644
2174--- a/src/plugins/windows/snarl/SnarlInterface.cpp
2175+++ b/src/plugins/windows/snarl/SnarlInterface.cpp
2176@@ -116,7 +116,7 @@ long SnarlInterface::snGetGlobalMsg() {
2177 }
2178
2179 long SnarlInterface::send(SNARLSTRUCT snarlStruct) {
2180- HWND hWnd = FindWindow(NULL, QString("Snarl").toStdWString().c_str());
2181+ HWND hWnd = FindWindow(nullptr, QString("Snarl").toStdWString().c_str());
2182 if (IsWindow(hWnd)) {
2183 COPYDATASTRUCT cds;
2184 cds.dwData = 2;
2185diff --git a/src/proxy.cpp b/src/proxy.cpp
2186index 0f342793..a5dd0f2e 100644
2187--- a/src/proxy.cpp
2188+++ b/src/proxy.cpp
2189@@ -636,6 +636,6 @@ ProxyForObject* ProxyManager::proxyForObject()
2190 return d->po;
2191 }
2192
2193-ProxyManager* ProxyManager::instance_ = NULL;
2194+ProxyManager* ProxyManager::instance_ = nullptr;
2195
2196 #include "proxy.moc"
2197diff --git a/src/psiaccount.cpp b/src/psiaccount.cpp
2198index ad24ea0d..034f3a6d 100644
2199--- a/src/psiaccount.cpp
2200+++ b/src/psiaccount.cpp
2201@@ -4060,7 +4060,7 @@ void PsiAccount::actionVoice(const Jid &j)
2202 w->setOutgoing(j2);
2203 w->show();
2204 /*
2205- Q_ASSERT(voiceCaller() != NULL);
2206+ Q_ASSERT(voiceCaller() != nullptr);
2207
2208 Jid jid;
2209 if (j.resource().isEmpty()) {
2210@@ -5126,7 +5126,7 @@ void PsiAccount::handleEvent(const PsiEvent::Ptr &e, ActivationType activationTy
2211
2212 #ifdef PSI_PLUGINS
2213 //TODO(mck): clean up
2214- //UserListItem *ulItem=NULL;
2215+ //UserListItem *ulItem=nullptr;
2216 //if ( !ul.isEmpty() )
2217 // ulItem=ul.first();
2218 if (PluginManager::instance()->processMessage(this, e->from().full(), m.body(), m.subject())) {
2219diff --git a/src/psigrowlnotifier.cpp b/src/psigrowlnotifier.cpp
2220index ba6dcafb..b6a64979 100644
2221--- a/src/psigrowlnotifier.cpp
2222+++ b/src/psigrowlnotifier.cpp
2223@@ -110,8 +110,8 @@ PsiGrowlNotifier* PsiGrowlNotifier::instance()
2224 * \param account The requesting account.
2225 * \param type The type of popup to be sent.
2226 * \param jid The originating jid
2227- * \param uli The originating userlist item. Can be NULL.
2228- * \param event The originating event. Can be NULL.
2229+ * \param uli The originating userlist item. Can be nullptr.
2230+ * \param event The originating event. Can be nullptr.
2231 */
2232 void PsiGrowlNotifier::popup(PsiAccount* account, PopupManager::PopupType type, const Jid& jid, const Resource& r, const UserListItem* uli, const PsiEvent::Ptr &event)
2233 {
2234diff --git a/src/psiiconset.cpp b/src/psiiconset.cpp
2235index babb3893..7663f262 100644
2236--- a/src/psiiconset.cpp
2237+++ b/src/psiiconset.cpp
2238@@ -127,13 +127,13 @@ public:
2239
2240 void loadIconset(Iconset *to, Iconset *from) {
2241 if ( !to ) {
2242- qWarning("PsiIconset::loadIconset(): 'to' iconset is NULL!");
2243+ qWarning("PsiIconset::loadIconset(): 'to' iconset is nullptr!");
2244 if ( from )
2245 qWarning("from->name() = '%s'", qPrintable(from->name()));
2246 return;
2247 }
2248 if ( !from ) {
2249- qWarning("PsiIconset::loadIconset(): 'from' iconset is NULL!");
2250+ qWarning("PsiIconset::loadIconset(): 'from' iconset is nullptr!");
2251 if ( to )
2252 qWarning("to->name() = '%s'", qPrintable(to->name()));
2253 return;
2254@@ -1012,4 +1012,4 @@ PsiIconset* PsiIconset::instance()
2255 return instance_;
2256 }
2257
2258-PsiIconset* PsiIconset::instance_ = NULL;
2259+PsiIconset* PsiIconset::instance_ = nullptr;
2260diff --git a/src/psioptions.cpp b/src/psioptions.cpp
2261index 939e201b..502cfadf 100644
2262--- a/src/psioptions.cpp
2263+++ b/src/psioptions.cpp
2264@@ -396,5 +396,5 @@ void PsiOptions::resetOption(const QString &name)
2265 }
2266
2267
2268-PsiOptions* PsiOptions::instance_ = NULL;
2269-PsiOptions* PsiOptions::defaults_ = NULL;
2270+PsiOptions* PsiOptions::instance_ = nullptr;
2271+PsiOptions* PsiOptions::defaults_ = nullptr;
2272diff --git a/src/psithememanager.cpp b/src/psithememanager.cpp
2273index 0dfd6282..2b7c5d3f 100644
2274--- a/src/psithememanager.cpp
2275+++ b/src/psithememanager.cpp
2276@@ -82,4 +82,4 @@ bool PsiThemeManager::loadAll()
2277 return true;
2278 }
2279
2280-PsiThemeManager* PsiThemeManager::instance_ = NULL;
2281+PsiThemeManager* PsiThemeManager::instance_ = nullptr;
2282diff --git a/src/psitrayicon.cpp b/src/psitrayicon.cpp
2283index e97f1e74..aa6cd1e2 100644
2284--- a/src/psitrayicon.cpp
2285+++ b/src/psitrayicon.cpp
2286@@ -14,7 +14,7 @@
2287
2288 PsiTrayIcon::PsiTrayIcon(const QString &tip, QMenu *popup, QObject *parent)
2289 : QObject(parent)
2290- , icon_(NULL)
2291+ , icon_(nullptr)
2292 , trayicon_(new QSystemTrayIcon())
2293 , realIcon_(0)
2294 {
2295diff --git a/src/sendbuttonmenu.cpp b/src/sendbuttonmenu.cpp
2296index 0b2efc85..5c8d4626 100644
2297--- a/src/sendbuttonmenu.cpp
2298+++ b/src/sendbuttonmenu.cpp
2299@@ -40,7 +40,7 @@ SendButtonTemplatesEditor::SendButtonTemplatesEditor(QWidget* parent)
2300 if (menu_list.size() == 0)
2301 continue;
2302 // find subitems if exists
2303- QTreeWidgetItem *item = NULL;
2304+ QTreeWidgetItem *item = nullptr;
2305 QString menu_str = "";
2306 int j = menu_list.size() - 2;
2307 for (; j >= 0; j--) {
2308@@ -50,7 +50,7 @@ SendButtonTemplatesEditor::SendButtonTemplatesEditor(QWidget* parent)
2309 menu_str = menu_str2;
2310 menu_str2.append("/" + menu_list.at(k));
2311 }
2312- item = subitems.value(menu_str2, NULL);
2313+ item = subitems.value(menu_str2, nullptr);
2314 if (item) {
2315 menu_str = menu_str2;
2316 ++j;
2317@@ -311,7 +311,7 @@ void SendButtonTemplatesEditor::reject()
2318
2319 SendButtonTemplatesMenu::SendButtonTemplatesMenu(QWidget* parent)
2320 : QMenu(parent)
2321- , mapper(NULL)
2322+ , mapper(nullptr)
2323 , ps_(false)
2324 {
2325 setSeparatorsCollapsible(true);
2326@@ -415,7 +415,7 @@ void SendButtonTemplatesMenu::update()
2327 if (menu_list.size() == 0)
2328 continue;
2329 // find submenus if exists
2330- QAction *m_act = NULL;
2331+ QAction *m_act = nullptr;
2332 QString menu_str = "";
2333 int j = menu_list.size() - 2;
2334 for (; j >= 0; j--) {
2335@@ -425,7 +425,7 @@ void SendButtonTemplatesMenu::update()
2336 menu_str = menu_str2;
2337 menu_str2.append("/" + menu_list.at(k));
2338 }
2339- m_act = submenus.value(menu_str2, NULL);
2340+ m_act = submenus.value(menu_str2, nullptr);
2341 if (m_act) {
2342 menu_str = menu_str2;
2343 ++j;
2344diff --git a/src/shortcutmanager.cpp b/src/shortcutmanager.cpp
2345index 77097eba..213a8ce9 100644
2346--- a/src/shortcutmanager.cpp
2347+++ b/src/shortcutmanager.cpp
2348@@ -23,7 +23,7 @@ ShortcutManager::ShortcutManager() : QObject(QCoreApplication::instance())
2349 /**
2350 * "The one and only instance" of the ShortcutManager
2351 */
2352-ShortcutManager* ShortcutManager::instance_ = NULL;
2353+ShortcutManager* ShortcutManager::instance_ = nullptr;
2354
2355 /**
2356 * \brief The Instantiator of the Shortcutmanager
2357@@ -115,7 +115,7 @@ QList<QKeySequence> ShortcutManager::readShortcutsFromOptions(const QString& nam
2358 */
2359 void ShortcutManager::connect(const QString& path, QObject* parent, const char* slot)
2360 {
2361- if (parent == NULL || slot == NULL)
2362+ if (parent == nullptr || slot == NULL)
2363 return;
2364
2365 if (!path.startsWith("global.")) {
2366diff --git a/src/sxe/sxesession.cpp b/src/sxe/sxesession.cpp
2367index d02a200e..5ffc5001 100644
2368--- a/src/sxe/sxesession.cpp
2369+++ b/src/sxe/sxesession.cpp
2370@@ -708,7 +708,7 @@ void SxeSession::queueOutgoingEdit(SxeEdit* edit) {
2371 SxeRecord* SxeSession::createRecord(const QString &id) {
2372 if(recordByNodeId_.contains(id)) {
2373 qDebug() << QString("record by id '%1' already exists.").arg(id).toLatin1();
2374- return NULL;
2375+ return nullptr;
2376 }
2377
2378 SxeRecord* m = new SxeRecord(id);
2379@@ -737,7 +737,7 @@ SxeRecord* SxeSession::record(const QString &id) {
2380
2381 SxeRecord* SxeSession::record(const QDomNode &node) const {
2382 if(node.isNull())
2383- return NULL;
2384+ return nullptr;
2385
2386 // go through all the SxeRecord's
2387 foreach(SxeRecord* meta, recordByNodeId_.values()) {
2388@@ -746,7 +746,7 @@ SxeRecord* SxeSession::record(const QDomNode &node) const {
2389 return meta;
2390 }
2391
2392- return NULL;
2393+ return nullptr;
2394 }
2395
2396 void SxeSession::setUUIDPrefix(const QString uuidPrefix) {
2397diff --git a/src/systeminfo.cpp b/src/systeminfo.cpp
2398index f35b3d53..5fc9967c 100644
2399--- a/src/systeminfo.cpp
2400+++ b/src/systeminfo.cpp
2401@@ -332,4 +332,4 @@ SystemInfo* SystemInfo::instance()
2402 return instance_;
2403 }
2404
2405-SystemInfo* SystemInfo::instance_ = NULL;
2406+SystemInfo* SystemInfo::instance_ = nullptr;
2407diff --git a/src/tabs/tabbablewidget.cpp b/src/tabs/tabbablewidget.cpp
2408index 64182f4d..4d9d2aaa 100644
2409--- a/src/tabs/tabbablewidget.cpp
2410+++ b/src/tabs/tabbablewidget.cpp
2411@@ -42,7 +42,7 @@ TabbableWidget::TabbableWidget(const Jid &jid, PsiAccount *pa, TabManager *tabMa
2412 , tabManager_(tabManager)
2413 {
2414 if (TabbableWidget::chatsCount == 0) {
2415- TabbableWidget::templateMenu = new SendButtonTemplatesMenu(NULL);
2416+ TabbableWidget::templateMenu = new SendButtonTemplatesMenu(nullptr);
2417 TabbableWidget::templateMenu->setParams(false);
2418 TabbableWidget::templateMenu->setStyleSheet(PsiOptions::instance()->getOption("options.ui.chat.css").toString());
2419 }
2420@@ -124,20 +124,20 @@ TabbableWidget::~TabbableWidget()
2421 }
2422 --TabbableWidget::chatsCount;
2423 if (TabbableWidget::chatsCount == 0) {
2424- if (TabbableWidget::templateMenu != NULL) {
2425+ if (TabbableWidget::templateMenu != nullptr) {
2426 delete TabbableWidget::templateMenu;
2427- TabbableWidget::templateMenu = NULL;
2428+ TabbableWidget::templateMenu = nullptr;
2429 }
2430 if (!TabbableWidget::templateEditDlg.isNull()) {
2431 delete (TabbableWidget::templateEditDlg);
2432- TabbableWidget::templateEditDlg = NULL;
2433+ TabbableWidget::templateEditDlg = nullptr;
2434 }
2435 }
2436 }
2437
2438 int TabbableWidget::chatsCount = 0;
2439-SendButtonTemplatesMenu *TabbableWidget::templateMenu = NULL;
2440-QPointer<SendButtonTemplatesEditor> TabbableWidget::templateEditDlg = NULL;
2441+SendButtonTemplatesMenu *TabbableWidget::templateMenu = nullptr;
2442+QPointer<SendButtonTemplatesEditor> TabbableWidget::templateEditDlg = nullptr;
2443
2444 SendButtonTemplatesMenu* TabbableWidget::getTemplateMenu()
2445 {
2446@@ -149,7 +149,7 @@ void TabbableWidget::showTemplateEditor()
2447 bool new_window = false;
2448 if (TabbableWidget::templateEditDlg.isNull()) {
2449 new_window = true;
2450- TabbableWidget::templateEditDlg = new SendButtonTemplatesEditor(NULL);
2451+ TabbableWidget::templateEditDlg = new SendButtonTemplatesEditor(nullptr);
2452 if (TabbableWidget::templateMenu) {
2453 TabbableWidget::templateEditDlg->setStyleSheet(PsiOptions::instance()->getOption("options.ui.chat.css").toString());
2454 connect(TabbableWidget::templateEditDlg.data(), SIGNAL(accepted()), TabbableWidget::templateMenu, SLOT(update()));
2455diff --git a/src/tools/advwidget/advwidget.cpp b/src/tools/advwidget/advwidget.cpp
2456index ad539910..b01b354d 100644
2457--- a/src/tools/advwidget/advwidget.cpp
2458+++ b/src/tools/advwidget/advwidget.cpp
2459@@ -480,8 +480,8 @@ bool ForceForegroundWindow(HWND hwnd)
2460 // Published in The Delphi Magazine 55, page 16
2461
2462 Result = false;
2463- ForegroundThreadID = GetWindowThreadProcessId(GetForegroundWindow(), NULL);
2464- ThisThreadID = GetWindowThreadProcessId(hwnd, NULL);
2465+ ForegroundThreadID = GetWindowThreadProcessId(GetForegroundWindow(), nullptr);
2466+ ThisThreadID = GetWindowThreadProcessId(hwnd, nullptr);
2467 if (AttachThreadInput(ThisThreadID, ForegroundThreadID, true)) {
2468 BringWindowToTop(hwnd); // IE 5.5 related hack
2469 SetForegroundWindow(hwnd);
2470diff --git a/src/tools/crash/crash_sigsegv.cpp b/src/tools/crash/crash_sigsegv.cpp
2471index 48d6be63..77848038 100644
2472--- a/src/tools/crash/crash_sigsegv.cpp
2473+++ b/src/tools/crash/crash_sigsegv.cpp
2474@@ -50,7 +50,7 @@
2475
2476 namespace Crash {
2477
2478-static int (* print)(const char *format, ...) = NULL;
2479+static int (* print)(const char *format, ...) = nullptr;
2480 static int needs_cr = 1;
2481
2482 void *sigsegv_set_print( int (* fnc)(const char *format, ...), int _needs_cr)
2483@@ -103,9 +103,9 @@ static int dump_pid_son(pid_t pid, const char *binary, int full_bt,
2484 (*myprint)("trying to dump pid: %d (%s)...%s", pid, binary,
2485 needs_cr ? "\n" : "");
2486
2487- fflush(NULL);
2488+ fflush(nullptr);
2489 fp = popen(cmd, "r");
2490- if( fp == NULL )
2491+ if( fp == nullptr )
2492 {
2493 (*myprint)("err. couldn't exec `%s'%s", cmd,
2494 needs_cr ? "\n" : "");
2495@@ -182,12 +182,12 @@ static int dump_pid(pid_t pid, const char *binary, int full_bt )
2496 static char *get_path_from_pid(char *buff, size_t nbuff, pid_t pid)
2497 {
2498 char proc[256];
2499- char *ret = NULL;
2500+ char *ret = nullptr;
2501 int n;
2502
2503 sprintf(proc, "/proc/%d/exe", pid);
2504 if( (n=readlink(proc, buff, nbuff)) == -1 )
2505- ret = NULL;
2506+ ret = nullptr;
2507 else
2508 {
2509 buff[n]=0;
2510@@ -224,7 +224,7 @@ static void sigsegv_handler_generic(int signal, int full_bt)
2511 int (* myprint)(const char *format, ...);
2512
2513 myprint = print ? print : printf;
2514- if( get_path_from_pid(binary, sizeof(binary), pid) == NULL) {
2515+ if( get_path_from_pid(binary, sizeof(binary), pid) == nullptr) {
2516 (*myprint)("pid %d does not seems to exist", pid);
2517 }
2518 else {
2519@@ -237,7 +237,7 @@ static void sigsegv_handler_generic(int signal, int full_bt)
2520 #ifdef HAVE_PTHREAD_H
2521 pthread_kill_other_threads_np();
2522 #endif
2523- fflush(NULL);
2524+ fflush(nullptr);
2525 abort();
2526 }
2527
2528diff --git a/src/tools/iconset/iconset.cpp b/src/tools/iconset/iconset.cpp
2529index 7f93e954..b1248bd6 100644
2530--- a/src/tools/iconset/iconset.cpp
2531+++ b/src/tools/iconset/iconset.cpp
2532@@ -885,7 +885,7 @@ public:
2533 };
2534 //! \endif
2535
2536-IconsetFactoryPrivate* IconsetFactoryPrivate::instance_ = NULL;
2537+IconsetFactoryPrivate* IconsetFactoryPrivate::instance_ = nullptr;
2538
2539 void IconsetFactoryPrivate::registerIconset(const Iconset *i)
2540 {
2541diff --git a/src/tools/tunecontroller/aimptunecontroller.cpp b/src/tools/tunecontroller/aimptunecontroller.cpp
2542index 0976e3a6..3a90a990 100644
2543--- a/src/tools/tunecontroller/aimptunecontroller.cpp
2544+++ b/src/tools/tunecontroller/aimptunecontroller.cpp
2545@@ -70,7 +70,7 @@ Tune AimpTuneController::getTune() const
2546 {
2547 HANDLE aFile=OpenFileMapping(FILE_MAP_READ, TRUE, AIMP_REMOTE_CLASS);
2548 PAIMPRemoteFileInfo aInfo = (PAIMPRemoteFileInfo)MapViewOfFile(aFile, FILE_MAP_READ, 0, 0, AIMPRemoteAccessMapFileSize);
2549- if (aInfo != NULL) {
2550+ if (aInfo != nullptr) {
2551 wchar_t *str = (wchar_t *)((char*)aInfo + sizeof(*aInfo));
2552 QString album = QString::fromWCharArray(str, aInfo->AlbumLength);
2553 str += aInfo->AlbumLength;
2554diff --git a/src/tools/tunecontroller/itunestunecontroller.cpp b/src/tools/tunecontroller/itunestunecontroller.cpp
2555index 2e0356d8..88cd682d 100644
2556--- a/src/tools/tunecontroller/itunestunecontroller.cpp
2557+++ b/src/tools/tunecontroller/itunestunecontroller.cpp
2558@@ -35,7 +35,7 @@ static QString CFStringToQString(CFStringRef s)
2559 {
2560 QString result;
2561
2562- if (s != NULL) {
2563+ if (s != nullptr) {
2564 CFIndex length = CFStringGetMaximumSizeForEncoding(CFStringGetLength(s), kCFStringEncodingUTF8) + 1;
2565 char* buffer = new char[length];
2566 if (CFStringGetCString(s, buffer, length, kCFStringEncodingUTF8)) {
2567@@ -54,13 +54,13 @@ ITunesController::ITunesController()
2568 {
2569 // TODO: Poll iTunes for current playing tune
2570 CFNotificationCenterRef center = CFNotificationCenterGetDistributedCenter();
2571- CFNotificationCenterAddObserver(center, this, ITunesController::iTunesCallback, CFSTR("com.apple.iTunes.playerInfo"), NULL, CFNotificationSuspensionBehaviorDeliverImmediately);
2572+ CFNotificationCenterAddObserver(center, this, ITunesController::iTunesCallback, CFSTR("com.apple.iTunes.playerInfo"), nullptr, CFNotificationSuspensionBehaviorDeliverImmediately);
2573 }
2574
2575 ITunesController::~ITunesController()
2576 {
2577 CFNotificationCenterRef center = CFNotificationCenterGetDistributedCenter();
2578- CFNotificationCenterRemoveObserver(center, this, CFSTR("com.apple.iTunes.playerInfo"), NULL);
2579+ CFNotificationCenterRemoveObserver(center, this, CFSTR("com.apple.iTunes.playerInfo"), nullptr);
2580 }
2581
2582 Tune ITunesController::currentTune() const
2583diff --git a/src/tools/tunecontroller/winamptunecontroller.cpp b/src/tools/tunecontroller/winamptunecontroller.cpp
2584index 0e074e51..bb5789f6 100644
2585--- a/src/tools/tunecontroller/winamptunecontroller.cpp
2586+++ b/src/tools/tunecontroller/winamptunecontroller.cpp
2587@@ -151,9 +151,9 @@ void WinAmpTuneController::check()
2588
2589 Tune tune;
2590 #ifdef UNICODE
2591- HWND h = FindWindow(L"Winamp v1.x", NULL);
2592+ HWND h = FindWindow(L"Winamp v1.x", nullptr);
2593 #else
2594- HWND h = FindWindow("Winamp v1.x", NULL);
2595+ HWND h = FindWindow("Winamp v1.x", nullptr);
2596 #endif
2597 if (h && SendMessage(h, WM_WA_IPC, 0, IPC_ISPLAYING) == 1) {
2598 tune = getTune(h);
2599diff --git a/src/translationmanager.cpp b/src/translationmanager.cpp
2600index 0a93efaf..978eb04b 100644
2601--- a/src/translationmanager.cpp
2602+++ b/src/translationmanager.cpp
2603@@ -183,4 +183,4 @@ QStringList TranslationManager::translationDirs() const
2604 return dirs;
2605 }
2606
2607-TranslationManager* TranslationManager::instance_ = NULL;
2608+TranslationManager* TranslationManager::instance_ = nullptr;
2609diff --git a/src/userlist.cpp b/src/userlist.cpp
2610index b1441d6d..96a9819e 100644
2611--- a/src/userlist.cpp
2612+++ b/src/userlist.cpp
2613@@ -297,7 +297,7 @@ UserListItem::UserListItem(bool self)
2614 v_private = false;
2615 v_isTransport = false;
2616 v_isConference = false;
2617- v_avatarFactory = NULL;
2618+ v_avatarFactory = nullptr;
2619 lastmsgtype = -1;
2620 v_pending = 0;
2621 v_hPending = 0;
2622diff --git a/src/vcardfactory.cpp b/src/vcardfactory.cpp
2623index ccb4784c..0d72fe84 100644
2624--- a/src/vcardfactory.cpp
2625+++ b/src/vcardfactory.cpp
2626@@ -252,4 +252,4 @@ JT_VCard* VCardFactory::getVCard(const Jid &jid, Task *rootTask, const QObject *
2627 return task;
2628 }
2629
2630-VCardFactory* VCardFactory::instance_ = NULL;
2631+VCardFactory* VCardFactory::instance_ = nullptr;
2632diff --git a/src/whiteboarding/wbmanager.cpp b/src/whiteboarding/wbmanager.cpp
2633index 128509ff..7278dc05 100644
2634--- a/src/whiteboarding/wbmanager.cpp
2635+++ b/src/whiteboarding/wbmanager.cpp
2636@@ -94,7 +94,7 @@ void WbManager::openWhiteboard(const Jid &target, const Jid &ownJid, bool groupC
2637 QList<QString> features;
2638 features += WBNS;
2639 if(!sxemanager_->checkSupport(target, features)) {
2640- QMessageBox::information(NULL, tr("Unsupported"), tr("The contact does not support whiteboarding."));
2641+ QMessageBox::information(nullptr, tr("Unsupported"), tr("The contact does not support whiteboarding."));
2642 return;
2643 }
2644
2645@@ -107,7 +107,7 @@ void WbManager::openWhiteboard(const Jid &target, const Jid &ownJid, bool groupC
2646 QDomDocument doc;
2647
2648 if(promptInitialDoc) {
2649- bool openExisting = (QMessageBox::Yes == QMessageBox::question(NULL,
2650+ bool openExisting = (QMessageBox::Yes == QMessageBox::question(nullptr,
2651 tr("Open Existing SVG?"),
2652 tr("Would you like to open an existing SVG document in the whitebaord?"),
2653 QMessageBox::Yes | QMessageBox::No,
2654@@ -115,7 +115,7 @@ void WbManager::openWhiteboard(const Jid &target, const Jid &ownJid, bool groupC
2655
2656 if(openExisting) {
2657 // prompt for an existing file
2658- QString fileName = QFileDialog::getOpenFileName(NULL, tr("Initial SVG Document for the Whiteboard"),
2659+ QString fileName = QFileDialog::getOpenFileName(nullptr, tr("Initial SVG Document for the Whiteboard"),
2660 QDir::homePath(),
2661 tr("Scalable Vector Graphics (*.svg)"));
2662
2663@@ -197,7 +197,7 @@ void WbManager::checkInvitation(const Jid &peer, const QList<QString> &features,
2664 wr->startLoop();
2665 requests_.removeAll(wr);
2666 delete wr;
2667- *result = (QMessageBox::Yes == QMessageBox::question(NULL,
2668+ *result = (QMessageBox::Yes == QMessageBox::question(nullptr,
2669 tr("Whiteboarding Invitation?"),
2670 tr("%1 has invited you to a whiteboarding session. Would you like to join?").arg(peer.full()),
2671 QMessageBox::Yes | QMessageBox::No,
2672diff --git a/src/whiteboarding/wbwidget.cpp b/src/whiteboarding/wbwidget.cpp
2673index 24f40275..02518573 100644
2674--- a/src/whiteboarding/wbwidget.cpp
2675+++ b/src/whiteboarding/wbwidget.cpp
2676@@ -344,7 +344,7 @@ void WbWidget::inspectNodes() {
2677 WbItem* item = wbItem(node);
2678
2679 // We don't need to do anything iff node is child of <svg/> and item exists or vice versa
2680- if((item != NULL) == (node.parentNode() == session_->document().documentElement()))
2681+ if((item != nullptr) == (node.parentNode() == session_->document().documentElement()))
2682 continue;
2683
2684 // Otherwise, either item exists and needs to be removed
2685diff --git a/src/widgets/actionlineedit.cpp b/src/widgets/actionlineedit.cpp
2686index 09706dae..0e8705ec 100644
2687--- a/src/widgets/actionlineedit.cpp
2688+++ b/src/widgets/actionlineedit.cpp
2689@@ -209,7 +209,7 @@ void ActionLineEdit::contextMenuEvent(QContextMenuEvent *e)
2690 {
2691 QMenu *menu = createStandardContextMenu();
2692 if (actions().count() > 0) {
2693- QAction *before = NULL;
2694+ QAction *before = nullptr;
2695 if (menu->actions().count() > 0) {
2696 before = menu->actions().first();
2697 }
2698diff --git a/src/x11windowsystem.cpp b/src/x11windowsystem.cpp
2699index d60edc97..9fc26e06 100644
2700--- a/src/x11windowsystem.cpp
2701+++ b/src/x11windowsystem.cpp
2702@@ -40,7 +40,7 @@ static bool getCardinal32Prop(Display *display, Window win, char *propName, long
2703 Atom nameAtom, typeAtom, actual_type_return;
2704 int actual_format_return, result;
2705 unsigned long nitems_return, bytes_after_return;
2706- long *result_array=NULL;
2707+ long *result_array=nullptr;
2708
2709 nameAtom = XInternAtom(display, propName, False);
2710 typeAtom = XInternAtom(display, "CARDINAL", False);