Guest User

One more patch

a guest
Mar 25th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 188.49 KB | None | 0 0
  1. diff --git a/src/abstracttreeitem.cpp b/src/abstracttreeitem.cpp
  2. index 45e6753c..fd280a82 100644
  3. --- a/src/abstracttreeitem.cpp
  4. +++ b/src/abstracttreeitem.cpp
  5. @@ -102,7 +102,7 @@ AbstractTreeItem *AbstractTreeItem::child(int row) const
  6.      if (row < childCount())
  7.          return _children.at(row);
  8.      else
  9. -        return 0;
  10. +        return nullptr;
  11.  }
  12.  
  13.  int AbstractTreeItem::childCount() const
  14. diff --git a/src/abstracttreemodel.cpp b/src/abstracttreemodel.cpp
  15. index 6247e1cd..1604952d 100644
  16. --- a/src/abstracttreemodel.cpp
  17. +++ b/src/abstracttreemodel.cpp
  18. @@ -44,7 +44,7 @@ QModelIndex AbstractTreeModel::index(int row, int column, const QModelIndex &par
  19.      else
  20.          parentItem = static_cast<AbstractTreeItem*>(parent.internalPointer());
  21.  
  22. -    AbstractTreeItem *childItem = 0;
  23. +    AbstractTreeItem *childItem = nullptr;
  24.      if (row >= 0 && row < parentItem->childCount())
  25.          childItem = parentItem->children().at(row);
  26.  
  27. diff --git a/src/accountadddlg.cpp b/src/accountadddlg.cpp
  28. index 7630a1ed..9e0ede18 100644
  29. --- a/src/accountadddlg.cpp
  30. +++ b/src/accountadddlg.cpp
  31. @@ -89,7 +89,7 @@ void AccountAddDlg::add()
  32.      QString aname = createNewAccountName(le_name->text());
  33.      le_name->setText( aname );
  34.  
  35. -    PsiAccount* newAccount = 0;
  36. +    PsiAccount* newAccount = nullptr;
  37.      if(ck_reg->isChecked()) {
  38.          AccountRegDlg *w = new AccountRegDlg(psi, this);
  39.          int n = w->exec();
  40. diff --git a/src/accountmanagedlg.cpp b/src/accountmanagedlg.cpp
  41. index f3aeb598..cc6de6b7 100644
  42. --- a/src/accountmanagedlg.cpp
  43. +++ b/src/accountmanagedlg.cpp
  44. @@ -55,7 +55,7 @@ class AccountRemoveDlg : public QDialog, public Ui::AccountRemove
  45.  {
  46.      Q_OBJECT
  47.  public:
  48. -    AccountRemoveDlg(const UserAccount &, QWidget *parent=0);
  49. +    AccountRemoveDlg(const UserAccount &, QWidget *parent=nullptr);
  50.      ~AccountRemoveDlg();
  51.  
  52.  protected:
  53. @@ -321,7 +321,7 @@ void AccountManageTree::dragMoveEvent(QDragMoveEvent *event)
  54.  
  55.  
  56.  AccountManageDlg::AccountManageDlg(PsiCon *_psi)
  57. -:QDialog(0)
  58. +:QDialog(nullptr)
  59.  {
  60.      setupUi(this);
  61.      setModal(false);
  62. @@ -377,7 +377,7 @@ void AccountManageDlg::qlv_selectionChanged(QTreeWidgetItem *lvi, QTreeWidgetIte
  63.  
  64.  void AccountManageDlg::add()
  65.  {
  66. -    AccountAddDlg *w = new AccountAddDlg(psi, 0);
  67. +    AccountAddDlg *w = new AccountAddDlg(psi, nullptr);
  68.      w->show();
  69.  }
  70.  
  71. @@ -402,7 +402,7 @@ void AccountManageDlg::remove()
  72.          return;
  73.  
  74.      if(i->pa->eventQueue()->count()) {
  75. -        QMessageBox::information(0, tr("Error"), qApp->translate("PsiAccount", "Unable to disable the account, as it has pending events."));
  76. +        QMessageBox::information(nullptr, tr("Error"), qApp->translate("PsiAccount", "Unable to disable the account, as it has pending events."));
  77.          return;
  78.      }
  79.  
  80. @@ -442,7 +442,7 @@ void AccountManageDlg::accountRemoved(PsiAccount *pa)
  81.          AccountManageItem* i = static_cast<AccountManageItem*>(lv_accs->topLevelItem(index));
  82.          if(i->pa == pa) {
  83.              delete i;
  84. -            qlv_selectionChanged(lv_accs->currentItem(), 0);
  85. +            qlv_selectionChanged(lv_accs->currentItem(), nullptr);
  86.              break;
  87.          }
  88.      }
  89. diff --git a/src/accountregdlg.cpp b/src/accountregdlg.cpp
  90. index 7f32f82a..34dc2613 100644
  91. --- a/src/accountregdlg.cpp
  92. +++ b/src/accountregdlg.cpp
  93. @@ -75,7 +75,7 @@ AccountRegDlg::AccountRegDlg(PsiCon *psi, QWidget *parent) :
  94.      // Proxy
  95.      proxy_chooser_ = ProxyManager::instance()->createProxyChooser(ui_.gb_connection);
  96.      replaceWidget(ui_.lb_proxychooser, proxy_chooser_);
  97. -    proxy_chooser_->setCurrentItem(0);
  98. +    proxy_chooser_->setCurrentItem(nullptr);
  99.  
  100.      // Fields pane
  101.      QVBoxLayout *fields_layout = new QVBoxLayout(ui_.page_fields);
  102. diff --git a/src/accountscombobox.cpp b/src/accountscombobox.cpp
  103. index d0c3141d..b16d1f40 100644
  104. --- a/src/accountscombobox.cpp
  105. +++ b/src/accountscombobox.cpp
  106. @@ -24,8 +24,8 @@
  107.  
  108.  AccountsComboBox::AccountsComboBox(QWidget* parent)
  109.      : QComboBox(parent)
  110. -    , controller_(0)
  111. -    , account_(0)
  112. +    , controller_(nullptr)
  113. +    , account_(nullptr)
  114.      , onlineOnly_(false)
  115.  {
  116.      setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed));
  117. @@ -86,7 +86,7 @@ void AccountsComboBox::setOnlineOnly(bool onlineOnly)
  118.  
  119.  void AccountsComboBox::changeAccount()
  120.  {
  121. -    account_ = 0;
  122. +    account_ = nullptr;
  123.      if (currentIndex() >= 0 && currentIndex() < accounts().count())
  124.          account_ = accounts().at(currentIndex());
  125.      emit activated(account_);
  126. diff --git a/src/actionlist.cpp b/src/actionlist.cpp
  127. index bf762554..073d85ee 100644
  128. --- a/src/actionlist.cpp
  129. +++ b/src/actionlist.cpp
  130. @@ -156,7 +156,7 @@ ActionList *MetaActionList::actionList( const QString &name ) const
  131.              return a;
  132.      }
  133.  
  134. -    return 0;
  135. +    return nullptr;
  136.  }
  137.  
  138.  QList<ActionList*> MetaActionList::actionLists( const unsigned int id ) const
  139. diff --git a/src/activeprofiles.cpp b/src/activeprofiles.cpp
  140. index b19d593d..2cee8621 100644
  141. --- a/src/activeprofiles.cpp
  142. +++ b/src/activeprofiles.cpp
  143. @@ -23,7 +23,7 @@
  144.  #include "profiles.h"
  145.  
  146.  
  147. -ActiveProfiles* ActiveProfiles::instance_ = 0;
  148. +ActiveProfiles* ActiveProfiles::instance_ = nullptr;
  149.  
  150.  /**
  151.   * \fn virtual ActiveProfiles::~ActiveProfiles();
  152. diff --git a/src/activeprofiles_dbus.cpp b/src/activeprofiles_dbus.cpp
  153. index 5608b05c..011bd397 100644
  154. --- a/src/activeprofiles_dbus.cpp
  155. +++ b/src/activeprofiles_dbus.cpp
  156. @@ -204,7 +204,7 @@ ActiveProfiles::ActiveProfiles()
  157.  ActiveProfiles::~ActiveProfiles()
  158.  {
  159.      delete d;
  160. -    d = 0;
  161. +    d = nullptr;
  162.  }
  163.  
  164.  bool ActiveProfiles::setStatus(const QString &profile, const QString &status, const QString &message) const
  165. @@ -223,7 +223,7 @@ bool ActiveProfiles::openUri(const QString &profile, const QString &uri) const
  166.  
  167.  bool ActiveProfiles::raise(const QString &profile, bool withUI) const
  168.  {
  169. -    QLabel *lab=0;
  170. +    QLabel *lab=nullptr;
  171.      QDBusMessage msg = QDBusMessage::createMethodCall ( d->dbusName(profile), "/Main", PSIDBUSMAINIF, "raise" );
  172.      if (withUI) {
  173.          lab = new QLabel(tr("This psi profile is already running...<br>please wait..."));
  174. diff --git a/src/activitycatalog.cpp b/src/activitycatalog.cpp
  175. index d3de7daf..adc98cc4 100644
  176. --- a/src/activitycatalog.cpp
  177. +++ b/src/activitycatalog.cpp
  178. @@ -214,4 +214,4 @@ const QList<ActivityCatalog::Entry>& ActivityCatalog::entries() const
  179.      return entries_;
  180.  }
  181.  
  182. -ActivityCatalog* ActivityCatalog::instance_ = 0;
  183. +ActivityCatalog* ActivityCatalog::instance_ = nullptr;
  184. diff --git a/src/activitydlg.cpp b/src/activitydlg.cpp
  185. index 4867c47f..a0d47ff2 100644
  186. --- a/src/activitydlg.cpp
  187. +++ b/src/activitydlg.cpp
  188. @@ -26,7 +26,7 @@
  189.  #include "pepmanager.h"
  190.  #include "psiiconset.h"
  191.  
  192. -ActivityDlg::ActivityDlg(QList<PsiAccount*> list) : QDialog(0), pa_(list)
  193. +ActivityDlg::ActivityDlg(QList<PsiAccount*> list) : QDialog(nullptr), pa_(list)
  194.  {
  195.      setAttribute(Qt::WA_DeleteOnClose);
  196.      if(pa_.isEmpty())
  197. diff --git a/src/adduserdlg.cpp b/src/adduserdlg.cpp
  198. index 7a9f4caa..b6b80ca6 100644
  199. --- a/src/adduserdlg.cpp
  200. +++ b/src/adduserdlg.cpp
  201. @@ -99,7 +99,7 @@ void AddUserDlg::init(const QStringList &groups, PsiAccount *pa)
  202.      d = new Private;
  203.      d->pa = pa;
  204.      d->pa->dialogRegister(this);
  205. -    d->jt = 0;
  206. +    d->jt = nullptr;
  207.      d->tasks = new TaskList;
  208.      connect(d->tasks, SIGNAL(started()),  busy, SLOT(start()));
  209.      connect(d->tasks, SIGNAL(finished()), busy, SLOT(stop()));
  210. @@ -195,7 +195,7 @@ void AddUserDlg::serviceActivated(int x)
  211.  {
  212.      if(d->jt) {
  213.          delete d->jt;
  214. -        d->jt = 0;
  215. +        d->jt = nullptr;
  216.          d->busy->stop();
  217.      }
  218.      gb_trans->setEnabled(false);
  219. @@ -236,7 +236,7 @@ void AddUserDlg::getTransID()
  220.  void AddUserDlg::jt_getFinished()
  221.  {
  222.      JT_Gateway *jt = d->jt;
  223. -    d->jt = 0;
  224. +    d->jt = nullptr;
  225.  
  226.      if(jt->success()) {
  227.          gb_trans->setEnabled(true);
  228. @@ -254,7 +254,7 @@ void AddUserDlg::jt_setFinished()
  229.      pb_transGet->setEnabled(true);
  230.  
  231.      JT_Gateway *jt = d->jt;
  232. -    d->jt = 0;
  233. +    d->jt = nullptr;
  234.  
  235.      if(jt->success()) {
  236.          QString jid = jt->translatedJid().full();
  237. @@ -301,7 +301,7 @@ void AddUserDlg::getVCardActivated()
  238.  {
  239.      const VCard vcard = VCardFactory::instance()->vcard(jid());
  240.  
  241. -    InfoDlg *w = new InfoDlg(InfoWidget::Contact, jid(), vcard, d->pa, 0, false);
  242. +    InfoDlg *w = new InfoDlg(InfoWidget::Contact, jid(), vcard, d->pa, nullptr, false);
  243.      w->show();
  244.  
  245.      // automatically retrieve info if it doesn't exist
  246. diff --git a/src/ahcformdlg.cpp b/src/ahcformdlg.cpp
  247. index c5fb6827..f8834ad0 100644
  248. --- a/src/ahcformdlg.cpp
  249. +++ b/src/ahcformdlg.cpp
  250. @@ -32,13 +32,13 @@
  251.  #include "busywidget.h"
  252.  
  253.  AHCFormDlg::AHCFormDlg(PsiCon *psi, const AHCommand& r, const Jid& receiver, XMPP::Client* client, bool final) :
  254. -    QDialog(0),
  255. +    QDialog(nullptr),
  256.      _psi(psi),
  257. -    _pb_prev(0),
  258. -    _pb_next(0),
  259. -    _pb_complete(0),
  260. -    _pb_cancel(0),
  261. -    _xdata(0),
  262. +    _pb_prev(nullptr),
  263. +    _pb_next(nullptr),
  264. +    _pb_complete(nullptr),
  265. +    _pb_cancel(nullptr),
  266. +    _xdata(nullptr),
  267.      _receiver(receiver),
  268.      _client(client)
  269.  {
  270. @@ -141,7 +141,7 @@ AHCFormDlg::AHCFormDlg(PsiCon *psi, const AHCommand& r, const Jid& receiver, XMP
  271.  
  272.      adjustSize();
  273.      show();
  274. -    setParent(0);
  275. +    setParent(nullptr);
  276.  }
  277.  
  278.  void AHCFormDlg::doPrev()
  279. diff --git a/src/ahcommanddlg.cpp b/src/ahcommanddlg.cpp
  280. index 185591b0..f424667a 100644
  281. --- a/src/ahcommanddlg.cpp
  282. +++ b/src/ahcommanddlg.cpp
  283. @@ -143,7 +143,7 @@ private slots:
  284.  // --------------------------------------------------------------------------
  285.  
  286.  AHCommandDlg::AHCommandDlg(PsiAccount* pa, const Jid& receiver)
  287. -    : QDialog(0), pa_(pa), receiver_(receiver)
  288. +    : QDialog(nullptr), pa_(pa), receiver_(receiver)
  289.  {
  290.      ui_.setupUi(this);
  291.      setAttribute(Qt::WA_DeleteOnClose);
  292. diff --git a/src/ahcservermanager.cpp b/src/ahcservermanager.cpp
  293. index 95b0e713..360816e5 100644
  294. --- a/src/ahcservermanager.cpp
  295. +++ b/src/ahcservermanager.cpp
  296. @@ -235,7 +235,7 @@ AHCommandServer* AHCServerManager::findServer(const QString& node) const
  297.          if ((*it)->node() == node)
  298.              return (*it);
  299.      }
  300. -    return 0;
  301. +    return nullptr;
  302.  }
  303.  
  304.  
  305. diff --git a/src/alertable.cpp b/src/alertable.cpp
  306. index 2fd54a4d..3d9d46fa 100644
  307. --- a/src/alertable.cpp
  308. +++ b/src/alertable.cpp
  309. @@ -30,7 +30,7 @@
  310.  Alertable::Alertable(QObject* parent)
  311.      : QObject(parent)
  312.  {
  313. -    alert_ = 0;
  314. +    alert_ = nullptr;
  315.  }
  316.  
  317.  /**
  318. @@ -38,7 +38,7 @@ Alertable::Alertable(QObject* parent)
  319.   */
  320.  Alertable::~Alertable()
  321.  {
  322. -    setAlert(0);
  323. +    setAlert(nullptr);
  324.  }
  325.  
  326.  /**
  327. @@ -46,7 +46,7 @@ Alertable::~Alertable()
  328.   */
  329.  bool Alertable::alerting() const
  330.  {
  331. -    return alert_ != 0;
  332. +    return alert_ != nullptr;
  333.  }
  334.  
  335.  /**
  336. @@ -70,7 +70,7 @@ void Alertable::setAlert(const PsiIcon* icon)
  337.      if (alert_) {
  338.          alert_->stop();
  339.          delete alert_;
  340. -        alert_ = 0;
  341. +        alert_ = nullptr;
  342.      }
  343.  
  344.      if (icon) {
  345. diff --git a/src/alerticon.cpp b/src/alerticon.cpp
  346. index 7e3f4770..3dbf5804 100644
  347. --- a/src/alerticon.cpp
  348. +++ b/src/alerticon.cpp
  349. @@ -53,7 +53,7 @@ private:
  350.      Impix _blank16;
  351.  };
  352.  
  353. -static MetaAlertIcon *metaAlertIcon = 0;
  354. +static MetaAlertIcon *metaAlertIcon = nullptr;
  355.  
  356.  MetaAlertIcon::MetaAlertIcon()
  357.      : QObject(qApp)
  358. @@ -129,7 +129,7 @@ QString AlertIcon::Private::alertStyle = QString();
  359.  
  360.  AlertIcon::Private::Private(AlertIcon *_ai)
  361.      : ai(_ai)
  362. -    , real(0)
  363. +    , real(nullptr)
  364.      , isActivated(false)
  365.  {
  366.      if ( !metaAlertIcon )
  367. diff --git a/src/alertmanager.cpp b/src/alertmanager.cpp
  368. index ed7ff6e5..4abe3eb9 100644
  369. --- a/src/alertmanager.cpp
  370. +++ b/src/alertmanager.cpp
  371. @@ -36,7 +36,7 @@ QWidget* AlertManager::findDialog(const QMetaObject& mo) const {
  372.              return i->widget;
  373.          }
  374.      }
  375. -    return 0;
  376. +    return nullptr;
  377.  }
  378.  
  379.  void AlertManager::findDialogs(const QMetaObject& mo, QList<void*>* list) const
  380. diff --git a/src/avatars.cpp b/src/avatars.cpp
  381. index 9b3022ce..f361247a 100644
  382. --- a/src/avatars.cpp
  383. +++ b/src/avatars.cpp
  384. @@ -268,7 +268,7 @@ public:
  385.      }
  386.  
  387.      OpResult appendUser(const QString &hash, IconType iconType, const QString &jid,
  388. -                              JidIcons **iconsOut = 0, FileCacheItem **itemOut = 0)
  389. +                              JidIcons **iconsOut = nullptr, FileCacheItem **itemOut = nullptr)
  390.      {
  391.          auto item = get(hash);
  392.          if (!item) {
  393. @@ -554,7 +554,7 @@ private:
  394.      static AvatarCache *_instance;
  395.  };
  396.  
  397. -AvatarCache* AvatarCache::_instance = 0;
  398. +AvatarCache* AvatarCache::_instance = nullptr;
  399.  
  400.  
  401.  //------------------------------------------------------------------------------
  402. diff --git a/src/avcall/avcall.cpp b/src/avcall/avcall.cpp
  403. index 8e508724..d3e09c07 100644
  404. --- a/src/avcall/avcall.cpp
  405. +++ b/src/avcall/avcall.cpp
  406. @@ -44,7 +44,7 @@ static MediaConfiguration getDefaultConfiguration()
  407.      return config;
  408.  }
  409.  
  410. -static MediaConfiguration *g_config = 0;
  411. +static MediaConfiguration *g_config = nullptr;
  412.  
  413.  static void ensureConfig()
  414.  {
  415. @@ -165,7 +165,7 @@ public:
  416.      PsiMedia::RtpChannel *audio, *video;
  417.      JingleRtpChannel *transport;
  418.  
  419. -    AvTransmit(PsiMedia::RtpChannel *_audio, PsiMedia::RtpChannel *_video, JingleRtpChannel *_transport, QObject *parent = 0) :
  420. +    AvTransmit(PsiMedia::RtpChannel *_audio, PsiMedia::RtpChannel *_video, JingleRtpChannel *_transport, QObject *parent = nullptr) :
  421.          QObject(parent),
  422.          audio(_audio),
  423.          video(_video),
  424. @@ -191,10 +191,10 @@ public:
  425.      ~AvTransmit()
  426.      {
  427.          if(audio)
  428. -            audio->setParent(0);
  429. +            audio->setParent(nullptr);
  430.          if(video)
  431. -            video->setParent(0);
  432. -        transport->setParent(0);
  433. +            video->setParent(nullptr);
  434. +        transport->setParent(nullptr);
  435.      }
  436.  
  437.  private slots:
  438. @@ -284,7 +284,7 @@ public:
  439.      {
  440.          Q_ASSERT(avTransmit);
  441.          avTransmit->moveToThread(previousThread);
  442. -        avTransmit = 0;
  443. +        avTransmit = nullptr;
  444.      }
  445.  };
  446.  
  447. @@ -295,9 +295,9 @@ class AvTransmitThread : public QCA::SyncThread
  448.  public:
  449.      AvTransmitHandler *handler;
  450.  
  451. -    AvTransmitThread(QObject *parent = 0) :
  452. +    AvTransmitThread(QObject *parent = nullptr) :
  453.          QCA::SyncThread(parent),
  454. -        handler(0)
  455. +        handler(nullptr)
  456.      {
  457.      }
  458.  
  459. @@ -365,13 +365,13 @@ public:
  460.      AvCallPrivate(AvCall *_q) :
  461.          QObject(_q),
  462.          q(_q),
  463. -        manager(0),
  464. -        sess(0),
  465. +        manager(nullptr),
  466. +        sess(nullptr),
  467.          transmitAudio(false),
  468.          transmitVideo(false),
  469.          transmitting(false),
  470. -        avTransmit(0),
  471. -        avTransmitThread(0)
  472. +        avTransmit(nullptr),
  473. +        avTransmitThread(nullptr)
  474.      {
  475.          allowVideo = AvCallManager::isVideoSupported();
  476.  
  477. @@ -395,7 +395,7 @@ public:
  478.              // note that the object remains active, just
  479.              //   dissociated from the manager
  480.              manager->unlink(q);
  481. -            manager = 0;
  482. +            manager = nullptr;
  483.          }
  484.      }
  485.  
  486. @@ -489,15 +489,15 @@ private:
  487.      {
  488.          // if we had a thread, this will move the object back
  489.          delete avTransmitThread;
  490. -        avTransmitThread = 0;
  491. +        avTransmitThread = nullptr;
  492.  
  493.          delete avTransmit;
  494. -        avTransmit = 0;
  495. +        avTransmit = nullptr;
  496.  
  497.          rtp.reset();
  498.  
  499.          delete sess;
  500. -        sess = 0;
  501. +        sess = nullptr;
  502.      }
  503.  
  504.      void start_rtp()
  505. @@ -710,8 +710,8 @@ private slots:
  506.  
  507.      void sess_activated()
  508.      {
  509. -        PsiMedia::RtpChannel *audio = 0;
  510. -        PsiMedia::RtpChannel *video = 0;
  511. +        PsiMedia::RtpChannel *audio = nullptr;
  512. +        PsiMedia::RtpChannel *video = nullptr;
  513.  
  514.          if(transmitAudio)
  515.              audio = rtp.audioRtpChannel();
  516. @@ -747,7 +747,7 @@ AvCall::AvCall()
  517.  }
  518.  
  519.  AvCall::AvCall(const AvCall &from) :
  520. -    QObject(0)
  521. +    QObject(nullptr)
  522.  {
  523.      Q_UNUSED(from);
  524.      fprintf(stderr, "AvCall copy not supported\n");
  525. @@ -840,7 +840,7 @@ void AvCallManagerPrivate::rtp_incomingReady()
  526.      {
  527.          call->d->sess->reject();
  528.          delete call->d->sess;
  529. -        call->d->sess = 0;
  530. +        call->d->sess = nullptr;
  531.          delete call;
  532.          return;
  533.      }
  534. @@ -850,7 +850,7 @@ void AvCallManagerPrivate::rtp_incomingReady()
  535.  }
  536.  
  537.  AvCallManager::AvCallManager(PsiAccount *pa) :
  538. -    QObject(0)
  539. +    QObject(nullptr)
  540.  {
  541.      d = new AvCallManagerPrivate(pa, this);
  542.  }
  543. diff --git a/src/avcall/calldlg.cpp b/src/avcall/calldlg.cpp
  544. index d34c0b3f..480ed3e8 100644
  545. --- a/src/avcall/calldlg.cpp
  546. +++ b/src/avcall/calldlg.cpp
  547. @@ -62,8 +62,8 @@ public:
  548.          q(_q),
  549.          active(false),
  550.          activated(false),
  551. -        sess(0),
  552. -        timer(0)
  553. +        sess(nullptr),
  554. +        timer(nullptr)
  555.      {
  556.          ui.setupUi(q);
  557.          q->setWindowTitle(tr("Voice Call"));
  558. @@ -105,7 +105,7 @@ public:
  559.              if(active)
  560.                  sess->reject();
  561.  
  562. -            sess->setIncomingVideo(0);
  563. +            sess->setIncomingVideo(nullptr);
  564.              sess->disconnect(this);
  565.              sess->unlink();
  566.              sess->deleteLater();
  567. diff --git a/src/avcall/jinglertp.cpp b/src/avcall/jinglertp.cpp
  568. index a8955380..cf90073d 100755
  569. --- a/src/avcall/jinglertp.cpp
  570. +++ b/src/avcall/jinglertp.cpp
  571. @@ -146,7 +146,7 @@ public:
  572.      QHostAddress extAddr;
  573.      QHostAddress stunBindAddr, stunRelayUdpAddr, stunRelayTcpAddr;
  574.  
  575. -    Resolver(QObject *parent = 0) :
  576. +    Resolver(QObject *parent = nullptr) :
  577.          QObject(parent),
  578.          dnsA(parent),
  579.          dnsB(parent),
  580. @@ -291,10 +291,10 @@ public:
  581.      XMPP::UdpPortReserver *portReserver;
  582.      QList<XMPP::Ice176*> left;
  583.  
  584. -    IceStopper(QObject *parent = 0) :
  585. +    IceStopper(QObject *parent = nullptr) :
  586.          QObject(parent),
  587.          t(this),
  588. -        portReserver(0)
  589. +        portReserver(nullptr)
  590.      {
  591.          connect(&t, SIGNAL(timeout()), SLOT(t_timeout()));
  592.          t.setSingleShot(true);
  593. @@ -334,7 +334,7 @@ private slots:
  594.      {
  595.          XMPP::Ice176 *ice = (XMPP::Ice176 *)sender();
  596.          ice->disconnect(this);
  597. -        ice->setParent(0);
  598. +        ice->setParent(nullptr);
  599.          ice->deleteLater();
  600.          left.removeAll(ice);
  601.          if(left.isEmpty())
  602. @@ -483,19 +483,19 @@ public:
  603.      JingleRtpPrivate(JingleRtp *_q) :
  604.          QObject(_q),
  605.          q(_q),
  606. -        manager(0),
  607. +        manager(nullptr),
  608.          localMaximumBitrate(-1),
  609.          remoteMaximumBitrate(-1),
  610. -        jt(0),
  611. +        jt(nullptr),
  612.          resolver(this),
  613. -        iceA(0),
  614. -        iceV(0),
  615. +        iceA(nullptr),
  616. +        iceV(nullptr),
  617.          local_media_ready(false),
  618.          prov_accepted(false),
  619.          ice_connected(false),
  620.          session_accepted(false),
  621.          session_activated(false),
  622. -        portReserver(0)
  623. +        portReserver(nullptr)
  624.      {
  625.          connect(&resolver, SIGNAL(finished()), SLOT(resolver_finished()));
  626.  
  627. @@ -511,7 +511,7 @@ public:
  628.          cleanup();
  629.          manager->unlink(q);
  630.  
  631. -        handshakeTimer->setParent(0);
  632. +        handshakeTimer->setParent(nullptr);
  633.          handshakeTimer->disconnect(this);
  634.          handshakeTimer->deleteLater();
  635.  
  636. @@ -612,8 +612,8 @@ public:
  637.  
  638.              init_iq_id = iq_id;
  639.  
  640. -            const JingleRtpContent *audioContent = 0;
  641. -            const JingleRtpContent *videoContent = 0;
  642. +            const JingleRtpContent *audioContent = nullptr;
  643. +            const JingleRtpContent *videoContent = nullptr;
  644.  
  645.              // find content
  646.              foreach(const JingleRtpContent &c, envelope.contentList)
  647. @@ -659,8 +659,8 @@ public:
  648.          {
  649.              manager->push_task->respondSuccess(peer, iq_id);
  650.  
  651. -            const JingleRtpContent *audioContent = 0;
  652. -            const JingleRtpContent *videoContent = 0;
  653. +            const JingleRtpContent *audioContent = nullptr;
  654. +            const JingleRtpContent *videoContent = nullptr;
  655.  
  656.              // find content
  657.              foreach(const JingleRtpContent &c, envelope.contentList)
  658. @@ -730,8 +730,8 @@ public:
  659.          {
  660.              manager->push_task->respondSuccess(peer, iq_id);
  661.  
  662. -            const JingleRtpContent *audioContent = 0;
  663. -            const JingleRtpContent *videoContent = 0;
  664. +            const JingleRtpContent *audioContent = nullptr;
  665. +            const JingleRtpContent *videoContent = nullptr;
  666.  
  667.              // find content
  668.              foreach(const JingleRtpContent &c, envelope.contentList)
  669. @@ -790,56 +790,56 @@ private:
  670.          handshakeTimer->stop();
  671.  
  672.          delete jt;
  673. -        jt = 0;
  674. +        jt = nullptr;
  675.  
  676.          if(portReserver)
  677.          {
  678. -            portReserver->setParent(0);
  679. +            portReserver->setParent(nullptr);
  680.  
  681.              QList<XMPP::Ice176*> list;
  682.  
  683.              if(iceA)
  684.              {
  685.                  iceA->disconnect(this);
  686. -                iceA->setParent(0);
  687. +                iceA->setParent(nullptr);
  688.                  list += iceA;
  689. -                iceA = 0;
  690. +                iceA = nullptr;
  691.              }
  692.  
  693.              if(iceV)
  694.              {
  695.                  iceV->disconnect(this);
  696. -                iceV->setParent(0);
  697. +                iceV->setParent(nullptr);
  698.                  list += iceV;
  699. -                iceV = 0;
  700. +                iceV = nullptr;
  701.              }
  702.  
  703.              // pass ownership of portReserver, iceA, and iceV
  704.              IceStopper *iceStopper = new IceStopper;
  705.              iceStopper->start(portReserver, list);
  706.  
  707. -            portReserver = 0;
  708. +            portReserver = nullptr;
  709.          }
  710.          else
  711.          {
  712.              if(iceA)
  713.              {
  714.                  iceA->disconnect(this);
  715. -                iceA->setParent(0);
  716. +                iceA->setParent(nullptr);
  717.                  iceA->deleteLater();
  718. -                iceA = 0;
  719. +                iceA = nullptr;
  720.              }
  721.  
  722.              if(iceV)
  723.              {
  724.                  iceV->disconnect(this);
  725. -                iceV->setParent(0);
  726. +                iceV->setParent(nullptr);
  727.                  iceV->deleteLater();
  728. -                iceV = 0;
  729. +                iceV = nullptr;
  730.              }
  731.  
  732.              delete portReserver;
  733. -            portReserver = 0;
  734. +            portReserver = nullptr;
  735.          }
  736.  
  737.          // prevent delivery of events by manager
  738. @@ -1255,24 +1255,24 @@ private:
  739.              handshakeTimer->stop();
  740.  
  741.              if(portReserver)
  742. -                portReserver->setParent(0);
  743. +                portReserver->setParent(nullptr);
  744.  
  745.              if(iceA)
  746.              {
  747.                  iceA->disconnect(this);
  748. -                iceA->setParent(0);
  749. +                iceA->setParent(nullptr);
  750.              }
  751.              if(iceV)
  752.              {
  753.                  iceV->disconnect(this);
  754. -                iceV->setParent(0);
  755. +                iceV->setParent(nullptr);
  756.              }
  757.  
  758.              rtpChannel->d->setIceObjects(portReserver, iceA, iceV);
  759.  
  760. -            portReserver = 0;
  761. -            iceA = 0;
  762. -            iceV = 0;
  763. +            portReserver = nullptr;
  764. +            iceA = nullptr;
  765. +            iceV = nullptr;
  766.  
  767.              emit q->activated();
  768.          }
  769. @@ -1413,7 +1413,7 @@ private slots:
  770.              return;
  771.  
  772.          JT_JingleRtp *task = jt;
  773. -        jt = 0;
  774. +        jt = nullptr;
  775.  
  776.          if(task->success())
  777.              prov_accept();
  778. @@ -1509,9 +1509,9 @@ JingleRtpChannel *JingleRtp::rtpChannel()
  779.  JingleRtpChannelPrivate::JingleRtpChannelPrivate(JingleRtpChannel *_q) :
  780.      QObject(_q),
  781.      q(_q),
  782. -    portReserver(0),
  783. -    iceA(0),
  784. -    iceV(0)
  785. +    portReserver(nullptr),
  786. +    iceA(nullptr),
  787. +    iceV(nullptr)
  788.  {
  789.      rtpActivityTimer = new QTimer(this);
  790.      connect(rtpActivityTimer, SIGNAL(timeout()), SLOT(rtpActivity_timeout()));
  791. @@ -1523,12 +1523,12 @@ JingleRtpChannelPrivate::~JingleRtpChannelPrivate()
  792.      {
  793.          QList<XMPP::Ice176*> list;
  794.  
  795. -        portReserver->setParent(0);
  796. +        portReserver->setParent(nullptr);
  797.  
  798.          if(iceA)
  799.          {
  800.              iceA->disconnect(this);
  801. -            iceA->setParent(0);
  802. +            iceA->setParent(nullptr);
  803.              //iceA->deleteLater();
  804.              list += iceA;
  805.          }
  806. @@ -1536,7 +1536,7 @@ JingleRtpChannelPrivate::~JingleRtpChannelPrivate()
  807.          if(iceV)
  808.          {
  809.              iceV->disconnect(this);
  810. -            iceV->setParent(0);
  811. +            iceV->setParent(nullptr);
  812.              //iceV->deleteLater();
  813.              list += iceV;
  814.          }
  815. @@ -1546,7 +1546,7 @@ JingleRtpChannelPrivate::~JingleRtpChannelPrivate()
  816.          iceStopper->start(portReserver, list);
  817.      }
  818.  
  819. -    rtpActivityTimer->setParent(0);
  820. +    rtpActivityTimer->setParent(nullptr);
  821.      rtpActivityTimer->disconnect(this);
  822.      rtpActivityTimer->deleteLater();
  823.  }
  824. @@ -1814,7 +1814,7 @@ void JingleRtpManagerPrivate::push_task_incomingRequest(const XMPP::Jid &from, c
  825.  }
  826.  
  827.  JingleRtpManager::JingleRtpManager(XMPP::Client *client) :
  828. -    QObject(0)
  829. +    QObject(nullptr)
  830.  {
  831.      d = new JingleRtpManagerPrivate(client, this);
  832.  }
  833. diff --git a/src/avcall/jinglertptasks.cpp b/src/avcall/jinglertptasks.cpp
  834. index f1dade2c..7747d9e3 100644
  835. --- a/src/avcall/jinglertptasks.cpp
  836. +++ b/src/avcall/jinglertptasks.cpp
  837. @@ -174,7 +174,7 @@ static JingleCondEntry jingleCondTable[] =
  838.      { "timeout",                  JingleRtpReason::Timeout },
  839.      { "unsupported-applications", JingleRtpReason::UnsupportedApplications },
  840.      { "unsupported-transports",   JingleRtpReason::UnsupportedTransports },
  841. -    { 0, 0 }
  842. +    { nullptr, 0 }
  843.  };
  844.  
  845.  static QString conditionToElementName(JingleRtpReason::Condition cond)
  846. diff --git a/src/bobfilecache.cpp b/src/bobfilecache.cpp
  847. index 4823b061..50f962d7 100644
  848. --- a/src/bobfilecache.cpp
  849. +++ b/src/bobfilecache.cpp
  850. @@ -26,7 +26,7 @@ using namespace XMPP;
  851.  
  852.  
  853.  BoBFileCache::BoBFileCache()
  854. -    : BoBCache(0)
  855. +    : BoBCache(nullptr)
  856.  {
  857.      setParent(QApplication::instance());
  858.      _fileCache = new FileCache(ApplicationInfo::bobDir(), this);
  859. @@ -61,4 +61,4 @@ BoBData BoBFileCache::get(const QString &cid)
  860.      return bd;
  861.  }
  862.  
  863. -BoBFileCache* BoBFileCache::_instance = 0;
  864. +BoBFileCache* BoBFileCache::_instance = nullptr;
  865. diff --git a/src/bookmarkmanagedlg.cpp b/src/bookmarkmanagedlg.cpp
  866. index c1ad4c53..b2ee97d0 100644
  867. --- a/src/bookmarkmanagedlg.cpp
  868. +++ b/src/bookmarkmanagedlg.cpp
  869. @@ -33,7 +33,7 @@
  870.  BookmarkManageDlg::BookmarkManageDlg(PsiAccount* account)
  871.      : QDialog()
  872.      , account_(account)
  873. -    , model_(0)
  874. +    , model_(nullptr)
  875.  {
  876.      setAttribute(Qt::WA_DeleteOnClose, true);
  877.      setWindowFlags(Qt::Dialog | Qt::WindowTitleHint | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint | Qt::CustomizeWindowHint);
  878. diff --git a/src/chatdlg.cpp b/src/chatdlg.cpp
  879. index 40836313..28209cd3 100644
  880. --- a/src/chatdlg.cpp
  881. +++ b/src/chatdlg.cpp
  882. @@ -98,12 +98,12 @@ ChatDlg* ChatDlg::create(const Jid& jid, PsiAccount* account, TabManager* tabMan
  883.  ChatDlg::ChatDlg(const Jid& jid, PsiAccount* pa, TabManager* tabManager)
  884.      : TabbableWidget(jid, pa, tabManager)
  885.      , highlightersInstalled_(false)
  886. -    , delayedMessages(0)
  887. +    , delayedMessages(nullptr)
  888.  {
  889.      pending_ = 0;
  890.      keepOpen_ = false;
  891.      warnSend_ = false;
  892. -    selfDestruct_ = 0;
  893. +    selfDestruct_ = nullptr;
  894.      transid_ = -1;
  895.      key_ = "";
  896.      lastWasEncrypted_ = false;
  897. @@ -134,7 +134,7 @@ ChatDlg::ChatDlg(const Jid& jid, PsiAccount* pa, TabManager* tabManager)
  898.      lastChatState_ = XMPP::StateNone;
  899.      sendComposingEvents_ = false;
  900.      isComposing_ = false;
  901. -    composingTimer_ = 0;
  902. +    composingTimer_ = nullptr;
  903.      updateRealJid();
  904.  }
  905.  
  906. @@ -673,7 +673,7 @@ void ChatDlg::setSelfDestruct(int minutes)
  907.      if (minutes <= 0) {
  908.          if (selfDestruct_) {
  909.              delete selfDestruct_;
  910. -            selfDestruct_ = 0;
  911. +            selfDestruct_ = nullptr;
  912.          }
  913.          return;
  914.      }
  915. @@ -1015,7 +1015,7 @@ void ChatDlg::holdMessages(bool hold)
  916.                  displayMessage(mv);
  917.          }
  918.          delete delayedMessages;
  919. -        delayedMessages = 0;
  920. +        delayedMessages = nullptr;
  921.      }
  922.  }
  923.  
  924. @@ -1200,7 +1200,7 @@ void ChatDlg::checkComposing()
  925.      if (!isComposing_) {
  926.          // User stopped composing
  927.          composingTimer_->deleteLater();
  928. -        composingTimer_ = 0;
  929. +        composingTimer_ = nullptr;
  930.          emit composing(false);
  931.      }
  932.      isComposing_ = false; // Reset composing
  933. @@ -1210,7 +1210,7 @@ void ChatDlg::resetComposing()
  934.  {
  935.      if (composingTimer_) {
  936.          delete composingTimer_;
  937. -        composingTimer_ = 0;
  938. +        composingTimer_ = nullptr;
  939.          isComposing_ = false;
  940.      }
  941.  }
  942. diff --git a/src/chateditproxy.cpp b/src/chateditproxy.cpp
  943. index ff34ef2a..e21d0463 100644
  944. --- a/src/chateditproxy.cpp
  945. +++ b/src/chateditproxy.cpp
  946. @@ -27,8 +27,8 @@
  947.  ChatEditProxy::ChatEditProxy(QWidget* parent)
  948.      : QWidget(parent)
  949.      , lineEditEnabled_(false)
  950. -    , textEdit_(0)
  951. -    , layout_(0)
  952. +    , textEdit_(nullptr)
  953. +    , layout_(nullptr)
  954.  {
  955.      layout_ = new QVBoxLayout(this);
  956.      layout_->setMargin(0);
  957. @@ -77,7 +77,7 @@ void ChatEditProxy::moveData(QTextEdit* newTextEdit, QTextEdit* oldTextEdit) con
  958.      QTextCursor cursor = oldTextEdit->textCursor();
  959.  
  960.      doc->setParent(newTextEdit);
  961. -    oldTextEdit->setDocument(0);
  962. +    oldTextEdit->setDocument(nullptr);
  963.  
  964.      newTextEdit->setDocument(doc);
  965.      newTextEdit->setTextCursor(cursor);
  966. diff --git a/src/chatsplitter.cpp b/src/chatsplitter.cpp
  967. index c314b00e..13e3cc41 100644
  968. --- a/src/chatsplitter.cpp
  969. +++ b/src/chatsplitter.cpp
  970. @@ -32,8 +32,8 @@
  971.  ChatSplitter::ChatSplitter(QWidget* parent)
  972.      : QWidget(parent)
  973.      , splitterEnabled_(true)
  974. -    , splitter_(0)
  975. -    , layout_(0)
  976. +    , splitter_(nullptr)
  977. +    , layout_(nullptr)
  978.  {
  979.      connect(PsiOptions::instance(), SIGNAL(optionChanged(const QString&)), SLOT(optionsChanged()));
  980.      optionsChanged();
  981. diff --git a/src/chatviewtheme.cpp b/src/chatviewtheme.cpp
  982. index 18497d7c..9abb9b63 100644
  983. --- a/src/chatviewtheme.cpp
  984. +++ b/src/chatviewtheme.cpp
  985. @@ -131,7 +131,7 @@ bool ChatViewThemePrivate::load(std::function<void(bool)> loadCallback)
  986.          jsUtil.reset(new ChatViewThemeJSUtil(this));
  987.      }
  988.      if (wv.isNull()) {
  989. -        wv = new WebView(0);
  990. +        wv = new WebView(nullptr);
  991.      }
  992.  
  993.      QString themeType = id.section('/', 0, 0);
  994. diff --git a/src/chatviewthemeprovider_priv.cpp b/src/chatviewthemeprovider_priv.cpp
  995. index 71f54424..167621b9 100644
  996. --- a/src/chatviewthemeprovider_priv.cpp
  997. +++ b/src/chatviewthemeprovider_priv.cpp
  998. @@ -232,7 +232,7 @@ ChatViewCon::ChatViewCon(PsiCon *pc) : QObject(pc), pc(pc)
  999.  ChatViewCon::~ChatViewCon()
  1000.  {
  1001.  #ifdef WEBENGINE
  1002. -    QWebEngineProfile::defaultProfile()->setRequestInterceptor(0);
  1003. +    QWebEngineProfile::defaultProfile()->setRequestInterceptor(nullptr);
  1004.      delete requestInterceptor;
  1005.      delete themeServer;
  1006.  #endif
  1007. diff --git a/src/coloropt.cpp b/src/coloropt.cpp
  1008. index af98a48e..edac8d08 100644
  1009. --- a/src/coloropt.cpp
  1010. +++ b/src/coloropt.cpp
  1011. @@ -23,7 +23,7 @@
  1012.  #include "psioptions.h"
  1013.  
  1014.  ColorOpt::ColorOpt()
  1015. -    : QObject(0)
  1016. +    : QObject(nullptr)
  1017.  {
  1018.      connect(PsiOptions::instance(), SIGNAL(optionChanged(const QString&)), SLOT(optionChanged(const QString&)));
  1019.      connect(PsiOptions::instance(), SIGNAL(destroyed()), SLOT(reset()));
  1020. @@ -99,7 +99,7 @@ ColorOpt* ColorOpt::instance()
  1021.  
  1022.  void ColorOpt::reset()
  1023.  {
  1024. -    instance_.reset(0);
  1025. +    instance_.reset(nullptr);
  1026.  }
  1027.  
  1028.  QScopedPointer<ColorOpt> ColorOpt::instance_;
  1029. diff --git a/src/common.cpp b/src/common.cpp
  1030. index 52e21795..654796f2 100644
  1031. --- a/src/common.cpp
  1032. +++ b/src/common.cpp
  1033. @@ -375,7 +375,7 @@ QLayout *rw_recurseFindLayout(QLayout *lo, QWidget *w)
  1034.              return lo;
  1035.          }
  1036.      }
  1037. -    return 0;
  1038. +    return nullptr;
  1039.  }
  1040.  
  1041.  QLayout *rw_findLayoutOf(QWidget *w)
  1042. @@ -450,7 +450,7 @@ void reorderGridLayout(QGridLayout* layout, int maxCols)
  1043.  TabbableWidget* findActiveTab()
  1044.  {
  1045.      QWidget* chat = QApplication::activeWindow();
  1046. -    TabbableWidget* tw = 0;
  1047. +    TabbableWidget* tw = nullptr;
  1048.      if(chat) {
  1049.          TabDlg* td = qobject_cast<TabDlg*>(chat);
  1050.          if(td) {
  1051. diff --git a/src/contactlistaccountmenu.cpp b/src/contactlistaccountmenu.cpp
  1052. index f3c85a20..73ac1483 100644
  1053. --- a/src/contactlistaccountmenu.cpp
  1054. +++ b/src/contactlistaccountmenu.cpp
  1055. @@ -67,14 +67,14 @@ class ContactListAccountMenu::Private : public QObject
  1056.  
  1057.  public:
  1058.      Private(ContactListAccountMenu *menu, PsiAccount *_account)
  1059. -        : QObject(0)
  1060. +        : QObject(nullptr)
  1061.          , account(_account)
  1062.      {
  1063.          connect(menu, SIGNAL(aboutToShow()), SLOT(updateActions()));
  1064.          connect(account, SIGNAL(updatedActivity()), SLOT(updateActions()));
  1065.          connect(account, SIGNAL(updatedAccount()), SLOT(updateActions()));
  1066.  
  1067. -        statusMenu_ = new AccountStatusMenu(0, account->psi(), account);
  1068. +        statusMenu_ = new AccountStatusMenu(nullptr, account->psi(), account);
  1069.          statusMenu_->fill();
  1070.          statusMenu_->setTitle(tr("&Status"));
  1071.          statusMenu_->setIcon(PsiIconset::instance()->status(makeSTATUS(account->status())).icon());
  1072. diff --git a/src/contactlistdragmodel.cpp b/src/contactlistdragmodel.cpp
  1073. index 4c022253..4ac0a26e 100644
  1074. --- a/src/contactlistdragmodel.cpp
  1075. +++ b/src/contactlistdragmodel.cpp
  1076. @@ -313,12 +313,12 @@ PsiAccount* ContactListDragModel::getDropAccount(PsiAccount* account, const QMod
  1077.      Q_UNUSED(account);
  1078.  
  1079.      if (!parent.isValid())
  1080. -        return 0;
  1081. +        return nullptr;
  1082.  
  1083.      ContactListItem *item = static_cast<ContactListItem*>(parent.internalPointer());
  1084.      Q_ASSERT(item);
  1085.      if (!item)
  1086. -        return 0;
  1087. +        return nullptr;
  1088.  
  1089.      if (item->isContact()) {
  1090.          return item->contact()->account();
  1091. @@ -327,7 +327,7 @@ PsiAccount* ContactListDragModel::getDropAccount(PsiAccount* account, const QMod
  1092.          return item->account();
  1093.      }
  1094.  
  1095. -    return 0;
  1096. +    return nullptr;
  1097.  }
  1098.  
  1099.  QString ContactListDragModel::getDropGroupName(const QModelIndex& parent) const
  1100. @@ -338,7 +338,7 @@ QString ContactListDragModel::getDropGroupName(const QModelIndex& parent) const
  1101.      ContactListItem *item = static_cast<ContactListItem*>(parent.internalPointer());
  1102.      Q_ASSERT(item);
  1103.      if (!item)
  1104. -        return 0;
  1105. +        return nullptr;
  1106.  
  1107.      if (item->isGroup()) {
  1108.          return item->name();
  1109. diff --git a/src/contactlistdragview.cpp b/src/contactlistdragview.cpp
  1110. index db41e421..3d146ef8 100644
  1111. --- a/src/contactlistdragview.cpp
  1112. +++ b/src/contactlistdragview.cpp
  1113. @@ -47,15 +47,15 @@
  1114.  
  1115.  ContactListDragView::ContactListDragView(QWidget* parent)
  1116.      : ContactListView(parent)
  1117. -    , backedUpSelection_(0)
  1118. -    , removeAction_(0)
  1119. +    , backedUpSelection_(nullptr)
  1120. +    , removeAction_(nullptr)
  1121.      , dropIndicatorRect_(QRect())
  1122.      , dropIndicatorPosition_(QAbstractItemView::OnViewport)
  1123.      , keyboardModifiers_(Qt::NoModifier)
  1124.      , dirty_(false)
  1125. -    , pressedIndex_(0)
  1126. +    , pressedIndex_(nullptr)
  1127.      , pressedIndexWasSelected_(false)
  1128. -    , viewportMenu_(0)
  1129. +    , viewportMenu_(nullptr)
  1130.      , editing(false)
  1131.  {
  1132.      removeAction_ = new IconAction("", "psi/remove", QString(), ShortcutManager::instance()->shortcuts("contactlist.delete"), this, "act_remove");
  1133. @@ -154,7 +154,7 @@ void ContactListDragView::mouseDoubleClickEvent(QMouseEvent* e)
  1134.  {
  1135.      ContactListDragModel* model = qobject_cast<ContactListDragModel*>(realModel());
  1136.      if (model && pressedIndex_) {
  1137. -        QModelIndexList indexes = model->indexesFor(0, pressedIndex_);
  1138. +        QModelIndexList indexes = model->indexesFor(nullptr, pressedIndex_);
  1139.          if (e->button() == Qt::LeftButton
  1140.              && indexes.count() == 1
  1141.              && model->toItem(indexes.first())->isGroup()) {
  1142. @@ -201,7 +201,7 @@ QModelIndexList ContactListDragView::indexesFor(PsiContact* contact, QMimeData*
  1143.  void ContactListDragView::toolTipEntered(PsiContact* contact, QMimeData* contactSelection)
  1144.  {
  1145.      Q_UNUSED(contact); // we don't want tooltips on multiple selections
  1146. -    QModelIndexList indexes = indexesFor(0, contactSelection);
  1147. +    QModelIndexList indexes = indexesFor(nullptr, contactSelection);
  1148.      if (indexes.count() == 1) {
  1149.          updateCursor(proxyIndex(indexes.first()), UC_TooltipEntered, false);
  1150.      }
  1151. @@ -312,7 +312,7 @@ bool ContactListDragView::supportsDropOnIndex(QDropEvent *e, const QModelIndex &
  1152.      ContactListModelSelection selection(e->mimeData());
  1153.      ContactListDragModel *model = qobject_cast<ContactListDragModel*>(realModel());
  1154.      if (!selection.haveRosterSelection())
  1155. -        model = 0;
  1156. +        model = nullptr;
  1157.  
  1158.      if (model && !model->supportsMimeDataOnIndex(e->mimeData(), realIndex(index))) {
  1159.          return false;
  1160. @@ -612,7 +612,7 @@ QMimeData* ContactListDragView::selection() const
  1161.      if (model && model->contactList() && !selectedIndexes().isEmpty()) {
  1162.          return model->mimeData(realIndexes(selectedIndexes()));
  1163.      }
  1164. -    return 0;
  1165. +    return nullptr;
  1166.  }
  1167.  
  1168.  void ContactListDragView::restoreSelection(QMimeData* _mimeData)
  1169. @@ -749,7 +749,7 @@ void ContactListDragView::mousePressEvent(QMouseEvent* e)
  1170.  {
  1171.      pressPosition_ = e->pos();
  1172.      delete pressedIndex_;
  1173. -    pressedIndex_ = 0;
  1174. +    pressedIndex_ = nullptr;
  1175.      pressedIndexWasSelected_ = false;
  1176.  
  1177.      QModelIndex index = indexAt(e->pos());
  1178. @@ -834,7 +834,7 @@ void ContactListDragView::backupCurrentSelection()
  1179.  {
  1180.      if (backedUpSelection_) {
  1181.          delete backedUpSelection_;
  1182. -        backedUpSelection_ = 0;
  1183. +        backedUpSelection_ = nullptr;
  1184.      }
  1185.  
  1186.      backedUpSelection_ = selection();
  1187. @@ -885,7 +885,7 @@ void ContactListDragView::mouseReleaseEvent(QMouseEvent* event)
  1188.      bool filter = false;
  1189.      ContactListDragModel* model = qobject_cast<ContactListDragModel*>(realModel());
  1190.      if (model && pressedIndex_) {
  1191. -        QModelIndexList indexes = model->indexesFor(0, pressedIndex_);
  1192. +        QModelIndexList indexes = model->indexesFor(nullptr, pressedIndex_);
  1193.          QModelIndex index = indexes.count() == 1 ? proxyIndex(indexes.first()) : QModelIndex();
  1194.          if (event->button() == Qt::LeftButton &&
  1195.              index.isValid() &&
  1196. @@ -908,7 +908,7 @@ void ContactListDragView::mouseReleaseEvent(QMouseEvent* event)
  1197.  
  1198.      pressPosition_ = QPoint();
  1199.      delete pressedIndex_;
  1200. -    pressedIndex_ = 0;
  1201. +    pressedIndex_ = nullptr;
  1202.  }
  1203.  
  1204.  void ContactListDragView::setViewportMenu(QMenu* menu)
  1205. diff --git a/src/contactlistgroupmenu.cpp b/src/contactlistgroupmenu.cpp
  1206. index 73560e7a..9555b94a 100644
  1207. --- a/src/contactlistgroupmenu.cpp
  1208. +++ b/src/contactlistgroupmenu.cpp
  1209. @@ -27,7 +27,7 @@
  1210.  
  1211.  
  1212.  ContactListGroupMenu::Private::Private(ContactListGroupMenu *menu, ContactListItem *item)
  1213. -    : QObject(0)
  1214. +    : QObject(nullptr)
  1215.      , q(menu)
  1216.      , group(item)
  1217.  {
  1218. @@ -69,10 +69,10 @@ ContactListGroupMenu::Private::Private(ContactListGroupMenu *menu, ContactListIt
  1219.      actionMucLeave_ = new IconAction(tr("Leave All"), this, "psi/action_muc_leave");
  1220.      connect(actionMucLeave_, SIGNAL(triggered()), SLOT(mucLeave()));
  1221.  
  1222. -    actionHide_ = new IconAction(tr("Hidden"), "psi/show_hidden", tr("Hidden"), 0, this, 0, true);
  1223. +    actionHide_ = new IconAction(tr("Hidden"), "psi/show_hidden", tr("Hidden"), 0, this, nullptr, true);
  1224.      connect(actionHide_, SIGNAL(triggered(bool)), SLOT(actHide(bool)));
  1225.  
  1226. -    authMenu_ = 0;
  1227. +    authMenu_ = nullptr;
  1228.  
  1229.      if (item->specialGroupType() != ContactListItem::SpecialGroupType::ConferenceSpecialGroupType) {
  1230.          q->addAction(renameAction_);
  1231. diff --git a/src/contactlistitemmenu.cpp b/src/contactlistitemmenu.cpp
  1232. index 0d9840fb..00d33c47 100644
  1233. --- a/src/contactlistitemmenu.cpp
  1234. +++ b/src/contactlistitemmenu.cpp
  1235. @@ -26,7 +26,7 @@
  1236.  #include <QLabel>
  1237.  
  1238.  ContactListItemMenu::ContactListItemMenu(ContactListItem* item, ContactListModel* model)
  1239. -    : QMenu(0)
  1240. +    : QMenu(nullptr)
  1241.      , item_(item)
  1242.      , model_(model)
  1243.      , _lblTitle(nullptr)
  1244. diff --git a/src/contactlistmodel.cpp b/src/contactlistmodel.cpp
  1245. index 513c84fc..b29a68ce 100644
  1246. --- a/src/contactlistmodel.cpp
  1247. +++ b/src/contactlistmodel.cpp
  1248. @@ -316,7 +316,7 @@ void ContactListModel::Private::clear()
  1249.      QHashIterator<PsiContact*, QPersistentModelIndex> it(monitoredContacts);
  1250.      while (it.hasNext()) {
  1251.          it.next();
  1252. -        disconnect(it.key(), 0, this, 0);
  1253. +        disconnect(it.key(), nullptr, this, nullptr);
  1254.      }
  1255.      monitoredContacts.clear();
  1256.  
  1257. @@ -369,7 +369,7 @@ void ContactListModel::Private::removeContact(PsiContact *contact)
  1258.              emit q->dataChanged(index, index);
  1259.          }
  1260.      }
  1261. -    disconnect(contact, 0, this, 0);
  1262. +    disconnect(contact, nullptr, this, nullptr);
  1263.      operationQueue.remove(contact);
  1264.  }
  1265.  
  1266. @@ -443,7 +443,7 @@ void ContactListModel::Private::updateAccount()
  1267.  
  1268.  void ContactListModel::Private::cleanUpAccount(PsiAccount *account)
  1269.  {
  1270. -    disconnect(account, 0, this, nullptr);
  1271. +    disconnect(account, nullptr, this, nullptr);
  1272.      ContactListItem *root = static_cast<ContactListItem*>(q->root());
  1273.      ContactListItem *item = root->findAccount(account);
  1274.      if (!item) {
  1275. diff --git a/src/contactlistmodelselection.cpp b/src/contactlistmodelselection.cpp
  1276. index 642f252e..b7439b89 100644
  1277. --- a/src/contactlistmodelselection.cpp
  1278. +++ b/src/contactlistmodelselection.cpp
  1279. @@ -32,7 +32,7 @@ static const QString psiRosterSelectionMimeType = "application/psi-roster-select
  1280.  
  1281.  ContactListModelSelection::ContactListModelSelection(QList<ContactListItem*> items)
  1282.      : QMimeData()
  1283. -    , mimeData_(0)
  1284. +    , mimeData_(nullptr)
  1285.  {
  1286.      QDomDocument doc;
  1287.      QDomElement root = doc.createElement("items");
  1288. diff --git a/src/contactmanager/contactmanagerdlg.cpp b/src/contactmanager/contactmanagerdlg.cpp
  1289. index 6b0d0d6c..3c21675f 100644
  1290. --- a/src/contactmanager/contactmanagerdlg.cpp
  1291. +++ b/src/contactmanager/contactmanagerdlg.cpp
  1292. @@ -35,9 +35,9 @@
  1293.  
  1294.  
  1295.  ContactManagerDlg::ContactManagerDlg(PsiAccount *pa) :
  1296. -    QDialog(0, Qt::Window),
  1297. +    QDialog(nullptr, Qt::Window),
  1298.      pa_(pa),
  1299. -    um(0)
  1300. +    um(nullptr)
  1301.  {
  1302.      setAttribute(Qt::WA_DeleteOnClose, true);
  1303.      ui_.setupUi(this);
  1304. diff --git a/src/discodlg.cpp b/src/discodlg.cpp
  1305. index 7d015fbf..79439ba9 100644
  1306. --- a/src/discodlg.cpp
  1307. +++ b/src/discodlg.cpp
  1308. @@ -1246,7 +1246,7 @@ void DiscoDlg::Private::actionActivated(int id)
  1309.  void DiscoDlg::Private::objectDestroyed(QObject *obj)
  1310.  {
  1311.      if ( obj == busy )
  1312. -        busy = 0;
  1313. +        busy = nullptr;
  1314.  }
  1315.  
  1316.  //----------------------------------------------------------------------------
  1317. @@ -1254,7 +1254,7 @@ void DiscoDlg::Private::objectDestroyed(QObject *obj)
  1318.  //----------------------------------------------------------------------------
  1319.  
  1320.  DiscoDlg::DiscoDlg(PsiAccount *pa, const Jid &jid, const QString &node)
  1321. -    : QDialog(0)
  1322. +    : QDialog(nullptr)
  1323.  {
  1324.      setAttribute(Qt::WA_DeleteOnClose);
  1325.      setWindowFlags(Qt::Dialog | Qt::WindowTitleHint | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint | Qt::CustomizeWindowHint);
  1326. diff --git a/src/edbflatfile.cpp b/src/edbflatfile.cpp
  1327. index b228a633..880b49b7 100644
  1328. --- a/src/edbflatfile.cpp
  1329. +++ b/src/edbflatfile.cpp
  1330. @@ -182,7 +182,7 @@ EDBFlatFile::File *EDBFlatFile::findFile(const Jid &j) const
  1331.          if(i->j.compare(j, false))
  1332.              return i;
  1333.      }
  1334. -    return 0;
  1335. +    return nullptr;
  1336.  }
  1337.  
  1338.  EDBFlatFile::File *EDBFlatFile::ensureFile(const Jid &j)
  1339. @@ -637,7 +637,7 @@ PsiEvent::Ptr EDBFlatFile::File::lineToEvent(const QString &line)
  1340.              m.urlAdd(Url(url, logdecode(strData.at(UrlDesc))));
  1341.          m.setSpooled(true);
  1342.  
  1343. -        MessageEvent::Ptr me(new MessageEvent(m, 0));
  1344. +        MessageEvent::Ptr me(new MessageEvent(m, nullptr));
  1345.          me->setOriginLocal(originLocal);
  1346.  
  1347.          return me.staticCast<PsiEvent>();
  1348. @@ -661,7 +661,7 @@ PsiEvent::Ptr EDBFlatFile::File::lineToEvent(const QString &line)
  1349.          else if(type == 8)
  1350.              subType = "unsubscribed";
  1351.  
  1352. -        AuthEvent::Ptr ae(new AuthEvent(j, subType, 0));
  1353. +        AuthEvent::Ptr ae(new AuthEvent(j, subType, nullptr));
  1354.          ae->setTimeStamp(QDateTime::fromString(strData.at(Time), Qt::ISODate));
  1355.          return ae.staticCast<PsiEvent>();
  1356.      }
  1357. diff --git a/src/eventdlg.cpp b/src/eventdlg.cpp
  1358. index 5e271f44..c8cdf5af 100644
  1359. --- a/src/eventdlg.cpp
  1360. +++ b/src/eventdlg.cpp
  1361. @@ -331,10 +331,10 @@ void AttachView::contextMenuEvent(QContextMenuEvent* e)
  1362.      if(!i)
  1363.          return;
  1364.  
  1365. -    QAction* goToUrlAction = 0;
  1366. -    QAction* copyLocationAction = 0;
  1367. -    QAction* joinGroupChatAction = 0;
  1368. -    QAction* removeAction = 0;
  1369. +    QAction* goToUrlAction = nullptr;
  1370. +    QAction* copyLocationAction = nullptr;
  1371. +    QAction* joinGroupChatAction = nullptr;
  1372. +    QAction* removeAction = nullptr;
  1373.  
  1374.      QMenu pm(this);
  1375.      if(i->type == 0) {
  1376. @@ -557,16 +557,16 @@ public slots:
  1377.  };
  1378.  
  1379.  EventDlg::EventDlg(const QString &to, PsiCon *psi, PsiAccount *pa)
  1380. -    : AdvancedWidget<QWidget>(0)
  1381. +    : AdvancedWidget<QWidget>(nullptr)
  1382.  {
  1383.      setAttribute(Qt::WA_DeleteOnClose);
  1384.      d = new Private(this);
  1385.      d->composing = true;
  1386.      d->psi = psi;
  1387. -    d->pa = 0;
  1388. +    d->pa = nullptr;
  1389.      d->psi->dialogRegister(this);
  1390.  
  1391. -    d->anim = 0;
  1392. +    d->anim = nullptr;
  1393.      d->nextAmount = 0;
  1394.      d->urlOnShow = false;
  1395.  
  1396. @@ -617,7 +617,7 @@ EventDlg::EventDlg(const QString &to, PsiCon *psi, PsiAccount *pa)
  1397.  }
  1398.  
  1399.  EventDlg::EventDlg(const Jid &j, PsiAccount *pa, bool unique)
  1400. -    : AdvancedWidget<QWidget>(0)
  1401. +    : AdvancedWidget<QWidget>(nullptr)
  1402.  {
  1403.      setAttribute(Qt::WA_DeleteOnClose);
  1404.      d = new Private(this);
  1405. @@ -632,7 +632,7 @@ EventDlg::EventDlg(const Jid &j, PsiAccount *pa, bool unique)
  1406.      else
  1407.          d->pa->dialogRegister(this);
  1408.  
  1409. -    d->anim = 0;
  1410. +    d->anim = nullptr;
  1411.      d->nextAmount = 0;
  1412.      d->urlOnShow = false;
  1413.  
  1414. @@ -681,13 +681,13 @@ void EventDlg::init()
  1415.      d->transid = -1;
  1416.  
  1417.      if(d->composing) {
  1418. -        d->lb_ident = 0;
  1419. +        d->lb_ident = nullptr;
  1420.          d->cb_ident = d->psi->accountsComboBox(this);
  1421.          connect(d->cb_ident, SIGNAL(activated(PsiAccount *)), SLOT(updateIdentity(PsiAccount *)));
  1422.          hb1->addWidget(d->cb_ident);
  1423.      }
  1424.      else {
  1425. -        d->cb_ident = 0;
  1426. +        d->cb_ident = nullptr;
  1427.          d->lb_ident = new AccountLabel(this);
  1428.          d->lb_ident->setAccount(d->pa);
  1429.          d->lb_ident->setSizePolicy(QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed ));
  1430. @@ -767,12 +767,12 @@ void EventDlg::init()
  1431.          d->tb_pgp = new IconToolButton(this);
  1432.          d->tb_pgp->setCheckable(true);
  1433.          d->tb_pgp->setToolTip(tr("Toggle encryption"));
  1434. -        d->lb_pgp = 0;
  1435. +        d->lb_pgp = nullptr;
  1436.      }
  1437.      else {
  1438.          d->lb_pgp = new IconLabel(this);
  1439.          d->lb_pgp->setPsiIcon(IconsetFactory::iconPtr("psi/cryptoNo"));
  1440. -        d->tb_pgp = 0;
  1441. +        d->tb_pgp = nullptr;
  1442.      }
  1443.  
  1444.      d->tb_url = new IconToolButton(this);
  1445. @@ -1372,7 +1372,7 @@ void EventDlg::optionsUpdate()
  1446.          QIcon i;
  1447.          i.addPixmap(IconsetFactory::icon("psi/cryptoNo").impix(),  QIcon::Normal, QIcon::Off);
  1448.          i.addPixmap(IconsetFactory::icon("psi/cryptoYes").impix(), QIcon::Normal, QIcon::On);
  1449. -        d->tb_pgp->setPsiIcon(0);
  1450. +        d->tb_pgp->setPsiIcon(nullptr);
  1451.          d->tb_pgp->setIcon(i);
  1452.      }
  1453.      if(d->lb_pgp)
  1454. @@ -1719,7 +1719,7 @@ void EventDlg::updateContact(const Jid &jid)
  1455.      if(d->jid.compare(jid, false)) {
  1456.          QString rname = d->jid.resource();
  1457.          QList<UserListItem*> ul = d->pa->findRelevant(d->jid);
  1458. -        UserListItem *u = 0;
  1459. +        UserListItem *u = nullptr;
  1460.          int status = -1;
  1461.          if(!ul.isEmpty()) {
  1462.              u = ul.first();
  1463. @@ -2042,8 +2042,8 @@ void EventDlg::updateReadNext(PsiIcon *nextAnim, int nextAmount)
  1464.      d->nextAmount = nextAmount;
  1465.  
  1466.      if(nextAmount == 0) {
  1467. -        d->setNextAnim(0);
  1468. -        d->pb_next->forceSetPsiIcon(0);
  1469. +        d->setNextAnim(nullptr);
  1470. +        d->pb_next->forceSetPsiIcon(nullptr);
  1471.          d->pb_next->setEnabled(false);
  1472.          d->pb_next->setText(tr("&Next"));
  1473.  
  1474. diff --git a/src/filecache.cpp b/src/filecache.cpp
  1475. index 516e0d64..8473e40c 100644
  1476. --- a/src/filecache.cpp
  1477. +++ b/src/filecache.cpp
  1478. @@ -246,7 +246,7 @@ FileCacheItem *FileCache::get(const QString &id, bool reborn)
  1479.          }
  1480.          remove(id);
  1481.      }
  1482. -    return 0;
  1483. +    return nullptr;
  1484.  }
  1485.  
  1486.  QByteArray FileCache::getData(const QString &id, bool reborn)
  1487. diff --git a/src/filetransdlg.cpp b/src/filetransdlg.cpp
  1488. index 10145a17..20635705 100644
  1489. --- a/src/filetransdlg.cpp
  1490. +++ b/src/filetransdlg.cpp
  1491. @@ -66,7 +66,7 @@ static int calcProgressStep(qlonglong big, int complement, int shift)
  1492.      return ((big + complement) >> shift);
  1493.  }
  1494.  
  1495. -static QStringList *activeFiles = 0;
  1496. +static QStringList *activeFiles = nullptr;
  1497.  
  1498.  static void active_file_add(const QString &s)
  1499.  {
  1500. @@ -140,7 +140,7 @@ FileTransferHandler::FileTransferHandler(PsiAccount *pa, FileTransfer *ft)
  1501.  {
  1502.      d = new Private;
  1503.      d->pa = pa;
  1504. -    d->c = 0;
  1505. +    d->c = nullptr;
  1506.  
  1507.      if(ft) {
  1508.          d->sending = false;
  1509. @@ -158,7 +158,7 @@ FileTransferHandler::FileTransferHandler(PsiAccount *pa, FileTransfer *ft)
  1510.      }
  1511.      else {
  1512.          d->sending = true;
  1513. -        d->ft = 0;
  1514. +        d->ft = nullptr;
  1515.      }
  1516.  }
  1517.  
  1518. @@ -373,7 +373,7 @@ void FileTransferHandler::ft_connected()
  1519.          }
  1520.          if(!ok) {
  1521.              delete d->ft;
  1522. -            d->ft = 0;
  1523. +            d->ft = nullptr;
  1524.              error(ErrFile, 0, d->f.errorString());
  1525.              return;
  1526.          }
  1527. @@ -400,7 +400,7 @@ void FileTransferHandler::ft_connected()
  1528.          }
  1529.          if(!ok) {
  1530.              delete d->ft;
  1531. -            d->ft = 0;
  1532. +            d->ft = nullptr;
  1533.              error(ErrFile, 0, d->f.errorString());
  1534.              return;
  1535.          }
  1536. @@ -424,7 +424,7 @@ void FileTransferHandler::ft_readyRead(const QByteArray &a)
  1537.          if(r < 0) {
  1538.              d->f.close();
  1539.              delete d->ft;
  1540. -            d->ft = 0;
  1541. +            d->ft = nullptr;
  1542.              error(ErrFile, 0, d->f.errorString());
  1543.              return;
  1544.          }
  1545. @@ -441,7 +441,7 @@ void FileTransferHandler::ft_bytesWritten(qint64 x)
  1546.          if(d->sent == d->fileSize) {
  1547.              d->f.close();
  1548.              delete d->ft;
  1549. -            d->ft = 0;
  1550. +            d->ft = nullptr;
  1551.          }
  1552.          else
  1553.              QTimer::singleShot(0, this, SLOT(trySend()));
  1554. @@ -454,7 +454,7 @@ void FileTransferHandler::ft_error(int x)
  1555.      if(d->f.isOpen())
  1556.          d->f.close();
  1557.      delete d->ft;
  1558. -    d->ft = 0;
  1559. +    d->ft = nullptr;
  1560.  
  1561.      if(x == FileTransfer::ErrReject)
  1562.          error(ErrReject, x, "");
  1563. @@ -495,7 +495,7 @@ void FileTransferHandler::trySend()
  1564.      if(r < 0) {
  1565.          d->f.close();
  1566.          delete d->ft;
  1567. -        d->ft = 0;
  1568. +        d->ft = nullptr;
  1569.          error(ErrFile, 0, d->f.errorString());
  1570.          return;
  1571.      }
  1572. @@ -509,7 +509,7 @@ void FileTransferHandler::doFinish()
  1573.      if(d->sent == d->fileSize) {
  1574.          d->f.close();
  1575.          delete d->ft;
  1576. -        d->ft = 0;
  1577. +        d->ft = nullptr;
  1578.      }
  1579.      progress(calcProgressStep(d->sent, d->complement, d->shift), d->sent);
  1580.  }
  1581. @@ -547,7 +547,7 @@ public:
  1582.  
  1583.  
  1584.  FileRequestDlg::FileRequestDlg(const Jid &j, PsiCon *psi, PsiAccount *pa)
  1585. -    : QDialog(0, psi_dialog_flags)
  1586. +    : QDialog(nullptr, psi_dialog_flags)
  1587.  {
  1588.      setAttribute(Qt::WA_DeleteOnClose);
  1589.      setModal(false);
  1590. @@ -558,18 +558,18 @@ FileRequestDlg::FileRequestDlg(const Jid &j, PsiCon *psi, PsiAccount *pa)
  1591.  
  1592.  
  1593.  FileRequestDlg::FileRequestDlg(const Jid &jid, PsiCon *psi, PsiAccount *pa, const QStringList& files, bool direct)
  1594. -    : QDialog(0, psi_dialog_flags)
  1595. +    : QDialog(nullptr, psi_dialog_flags)
  1596.  {
  1597.      setAttribute(Qt::WA_DeleteOnClose);
  1598.      d = new Private;
  1599.      setModal(false);
  1600.      setupUi(this);
  1601.      d->psi = psi;
  1602. -    d->pa = 0;
  1603. +    d->pa = nullptr;
  1604.      d->jid = jid;
  1605. -    d->ft = 0;
  1606. +    d->ft = nullptr;
  1607.      d->sending = true;
  1608. -    d->lb_ident = 0;
  1609. +    d->lb_ident = nullptr;
  1610.      updateIdentity(pa);
  1611.  
  1612.      QFrame *hb = new QFrame(this);
  1613. @@ -643,14 +643,14 @@ FileRequestDlg::FileRequestDlg(const Jid &jid, PsiCon *psi, PsiAccount *pa, cons
  1614.  }
  1615.  
  1616.  FileRequestDlg::FileRequestDlg(const QDateTime &ts, FileTransfer *ft, PsiAccount *pa)
  1617. -    : QDialog(0, psi_dialog_flags)
  1618. +    : QDialog(nullptr, psi_dialog_flags)
  1619.  {
  1620.      setAttribute(Qt::WA_DeleteOnClose);
  1621.      d = new Private;
  1622.      setModal(false);
  1623.      setupUi(this);
  1624. -    d->psi = 0;
  1625. -    d->pa = 0;
  1626. +    d->psi = nullptr;
  1627. +    d->pa = nullptr;
  1628.      d->jid = ft->peer();
  1629.      d->ft = new FileTransferHandler(pa, ft);
  1630.      d->sending = false;
  1631. @@ -659,7 +659,7 @@ FileRequestDlg::FileRequestDlg(const QDateTime &ts, FileTransfer *ft, PsiAccount
  1632.      d->fileName = ft->fileName();
  1633.      d->fileSize = ft->fileSize();
  1634.  
  1635. -    d->cb_ident = 0;
  1636. +    d->cb_ident = nullptr;
  1637.      QFrame *hb = new QFrame(this);
  1638.      QHBoxLayout *hbLayout = new QHBoxLayout(hb);
  1639.      hbLayout->setMargin(0);
  1640. @@ -740,7 +740,7 @@ void FileRequestDlg::done(int r)
  1641.          // close/reject FT if there is one
  1642.          if(d->ft) {
  1643.              delete d->ft;
  1644. -            d->ft = 0;
  1645. +            d->ft = nullptr;
  1646.          }
  1647.      }
  1648.  
  1649. @@ -926,7 +926,7 @@ void FileRequestDlg::ft_connected()
  1650.      busy->stop();
  1651.      FileTransDlg *w = d->pa->psi()->ftdlg();
  1652.      FileTransferHandler *h = d->ft;
  1653. -    d->ft = 0;
  1654. +    d->ft = nullptr;
  1655.      closeDialogs(this);
  1656.      close();
  1657.      w->showWithoutActivation();
  1658. @@ -940,7 +940,7 @@ void FileRequestDlg::ft_error(int x, int fx, const QString &)
  1659.      busy->stop();
  1660.  
  1661.      delete d->ft;
  1662. -    d->ft = 0;
  1663. +    d->ft = nullptr;
  1664.  
  1665.      closeDialogs(this);
  1666.  
  1667. @@ -986,7 +986,7 @@ void FileRequestDlg::ft_error(int x, int fx, const QString &)
  1668.  void FileRequestDlg::t_timeout()
  1669.  {
  1670.      delete d->ft;
  1671. -    d->ft = 0;
  1672. +    d->ft = nullptr;
  1673.  
  1674.      busy->stop();
  1675.      closeDialogs(this);
  1676. @@ -1450,7 +1450,7 @@ class FileTransView : public QListWidget
  1677.  public:
  1678.      ColumnWidthManager *cm;
  1679.  
  1680. -    FileTransView(QWidget *parent=0, const char *name=0)
  1681. +    FileTransView(QWidget *parent=nullptr, const char *name=nullptr)
  1682.      :QListWidget(parent)
  1683.      {
  1684.          Q_UNUSED(name)
  1685. @@ -1566,7 +1566,7 @@ private:
  1686.  
  1687.  FileTransDelegate::FileTransDelegate(QObject* p)
  1688.      : QItemDelegate(p)
  1689. -    , ftv(0)
  1690. +    , ftv(nullptr)
  1691.  {
  1692.      ftv = static_cast<FileTransView*>(p);
  1693.  }
  1694. @@ -1672,7 +1672,7 @@ public:
  1695.              if(fi->id == id)
  1696.                  return fi;
  1697.          }
  1698. -        return 0;
  1699. +        return nullptr;
  1700.      }
  1701.  
  1702.      QList<FileTransItem*> getFinished()
  1703. @@ -1694,7 +1694,7 @@ public:
  1704.              if((*it)->h == h)
  1705.                  return *it;
  1706.          }
  1707. -        return 0;
  1708. +        return nullptr;
  1709.      }
  1710.  
  1711.      TransferMapping *findMapping(int id)
  1712. @@ -1704,7 +1704,7 @@ public:
  1713.              if((*it)->id == id)
  1714.                  return *it;
  1715.          }
  1716. -        return 0;
  1717. +        return nullptr;
  1718.      }
  1719.  
  1720.      void updateProgress(TransferMapping *i, bool updateAll=true)
  1721. @@ -1759,7 +1759,7 @@ public:
  1722.  };
  1723.  
  1724.  FileTransDlg::FileTransDlg(PsiCon *psi)
  1725. -:AdvancedWidget<QDialog>(0, psi_dialog_flags)
  1726. +:AdvancedWidget<QDialog>(nullptr, psi_dialog_flags)
  1727.  {
  1728.      d = new Private(this);
  1729.      d->psi = psi;
  1730. diff --git a/src/gcuserview.cpp b/src/gcuserview.cpp
  1731. index fa59bb2b..d4a05c3d 100644
  1732. --- a/src/gcuserview.cpp
  1733. +++ b/src/gcuserview.cpp
  1734. @@ -424,7 +424,7 @@ QString GCUserModel::makeToolTip(const MUCContact &contact) const
  1735.  
  1736.  QMimeData* GCUserModel::mimeData(const QModelIndexList &indexes) const
  1737.  {
  1738. -    QMimeData* data = 0;
  1739. +    QMimeData* data = nullptr;
  1740.      if(!indexes.isEmpty()) {
  1741.          data = new QMimeData();
  1742.          data->setText(_selfJid.withResource(indexes.first().data().toString()).full());
  1743. diff --git a/src/geolocationdlg.cpp b/src/geolocationdlg.cpp
  1744. index 07783127..e9f8929a 100644
  1745. --- a/src/geolocationdlg.cpp
  1746. +++ b/src/geolocationdlg.cpp
  1747. @@ -28,7 +28,7 @@
  1748.  #include <QLineEdit>
  1749.  #include "iconset.h"
  1750.  
  1751. -GeoLocationDlg::GeoLocationDlg(QList<PsiAccount*> list) : QDialog(0), pa_(list)
  1752. +GeoLocationDlg::GeoLocationDlg(QList<PsiAccount*> list) : QDialog(nullptr), pa_(list)
  1753.  {
  1754.      setAttribute(Qt::WA_DeleteOnClose);
  1755.      if(pa_.isEmpty())
  1756. diff --git a/src/groupchatdlg.cpp b/src/groupchatdlg.cpp
  1757. index 203a4143..43587bb2 100644
  1758. --- a/src/groupchatdlg.cpp
  1759. +++ b/src/groupchatdlg.cpp
  1760. @@ -385,7 +385,7 @@ join <channel>{,<channel>} [pass{,<pass>}
  1761.              if(cmd == "clear") {
  1762.                  dlg->doClear();
  1763.                  histAt = 0;
  1764. -                newstate = 0;
  1765. +                newstate = nullptr;
  1766.              } else if(cmd == "nick") {
  1767.                  if (command.count() > 1) {
  1768.                      QString nick = command[1].trimmed();
  1769. @@ -393,7 +393,7 @@ join <channel>{,<channel>} [pass{,<pass>}
  1770.                      prev_self = self;
  1771.                      self = nick;
  1772.                      dlg->account()->groupChatChangeNick(dlg->jid().domain(), dlg->jid().node(), self, dlg->account()->status());
  1773. -                    newstate = 0;
  1774. +                    newstate = nullptr;
  1775.                  } else {
  1776.                      // FIXME DRY with doNick
  1777.                      MCmdSimpleState *state = new MCmdSimpleState("nick", tr("new nick") + '=', MCMDSTATE_UNPARSED);
  1778. @@ -403,7 +403,7 @@ join <channel>{,<channel>} [pass{,<pass>}
  1779.                  }
  1780.              } else if(cmd == "sping") {
  1781.                  doSPing();
  1782. -                newstate = 0;
  1783. +                newstate = nullptr;
  1784.              } else if(cmd == "kick" && command.count() > 1) {
  1785.                  command.removeFirst();
  1786.                  const QString nick = command.takeFirst().trimmed();
  1787. @@ -440,14 +440,14 @@ join <channel>{,<channel>} [pass{,<pass>}
  1788.                  connect(version, SIGNAL(finished()), SLOT(version_finished()));
  1789.                  version->get(target);
  1790.                  version->go();
  1791. -                newstate = 0;
  1792. +                newstate = nullptr;
  1793.              } else if (cmd == "idle" && command.count() > 1) {
  1794.                  QString nick = command[1].trimmed();
  1795.                  Jid target = dlg->jid().withResource(nick);
  1796.                  LastActivityTask *idle = new LastActivityTask(target, dlg->account()->client()->rootTask());
  1797.                  connect(idle, SIGNAL(finished()), SLOT(lastactivity_finished()));
  1798.                  idle->go();
  1799. -                newstate = 0;
  1800. +                newstate = nullptr;
  1801.              } else if (cmd == "quote") {
  1802.                  dlg->appendSysMsg(command.join("|"), false);
  1803.                  preset = command;
  1804. @@ -829,7 +829,7 @@ GCMainDlg::GCMainDlg(PsiAccount *pa, const Jid &j, TabManager *tabManager)
  1805.  
  1806.      d->histAt = 0;
  1807.      //d->findDlg = 0;
  1808. -    d->configDlg = 0;
  1809. +    d->configDlg = nullptr;
  1810.      d->usersModel = new GCUserModel(pa, j, this);
  1811.  
  1812.      d->state = Private::Connected;
  1813. @@ -875,7 +875,7 @@ GCMainDlg::GCMainDlg(PsiAccount *pa, const Jid &j, TabManager *tabManager)
  1814.  
  1815.      // typeahead find bar
  1816.      QHBoxLayout *hb3a = new QHBoxLayout();
  1817. -    d->typeahead = new TypeAheadFindBar(ui_.log->textWidget(), tr("Find toolbar"), 0);
  1818. +    d->typeahead = new TypeAheadFindBar(ui_.log->textWidget(), tr("Find toolbar"), nullptr);
  1819.      hb3a->addWidget( d->typeahead );
  1820.      ui_.vboxLayout1->addLayout(hb3a);
  1821.  
  1822. diff --git a/src/groupmenu.cpp b/src/groupmenu.cpp
  1823. index 098c56f3..345486eb 100644
  1824. --- a/src/groupmenu.cpp
  1825. +++ b/src/groupmenu.cpp
  1826. @@ -90,11 +90,11 @@ void GroupMenu::createNewGroup()
  1827.  {
  1828.      while (contact_) {
  1829.          bool ok = false;
  1830. -        QString newgroup = QInputDialog::getText(0, tr("Create New Group"),
  1831. +        QString newgroup = QInputDialog::getText(nullptr, tr("Create New Group"),
  1832.                                                   tr("Enter the new group name:"),
  1833.                                                   QLineEdit::Normal,
  1834.                                                   QString::null,
  1835. -                                                 &ok, 0);
  1836. +                                                 &ok, nullptr);
  1837.          if (!ok)
  1838.              break;
  1839.          if (newgroup.isEmpty())
  1840. diff --git a/src/historycontactlistmodel.cpp b/src/historycontactlistmodel.cpp
  1841. index 41f82adf..824727b6 100644
  1842. --- a/src/historycontactlistmodel.cpp
  1843. +++ b/src/historycontactlistmodel.cpp
  1844. @@ -110,7 +110,7 @@ QVariant HistoryContactListModel::data(const QModelIndex &index, int role) const
  1845.  Qt::ItemFlags HistoryContactListModel::flags(const QModelIndex &index) const
  1846.  {
  1847.      if (!index.isValid())
  1848. -        return 0;
  1849. +        return nullptr;
  1850.      return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
  1851.  }
  1852.  
  1853. diff --git a/src/historydlg.cpp b/src/historydlg.cpp
  1854. index 8fa6a2f2..e495d2f5 100644
  1855. --- a/src/historydlg.cpp
  1856. +++ b/src/historydlg.cpp
  1857. @@ -101,7 +101,7 @@ static QStringList wrapString(const QString &str, int wid)
  1858.  
  1859.  
  1860.  SearchProxy::SearchProxy(PsiCon *p, DisplayProxy *d)
  1861. -    : QObject(0)
  1862. +    : QObject(nullptr)
  1863.      , active(false)
  1864.  {
  1865.      psi = p;
  1866. @@ -296,7 +296,7 @@ void SearchProxy::handlePadding(const EDBResult &r)
  1867.  
  1868.  
  1869.  DisplayProxy::DisplayProxy(PsiCon *p, PsiTextView *v)
  1870. -    : QObject(0)
  1871. +    : QObject(nullptr)
  1872.  {
  1873.      psi = p;
  1874.      viewWid = v;
  1875. @@ -635,7 +635,7 @@ public:
  1876.  };
  1877.  
  1878.  HistoryDlg::HistoryDlg(const Jid &jid, PsiAccount *pa)
  1879. -    : AdvancedWidget<QDialog>(0, Qt::Window)
  1880. +    : AdvancedWidget<QDialog>(nullptr, Qt::Window)
  1881.      , lastFocus(nullptr)
  1882.  {
  1883.      ui_.setupUi(this);
  1884. @@ -1284,7 +1284,7 @@ void HistoryDlg::updateSearchHint()
  1885.  
  1886.  UserListItem* HistoryDlg::currentUserListItem() const
  1887.  {
  1888. -    UserListItem* u = 0;
  1889. +    UserListItem* u = nullptr;
  1890.      if (d->pa && !d->jid.isEmpty())
  1891.          u = d->pa->findFirstRelevant(d->jid);
  1892.      return u;
  1893. diff --git a/src/htmltextcontroller.cpp b/src/htmltextcontroller.cpp
  1894. index 9c4e1ae9..58baab3e 100644
  1895. --- a/src/htmltextcontroller.cpp
  1896. +++ b/src/htmltextcontroller.cpp
  1897. @@ -25,7 +25,7 @@ class HTMLTextMenu : public QMenu
  1898.  {
  1899.      Q_OBJECT
  1900.  public:
  1901. -    HTMLTextMenu(QWidget* parent = 0): QMenu(parent)
  1902. +    HTMLTextMenu(QWidget* parent = nullptr): QMenu(parent)
  1903.      {
  1904.          actBold = addAction(tr("Bold"));
  1905.          actBold->setCheckable(true);
  1906. diff --git a/src/infodlg.cpp b/src/infodlg.cpp
  1907. index 4b890440..498444e7 100644
  1908. --- a/src/infodlg.cpp
  1909. +++ b/src/infodlg.cpp
  1910. @@ -130,7 +130,7 @@ InfoWidget::InfoWidget(int type, const Jid &j, const VCard &vcard, PsiAccount *p
  1911.      d->pa = pa;
  1912.      d->busy = false;
  1913.      d->te_edited = false;
  1914. -    d->jt = 0;
  1915. +    d->jt = nullptr;
  1916.      d->pa->dialogRegister(this, j);
  1917.      d->cacheVCard = cacheVCard;
  1918.      d->dateTextFormat = "d MMM yyyy";
  1919. @@ -244,7 +244,7 @@ InfoWidget::~InfoWidget()
  1920.  {
  1921.      d->pa->dialogUnregister(this);
  1922.      delete d->userListItem;
  1923. -    d->userListItem = 0;
  1924. +    d->userListItem = nullptr;
  1925.      delete d;
  1926.  }
  1927.  
  1928. @@ -271,7 +271,7 @@ bool InfoWidget::aboutToClose() {
  1929.      // cancel active transaction (refresh only)
  1930.      if(d->busy && d->actionType == 0) {
  1931.          delete d->jt;
  1932. -        d->jt = 0;
  1933. +        d->jt = nullptr;
  1934.      }
  1935.  
  1936.      return true;
  1937. @@ -279,7 +279,7 @@ bool InfoWidget::aboutToClose() {
  1938.  
  1939.  void InfoWidget::jt_finished()
  1940.  {
  1941. -    d->jt = 0;
  1942. +    d->jt = nullptr;
  1943.      JT_VCard* jtVCard = static_cast<JT_VCard*> (sender());
  1944.  
  1945.      d->busy = false;
  1946. diff --git a/src/invitetogroupchatmenu.cpp b/src/invitetogroupchatmenu.cpp
  1947. index ba1c6fd4..34c2add0 100644
  1948. --- a/src/invitetogroupchatmenu.cpp
  1949. +++ b/src/invitetogroupchatmenu.cpp
  1950. @@ -26,7 +26,7 @@
  1951.  
  1952.  InviteToGroupChatMenu::InviteToGroupChatMenu(QWidget* parent)
  1953.      : QMenu(parent)
  1954. -    , controller_(0)
  1955. +    , controller_(nullptr)
  1956.  {
  1957.  }
  1958.  
  1959. diff --git a/src/main.cpp b/src/main.cpp
  1960. index 1980d962..b45fbab0 100644
  1961. --- a/src/main.cpp
  1962. +++ b/src/main.cpp
  1963. @@ -96,7 +96,7 @@ PsiMain::PsiMain(const QHash<QString, QString>& commandline, QObject *par)
  1964.      : QObject(par)
  1965.      , cmdline(commandline)
  1966.  {
  1967. -    pcon = 0;
  1968. +    pcon = nullptr;
  1969.  
  1970.      // migrate old (pre 0.11) registry settings...
  1971.      QSettings sUser(QSettings::UserScope, "psi-im.org", "Psi");
  1972. @@ -205,7 +205,7 @@ void PsiMain::useLocalInstance()
  1973.      else {
  1974.          // Create & open the default profile
  1975.          if (!profileExists("default") && !profileNew("default")) {
  1976. -            QMessageBox::critical(0, tr("Error"),
  1977. +            QMessageBox::critical(nullptr, tr("Error"),
  1978.                  tr("There was an error creating the default profile."));
  1979.              QTimer::singleShot(0, this, SLOT(bail()));
  1980.          } else {
  1981. @@ -221,7 +221,7 @@ void PsiMain::chooseProfile()
  1982.  {
  1983.      if(pcon) {
  1984.          delete pcon;
  1985. -        pcon = 0;
  1986. +        pcon = nullptr;
  1987.      }
  1988.  
  1989.      QString str = "";
  1990. @@ -288,7 +288,7 @@ void PsiMain::sessionStart()
  1991.  {
  1992.      if (!ActiveProfiles::instance()->setThisProfile(activeProfile)) { // already running
  1993.          if (!ActiveProfiles::instance()->raise(activeProfile, true)) {
  1994. -            QMessageBox::critical(0, tr("Error"), tr("Cannot open this profile - it is already running, but not responding"));
  1995. +            QMessageBox::critical(nullptr, tr("Error"), tr("Cannot open this profile - it is already running, but not responding"));
  1996.          }
  1997.          quit();
  1998.          return;
  1999. @@ -300,7 +300,7 @@ void PsiMain::sessionStart()
  2000.      pcon = new PsiCon();
  2001.      if (!pcon->init()) {
  2002.          delete pcon;
  2003. -        pcon = 0;
  2004. +        pcon = nullptr;
  2005.          quit();
  2006.          return;
  2007.      }
  2008. @@ -332,7 +332,7 @@ void PsiMain::bail()
  2009.      if(pcon) {
  2010.          pcon->gracefulDeinit([this](){
  2011.              pcon->deleteLater();
  2012. -            pcon = 0;
  2013. +            pcon = nullptr;
  2014.              quit();
  2015.          });
  2016.      }
  2017. @@ -503,7 +503,7 @@ PSI_EXPORT_FUNC int main(int argc, char *argv[])
  2018.          return restart_process(argc, argv, cmdline["uri"]);
  2019.  #else
  2020.          // otherwise, it should enough to modify argc/argv
  2021. -        argv[argc] = 0;
  2022. +        argv[argc] = nullptr;
  2023.  #endif
  2024.      }
  2025.  
  2026. diff --git a/src/mainwin.cpp b/src/mainwin.cpp
  2027. index ab806ca8..d98ffba8 100644
  2028. --- a/src/mainwin.cpp
  2029. +++ b/src/mainwin.cpp
  2030. @@ -218,7 +218,7 @@ MainWin::Private::Private(PsiCon* _psi, MainWin* _mainWin) :
  2031.      prefilterShowAway = false;
  2032.  
  2033.      char* squishStr = getenv("SQUISH_ENABLED");
  2034. -    squishEnabled = squishStr != 0;
  2035. +    squishEnabled = squishStr != nullptr;
  2036.  }
  2037.  
  2038.  MainWin::Private::~Private()
  2039. @@ -315,7 +315,7 @@ const QString rosterGeometryPath      = "options.ui.save.roster-width";
  2040.  const QString tabsGeometryPath        = "options.ui.save.log-width";
  2041.  
  2042.  MainWin::MainWin(bool _onTop, bool _asTool, PsiCon* psi)
  2043. -:AdvancedWidget<QMainWindow>(0, (_onTop ? Qt::WindowStaysOnTopHint : Qt::Widget) | (_asTool ? Qt::Tool : Qt::Widget))
  2044. +:AdvancedWidget<QMainWindow>(nullptr, (_onTop ? Qt::WindowStaysOnTopHint : Qt::Widget) | (_asTool ? Qt::Tool : Qt::Widget))
  2045.  {
  2046.      setObjectName("MainWin");
  2047.      setAttribute(Qt::WA_AlwaysShowToolTips);
  2048. @@ -333,12 +333,12 @@ MainWin::MainWin(bool _onTop, bool _asTool, PsiCon* psi)
  2049.      d->lastStatus = -2;
  2050.  
  2051.      d->nextAmount = 0;
  2052. -    d->nextAnim = 0;
  2053. -    d->tray = 0;
  2054. -    d->trayMenu = 0;
  2055. +    d->nextAnim = nullptr;
  2056. +    d->tray = nullptr;
  2057. +    d->trayMenu = nullptr;
  2058.      d->statusTip = "";
  2059.      d->nickname = "";
  2060. -    d->defaultAccount = 0;
  2061. +    d->defaultAccount = nullptr;
  2062.  
  2063.      QWidget *rosterBar = new QWidget(this);
  2064.      bool allInOne = false;
  2065. @@ -350,7 +350,7 @@ MainWin::MainWin(bool _onTop, bool _asTool, PsiCon* psi)
  2066.          setCentralWidget(d->splitter);
  2067.          allInOne = true;
  2068.  
  2069. -        d->mainTabs = d->psi->tabManager()->newTabs(0);
  2070. +        d->mainTabs = d->psi->tabManager()->newTabs(nullptr);
  2071.          d->psi->tabManager()->setPreferredTabsForKind('C', d->mainTabs);
  2072.          d->psi->tabManager()->setPreferredTabsForKind('M', d->mainTabs);
  2073.  
  2074. @@ -559,7 +559,7 @@ MainWin::~MainWin()
  2075.  {
  2076.      if(d->tray) {
  2077.          delete d->tray;
  2078. -        d->tray = 0;
  2079. +        d->tray = nullptr;
  2080.      }
  2081.  
  2082.      saveToolbarsState();
  2083. @@ -658,7 +658,7 @@ void MainWin::registerAction( IconAction* action )
  2084.          { "help_diag_qcaplugin",   activated, this, SLOT( actDiagQCAPluginActivated() ) },
  2085.          { "help_diag_qcakeystore", activated, this, SLOT( actDiagQCAKeyStoreActivated() ) },
  2086.  
  2087. -        { "", 0, 0, 0 }
  2088. +        { "", nullptr, nullptr, nullptr }
  2089.      };
  2090.  
  2091.      int i;
  2092. @@ -700,8 +700,8 @@ void MainWin::registerAction( IconAction* action )
  2093.          { "show_offline",   contactList, SIGNAL(showOfflineChanged(bool)), setChecked, contactList->showOffline()},
  2094.          { "show_self",      contactList, SIGNAL(showSelfChanged(bool)), setChecked, contactList->showSelf()},
  2095.          { "show_agents",    contactList, SIGNAL(showAgentsChanged(bool)), setChecked, contactList->showAgents()},
  2096. -        { "show_statusmsg", 0, 0, 0, false},
  2097. -        { "", 0, 0, 0, false }
  2098. +        { "show_statusmsg", nullptr, nullptr, nullptr, false},
  2099. +        { "", nullptr, nullptr, nullptr, false }
  2100.      };
  2101.  
  2102.      for ( i = 0; !(aName = QString(reverseactionlist[i].name)).isEmpty(); i++ ) {
  2103. @@ -734,7 +734,7 @@ void MainWin::reinitAutoHide()
  2104.          }
  2105.      } else {
  2106.          delete d->hideTimer;
  2107. -        d->hideTimer = 0;
  2108. +        d->hideTimer = nullptr;
  2109.      }
  2110.  }
  2111.  
  2112. @@ -784,13 +784,13 @@ void MainWin::setWindowOpts(bool _onTop, bool _asTool)
  2113.  
  2114.  void MainWin::setUseDock(bool use)
  2115.  {
  2116. -    if (use == (d->tray != 0)) {
  2117. +    if (use == (d->tray != nullptr)) {
  2118.          return;
  2119.      }
  2120.  
  2121.      if (d->tray) {
  2122.          delete d->tray;
  2123. -        d->tray = 0;
  2124. +        d->tray = nullptr;
  2125.      }
  2126.  
  2127.      Q_ASSERT(!d->tray);
  2128. @@ -885,7 +885,7 @@ void MainWin::buildToolbars()
  2129.          } else {
  2130.              if (d && d->viewToolBar) {
  2131.                  delete d->viewToolBar;
  2132. -                d->viewToolBar = 0;
  2133. +                d->viewToolBar = nullptr;
  2134.              }
  2135.              tb = new PsiToolBar(base, this, d->psi->actionList());
  2136.          }
  2137. @@ -1670,7 +1670,7 @@ void MainWin::trayHide()
  2138.  void MainWin::updateReadNext(PsiIcon* anim, int amount)
  2139.  {
  2140.      d->nextAnim = anim;
  2141. -    if(anim == 0) {
  2142. +    if(anim == nullptr) {
  2143.          d->nextAmount = 0;
  2144.      }
  2145.      else {
  2146. diff --git a/src/mainwin_p.cpp b/src/mainwin_p.cpp
  2147. index f9d6ea5e..db282ca6 100644
  2148. --- a/src/mainwin_p.cpp
  2149. +++ b/src/mainwin_p.cpp
  2150. @@ -48,7 +48,7 @@ class PopupActionButton : public QPushButton
  2151.  {
  2152.      Q_OBJECT
  2153.  public:
  2154. -    PopupActionButton(QWidget *parent = 0, const char *name = 0);
  2155. +    PopupActionButton(QWidget *parent = nullptr, const char *name = nullptr);
  2156.      ~PopupActionButton();
  2157.  
  2158.      void setIcon(PsiIcon *, bool showText);
  2159. @@ -72,7 +72,7 @@ private:
  2160.  };
  2161.  
  2162.  PopupActionButton::PopupActionButton(QWidget *parent, const char *name)
  2163. -: QPushButton(parent), icon(0), showText(true)
  2164. +: QPushButton(parent), icon(nullptr), showText(true)
  2165.  {
  2166.      setObjectName(name);
  2167.  }
  2168. @@ -101,8 +101,8 @@ void PopupActionButton::setIcon(PsiIcon *i, bool st)
  2169.  {
  2170.      if ( icon ) {
  2171.          icon->stop();
  2172. -        disconnect (icon, 0, this, 0);
  2173. -        icon = 0;
  2174. +        disconnect (icon, nullptr, this, nullptr);
  2175. +        icon = nullptr;
  2176.      }
  2177.  
  2178.      icon = i;
  2179. @@ -231,7 +231,7 @@ public:
  2180.      Private (QObject *parent)
  2181.      : QObject (parent)
  2182.      {
  2183. -        icon = 0;
  2184. +        icon = nullptr;
  2185.          showText = true;
  2186.      }
  2187.  
  2188. @@ -263,10 +263,10 @@ void PopupAction::setAlert (const PsiIcon *icon)
  2189.  
  2190.  void PopupAction::setIcon (const PsiIcon *icon, bool showText, bool alert)
  2191.  {
  2192. -    PsiIcon *oldIcon = 0;
  2193. +    PsiIcon *oldIcon = nullptr;
  2194.      if ( d->icon ) {
  2195.          oldIcon = d->icon;
  2196. -        d->icon = 0;
  2197. +        d->icon = nullptr;
  2198.      }
  2199.  
  2200.      d->showText = showText;
  2201. @@ -280,7 +280,7 @@ void PopupAction::setIcon (const PsiIcon *icon, bool showText, bool alert)
  2202.          IconAction::setIcon(icon->icon());
  2203.      }
  2204.      else {
  2205. -        d->icon = 0;
  2206. +        d->icon = nullptr;
  2207.          IconAction::setIcon(QIcon());
  2208.      }
  2209.  
  2210. @@ -339,7 +339,7 @@ void PopupAction::setEnabled (bool e)
  2211.  
  2212.  IconAction *PopupAction::copy() const
  2213.  {
  2214. -    PopupAction *act = new PopupAction(text(), menu(), 0, objectName().toLatin1());
  2215. +    PopupAction *act = new PopupAction(text(), menu(), nullptr, objectName().toLatin1());
  2216.  
  2217.      *act = *this;
  2218.  
  2219. @@ -457,7 +457,7 @@ void MAction::numAccountsChanged()
  2220.  
  2221.  IconAction *MAction::copy() const
  2222.  {
  2223. -    MAction *act = new MAction(text(), id_, controller_, 0);
  2224. +    MAction *act = new MAction(text(), id_, controller_, nullptr);
  2225.  
  2226.      *act = *this;
  2227.  
  2228. @@ -473,7 +473,7 @@ MAction &MAction::operator=( const MAction &from )
  2229.  
  2230.  void MAction::doSetMenu(QMenu* menu)
  2231.  {
  2232. -    IconActionGroup::doSetMenu(findChildren<QAction*>().count() > 1 ? menu : 0);
  2233. +    IconActionGroup::doSetMenu(findChildren<QAction*>().count() > 1 ? menu : nullptr);
  2234.  }
  2235.  
  2236.  //----------------------------------------------------------------------------
  2237. @@ -507,7 +507,7 @@ bool SpacerAction::addTo(QWidget *w)
  2238.  
  2239.  IconAction *SpacerAction::copy() const
  2240.  {
  2241. -    return new SpacerAction( 0 );
  2242. +    return new SpacerAction( nullptr );
  2243.  }
  2244.  
  2245.  //----------------------------------------------------------------------------
  2246. @@ -535,7 +535,7 @@ bool SeparatorAction::addTo(QWidget *w)
  2247.  
  2248.  IconAction *SeparatorAction::copy() const
  2249.  {
  2250. -    return new SeparatorAction(0);
  2251. +    return new SeparatorAction(nullptr);
  2252.  }
  2253.  
  2254.  //----------------------------------------------------------------------------
  2255. @@ -658,7 +658,7 @@ void EventNotifierAction::updateVisibility()
  2256.  
  2257.  IconAction *EventNotifierAction::copy() const
  2258.  {
  2259. -    EventNotifierAction *act = new EventNotifierAction( 0 );
  2260. +    EventNotifierAction *act = new EventNotifierAction( nullptr );
  2261.  
  2262.      *act = *this;
  2263.  
  2264. diff --git a/src/mcmdmanager.cpp b/src/mcmdmanager.cpp
  2265. index ba3fee73..a3296414 100644
  2266. --- a/src/mcmdmanager.cpp
  2267. +++ b/src/mcmdmanager.cpp
  2268. @@ -40,7 +40,7 @@ MCmdSimpleState::MCmdSimpleState(QString name, QString prompt, int flags)
  2269.  MCmdSimpleState::~MCmdSimpleState() {
  2270.  }
  2271.  
  2272. -MCmdManager::MCmdManager(MCmdUiSiteIface* site_) : state_(0), uiSite_(site_) {
  2273. +MCmdManager::MCmdManager(MCmdUiSiteIface* site_) : state_(nullptr), uiSite_(site_) {
  2274.  };
  2275.  
  2276.  MCmdManager::~MCmdManager() {
  2277. @@ -129,7 +129,7 @@ QString MCmdManager::serializeCommand(const QStringList &list)
  2278.  
  2279.  
  2280.  bool MCmdManager::processCommand(QString command) {
  2281. -    MCmdStateIface *tmpstate=0;
  2282. +    MCmdStateIface *tmpstate=nullptr;
  2283.      QStringList preset;
  2284.      QStringList items;
  2285.      if (state_->getFlags() & MCMDSTATE_UNPARSED) {
  2286. @@ -143,7 +143,7 @@ bool MCmdManager::processCommand(QString command) {
  2287.      foreach(MCmdProviderIface *prov, providers_) {
  2288.          if (prov->mCmdTryStateTransit(state_, items, tmpstate, preset)) {
  2289.              state_ = tmpstate;
  2290. -            if (state_ != 0) {
  2291. +            if (state_ != nullptr) {
  2292.                  QString prompt = state_->getPrompt();
  2293.                  QString def;
  2294.                  if (state_->getFlags() & MCMDSTATE_UNPARSED) {
  2295. @@ -163,8 +163,8 @@ bool MCmdManager::processCommand(QString command) {
  2296.  
  2297.      tmpstate = state_;
  2298.      bool ret = state_->unhandled(items);
  2299. -    state_ = 0;
  2300. -    if (state_ == 0) {
  2301. +    state_ = nullptr;
  2302. +    if (state_ == nullptr) {
  2303.          tmpstate->dispose();
  2304.          uiSite_->mCmdClose();
  2305.      }
  2306. @@ -173,7 +173,7 @@ bool MCmdManager::processCommand(QString command) {
  2307.  
  2308.  
  2309.  bool MCmdManager::open(MCmdStateIface *state, QStringList preset) {
  2310. -    if (0 != state_) state_->dispose();
  2311. +    if (nullptr != state_) state_->dispose();
  2312.  
  2313.      state_ = state;
  2314.      QString prompt = state->getPrompt();
  2315. @@ -229,7 +229,7 @@ QStringList MCmdManager::completeCommand(QString &command, int pos, int &start,
  2316.  }
  2317.  
  2318.  bool MCmdManager::isActive() {
  2319. -    return state_ != 0;
  2320. +    return state_ != nullptr;
  2321.  }
  2322.  
  2323.  
  2324. diff --git a/src/mcmdsimplesite.cpp b/src/mcmdsimplesite.cpp
  2325. index efdc8a9c..445206ea 100644
  2326. --- a/src/mcmdsimplesite.cpp
  2327. +++ b/src/mcmdsimplesite.cpp
  2328. @@ -33,8 +33,8 @@ MCmdSimpleSite::MCmdSimpleSite(QLabel *p, QTextEdit *i)
  2329.  }
  2330.  
  2331.  MCmdSimpleSite::MCmdSimpleSite()
  2332. -    : promptWidget(0)
  2333. -    , inputWidget(0)
  2334. +    : promptWidget(nullptr)
  2335. +    , inputWidget(nullptr)
  2336.      , open(false)
  2337.  {
  2338.  }
  2339. diff --git a/src/messageview.cpp b/src/messageview.cpp
  2340. index 2db53c6f..ce6fb795 100644
  2341. --- a/src/messageview.cpp
  2342. +++ b/src/messageview.cpp
  2343. @@ -28,7 +28,7 @@ static const QString me_cmd = "/me ";
  2344.  
  2345.  MessageView::MessageView(Type t) :
  2346.      _type(t),
  2347. -    _flags(0),
  2348. +    _flags(nullptr),
  2349.      _status(0),
  2350.      _statusPriority(0),
  2351.      _dateTime(QDateTime::currentDateTime()),
  2352. diff --git a/src/miniclient.cpp b/src/miniclient.cpp
  2353. index 28602fef..8b4c33d2 100644
  2354. --- a/src/miniclient.cpp
  2355. +++ b/src/miniclient.cpp
  2356. @@ -38,10 +38,10 @@ MiniClient::MiniClient(QObject *parent)
  2357.  {
  2358.      _client = new Client;
  2359.      _client->bobManager()->setCache(BoBFileCache::instance());
  2360. -    conn = 0;
  2361. -    tls = 0;
  2362. -    tlsHandler = 0;
  2363. -    stream = 0;
  2364. +    conn = nullptr;
  2365. +    tls = nullptr;
  2366. +    tlsHandler = nullptr;
  2367. +    stream = nullptr;
  2368.      auth = false;
  2369.      force_ssl = false;
  2370.      error_disconnect = true;
  2371. @@ -56,14 +56,14 @@ MiniClient::~MiniClient()
  2372.  void MiniClient::reset()
  2373.  {
  2374.      delete stream;
  2375. -    stream = 0;
  2376. +    stream = nullptr;
  2377.  
  2378.      delete tls;
  2379. -    tls = 0;
  2380. -    tlsHandler = 0;
  2381. +    tls = nullptr;
  2382. +    tlsHandler = nullptr;
  2383.  
  2384.      delete conn;
  2385. -    conn = 0;
  2386. +    conn = nullptr;
  2387.  }
  2388.  
  2389.  void MiniClient::connectToServer(const Jid &jid, bool legacy_ssl_probe, bool legacy_ssl, bool forcessl, const QString &_host, int _port, QString proxy, QString *_pass)
  2390. @@ -165,7 +165,7 @@ void MiniClient::setErrorOnDisconnect(bool b)
  2391.  
  2392.  void MiniClient::tls_handshaken()
  2393.  {
  2394. -    if (CertificateHelpers::checkCertificate(tls, tlsHandler, tlsOverrideDomain, tlsOverrideCert, 0,
  2395. +    if (CertificateHelpers::checkCertificate(tls, tlsHandler, tlsOverrideDomain, tlsOverrideCert, nullptr,
  2396.                                           tr("Server Authentication"),
  2397.                                           j.domain())) {
  2398.          tlsHandler->continueAfterHandshake();
  2399. @@ -235,7 +235,7 @@ void MiniClient::cs_warning(int err)
  2400.  {
  2401.      if (err == ClientStream::WarnNoTLS && force_ssl) {
  2402.          close();
  2403. -        QMessageBox::critical(0, tr("Server Error"), tr("The server does not support TLS encryption."));
  2404. +        QMessageBox::critical(nullptr, tr("Server Error"), tr("The server does not support TLS encryption."));
  2405.      }
  2406.      else {
  2407.          stream->continueAfterWarning();
  2408. @@ -255,7 +255,7 @@ void MiniClient::cs_error(int err)
  2409.      close();
  2410.  
  2411.      if (needAlert)
  2412. -        QMessageBox::critical(0, tr("Server Error"), tr("There was an error communicating with the XMPP server.\nDetails: %1").arg(str));
  2413. +        QMessageBox::critical(nullptr, tr("Server Error"), tr("There was an error communicating with the XMPP server.\nDetails: %1").arg(str));
  2414.      error();
  2415.  }
  2416.  
  2417. diff --git a/src/moodcatalog.cpp b/src/moodcatalog.cpp
  2418. index 9d740b18..a5b346ff 100644
  2419. --- a/src/moodcatalog.cpp
  2420. +++ b/src/moodcatalog.cpp
  2421. @@ -187,4 +187,4 @@ const QList<MoodCatalog::Entry>& MoodCatalog::entries() const
  2422.      return entries_;
  2423.  }
  2424.  
  2425. -MoodCatalog* MoodCatalog::instance_ = 0;
  2426. +MoodCatalog* MoodCatalog::instance_ = nullptr;
  2427. diff --git a/src/mooddlg.cpp b/src/mooddlg.cpp
  2428. index 756b79e5..5893d36f 100644
  2429. --- a/src/mooddlg.cpp
  2430. +++ b/src/mooddlg.cpp
  2431. @@ -27,7 +27,7 @@
  2432.  #include "psiiconset.h"
  2433.  
  2434.  MoodDlg::MoodDlg(QList<PsiAccount*> list)
  2435. -    : QDialog(0), pa_(list)
  2436. +    : QDialog(nullptr), pa_(list)
  2437.  {
  2438.      setAttribute(Qt::WA_DeleteOnClose);
  2439.      if(pa_.isEmpty())
  2440. diff --git a/src/mucjoindlg.cpp b/src/mucjoindlg.cpp
  2441. index a43141ea..be98390f 100644
  2442. --- a/src/mucjoindlg.cpp
  2443. +++ b/src/mucjoindlg.cpp
  2444. @@ -36,7 +36,7 @@ static const int nickConflictCode = 409;
  2445.  static const QString additionalSymbol = "_";
  2446.  
  2447.  MUCJoinDlg::MUCJoinDlg(PsiCon* psi, PsiAccount* pa)
  2448. -    : QDialog(0)
  2449. +    : QDialog(nullptr)
  2450.      , nickAlreadyCompleted_(false)
  2451.  {
  2452.      setAttribute(Qt::WA_DeleteOnClose);
  2453. @@ -47,7 +47,7 @@ MUCJoinDlg::MUCJoinDlg(PsiCon* psi, PsiAccount* pa)
  2454.      setWindowIcon(IconsetFactory::icon("psi/groupChat").icon());
  2455.  #endif
  2456.      controller_ = psi;
  2457. -    account_ = 0;
  2458. +    account_ = nullptr;
  2459.      controller_->dialogRegister(this);
  2460.      ui_.ck_history->setChecked(true);
  2461.      ui_.ck_history->hide();
  2462. @@ -123,7 +123,7 @@ void MUCJoinDlg::updateIdentityVisibility()
  2463.  
  2464.  void MUCJoinDlg::updateFavorites()
  2465.  {
  2466. -    QListWidgetItem *recentLwi = 0, *lwi;
  2467. +    QListWidgetItem *recentLwi = nullptr, *lwi;
  2468.  
  2469.      ui_.lwFavorites->clear();
  2470.  
  2471. diff --git a/src/networkaccessmanager.cpp b/src/networkaccessmanager.cpp
  2472. index 4dd917fa..c788339f 100644
  2473. --- a/src/networkaccessmanager.cpp
  2474. +++ b/src/networkaccessmanager.cpp
  2475. @@ -30,7 +30,7 @@ NetworkAccessManager::NetworkAccessManager(QObject *parent)
  2476.  }
  2477.  
  2478.  QNetworkReply *NetworkAccessManager::createRequest(Operation op, const QNetworkRequest & req,
  2479. -                                                   QIODevice * outgoingData = 0)
  2480. +                                                   QIODevice * outgoingData = nullptr)
  2481.  {
  2482.      if (req.url().host() != QLatin1String("psi")) {
  2483.          return QNetworkAccessManager::createRequest(op, req, outgoingData);
  2484. diff --git a/src/options/opt_advanced.cpp b/src/options/opt_advanced.cpp
  2485. index 85df3439..66d3e7f3 100644
  2486. --- a/src/options/opt_advanced.cpp
  2487. +++ b/src/options/opt_advanced.cpp
  2488. @@ -24,7 +24,7 @@ public:
  2489.  OptionsTabAdvanced::OptionsTabAdvanced(QObject *parent)
  2490.  : OptionsTab(parent, "misc", "", tr("Misc."), tr("Extra uncategorized options"), "psi/advanced")
  2491.  {
  2492. -    w = 0;
  2493. +    w = nullptr;
  2494.  }
  2495.  
  2496.  OptionsTabAdvanced::~OptionsTabAdvanced()
  2497. @@ -34,7 +34,7 @@ OptionsTabAdvanced::~OptionsTabAdvanced()
  2498.  QWidget *OptionsTabAdvanced::widget()
  2499.  {
  2500.      if ( w )
  2501. -        return 0;
  2502. +        return nullptr;
  2503.  
  2504.      w = new OptAdvancedUI();
  2505.      OptAdvancedUI *d = static_cast<OptAdvancedUI *>(w);
  2506. diff --git a/src/options/opt_appearance.cpp b/src/options/opt_appearance.cpp
  2507. index 93b06d44..80aec5db 100644
  2508. --- a/src/options/opt_appearance.cpp
  2509. +++ b/src/options/opt_appearance.cpp
  2510. @@ -119,7 +119,7 @@ OptionsTabAppearanceMisc::~OptionsTabAppearanceMisc()
  2511.  QWidget *OptionsTabAppearanceMisc::widget()
  2512.  {
  2513.      if ( w )
  2514. -        return 0;
  2515. +        return nullptr;
  2516.  
  2517.      w = new OptAppearanceMiscUI();
  2518.  
  2519. @@ -191,7 +191,7 @@ static QPixmap color2pixmap(QColor c) // taken from opt_general.cpp
  2520.  QWidget *OptionsTabAppearanceGeneral::widget()
  2521.  {
  2522.      if ( w )
  2523. -        return 0;
  2524. +        return nullptr;
  2525.  
  2526.      w = new OptAppearanceUI();
  2527.      OptAppearanceUI *d = static_cast<OptAppearanceUI *>(w);
  2528. diff --git a/src/options/opt_application.cpp b/src/options/opt_application.cpp
  2529. index eeae6cc7..d5565b22 100644
  2530. --- a/src/options/opt_application.cpp
  2531. +++ b/src/options/opt_application.cpp
  2532. @@ -52,7 +52,7 @@ OptionsTabApplication::~OptionsTabApplication()
  2533.  QWidget *OptionsTabApplication::widget()
  2534.  {
  2535.      if ( w )
  2536. -        return 0;
  2537. +        return nullptr;
  2538.  
  2539.      w = new OptApplicationUI();
  2540.      OptApplicationUI *d = static_cast<OptApplicationUI *>(w);
  2541. @@ -136,7 +136,7 @@ void OptionsTabApplication::applyOptions()
  2542.      }
  2543.      if(curLang != itemData && !itemData.isEmpty()) {
  2544.          TranslationManager::instance()->loadTranslation(itemData);
  2545. -        QMessageBox::information(0, tr("Information"), tr("Some of the options you changed will only have full effect upon restart."));
  2546. +        QMessageBox::information(nullptr, tr("Information"), tr("Some of the options you changed will only have full effect upon restart."));
  2547.      }
  2548.      QSettings s(ApplicationInfo::homeDir(ApplicationInfo::ConfigLocation) + "/psirc", QSettings::IniFormat);
  2549.      s.setValue("last_lang", itemData);
  2550. diff --git a/src/options/opt_avcall.cpp b/src/options/opt_avcall.cpp
  2551. index 0e43f4ff..1cb543eb 100644
  2552. --- a/src/options/opt_avcall.cpp
  2553. +++ b/src/options/opt_avcall.cpp
  2554. @@ -25,7 +25,7 @@ public:
  2555.  OptionsTabAvCall::OptionsTabAvCall(QObject *parent)
  2556.  : OptionsTab(parent, "avcall", "", tr("Voice Calling"), AvCallManager::isVideoSupported() ? tr("Audio and video device configuration") : tr("Audio device configuration"), "psi/avcall")
  2557.  {
  2558. -    w = 0;
  2559. +    w = nullptr;
  2560.      connect(MediaDeviceWatcher::instance(), &MediaDeviceWatcher::updated, this, [this](){
  2561.          restoreOptions();
  2562.      });
  2563. @@ -38,7 +38,7 @@ OptionsTabAvCall::~OptionsTabAvCall()
  2564.  QWidget *OptionsTabAvCall::widget()
  2565.  {
  2566.      if ( w )
  2567. -        return 0;
  2568. +        return nullptr;
  2569.  
  2570.      w = new OptAvCallUI();
  2571.      //OptAvCallUI *d = static_cast<OptAvCallUI *>(w);
  2572. diff --git a/src/options/opt_chat.cpp b/src/options/opt_chat.cpp
  2573. index ba410a74..f188c707 100644
  2574. --- a/src/options/opt_chat.cpp
  2575. +++ b/src/options/opt_chat.cpp
  2576. @@ -25,8 +25,8 @@ public:
  2577.  OptionsTabChat::OptionsTabChat(QObject *parent)
  2578.  : OptionsTab(parent, "chat", "", tr("Chat"), tr("Configure the chat dialog"), "psi/start-chat")
  2579.  {
  2580. -    w = 0;
  2581. -    bg_delChats = bg_defAct = 0;
  2582. +    w = nullptr;
  2583. +    bg_delChats = bg_defAct = nullptr;
  2584.  }
  2585.  
  2586.  OptionsTabChat::~OptionsTabChat()
  2587. @@ -40,7 +40,7 @@ OptionsTabChat::~OptionsTabChat()
  2588.  QWidget *OptionsTabChat::widget()
  2589.  {
  2590.      if ( w )
  2591. -        return 0;
  2592. +        return nullptr;
  2593.  
  2594.      w = new OptChatUI();
  2595.      OptChatUI *d = static_cast<OptChatUI *>(w);
  2596. diff --git a/src/options/opt_events.cpp b/src/options/opt_events.cpp
  2597. index 0863f702..455e43a7 100644
  2598. --- a/src/options/opt_events.cpp
  2599. +++ b/src/options/opt_events.cpp
  2600. @@ -24,14 +24,14 @@ public:
  2601.  
  2602.  OptionsTabEvents::OptionsTabEvents(QObject *parent)
  2603.      : OptionsTab(parent, "events", "", tr("Events"), tr("The events behaviour"), "psi/events")
  2604. -    , w(0)
  2605. +    , w(nullptr)
  2606.  {
  2607.  }
  2608.  
  2609.  QWidget *OptionsTabEvents::widget()
  2610.  {
  2611.      if ( w )
  2612. -        return 0;
  2613. +        return nullptr;
  2614.  
  2615.      w = new OptEventsUI();
  2616.      OptEventsUI *d = static_cast<OptEventsUI *>(w);
  2617. diff --git a/src/options/opt_groupchat.cpp b/src/options/opt_groupchat.cpp
  2618. index 6a4a32fb..469375c2 100644
  2619. --- a/src/options/opt_groupchat.cpp
  2620. +++ b/src/options/opt_groupchat.cpp
  2621. @@ -39,7 +39,7 @@ void OptionsTabGroupchat::setData(PsiCon *, QWidget *_dlg)
  2622.  QWidget *OptionsTabGroupchat::widget()
  2623.  {
  2624.      if ( w )
  2625. -        return 0;
  2626. +        return nullptr;
  2627.  
  2628.      w = new GeneralGroupchatUI();
  2629.      GeneralGroupchatUI *d = static_cast<GeneralGroupchatUI *>(w);
  2630. @@ -92,8 +92,8 @@ void OptionsTabGroupchat::restoreOptions()
  2631.      GeneralGroupchatUI *d = static_cast<GeneralGroupchatUI *>(w);
  2632.  
  2633.      // no need to call dataChanged() when these widgets are modified
  2634. -    disconnect(d->le_newNickColor,     SIGNAL(textChanged(const QString &)), 0, 0);
  2635. -    disconnect(d->le_newHighlightWord, SIGNAL(textChanged(const QString &)), 0, 0);
  2636. +    disconnect(d->le_newNickColor,     SIGNAL(textChanged(const QString &)), nullptr, nullptr);
  2637. +    disconnect(d->le_newHighlightWord, SIGNAL(textChanged(const QString &)), nullptr, nullptr);
  2638.      connect(d->le_newNickColor,       SIGNAL(textChanged(const QString &)), SLOT(displayGCNickColor()));
  2639.  
  2640.      d->ck_gcHighlights->setChecked( true );
  2641. diff --git a/src/options/opt_iconset.cpp b/src/options/opt_iconset.cpp
  2642. index 78d38595..1c93bfb4 100644
  2643. --- a/src/options/opt_iconset.cpp
  2644. +++ b/src/options/opt_iconset.cpp
  2645. @@ -349,7 +349,7 @@ void IconsetLoadThread::run()
  2646.      }
  2647.  
  2648.      for(int i = 0; i < failedList.size(); i++) {
  2649. -        postEvent(new IconsetLoadEvent(this, 0));
  2650. +        postEvent(new IconsetLoadEvent(this, nullptr));
  2651.      }
  2652.  
  2653.  getout:
  2654. @@ -363,8 +363,8 @@ getout:
  2655.  
  2656.  OptionsTabIconsetSystem::OptionsTabIconsetSystem(QObject *parent)
  2657.      : OptionsTab(parent, "iconset_system", "", tr("System Icons"), tr("Select the system iconset"))
  2658. -    , w(0)
  2659. -    , thread(0)
  2660. +    , w(nullptr)
  2661. +    , thread(nullptr)
  2662.  {
  2663.  }
  2664.  
  2665. @@ -376,7 +376,7 @@ OptionsTabIconsetSystem::~OptionsTabIconsetSystem()
  2666.  QWidget *OptionsTabIconsetSystem::widget()
  2667.  {
  2668.      if ( w )
  2669. -        return 0;
  2670. +        return nullptr;
  2671.  
  2672.      w = new IconsetSystemUI;
  2673.      IconsetSystemUI *d = static_cast<IconsetSystemUI *>(w);
  2674. @@ -463,7 +463,7 @@ bool OptionsTabIconsetSystem::event(QEvent *e)
  2675.          d->progress->hide();
  2676.  
  2677.          d->unsetCursor();
  2678. -        thread = 0;
  2679. +        thread = nullptr;
  2680.  
  2681.          return true;
  2682.      }
  2683. @@ -493,7 +493,7 @@ void OptionsTabIconsetSystem::cancelThread()
  2684.          thread->cancelled = true;
  2685.          threadCancelled.unlock();
  2686.  
  2687. -        thread = 0;
  2688. +        thread = nullptr;
  2689.      }
  2690.  }
  2691.  
  2692. @@ -503,8 +503,8 @@ void OptionsTabIconsetSystem::cancelThread()
  2693.  
  2694.  OptionsTabIconsetEmoticons::OptionsTabIconsetEmoticons(QObject *parent)
  2695.      : OptionsTab(parent, "iconset_emoticons", "", tr("Emoticons"), tr("Select your emoticon iconsets"))
  2696. -    , w(0)
  2697. -    , thread(0)
  2698. +    , w(nullptr)
  2699. +    , thread(nullptr)
  2700.  {
  2701.  }
  2702.  
  2703. @@ -516,7 +516,7 @@ OptionsTabIconsetEmoticons::~OptionsTabIconsetEmoticons()
  2704.  QWidget *OptionsTabIconsetEmoticons::widget()
  2705.  {
  2706.      if ( w )
  2707. -        return 0;
  2708. +        return nullptr;
  2709.  
  2710.      w = new IconsetEmoUI;
  2711.      IconsetEmoUI *d = static_cast<IconsetEmoUI *>(w);
  2712. @@ -641,7 +641,7 @@ bool OptionsTabIconsetEmoticons::event(QEvent *e)
  2713.          d->progress->hide();
  2714.  
  2715.          d->unsetCursor();
  2716. -        thread = 0;
  2717. +        thread = nullptr;
  2718.  
  2719.          return true;
  2720.      }
  2721. @@ -671,7 +671,7 @@ void OptionsTabIconsetEmoticons::cancelThread()
  2722.          thread->cancelled = true;
  2723.          threadCancelled.unlock();
  2724.  
  2725. -        thread = 0;
  2726. +        thread = nullptr;
  2727.      }
  2728.  }
  2729.  
  2730. @@ -682,8 +682,8 @@ void OptionsTabIconsetEmoticons::cancelThread()
  2731.  
  2732.  OptionsTabIconsetMoods::OptionsTabIconsetMoods(QObject *parent)
  2733.      : OptionsTab(parent, "iconset_moods", "", tr("Moods"), tr("Select your mood iconset"))
  2734. -    , w(0)
  2735. -    , thread(0)
  2736. +    , w(nullptr)
  2737. +    , thread(nullptr)
  2738.  {
  2739.  }
  2740.  
  2741. @@ -695,7 +695,7 @@ OptionsTabIconsetMoods::~OptionsTabIconsetMoods()
  2742.  QWidget *OptionsTabIconsetMoods::widget()
  2743.  {
  2744.      if ( w )
  2745. -        return 0;
  2746. +        return nullptr;
  2747.  
  2748.      w = new IconsetMoodUI;
  2749.      IconsetMoodUI *d = static_cast<IconsetMoodUI *>(w);
  2750. @@ -790,7 +790,7 @@ bool OptionsTabIconsetMoods::event(QEvent *e)
  2751.          d->progress->hide();
  2752.  
  2753.          d->unsetCursor();
  2754. -        thread = 0;
  2755. +        thread = nullptr;
  2756.  
  2757.          return true;
  2758.      }
  2759. @@ -820,7 +820,7 @@ void OptionsTabIconsetMoods::cancelThread()
  2760.          thread->cancelled = true;
  2761.          threadCancelled.unlock();
  2762.  
  2763. -        thread = 0;
  2764. +        thread = nullptr;
  2765.      }
  2766.  }
  2767.  //----------------------------------------------------------------------------
  2768. @@ -829,8 +829,8 @@ void OptionsTabIconsetMoods::cancelThread()
  2769.  
  2770.  OptionsTabIconsetActivity::OptionsTabIconsetActivity(QObject *parent)
  2771.      : OptionsTab(parent, "iconset_activities", "", tr("Activity"), tr("Select your activity iconset"))
  2772. -    , w(0)
  2773. -    , thread(0)
  2774. +    , w(nullptr)
  2775. +    , thread(nullptr)
  2776.  {
  2777.  }
  2778.  
  2779. @@ -842,7 +842,7 @@ OptionsTabIconsetActivity::~OptionsTabIconsetActivity()
  2780.  QWidget *OptionsTabIconsetActivity::widget()
  2781.  {
  2782.      if ( w )
  2783. -        return 0;
  2784. +        return nullptr;
  2785.  
  2786.      w = new IconsetActivityUI;
  2787.      IconsetActivityUI *d = static_cast<IconsetActivityUI *>(w);
  2788. @@ -937,7 +937,7 @@ bool OptionsTabIconsetActivity::event(QEvent *e)
  2789.          d->progress->hide();
  2790.  
  2791.          d->unsetCursor();
  2792. -        thread = 0;
  2793. +        thread = nullptr;
  2794.  
  2795.          return true;
  2796.      }
  2797. @@ -967,7 +967,7 @@ void OptionsTabIconsetActivity::cancelThread()
  2798.          thread->cancelled = true;
  2799.          threadCancelled.unlock();
  2800.  
  2801. -        thread = 0;
  2802. +        thread = nullptr;
  2803.      }
  2804.  }
  2805.  //----------------------------------------------------------------------------
  2806. @@ -976,8 +976,8 @@ void OptionsTabIconsetActivity::cancelThread()
  2807.  
  2808.  OptionsTabIconsetAffiliations::OptionsTabIconsetAffiliations(QObject *parent)
  2809.      : OptionsTab(parent, "iconset_affiliations", "", tr("Affiliations"), tr("Select your affiliations iconset"))
  2810. -    , w(0)
  2811. -    , thread(0)
  2812. +    , w(nullptr)
  2813. +    , thread(nullptr)
  2814.  {
  2815.  }
  2816.  
  2817. @@ -989,7 +989,7 @@ OptionsTabIconsetAffiliations::~OptionsTabIconsetAffiliations()
  2818.  QWidget *OptionsTabIconsetAffiliations::widget()
  2819.  {
  2820.      if ( w )
  2821. -        return 0;
  2822. +        return nullptr;
  2823.  
  2824.      w = new IconsetAffiliationUI;
  2825.      IconsetAffiliationUI *d = static_cast<IconsetAffiliationUI *>(w);
  2826. @@ -1084,7 +1084,7 @@ bool OptionsTabIconsetAffiliations::event(QEvent *e)
  2827.          d->progress->hide();
  2828.  
  2829.          d->unsetCursor();
  2830. -        thread = 0;
  2831. +        thread = nullptr;
  2832.  
  2833.          return true;
  2834.      }
  2835. @@ -1114,7 +1114,7 @@ void OptionsTabIconsetAffiliations::cancelThread()
  2836.          thread->cancelled = true;
  2837.          threadCancelled.unlock();
  2838.  
  2839. -        thread = 0;
  2840. +        thread = nullptr;
  2841.      }
  2842.  }
  2843.  
  2844. @@ -1124,8 +1124,8 @@ void OptionsTabIconsetAffiliations::cancelThread()
  2845.  
  2846.  OptionsTabIconsetClients::OptionsTabIconsetClients(QObject *parent)
  2847.      : OptionsTab(parent, "iconset_clients", "", tr("Clients"), tr("Select your clients iconset"))
  2848. -    , w(0)
  2849. -    , thread(0)
  2850. +    , w(nullptr)
  2851. +    , thread(nullptr)
  2852.  {
  2853.  }
  2854.  
  2855. @@ -1137,7 +1137,7 @@ OptionsTabIconsetClients::~OptionsTabIconsetClients()
  2856.  QWidget *OptionsTabIconsetClients::widget()
  2857.  {
  2858.      if ( w )
  2859. -        return 0;
  2860. +        return nullptr;
  2861.  
  2862.      w = new IconsetClientUI;
  2863.      IconsetClientUI *d = static_cast<IconsetClientUI *>(w);
  2864. @@ -1232,7 +1232,7 @@ bool OptionsTabIconsetClients::event(QEvent *e)
  2865.          d->progress->hide();
  2866.  
  2867.          d->unsetCursor();
  2868. -        thread = 0;
  2869. +        thread = nullptr;
  2870.  
  2871.          return true;
  2872.      }
  2873. @@ -1262,7 +1262,7 @@ void OptionsTabIconsetClients::cancelThread()
  2874.          thread->cancelled = true;
  2875.          threadCancelled.unlock();
  2876.  
  2877. -        thread = 0;
  2878. +        thread = nullptr;
  2879.      }
  2880.  }
  2881.  
  2882. @@ -1272,8 +1272,8 @@ void OptionsTabIconsetClients::cancelThread()
  2883.  
  2884.  OptionsTabIconsetRoster::OptionsTabIconsetRoster(QObject *parent)
  2885.      : OptionsTab(parent, "iconset_roster", "", tr("Roster Icons"), tr("Select iconsets for your roster"))
  2886. -    , w(0)
  2887. -    , thread(0)
  2888. +    , w(nullptr)
  2889. +    , thread(nullptr)
  2890.  {
  2891.  }
  2892.  
  2893. @@ -1293,7 +1293,7 @@ void OptionsTabIconsetRoster::addService(const QString& id, const QString& name)
  2894.  QWidget *OptionsTabIconsetRoster::widget()
  2895.  {
  2896.      if ( w )
  2897. -        return 0;
  2898. +        return nullptr;
  2899.  
  2900.      w = new IconsetRosterUI;
  2901.      IconsetRosterUI *d = static_cast<IconsetRosterUI *>(w);
  2902. @@ -1323,7 +1323,7 @@ QWidget *OptionsTabIconsetRoster::widget()
  2903.      connect(d->iss_servicesRoster, SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)), SLOT(isServices_iconsetSelected(QListWidgetItem *, QListWidgetItem *)));
  2904.      connect(d->tw_isServices, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), SLOT(isServices_selectionChanged(QTreeWidgetItem *)));
  2905.      connect(d->pb_servicesDetails, SIGNAL(clicked()), SLOT(servicesDetails()));
  2906. -    isServices_selectionChanged(0);
  2907. +    isServices_selectionChanged(nullptr);
  2908.  
  2909.      connect(d->iss_customRoster, SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)), SLOT(isCustom_iconsetSelected(QListWidgetItem *, QListWidgetItem *)));
  2910.      connect(d->tw_customRoster, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), SLOT(isCustom_selectionChanged(QTreeWidgetItem *)));
  2911. @@ -1333,7 +1333,7 @@ QWidget *OptionsTabIconsetRoster::widget()
  2912.      connect(d->le_customRoster, SIGNAL(textChanged(const QString &)), SLOT(isCustom_textChanged()));
  2913.      connect(d->pb_customRosterAdd, SIGNAL(clicked()), SLOT(isCustom_add()));
  2914.      connect(d->pb_customRosterDelete, SIGNAL(clicked()), SLOT(isCustom_delete()));
  2915. -    isCustom_selectionChanged(0);
  2916. +    isCustom_selectionChanged(nullptr);
  2917.  
  2918.      d->ck_useTransportIconsForContacts->setWhatsThis(
  2919.          tr("Toggles use of transport icons to the contacts, that use that transports."));
  2920. @@ -1482,7 +1482,7 @@ bool OptionsTabIconsetRoster::event(QEvent *e)
  2921.          // roster - custom
  2922.          {
  2923.              // Then, fill the QListView
  2924. -            QTreeWidgetItem *last = 0;
  2925. +            QTreeWidgetItem *last = nullptr;
  2926.              QStringList customicons = PsiOptions::instance()->getChildOptionNames("options.iconsets.custom-status", true, true);
  2927.              foreach(QString base, customicons) {
  2928.                  QString regexp = PsiOptions::instance()->getOption(base + ".regexp").toString();
  2929. @@ -1513,7 +1513,7 @@ bool OptionsTabIconsetRoster::event(QEvent *e)
  2930.          d->progress->hide();
  2931.  
  2932.          d->unsetCursor();
  2933. -        thread = 0;
  2934. +        thread = nullptr;
  2935.  
  2936.          return true;
  2937.      }
  2938. @@ -1578,8 +1578,8 @@ void OptionsTabIconsetRoster::isServices_iconsetSelected(QListWidgetItem *item,
  2939.  void OptionsTabIconsetRoster::isServices_selectionChanged(QTreeWidgetItem *it)
  2940.  {
  2941.      IconsetRosterUI *d = static_cast<IconsetRosterUI *>(w);
  2942. -    d->iss_servicesRoster->setEnabled( it != 0 );
  2943. -    d->pb_servicesDetails->setEnabled( it != 0 );
  2944. +    d->iss_servicesRoster->setEnabled( it != nullptr );
  2945. +    d->pb_servicesDetails->setEnabled( it != nullptr );
  2946.      d->iss_servicesRoster->clearSelection();
  2947.      if ( !it )
  2948.          return;
  2949. @@ -1631,11 +1631,11 @@ void OptionsTabIconsetRoster::isCustom_iconsetSelected(QListWidgetItem *item, QL
  2950.  void OptionsTabIconsetRoster::isCustom_selectionChanged(QTreeWidgetItem *it)
  2951.  {
  2952.      IconsetRosterUI *d = static_cast<IconsetRosterUI *>(w);
  2953. -    d->iss_customRoster->setEnabled( it != 0 );
  2954. -    d->pb_customRosterDetails->setEnabled( it != 0 );
  2955. +    d->iss_customRoster->setEnabled( it != nullptr );
  2956. +    d->pb_customRosterDetails->setEnabled( it != nullptr );
  2957.      //d->pb_customRosterAdd->setEnabled( it != 0 );
  2958. -    d->pb_customRosterDelete->setEnabled( it != 0 );
  2959. -    d->le_customRoster->setEnabled( it != 0 );
  2960. +    d->pb_customRosterDelete->setEnabled( it != nullptr );
  2961. +    d->le_customRoster->setEnabled( it != nullptr );
  2962.      d->iss_customRoster->clearSelection();
  2963.      if ( !it )
  2964.          return;
  2965. @@ -1710,7 +1710,7 @@ void OptionsTabIconsetRoster::isCustom_delete()
  2966.          return;
  2967.  
  2968.      delete item;
  2969. -    isCustom_selectionChanged(0);
  2970. +    isCustom_selectionChanged(nullptr);
  2971.      d->tw_customRoster->clearSelection();
  2972.      emit dataChanged();
  2973.  }
  2974. @@ -1732,6 +1732,6 @@ void OptionsTabIconsetRoster::cancelThread()
  2975.          thread->cancelled = true;
  2976.          threadCancelled.unlock();
  2977.  
  2978. -        thread = 0;
  2979. +        thread = nullptr;
  2980.      }
  2981.  }
  2982. diff --git a/src/options/opt_input.cpp b/src/options/opt_input.cpp
  2983. index e7f2040c..0f25e01e 100644
  2984. --- a/src/options/opt_input.cpp
  2985. +++ b/src/options/opt_input.cpp
  2986. @@ -26,8 +26,8 @@ public:
  2987.  
  2988.  OptionsTabInput::OptionsTabInput(QObject *parent)
  2989.  : OptionsTab(parent, "input", "", tr("Input"), tr("Input options"), "psi/action_templates_edit"),
  2990. -  w_(0),
  2991. -  psi_(0)
  2992. +  w_(nullptr),
  2993. +  psi_(nullptr)
  2994.  {
  2995.  }
  2996.  
  2997. @@ -37,7 +37,7 @@ OptionsTabInput::~OptionsTabInput()
  2998.  QWidget *OptionsTabInput::widget()
  2999.  {
  3000.      if (w_) {
  3001. -        return 0;
  3002. +        return nullptr;
  3003.      }
  3004.  
  3005.      w_ = new OptInputUI();
  3006. diff --git a/src/options/opt_messages_common.cpp b/src/options/opt_messages_common.cpp
  3007. index efcbbdd6..e05f2cff 100644
  3008. --- a/src/options/opt_messages_common.cpp
  3009. +++ b/src/options/opt_messages_common.cpp
  3010. @@ -17,8 +17,8 @@ public:
  3011.  
  3012.  OptionsTabMsgCommon::OptionsTabMsgCommon(QObject *parent)
  3013.  : OptionsTab(parent, "common", "", tr("Common"), tr("Сommon options for messages section"), "psi/advanced"),
  3014. -  w_(0),
  3015. -  psi_(0)
  3016. +  w_(nullptr),
  3017. +  psi_(nullptr)
  3018.  {
  3019.  }
  3020.  
  3021. @@ -28,7 +28,7 @@ OptionsTabMsgCommon::~OptionsTabMsgCommon()
  3022.  QWidget *OptionsTabMsgCommon::widget()
  3023.  {
  3024.      if (w_) {
  3025. -        return 0;
  3026. +        return nullptr;
  3027.      }
  3028.  
  3029.      w_ = new OptMsgCommonUI();
  3030. diff --git a/src/options/opt_plugins.cpp b/src/options/opt_plugins.cpp
  3031. index 5856d5dc..1e5f9282 100644
  3032. --- a/src/options/opt_plugins.cpp
  3033. +++ b/src/options/opt_plugins.cpp
  3034. @@ -40,7 +40,7 @@ class PluginsOptionsDlg : public OptionsDlgBase
  3035.  {
  3036.      Q_OBJECT
  3037.  public:
  3038. -    PluginsOptionsDlg(const QString &pluginName, PsiCon *psi, QWidget *parent = 0) :
  3039. +    PluginsOptionsDlg(const QString &pluginName, PsiCon *psi, QWidget *parent = nullptr) :
  3040.          OptionsDlgBase(psi, parent)
  3041.      {
  3042.          setWindowTitle(QString("%1: %2").arg(pluginName).arg(windowTitle()));
  3043. @@ -82,7 +82,7 @@ void OptionsTabPlugins::setData(PsiCon *psi, QWidget *)
  3044.  QWidget *OptionsTabPlugins::widget()
  3045.  {
  3046.      if ( w )
  3047. -        return 0;
  3048. +        return nullptr;
  3049.  
  3050.      w = new OptPluginsUI();
  3051.      OptPluginsUI *d = static_cast<OptPluginsUI *>(w);
  3052. diff --git a/src/options/opt_popups.cpp b/src/options/opt_popups.cpp
  3053. index 64e61adf..0a06e161 100644
  3054. --- a/src/options/opt_popups.cpp
  3055. +++ b/src/options/opt_popups.cpp
  3056. @@ -34,15 +34,15 @@ public:
  3057.  
  3058.  OptionsTabPopups::OptionsTabPopups(QObject *parent)
  3059.      : OptionsTab(parent, "popups", "", tr("Popups"), tr("The popups behaviour"), "psi/tip")
  3060. -    , w(0)
  3061. -    , popup_(0)
  3062. +    , w(nullptr)
  3063. +    , popup_(nullptr)
  3064.  {
  3065.  }
  3066.  
  3067.  QWidget *OptionsTabPopups::widget()
  3068.  {
  3069.      if ( w )
  3070. -        return 0;
  3071. +        return nullptr;
  3072.  
  3073.      w = new OptPopupsUI();
  3074.      return w;
  3075. diff --git a/src/options/opt_roster_main.cpp b/src/options/opt_roster_main.cpp
  3076. index e8c63e41..19030426 100644
  3077. --- a/src/options/opt_roster_main.cpp
  3078. +++ b/src/options/opt_roster_main.cpp
  3079. @@ -17,7 +17,7 @@ public:
  3080.  
  3081.  OptionsTabRosterMain::OptionsTabRosterMain(QObject *parent)
  3082.      : OptionsTab(parent, "roster_main", "", tr("Roster"), tr("Roster window options"), "psi/roster_icon")
  3083. -    , w(0)
  3084. +    , w(nullptr)
  3085.  {
  3086.  }
  3087.  
  3088. @@ -28,7 +28,7 @@ OptionsTabRosterMain::~OptionsTabRosterMain()
  3089.  QWidget *OptionsTabRosterMain::widget()
  3090.  {
  3091.      if ( w )
  3092. -        return 0;
  3093. +        return nullptr;
  3094.  
  3095.      w = new OptRosterMainUI();
  3096.      OptRosterMainUI *d = static_cast<OptRosterMainUI *>(w);
  3097. diff --git a/src/options/opt_roster_muc.cpp b/src/options/opt_roster_muc.cpp
  3098. index 17c0625e..10f972c9 100644
  3099. --- a/src/options/opt_roster_muc.cpp
  3100. +++ b/src/options/opt_roster_muc.cpp
  3101. @@ -18,7 +18,7 @@ public:
  3102.  
  3103.  OptionsTabRosterMuc::OptionsTabRosterMuc(QObject *parent)
  3104.      : OptionsTab(parent, "roster_muc", "", tr("Groupchat"), tr("Groupchat roster options"), "psi/groupChat")
  3105. -    , w(0)
  3106. +    , w(nullptr)
  3107.  {
  3108.  }
  3109.  
  3110. @@ -45,7 +45,7 @@ void OptionsTabRosterMuc::changeEvent(QEvent *e)
  3111.  QWidget *OptionsTabRosterMuc::widget()
  3112.  {
  3113.      if ( w )
  3114. -        return 0;
  3115. +        return nullptr;
  3116.  
  3117.      w = new OptRosterMucUI();
  3118.      OptRosterMucUI *d = static_cast<OptRosterMucUI *>(w);
  3119. diff --git a/src/options/opt_shortcuts.cpp b/src/options/opt_shortcuts.cpp
  3120. index e6fde557..0700ceb5 100644
  3121. --- a/src/options/opt_shortcuts.cpp
  3122. +++ b/src/options/opt_shortcuts.cpp
  3123. @@ -50,7 +50,7 @@ public:
  3124.  OptionsTabShortcuts::OptionsTabShortcuts(QObject *parent)
  3125.  : OptionsTab(parent, "shortcuts", "", tr("Shortcuts"), tr("Options for Psi Shortcuts"), "psi/shortcuts")
  3126.  {
  3127. -    w = 0;
  3128. +    w = nullptr;
  3129.  }
  3130.  
  3131.  /**
  3132. @@ -67,7 +67,7 @@ OptionsTabShortcuts::~OptionsTabShortcuts()
  3133.  QWidget *OptionsTabShortcuts::widget()
  3134.  {
  3135.      if ( w )
  3136. -        return 0;
  3137. +        return nullptr;
  3138.  
  3139.      w = new OptShortcutsUI();
  3140.      OptShortcutsUI *d = static_cast<OptShortcutsUI *>(w);
  3141. diff --git a/src/options/opt_sound.cpp b/src/options/opt_sound.cpp
  3142. index 5f4ea44a..555b5f08 100644
  3143. --- a/src/options/opt_sound.cpp
  3144. +++ b/src/options/opt_sound.cpp
  3145. @@ -44,7 +44,7 @@ OptionsTabSound::~OptionsTabSound()
  3146.  QWidget *OptionsTabSound::widget()
  3147.  {
  3148.      if ( w )
  3149. -        return 0;
  3150. +        return nullptr;
  3151.  
  3152.      w = new OptSoundUI();
  3153.      OptSoundUI *d = static_cast<OptSoundUI *>(w);
  3154. diff --git a/src/options/opt_statusauto.cpp b/src/options/opt_statusauto.cpp
  3155. index e919d801..3b703ad4 100644
  3156. --- a/src/options/opt_statusauto.cpp
  3157. +++ b/src/options/opt_statusauto.cpp
  3158. @@ -29,7 +29,7 @@ OptionsTabStatusAuto::~OptionsTabStatusAuto()
  3159.  QWidget *OptionsTabStatusAuto::widget()
  3160.  {
  3161.      if ( w )
  3162. -        return 0;
  3163. +        return nullptr;
  3164.  
  3165.      w = new OptStatusAutoUI();
  3166.      OptStatusAutoUI *d = static_cast<OptStatusAutoUI *>(w);
  3167. diff --git a/src/options/opt_statusgeneral.cpp b/src/options/opt_statusgeneral.cpp
  3168. index 191f4cab..ca211c19 100644
  3169. --- a/src/options/opt_statusgeneral.cpp
  3170. +++ b/src/options/opt_statusgeneral.cpp
  3171. @@ -32,7 +32,7 @@ OptionsTabStatusGeneral::~OptionsTabStatusGeneral()
  3172.  QWidget *OptionsTabStatusGeneral::widget()
  3173.  {
  3174.      if ( w )
  3175. -        return 0;
  3176. +        return nullptr;
  3177.  
  3178.      w = new OptStatusGeneralUI();
  3179.      OptStatusGeneralUI *d = static_cast<OptStatusGeneralUI *>(w);
  3180. @@ -196,8 +196,8 @@ void OptionsTabStatusGeneral::setData(PsiCon *, QWidget *parentDialog)
  3181.  void OptionsTabStatusGeneral::currentItemChanged(QListWidgetItem * current, QListWidgetItem * /*previous*/ )
  3182.  {
  3183.      OptStatusGeneralUI *d = static_cast<OptStatusGeneralUI*>(w);
  3184. -    d->pb_spEdit->setEnabled(current != 0);
  3185. -    d->pb_spDelete->setEnabled(current != 0);
  3186. +    d->pb_spEdit->setEnabled(current != nullptr);
  3187. +    d->pb_spDelete->setEnabled(current != nullptr);
  3188.      if (current)
  3189.          loadStatusPreset();
  3190.      else
  3191. diff --git a/src/options/opt_statuspep.cpp b/src/options/opt_statuspep.cpp
  3192. index 27050a77..b1c59b7a 100644
  3193. --- a/src/options/opt_statuspep.cpp
  3194. +++ b/src/options/opt_statuspep.cpp
  3195. @@ -17,8 +17,8 @@ public:
  3196.  
  3197.  OptionsTabStatusPep::OptionsTabStatusPep(QObject *parent)
  3198.  : OptionsTab(parent, "status_tunes", "", tr("PEP"), tr("Tunes no-video filter and controllers switcher"))
  3199. -, w_(0)
  3200. -, psi_(0)
  3201. +, w_(nullptr)
  3202. +, psi_(nullptr)
  3203.  , controllersChanged_(false)
  3204.  {
  3205.  }
  3206. @@ -30,7 +30,7 @@ OptionsTabStatusPep::~OptionsTabStatusPep()
  3207.  QWidget *OptionsTabStatusPep::widget()
  3208.  {
  3209.      if (w_) {
  3210. -        return 0;
  3211. +        return nullptr;
  3212.      }
  3213.  
  3214.      w_ = new OptStatusPepUI();
  3215. diff --git a/src/options/opt_theme.cpp b/src/options/opt_theme.cpp
  3216. index e560e8ea..f9f729e6 100644
  3217. --- a/src/options/opt_theme.cpp
  3218. +++ b/src/options/opt_theme.cpp
  3219. @@ -62,7 +62,7 @@ OptionsTabAppearanceTheme::OptionsTabAppearanceTheme(QObject *parent,
  3220.      : OptionsTab(parent, provider_->type(), "",
  3221.                   provider_->optionsName(),
  3222.                   provider_->optionsDescription())
  3223. -    , w(0)
  3224. +    , w(nullptr)
  3225.      , provider(provider_)
  3226.  {
  3227.  
  3228. @@ -75,7 +75,7 @@ OptionsTabAppearanceTheme::~OptionsTabAppearanceTheme()
  3229.  QWidget *OptionsTabAppearanceTheme::widget()
  3230.  {
  3231.      if ( w )
  3232. -        return 0;
  3233. +        return nullptr;
  3234.  
  3235.      w = new OptAppearanceThemeUI();
  3236.      OptAppearanceThemeUI *d = static_cast<OptAppearanceThemeUI *>(w);
  3237. diff --git a/src/options/opt_toolbars.cpp b/src/options/opt_toolbars.cpp
  3238. index 6cb843a7..d220f795 100644
  3239. --- a/src/options/opt_toolbars.cpp
  3240. +++ b/src/options/opt_toolbars.cpp
  3241. @@ -93,7 +93,7 @@ OptionsTabToolbars::OptionsTabToolbars(QObject *parent)
  3242.  QWidget *OptionsTabToolbars::widget()
  3243.  {
  3244.      if (w)
  3245. -        return 0;
  3246. +        return nullptr;
  3247.  
  3248.      w = new LookFeelToolbarsUI();
  3249.      LookFeelToolbarsUI *d = (LookFeelToolbarsUI*) w;
  3250. @@ -404,7 +404,7 @@ void OptionsTabToolbars::toolbarSelectionChanged(int item)
  3251.      {
  3252.          // Fill the TreeWidget with toolbar-specific actions
  3253.          QTreeWidget *tw = d->tw_availActions;
  3254. -        QTreeWidgetItem *lastRoot = 0;
  3255. +        QTreeWidgetItem *lastRoot = nullptr;
  3256.  
  3257.          QList<ActionList*> lists = psi->actionList()->actionLists(p->currentType());
  3258.  
  3259. @@ -415,7 +415,7 @@ void OptionsTabToolbars::toolbarSelectionChanged(int item)
  3260.              root->setData(0, Qt::UserRole, QString(""));
  3261.              root->setExpanded(true);
  3262.  
  3263. -            QTreeWidgetItem *last = 0;
  3264. +            QTreeWidgetItem *last = nullptr;
  3265.              QStringList actionNames = actionList->actions();
  3266.              QStringList::Iterator it2 = actionNames.begin();
  3267.              for (; it2 != actionNames.end(); ++it2) {
  3268. diff --git a/src/options/opt_tree.cpp b/src/options/opt_tree.cpp
  3269. index 54e6bee5..c28d4368 100644
  3270. --- a/src/options/opt_tree.cpp
  3271. +++ b/src/options/opt_tree.cpp
  3272. @@ -7,7 +7,7 @@
  3273.  OptionsTabTree::OptionsTabTree(QObject *parent)
  3274.          : OptionsTab(parent, "tree", "", tr("Advanced"), tr("Options for advanced users"), "psi/advanced-plus")
  3275.  {
  3276. -    w = 0;
  3277. +    w = nullptr;
  3278.  }
  3279.  
  3280.  OptionsTabTree::~OptionsTabTree()
  3281. @@ -17,7 +17,7 @@ OptionsTabTree::~OptionsTabTree()
  3282.  QWidget *OptionsTabTree::widget()
  3283.  {
  3284.      if (w) {
  3285. -        return 0;
  3286. +        return nullptr;
  3287.      }
  3288.      w = new QWidget();
  3289.      //w->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
  3290. diff --git a/src/options/optionstab.cpp b/src/options/optionstab.cpp
  3291. index 78a0c688..a2fcf105 100644
  3292. --- a/src/options/optionstab.cpp
  3293. +++ b/src/options/optionstab.cpp
  3294. @@ -50,7 +50,7 @@ QString OptionsTab::tabName() const
  3295.  PsiIcon *OptionsTab::tabIcon() const
  3296.  {
  3297.      if ( v_tabIconName.isEmpty() )
  3298. -        return 0;
  3299. +        return nullptr;
  3300.  
  3301.      return (PsiIcon *)IconsetFactory::iconPtr( v_tabIconName );
  3302.  }
  3303. @@ -120,7 +120,7 @@ private slots:
  3304.  
  3305.  private:
  3306.      struct TabData {
  3307. -        TabData() { tab = 0; initialized = false; }
  3308. +        TabData() { tab = nullptr; initialized = false; }
  3309.          TabData(OptionsTab *t) { tab = t; initialized = false; }
  3310.          OptionsTab *tab;
  3311.          bool initialized;
  3312. @@ -141,7 +141,7 @@ void OptionsTabWidget::addTab(OptionsTab *tab)
  3313.  
  3314.      // the widget will have no parent; it will be reparented
  3315.      // when inserting it with "addTab"
  3316. -    QWidget *w = new QWidget(0);
  3317. +    QWidget *w = new QWidget(nullptr);
  3318.      w->setObjectName(tab->name());
  3319.  
  3320.      if ( !tab->desc().isEmpty() )
  3321. @@ -228,7 +228,7 @@ MetaOptionsTab::~MetaOptionsTab()
  3322.  
  3323.  void MetaOptionsTab::init()
  3324.  {
  3325. -    w = 0;
  3326. +    w = nullptr;
  3327.  }
  3328.  
  3329.  void MetaOptionsTab::addTab(OptionsTab *tab)
  3330. @@ -253,7 +253,7 @@ QWidget *MetaOptionsTab::widget()
  3331.      if ( w )
  3332.          return w;
  3333.  
  3334. -    OptionsTabWidget *t = new OptionsTabWidget(0);
  3335. +    OptionsTabWidget *t = new OptionsTabWidget(nullptr);
  3336.      w = t;
  3337.  
  3338.      connect(w, SIGNAL(connectDataChanged(QWidget *)), SIGNAL(connectDataChanged(QWidget *)));
  3339. diff --git a/src/pgpkeydlg.cpp b/src/pgpkeydlg.cpp
  3340. index 67902e65..b9d0b438 100644
  3341. --- a/src/pgpkeydlg.cpp
  3342. +++ b/src/pgpkeydlg.cpp
  3343. @@ -77,7 +77,7 @@ public:
  3344.  
  3345.  PGPKeyDlg::PGPKeyDlg(Type t, const QString& defaultKeyID, QWidget *parent)
  3346.      : QDialog(parent)
  3347. -    , model_(0)
  3348. +    , model_(nullptr)
  3349.  {
  3350.      ui_.setupUi(this);
  3351.      setModal(true);
  3352. @@ -103,8 +103,8 @@ PGPKeyDlg::PGPKeyDlg(Type t, const QString& defaultKeyID, QWidget *parent)
  3353.  
  3354.      ui_.le_filter->installEventFilter(this);
  3355.  
  3356. -    KeyViewItem* firstItem = 0;
  3357. -    KeyViewItem* selectedItem = 0;
  3358. +    KeyViewItem* firstItem = nullptr;
  3359. +    KeyViewItem* selectedItem = nullptr;
  3360.      int row = 0;
  3361.  
  3362.      foreach(QCA::KeyStore *ks, PGPUtil::instance().keystores_) {
  3363. diff --git a/src/pgputil.cpp b/src/pgputil.cpp
  3364. index cdb7236c..1900631a 100644
  3365. --- a/src/pgputil.cpp
  3366. +++ b/src/pgputil.cpp
  3367. @@ -8,7 +8,7 @@
  3368.  #include "passphrasedlg.h"
  3369.  #include "showtextdlg.h"
  3370.  
  3371. -PGPUtil* PGPUtil::instance_ = 0;
  3372. +PGPUtil* PGPUtil::instance_ = nullptr;
  3373.  
  3374.  PGPUtil::PGPUtil() : qcaEventHandler_(nullptr), passphraseDlg_(nullptr), cache_no_pgp_(false)
  3375.  {
  3376. @@ -301,11 +301,11 @@ void PGPUtil::showDiagnosticText(const QString& event, const QString& diagnostic
  3377.          QMessageBox msgbox(QMessageBox::Critical,
  3378.                             tr("Error"),
  3379.                             event,
  3380. -                           QMessageBox::Ok, 0);
  3381. +                           QMessageBox::Ok, nullptr);
  3382.          QPushButton *diag = msgbox.addButton(tr("Diagnostics"), QMessageBox::HelpRole);
  3383.          msgbox.exec();
  3384.          if (msgbox.clickedButton() == diag) {
  3385. -            ShowTextDlg* w = new ShowTextDlg(diagnostic, true, false, 0);
  3386. +            ShowTextDlg* w = new ShowTextDlg(diagnostic, true, false, nullptr);
  3387.              w->setWindowTitle(tr("OpenPGP Diagnostic Text"));
  3388.              w->resize(560, 240);
  3389.              w->exec();
  3390. diff --git a/src/pluginhost.cpp b/src/pluginhost.cpp
  3391. index 61db7415..b309b4de 100644
  3392. --- a/src/pluginhost.cpp
  3393. +++ b/src/pluginhost.cpp
  3394. @@ -537,7 +537,7 @@ bool PluginHost::incomingXml(int account, const QDomElement &e)
  3395.          }
  3396.  
  3397.          // choose handler function depending on iq type
  3398. -        bool (IqNamespaceFilter::*handler)(int account, const QDomElement& xml) = 0;
  3399. +        bool (IqNamespaceFilter::*handler)(int account, const QDomElement& xml) = nullptr;
  3400.          const QString type = e.attribute("type");
  3401.          if (type == "get") {
  3402.              handler = &IqNamespaceFilter::iqGet;
  3403. @@ -944,7 +944,7 @@ void PluginHost::addIcon(const QString& name, const QByteArray& ba)
  3404.  
  3405.  QTextEdit* PluginHost::getEditBox()
  3406.  {
  3407. -    QTextEdit* ed = 0;
  3408. +    QTextEdit* ed = nullptr;
  3409.      TabbableWidget* tw = findActiveTab();
  3410.      if(tw) {
  3411.          QWidget* chatEditProxy = tw->findChild<QWidget*>("mle");
  3412. diff --git a/src/popupmanager.cpp b/src/popupmanager.cpp
  3413. index 0705f9f9..0416b957 100644
  3414. --- a/src/popupmanager.cpp
  3415. +++ b/src/popupmanager.cpp
  3416. @@ -57,15 +57,15 @@ class PopupManager::Private
  3417.  
  3418.  public:
  3419.      Private()
  3420. -        : psi_(0)
  3421. +        : psi_(nullptr)
  3422.          , lastCustomType_(PopupManager::AlertCustom)
  3423.      {
  3424.      }
  3425.  
  3426.      PsiPopupInterface* popup(const QString& name)
  3427.      {
  3428. -        PsiPopupInterface* ppi = 0;
  3429. -        PsiPopupPluginInterface *plugin = 0;
  3430. +        PsiPopupInterface* ppi = nullptr;
  3431. +        PsiPopupPluginInterface *plugin = nullptr;
  3432.          if(popups_.keys().contains(name)) {
  3433.              plugin = popups_.value(name);
  3434.          }
  3435. diff --git a/src/privacy/privacydlg.cpp b/src/privacy/privacydlg.cpp
  3436. index 173874c7..39b64b22 100644
  3437. --- a/src/privacy/privacydlg.cpp
  3438. +++ b/src/privacy/privacydlg.cpp
  3439. @@ -287,7 +287,7 @@ void PrivacyDlg::changeList_succeeded(QString name)
  3440.  
  3441.  void PrivacyDlg::changeList_failed()
  3442.  {
  3443. -    QMessageBox::critical(0, QObject::tr("Error"), QObject::tr("There was an error changing the list."));
  3444. +    QMessageBox::critical(nullptr, QObject::tr("Error"), QObject::tr("There was an error changing the list."));
  3445.      setWidgetsEnabled(true);
  3446.  }
  3447.  
  3448. @@ -300,7 +300,7 @@ void PrivacyDlg::change_succeeded()
  3449.  void PrivacyDlg::change_failed()
  3450.  {
  3451.      revertSettings();
  3452. -    QMessageBox::critical(0, QObject::tr("Error"), QObject::tr("There was an error processing your request."));
  3453. +    QMessageBox::critical(nullptr, QObject::tr("Error"), QObject::tr("There was an error processing your request."));
  3454.      setWidgetsEnabled(true);
  3455.  }
  3456.  
  3457. diff --git a/src/privacy/psiprivacymanager.cpp b/src/privacy/psiprivacymanager.cpp
  3458. index c3db9785..e6a49260 100644
  3459. --- a/src/privacy/psiprivacymanager.cpp
  3460. +++ b/src/privacy/psiprivacymanager.cpp
  3461. @@ -653,7 +653,7 @@ PrivacyList* PsiPrivacyManager::blockedList() const
  3462.      if(lists_.contains(blockedListName_))
  3463.          return lists_[blockedListName_];
  3464.  
  3465. -    return 0;
  3466. +    return nullptr;
  3467.  }
  3468.  
  3469.  QStringList PsiPrivacyManager::blockedContacts() const
  3470. diff --git a/src/proxy.cpp b/src/proxy.cpp
  3471. index a5dd0f2e..56f8ccf2 100644
  3472. --- a/src/proxy.cpp
  3473. +++ b/src/proxy.cpp
  3474. @@ -142,8 +142,8 @@ public slots:
  3475.      {
  3476.          q->ui_.lbx_proxy->clear();
  3477.  
  3478. -        QListWidgetItem* firstItem = 0;
  3479. -        QListWidgetItem* currentItem = 0;
  3480. +        QListWidgetItem* firstItem = nullptr;
  3481. +        QListWidgetItem* currentItem = nullptr;
  3482.          foreach(ProxyItem i, list) {
  3483.              QListWidgetItem* item = new QListWidgetItem(i.name);
  3484.              addItem(item);
  3485. @@ -515,7 +515,7 @@ public:
  3486.  };
  3487.  
  3488.  ProxyManager::ProxyManager()
  3489. -        : QObject(0)
  3490. +        : QObject(nullptr)
  3491.  {
  3492.      d = new Private;
  3493.  }
  3494. @@ -585,7 +585,7 @@ void ProxyManager::openDialog(QString def)
  3495.      if(d->pd)
  3496.          bringToFront(d->pd);
  3497.      else {
  3498. -        d->pd = new ProxyDlg(itemList(), def, 0);
  3499. +        d->pd = new ProxyDlg(itemList(), def, nullptr);
  3500.          connect(d->pd, SIGNAL(applyList(const ProxyItemList &, int)), SLOT(pd_applyList(const ProxyItemList &, int)));
  3501.          d->pd->show();
  3502.      }
  3503. diff --git a/src/psiactionlist.cpp b/src/psiactionlist.cpp
  3504. index ab55d5d8..758a9da1 100644
  3505. --- a/src/psiactionlist.cpp
  3506. +++ b/src/psiactionlist.cpp
  3507. @@ -115,7 +115,7 @@ void PsiActionList::Private::createCommon()
  3508.      ActionNames actions[] = {
  3509.          { "separator", separatorAction },
  3510.          { "spacer", spacerAction },
  3511. -        { "", 0 }
  3512. +        { "", nullptr }
  3513.      };
  3514.  
  3515.      createActionList( tr( "Common Actions" ), Actions_Common, actions );
  3516. @@ -130,26 +130,26 @@ void PsiActionList::Private::createMainWin()
  3517.          viewGroups->setUsesDropDown(true);
  3518.          viewGroups->setExclusive(false);
  3519.  
  3520. -        IconAction *actEnableGroups = new IconAction(tr("Show Roster Groups"), "psi/enable-groups", tr("Show Roster Groups"), 0, viewGroups, 0, true);
  3521. +        IconAction *actEnableGroups = new IconAction(tr("Show Roster Groups"), "psi/enable-groups", tr("Show Roster Groups"), 0, viewGroups, nullptr, true);
  3522.          actEnableGroups->setWhatsThis(tr("Enable/disable groups in roster"));
  3523.  
  3524. -        IconAction *showOffline = new IconAction(tr("Show Offline Contacts"), "psi/show_offline", tr("Show Offline Contacts"), 0, viewGroups, 0, true);
  3525. +        IconAction *showOffline = new IconAction(tr("Show Offline Contacts"), "psi/show_offline", tr("Show Offline Contacts"), 0, viewGroups, nullptr, true);
  3526.          showOffline->setWhatsThis(tr("Toggles visibility of offline contacts in roster"));
  3527.  
  3528.          /*IconAction *showAway = new IconAction(tr("Show Away/XA/DnD Contacts"), "psi/show_away", tr("Show Away/XA/DnD Contacts"), 0,
  3529.                                                PsiOptions::instance()->getOption("options.ui.menu.view.show-away").toBool() ? (QObject*)viewGroups : (QObject*)this, 0, true);
  3530.          showAway->setWhatsThis(tr("Toggles visibility of away/xa/dnd contacts in roster"));*/
  3531.  
  3532. -        IconAction *showHidden = new IconAction(tr("Show Hidden Contacts"), "psi/show_hidden", tr("Show Hidden Contacts"), 0, viewGroups, 0, true);
  3533. +        IconAction *showHidden = new IconAction(tr("Show Hidden Contacts"), "psi/show_hidden", tr("Show Hidden Contacts"), 0, viewGroups, nullptr, true);
  3534.          showHidden->setWhatsThis(tr("Toggles visibility of hidden contacts in roster"));
  3535.  
  3536. -        IconAction *showAgents = new IconAction(tr("Show Agents/Transports"), "psi/disco", tr("Show Agents/Transports"), 0, viewGroups, 0, true);
  3537. +        IconAction *showAgents = new IconAction(tr("Show Agents/Transports"), "psi/disco", tr("Show Agents/Transports"), 0, viewGroups, nullptr, true);
  3538.          showAgents->setWhatsThis(tr("Toggles visibility of agents/transports in roster"));
  3539.  
  3540. -        IconAction *showSelf = new IconAction(tr("Show Self Contact"), "psi/show_self", tr("Show Self Contact"), 0, viewGroups, 0, true);
  3541. +        IconAction *showSelf = new IconAction(tr("Show Self Contact"), "psi/show_self", tr("Show Self Contact"), 0, viewGroups, nullptr, true);
  3542.          showSelf->setWhatsThis(tr("Toggles visibility of self contact in roster"));
  3543.  
  3544. -        IconAction *showStatusMsg = new IconAction(tr("Show Status Messages"), "psi/statusmsg", tr("Show Status Messages"), 0, viewGroups, 0, true);
  3545. +        IconAction *showStatusMsg = new IconAction(tr("Show Status Messages"), "psi/statusmsg", tr("Show Status Messages"), 0, viewGroups, nullptr, true);
  3546.          showSelf->setWhatsThis(tr("Toggles visibility of status messages of contacts"));
  3547.  
  3548.          ActionNames actions[] = {
  3549. @@ -161,19 +161,19 @@ void PsiActionList::Private::createMainWin()
  3550.              { "show_agents",  showAgents  },
  3551.              { "show_self",    showSelf    },
  3552.              { "show_statusmsg", showStatusMsg },
  3553. -            { "", 0 }
  3554. +            { "", nullptr }
  3555.          };
  3556.  
  3557.          createActionList(tr("Show Contacts"), Actions_MainWin, actions);
  3558.      }
  3559.  
  3560.      {
  3561. -        PopupAction *optionsButton = new PopupAction (tr("&Psi"), 0, this, "optionsButton");
  3562. +        PopupAction *optionsButton = new PopupAction (tr("&Psi"), nullptr, this, "optionsButton");
  3563.          optionsButton->setWhatsThis (tr("The main Psi button, that provides access to many actions"));
  3564.          optionsButton->setSizePolicy ( QSizePolicy( QSizePolicy::Maximum, QSizePolicy::Preferred ) );
  3565.          optionsButton->setIcon ( IconsetFactory::iconPtr("psi/main"), false );
  3566.  
  3567. -        PopupAction *statusButton = new PopupAction (tr("&Status"), 0, this, "statusButton");
  3568. +        PopupAction *statusButton = new PopupAction (tr("&Status"), nullptr, this, "statusButton");
  3569.          statusButton->setWhatsThis (tr("Provides a convenient way to change and to get information about current status"));
  3570.          statusButton->setSizePolicy ( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
  3571.  
  3572. @@ -188,7 +188,7 @@ void PsiActionList::Private::createMainWin()
  3573.              { "button_status",  statusButton  },
  3574.              { "active_contacts",actActiveContacts},
  3575.              { "event_notifier", eventNotifier },
  3576. -            { "", 0 }
  3577. +            { "", nullptr }
  3578.          };
  3579.  
  3580.          createActionList( tr( "Buttons" ), Actions_MainWin, actions );
  3581. @@ -196,13 +196,13 @@ void PsiActionList::Private::createMainWin()
  3582.  
  3583.  
  3584.      {
  3585. -        IconAction *add_act = 0;
  3586. +        IconAction *add_act = nullptr;
  3587.          if (!PsiOptions::instance()->getOption("options.ui.contactlist.lockdown-roster").toBool())
  3588.              add_act = new MAction(IconsetFactory::icon("psi/addContact"), tr("&Add a Contact"), 0, psi, this);
  3589.  
  3590.          IconAction *lw_act = new MAction(IconsetFactory::icon("psi/xml"), tr("&XML Console"), 2, psi, this);
  3591.  
  3592. -        IconAction *actDisco = 0;
  3593. +        IconAction *actDisco = nullptr;
  3594.          if(!PsiOptions::instance()->getOption("options.ui.contactlist.disable-service-discovery").toBool())
  3595.              actDisco = new MAction(IconsetFactory::icon("psi/disco"), tr("Service &Discovery"), 3, psi, this);
  3596.  
  3597. @@ -228,7 +228,7 @@ void PsiActionList::Private::createMainWin()
  3598.          IconAction *actToolbars = new IconAction(tr("Configure Toolbars"), "psi/toolbars", tr("Configure Tool&bars"), 0, this);
  3599.          IconAction *actChangeProfile = new IconAction (tr("Change Profile"), "psi/profile", tr("&Change Profile"), 0, this);
  3600.  
  3601. -        IconAction *actPlaySounds = new IconAction (tr("Play Sounds"), "psi/playSounds", tr("Play &Sounds"), 0, this, 0, true);
  3602. +        IconAction *actPlaySounds = new IconAction (tr("Play Sounds"), "psi/playSounds", tr("Play &Sounds"), 0, this, nullptr, true);
  3603.          actPlaySounds->setWhatsThis (tr("Toggles whether sound should be played or not"));
  3604.  
  3605.          IconAction *actQuit = new IconAction (tr("Quit"), "psi/quit", tr("&Quit"), 0, this);
  3606. @@ -255,7 +255,7 @@ void PsiActionList::Private::createMainWin()
  3607.              { "menu_change_profile",  actChangeProfile },
  3608.              { "menu_play_sounds",     actPlaySounds    },
  3609.              { "menu_quit",            actQuit          },
  3610. -            { "", 0 }
  3611. +            { "", nullptr }
  3612.          };
  3613.  
  3614.          createActionList( tr( "Menu Items" ), Actions_MainWin, actions );
  3615. @@ -263,7 +263,7 @@ void PsiActionList::Private::createMainWin()
  3616.  
  3617.  #ifdef USE_PEP
  3618.      {
  3619. -        IconAction *actPublishTune = new IconAction (tr("Publish Tune"), "psi/publishTune", tr("Publish &Tune"), 0, this, 0, true);
  3620. +        IconAction *actPublishTune = new IconAction (tr("Publish Tune"), "psi/publishTune", tr("Publish &Tune"), 0, this, nullptr, true);
  3621.          actPublishTune->setWhatsThis (tr("Toggles whether the currently playing tune should be published or not"));
  3622.  
  3623.          IconAction *actSetMood = new IconAction (tr("Set Mood"), "pep/mood", tr("Set Mood"), 0, this);
  3624. @@ -280,7 +280,7 @@ void PsiActionList::Private::createMainWin()
  3625.              { "set_mood",        actSetMood },
  3626.              { "set_activity",    actSetActivity },
  3627.              { "set_geoloc",        actSetGeoloc },
  3628. -            { "", 0 }
  3629. +            { "", nullptr }
  3630.          };
  3631.  
  3632.          createActionList( tr( "Publish" ), Actions_MainWin, actions );
  3633. @@ -346,7 +346,7 @@ void PsiActionList::Private::createMainWin()
  3634.              { "status_offline",   statusOffline   },
  3635.              { "choose_status",    chooseStatus    },
  3636.              { "reconnect_all",    reconnectAll    },
  3637. -            { "", 0 }
  3638. +            { "", nullptr }
  3639.          };
  3640.  
  3641.          statusActionList = createActionList( tr( "Status" ), Actions_MainWin, actions );
  3642. @@ -401,7 +401,7 @@ void PsiActionList::Private::createMainWin()
  3643.              { "help_about_psimedia",   actAboutPsiMedia   },
  3644.              { "help_diag_qcaplugin",   actDiagQCAPlugin   },
  3645.              { "help_diag_qcakeystore", actDiagQCAKeyStore },
  3646. -            { "", 0 }
  3647. +            { "", nullptr }
  3648.          };
  3649.  
  3650.          createActionList( tr( "Help" ), Actions_MainWin, actions );
  3651. @@ -434,7 +434,7 @@ void PsiActionList::Private::createChat()
  3652.          IconAction *actIcon = new IconAction(tr("Select Icon"), "psi/smile", tr("Select Icon"), 0, this);
  3653.          IconAction *actVoice = new IconAction(tr("Voice Call"), "psi/avcall", tr("Voice Call"), 0, this);
  3654.          IconAction *actFile = new IconAction(tr("Send File"), "psi/upload", tr("Send File"), 0, this);
  3655. -        IconAction *actPgp = new IconAction(tr("Toggle Encryption"), "psi/cryptoYes", tr("Toggle Encryption"), 0, this, 0, true);
  3656. +        IconAction *actPgp = new IconAction(tr("Toggle Encryption"), "psi/cryptoYes", tr("Toggle Encryption"), 0, this, nullptr, true);
  3657.          IconAction *actInfo = new IconAction(tr("User Info"), "psi/vCard", tr("User Info"), 0, this);
  3658.          IconAction *actHistory = new IconAction(tr("Message History"), "psi/history", tr("Message History"), 0, this);
  3659.          IconAction *actCompact = new IconAction(tr("Toggle Compact/Full Size"), "psi/compact", tr("Toggle Compact/Full Size"), 0, this);
  3660. @@ -453,7 +453,7 @@ void PsiActionList::Private::createChat()
  3661.              { "chat_history", actHistory   },
  3662.              { "chat_compact", actCompact   },
  3663.              { "chat_active_contacts", actActiveContacts   },
  3664. -            { "", 0 }
  3665. +            { "", nullptr }
  3666.          };
  3667.  
  3668.          createActionList(tr("Chat basic buttons"), Actions_Chat, actions);
  3669. @@ -477,7 +477,7 @@ void PsiActionList::Private::createGroupchat()
  3670.              { "gchat_html_text", actHtmlText   },
  3671.              { "gchat_configure", actConfigure   },
  3672.              { "gchat_icon", actIcon   },
  3673. -            { "", 0 }
  3674. +            { "", nullptr }
  3675.          };
  3676.  
  3677.          createActionList(tr("Groupchat basic buttons"), Actions_Groupchat, actions);
  3678. diff --git a/src/psichatdlg.cpp b/src/psichatdlg.cpp
  3679. index 98a49c02..6259e579 100644
  3680. --- a/src/psichatdlg.cpp
  3681. +++ b/src/psichatdlg.cpp
  3682. @@ -55,7 +55,7 @@
  3683.  
  3684.  #define MCMDCHAT        "https://psi-im.org/ids/mcmd#chatmain"
  3685.  
  3686. -PsiIcon* PsiChatDlg::throbber_icon = 0;
  3687. +PsiIcon* PsiChatDlg::throbber_icon = nullptr;
  3688.  
  3689.  class PsiChatDlg::ChatDlgMCmdProvider : public QObject, public MCmdProviderIface {
  3690.      Q_OBJECT
  3691. @@ -74,25 +74,25 @@ public:
  3692.                  //qDebug() << "querying: " << dlg_->jid().full();
  3693.                  version->get(dlg_->jid());
  3694.                  version->go();
  3695. -                newstate = 0;
  3696. +                newstate = nullptr;
  3697.              } else if (cmd == "idle") {
  3698.                  LastActivityTask *idle = new LastActivityTask(dlg_->jid(), dlg_->account()->client()->rootTask());
  3699.                  connect(idle, SIGNAL(finished()), SLOT(lastactivity_finished()));
  3700.                  idle->go();
  3701. -                newstate = 0;
  3702. +                newstate = nullptr;
  3703.              } else if (cmd == "clear") {
  3704.                  dlg_->doClear();
  3705. -                newstate = 0;
  3706. +                newstate = nullptr;
  3707.              } else if (cmd == "vcard") {
  3708.                  dlg_->doInfo();
  3709. -                newstate = 0;
  3710. +                newstate = nullptr;
  3711.              } else if (cmd == "auth") {
  3712.                  if (command.count() == 2) {
  3713.                      if (command[1].toLower() == "request") {
  3714.                          dlg_->account()->actionAuthRequest(dlg_->jid());
  3715.                      }
  3716.                  }
  3717. -                newstate = 0;
  3718. +                newstate = nullptr;
  3719.              } else if (cmd == "compact") {
  3720.                  if (command.count() == 2) {
  3721.                      QString sub = command[1].toLower();
  3722. @@ -107,7 +107,7 @@ public:
  3723.                      dlg_->smallChat_ = !dlg_->smallChat_;
  3724.                  }
  3725.                  dlg_->setLooks();
  3726. -                newstate = 0;
  3727. +                newstate = nullptr;
  3728.              } else if (!cmd.isEmpty()) {
  3729.                  return false;
  3730.              }
  3731. @@ -274,7 +274,7 @@ void PsiChatDlg::initUi()
  3732.      ui_.log->realTextWidget()->installEventFilter(this);
  3733.      ui_.mini_prompt->hide();
  3734.  
  3735. -    if (throbber_icon == 0) {
  3736. +    if (throbber_icon == nullptr) {
  3737.          throbber_icon = (PsiIcon *)IconsetFactory::iconPtr("psi/throbber");
  3738.      }
  3739.  #ifdef PSI_PLUGINS
  3740. @@ -344,7 +344,7 @@ void PsiChatDlg::setLooks()
  3741.      QIcon i;
  3742.      i.addPixmap(IconsetFactory::icon("psi/cryptoNo").impix(),  QIcon::Normal, QIcon::Off);
  3743.      i.addPixmap(IconsetFactory::icon("psi/cryptoYes").impix(), QIcon::Normal, QIcon::On);
  3744. -    actions_->action("chat_pgp")->setPsiIcon(0);
  3745. +    actions_->action("chat_pgp")->setPsiIcon(nullptr);
  3746.      actions_->action("chat_pgp")->setIcon(i);
  3747.  }
  3748.  
  3749. @@ -449,7 +449,7 @@ void PsiChatDlg::initToolButtons()
  3750.  {
  3751.  // typeahead find
  3752.      QHBoxLayout *hb3a = new QHBoxLayout();
  3753. -    typeahead_ = new TypeAheadFindBar(ui_.log->textWidget(), tr("Find toolbar"), 0);
  3754. +    typeahead_ = new TypeAheadFindBar(ui_.log->textWidget(), tr("Find toolbar"), nullptr);
  3755.      hb3a->addWidget( typeahead_ );
  3756.      ui_.vboxLayout1->addLayout(hb3a);
  3757.  // -- typeahead
  3758. diff --git a/src/psicon.cpp b/src/psicon.cpp
  3759. index aa63eeaf..10ca94a1 100644
  3760. --- a/src/psicon.cpp
  3761. +++ b/src/psicon.cpp
  3762. @@ -972,7 +972,7 @@ QWidget *PsiCon::dialogFind(const char *className)
  3763.              return i->widget;
  3764.          }
  3765.      }
  3766. -    return 0;
  3767. +    return nullptr;
  3768.  }
  3769.  
  3770.  QMenuBar* PsiCon::defaultMenuBar() const
  3771. @@ -1288,12 +1288,12 @@ void PsiCon::openUri(const QUrl &uri)
  3772.  
  3773.      // scheme
  3774.      if (uri.scheme() != "xmpp") {
  3775. -        QMessageBox::critical(0, tr("Unsupported URI type"), QString("URI (link) type \"%1\" is not supported.").arg(uri.scheme()));
  3776. +        QMessageBox::critical(nullptr, tr("Unsupported URI type"), QString("URI (link) type \"%1\" is not supported.").arg(uri.scheme()));
  3777.          return;
  3778.      }
  3779.  
  3780.      // authority
  3781. -    PsiAccount *pa = 0;
  3782. +    PsiAccount *pa = nullptr;
  3783.      //if (uri.authority().isEmpty()) {
  3784.          TabbableWidget* tw = findActiveTab();
  3785.          if (tw) {
  3786. @@ -1304,7 +1304,7 @@ void PsiCon::openUri(const QUrl &uri)
  3787.          }
  3788.  
  3789.          if (!pa) {
  3790. -            QMessageBox::critical(0, tr("Error"), QString("You need to have an account configured and enabled to open URIs (links)."));
  3791. +            QMessageBox::critical(nullptr, tr("Error"), QString("You need to have an account configured and enabled to open URIs (links)."));
  3792.              return;
  3793.          }
  3794.      //
  3795. @@ -1716,13 +1716,13 @@ void PsiCon::processEvent(const PsiEvent::Ptr &e, ActivationType activationType)
  3796.          e->account()->cpUpdate(*u);
  3797.          if(sess) {
  3798.              if(!sess->jid().isEmpty()) {
  3799. -                CallDlg *w = new CallDlg(e->account(), 0);
  3800. +                CallDlg *w = new CallDlg(e->account(), nullptr);
  3801.                  w->setAttribute(Qt::WA_DeleteOnClose);
  3802.                  w->setIncoming(sess);
  3803.                  bringToFront(w);
  3804.              }
  3805.              else {
  3806. -                QMessageBox::information(0, tr("Call ended"), tr("Other party canceled call."));
  3807. +                QMessageBox::information(nullptr, tr("Call ended"), tr("Other party canceled call."));
  3808.                  delete sess;
  3809.              }
  3810.          }
  3811. @@ -1880,7 +1880,7 @@ void PsiCon::s5b_init()
  3812.      int port = PsiOptions::instance()->getOption("options.p2p.bytestreams.listen-port").toInt();
  3813.      if (port) {
  3814.          if(!d->s5bServer->start(port)) {
  3815. -            QMessageBox::warning(0, tr("Warning"), tr("Unable to bind to port %1 for Data Transfer.\nThis may mean you are already running another instance of Psi. You may experience problems sending and/or receiving files.").arg(port));
  3816. +            QMessageBox::warning(nullptr, tr("Warning"), tr("Unable to bind to port %1 for Data Transfer.\nThis may mean you are already running another instance of Psi. You may experience problems sending and/or receiving files.").arg(port));
  3817.          }
  3818.      }
  3819.  }
  3820. diff --git a/src/psicontact.cpp b/src/psicontact.cpp
  3821. index ebf3d192..398e7e7f 100644
  3822. --- a/src/psicontact.cpp
  3823. +++ b/src/psicontact.cpp
  3824. @@ -50,7 +50,7 @@ public:
  3825.      Private(PsiContact* contact)
  3826.          : Alertable()
  3827.          , q(contact)
  3828. -        , account_(0)
  3829. +        , account_(nullptr)
  3830.          , statusTimer_(nullptr)
  3831.          , animTimer_(nullptr)
  3832.          , oldStatus_(XMPP::Status::Offline)
  3833. @@ -141,10 +141,10 @@ PsiContact::PsiContact(const UserListItem& u, PsiAccount* account, bool isSelf)
  3834.  }
  3835.  
  3836.  PsiContact::PsiContact()
  3837. -    : QObject(0)
  3838. +    : QObject(nullptr)
  3839.  {
  3840.      d = new Private(this);
  3841. -    d->account_ = 0;
  3842. +    d->account_ = nullptr;
  3843.  }
  3844.  
  3845.  /**
  3846. @@ -262,7 +262,7 @@ QIcon PsiContact::picture() const
  3847.  ContactListItemMenu* PsiContact::contextMenu(ContactListModel* model)
  3848.  {
  3849.      if (!account())
  3850. -        return 0;
  3851. +        return nullptr;
  3852.      return new PsiContactMenu(this, model);
  3853.  }
  3854.  
  3855. diff --git a/src/psicontactlist.cpp b/src/psicontactlist.cpp
  3856. index d817a36b..9d2021a2 100644
  3857. --- a/src/psicontactlist.cpp
  3858. +++ b/src/psicontactlist.cpp
  3859. @@ -167,7 +167,7 @@ PsiAccount *PsiContactList::defaultAccount() const
  3860.      if (!enabledAccounts_.isEmpty()) {
  3861.          return enabledAccounts_.first();
  3862.      }
  3863. -    return 0;
  3864. +    return nullptr;
  3865.  }
  3866.  
  3867.  /**
  3868. @@ -263,7 +263,7 @@ int PsiContactList::queueContactCount() const
  3869.   */
  3870.  PsiAccount* PsiContactList::queueLowestEventId()
  3871.  {
  3872. -    PsiAccount *low = 0;
  3873. +    PsiAccount *low = nullptr;
  3874.  
  3875.      // first try to get event from non-dnd account
  3876.      low = tryQueueLowestEventId(false);
  3877. @@ -458,7 +458,7 @@ void PsiContactList::setContactSortStyle(QString style)
  3878.  
  3879.  PsiAccount *PsiContactList::tryQueueLowestEventId(bool includeDND)
  3880.  {
  3881. -    PsiAccount *low = 0;
  3882. +    PsiAccount *low = nullptr;
  3883.      int low_id = 0;
  3884.      int low_prior = EventPriorityDontCare;
  3885.  
  3886. @@ -496,7 +496,7 @@ PsiAccount* PsiContactList::getAccount(const QString& id) const
  3887.          if (account->id() == id)
  3888.              return account;
  3889.  
  3890. -    return 0;
  3891. +    return nullptr;
  3892.  }
  3893.  
  3894.  PsiAccount* PsiContactList::getAccountByJid(const XMPP::Jid& jid) const
  3895. @@ -505,7 +505,7 @@ PsiAccount* PsiContactList::getAccountByJid(const XMPP::Jid& jid) const
  3896.          if (account->jid().compare(jid, false))
  3897.              return account;
  3898.  
  3899. -    return 0;
  3900. +    return nullptr;
  3901.  }
  3902.  
  3903.  const QList<PsiContact*>& PsiContactList::contacts() const
  3904. diff --git a/src/psicontactmenu.cpp b/src/psicontactmenu.cpp
  3905. index 30242d79..4b2236e5 100644
  3906. --- a/src/psicontactmenu.cpp
  3907. +++ b/src/psicontactmenu.cpp
  3908. @@ -57,10 +57,10 @@
  3909.  //----------------------------------------------------------------------------
  3910.  
  3911.  PsiContactMenu::Private::Private(PsiContactMenu* menu, PsiContact* _contact)
  3912. -    : QObject(0)
  3913. +    : QObject(nullptr)
  3914.      , contact_(_contact)
  3915.      , menu_(menu)
  3916. -    , authMenu_(0)
  3917. +    , authMenu_(nullptr)
  3918.  {
  3919.      Jid jid = _contact->jid();
  3920.      menu->setLabelTitle(_contact->isPrivate() ? jid.full() : jid.bare());
  3921. @@ -180,10 +180,10 @@ PsiContactMenu::Private::Private(PsiContactMenu* menu, PsiContact* _contact)
  3922.      connect(mucLeaveAction_, SIGNAL(triggered()), SLOT(mucLeave()));
  3923.      mucLeaveAction_->setShortcuts(ShortcutManager::instance()->shortcuts("common.close"));
  3924.  
  3925. -    blockAction_ = new IconAction(tr("Block"), "psi/stop", tr("Block"), 0, this, 0, true);
  3926. +    blockAction_ = new IconAction(tr("Block"), "psi/stop", tr("Block"), 0, this, nullptr, true);
  3927.      connect(blockAction_, SIGNAL(triggered(bool)), SLOT(block(bool)));
  3928.  
  3929. -    visibleAction_ = new IconAction(tr("Always Visible"), "psi/eye", tr("Always Visible"), 0, this, 0, true);
  3930. +    visibleAction_ = new IconAction(tr("Always Visible"), "psi/eye", tr("Always Visible"), 0, this, nullptr, true);
  3931.      connect(visibleAction_, SIGNAL(triggered(bool)), SLOT(setAlwaysVisible(bool)));
  3932.  
  3933.      _copyUserJid = new IconAction(tr("Copy User JID"), "", tr("Copy User JID"), 0 , this);
  3934. @@ -431,7 +431,7 @@ void PsiContactMenu::Private::inviteToGroupchat(PsiAccount* account, QString gro
  3935.      if (!contact_)
  3936.          return;
  3937.      account->actionInvite(contact_->jid(), groupchat);
  3938. -    QMessageBox::information(0, tr("Invitation"),
  3939. +    QMessageBox::information(nullptr, tr("Invitation"),
  3940.                               tr("Sent groupchat invitation to <b>%1</b>.").arg(contact_->name()));
  3941.  }
  3942.  
  3943. @@ -468,7 +468,7 @@ void PsiContactMenu::Private::addAuth()
  3944.      else
  3945.          contact_->account()->actionAdd(contact_->jid());
  3946.  
  3947. -    QMessageBox::information(0, tr("Add"),
  3948. +    QMessageBox::information(nullptr, tr("Add"),
  3949.                               tr("Added/Authorized <b>%1</b> to the contact list.").arg(contact_->name()));
  3950.  }
  3951.  
  3952. @@ -536,7 +536,7 @@ void PsiContactMenu::Private::authResend()
  3953.      if (!contact_)
  3954.          return;
  3955.      contact_->account()->actionAuth(contact_->jid());
  3956. -    QMessageBox::information(0, tr("Authorize"),
  3957. +    QMessageBox::information(nullptr, tr("Authorize"),
  3958.                               tr("Sent authorization to <b>%1</b>.").arg(contact_->name()));
  3959.  }
  3960.  
  3961. @@ -545,7 +545,7 @@ void PsiContactMenu::Private::authRerequest()
  3962.      if (!contact_)
  3963.          return;
  3964.      contact_->account()->actionAuthRequest(contact_->jid());
  3965. -    QMessageBox::information(0, tr("Authorize"),
  3966. +    QMessageBox::information(nullptr, tr("Authorize"),
  3967.                               tr("Rerequested authorization from <b>%1</b>.").arg(contact_->name()));
  3968.  }
  3969.  
  3970. @@ -554,7 +554,7 @@ void PsiContactMenu::Private::authRemove()
  3971.      if (!contact_)
  3972.          return;
  3973.  
  3974. -    int n = QMessageBox::information(0, tr("Remove"),
  3975. +    int n = QMessageBox::information(nullptr, tr("Remove"),
  3976.                                       tr("Are you sure you want to remove authorization from <b>%1</b>?").arg(contact_->name()),
  3977.                                       tr("&Yes"), tr("&No"));
  3978.  
  3979. @@ -574,7 +574,7 @@ void PsiContactMenu::Private::pictureAssign()
  3980.  {
  3981.      if (!contact_)
  3982.          return;
  3983. -    QString file = QFileDialog::getOpenFileName(0, tr("Choose an Image"), "", tr("All files (*.png *.jpg *.gif)"));
  3984. +    QString file = QFileDialog::getOpenFileName(nullptr, tr("Choose an Image"), "", tr("All files (*.png *.jpg *.gif)"));
  3985.      if (!file.isNull()) {
  3986.          contact_->account()->avatarFactory()->importManualAvatar(contact_->jid(),file);
  3987.      }
  3988. diff --git a/src/psidbusnotifier.cpp b/src/psidbusnotifier.cpp
  3989. index 6a3dd00c..9461514f 100644
  3990. --- a/src/psidbusnotifier.cpp
  3991. +++ b/src/psidbusnotifier.cpp
  3992. @@ -104,7 +104,7 @@ static QDBusMessage createMessage(const QString& method)
  3993.  PsiDBusNotifier::PsiDBusNotifier(QObject *parent)
  3994.      : QObject(parent)
  3995.      , id_(0)
  3996. -    , account_(0)
  3997. +    , account_(nullptr)
  3998.      , lifeTimer_(new QTimer(this))
  3999.  {
  4000.      QDBusConnection::sessionBus().connect("org.freedesktop.Notifications",
  4001. @@ -168,7 +168,7 @@ void PsiDBusNotifier::popup(PsiAccount* account, PopupManager::PopupType type, c
  4002.          if (((int)statusMsg.length()) > len)
  4003.              statusMsg = statusMsg.left(len) + "...";
  4004.      bool doAlert = false;
  4005. -    PsiIcon* ico = 0;
  4006. +    PsiIcon* ico = nullptr;
  4007.  
  4008.      if (uli && !uli->name().isEmpty()) {
  4009.          contact = uli->name();
  4010. diff --git a/src/psievent.cpp b/src/psievent.cpp
  4011. index 2ad87259..eb993498 100644
  4012. --- a/src/psievent.cpp
  4013. +++ b/src/psievent.cpp
  4014. @@ -181,7 +181,7 @@ QString PsiEvent::description() const
  4015.  
  4016.  PsiEvent *PsiEvent::copy() const
  4017.  {
  4018. -    return 0;
  4019. +    return nullptr;
  4020.  }
  4021.  
  4022.  #ifdef PSI_PLUGINS
  4023. @@ -687,7 +687,7 @@ private:
  4024.      EventIdGenerator();
  4025.  };
  4026.  
  4027. -EventIdGenerator* EventIdGenerator::instance_ = 0;
  4028. +EventIdGenerator* EventIdGenerator::instance_ = nullptr;
  4029.  
  4030.  EventIdGenerator* EventIdGenerator::instance()
  4031.  {
  4032. @@ -753,7 +753,7 @@ void AvCallEvent::setFrom(const XMPP::Jid &j)
  4033.  AvCall *AvCallEvent::takeAvCall()
  4034.  {
  4035.      AvCall *_sess = sess;
  4036. -    sess = 0;
  4037. +    sess = nullptr;
  4038.      return _sess;
  4039.  }
  4040.  
  4041. @@ -808,8 +808,8 @@ PsiEvent::Ptr EventItem::event() const
  4042.  //----------------------------------------------------------------------------
  4043.  
  4044.  EventQueue::EventQueue(PsiAccount *account)
  4045. -    : psi_(0)
  4046. -    , account_(0)
  4047. +    : psi_(nullptr)
  4048. +    , account_(nullptr)
  4049.      , enabled_(false)
  4050.  {
  4051.      account_ = account;
  4052. @@ -819,8 +819,8 @@ EventQueue::EventQueue(PsiAccount *account)
  4053.  EventQueue::EventQueue(const EventQueue &from)
  4054.      : QObject()
  4055.      , list_()
  4056. -    , psi_(0)
  4057. -    , account_(0)
  4058. +    , psi_(nullptr)
  4059. +    , account_(nullptr)
  4060.      , enabled_(false)
  4061.  {
  4062.      Q_ASSERT(false);
  4063. @@ -1160,14 +1160,14 @@ bool EventQueue::fromXml(const QDomElement *q)
  4064.          PsiEvent::Ptr event;
  4065.          QString eventType = e.attribute("type");
  4066.          if ( eventType == "MessageEvent" ) {
  4067. -            event = MessageEvent::Ptr(new MessageEvent(0));
  4068. +            event = MessageEvent::Ptr(new MessageEvent(nullptr));
  4069.              if ( !event->fromXml(psi_, account_, &e) ) {
  4070.                  //delete event;
  4071.                  event.clear();
  4072.              }
  4073.          }
  4074.          else if ( eventType == "AuthEvent" ) {
  4075. -            event = AuthEvent::Ptr(new AuthEvent("", "", 0));
  4076. +            event = AuthEvent::Ptr(new AuthEvent("", "", nullptr));
  4077.              if ( !event->fromXml(psi_, account_, &e) ) {
  4078.                  //delete event;
  4079.                  event.clear();
  4080. diff --git a/src/psiiconset.cpp b/src/psiiconset.cpp
  4081. index 55bba420..ea9642c0 100644
  4082. --- a/src/psiiconset.cpp
  4083. +++ b/src/psiiconset.cpp
  4084. @@ -352,7 +352,7 @@ PsiIconset::~PsiIconset()
  4085.  void PsiIconset::reset()
  4086.  {
  4087.      delete instance_;
  4088. -    instance_ = 0;
  4089. +    instance_ = nullptr;
  4090.      IconsetFactory::reset();
  4091.  }
  4092.  
  4093. @@ -858,7 +858,7 @@ PsiIcon PsiIconset::status(const XMPP::Status &s)
  4094.  
  4095.  PsiIcon *PsiIconset::transportStatusPtr(QString name, int s)
  4096.  {
  4097. -    PsiIcon *icon = 0;
  4098. +    PsiIcon *icon = nullptr;
  4099.  
  4100.      QVariantList serviceicons = PsiOptions::instance()->mapKeyList("options.iconsets.service-status");
  4101.      if (serviceicons.contains(name)) {
  4102. @@ -926,7 +926,7 @@ PsiIcon PsiIconset::status(const XMPP::Jid &jid, const XMPP::Status &s)
  4103.  PsiIcon *PsiIconset::statusPtr(UserListItem *u)
  4104.  {
  4105.      if ( !u )
  4106. -        return 0;
  4107. +        return nullptr;
  4108.  
  4109.      int s = 0;
  4110.      if ( !u->presenceError().isEmpty() )
  4111. diff --git a/src/psimedia/psimedia.cpp b/src/psimedia/psimedia.cpp
  4112. index 84fa474a..432af898 100644
  4113. --- a/src/psimedia/psimedia.cpp
  4114. +++ b/src/psimedia/psimedia.cpp
  4115. @@ -105,8 +105,8 @@ static PPayloadInfo exportPayloadInfo(const PayloadInfo &p)
  4116.  //----------------------------------------------------------------------------
  4117.  // Global
  4118.  //----------------------------------------------------------------------------
  4119. -static Provider *g_provider = 0;
  4120. -static QPluginLoader *g_pluginLoader = 0;
  4121. +static Provider *g_provider = nullptr;
  4122. +static QPluginLoader *g_pluginLoader = nullptr;
  4123.  
  4124.  static void cleanupProvider();
  4125.  
  4126. @@ -115,7 +115,7 @@ Provider *provider()
  4127.      if(!g_provider)
  4128.      {
  4129.          // static plugin around?
  4130. -        Provider *provider = 0;
  4131. +        Provider *provider = nullptr;
  4132.          QObjectList list = QPluginLoader::staticInstances();
  4133.          foreach(QObject *obj, list)
  4134.          {
  4135. @@ -136,7 +136,7 @@ Provider *provider()
  4136.              if(!provider->init(QString()))
  4137.              {
  4138.                  delete provider;
  4139. -                return 0;
  4140. +                return nullptr;
  4141.              }
  4142.  
  4143.              g_provider = provider;
  4144. @@ -199,13 +199,13 @@ void cleanupProvider()
  4145.          return;
  4146.  
  4147.      delete g_provider;
  4148. -    g_provider = 0;
  4149. +    g_provider = nullptr;
  4150.  
  4151.      if(g_pluginLoader)
  4152.      {
  4153.          g_pluginLoader->unload();
  4154.          delete g_pluginLoader;
  4155. -        g_pluginLoader = 0;
  4156. +        g_pluginLoader = nullptr;
  4157.      }
  4158.  }
  4159.  
  4160. @@ -252,12 +252,12 @@ public:
  4161.  // Device
  4162.  //----------------------------------------------------------------------------
  4163.  Device::Device() :
  4164. -    d(0)
  4165. +    d(nullptr)
  4166.  {
  4167.  }
  4168.  
  4169.  Device::Device(const Device &other) :
  4170. -    d(other.d ? new Private(*other.d) : 0)
  4171. +    d(other.d ? new Private(*other.d) : nullptr)
  4172.  {
  4173.  }
  4174.  
  4175. @@ -280,7 +280,7 @@ Device & Device::operator=(const Device &other)
  4176.          else
  4177.          {
  4178.              delete d;
  4179. -            d = 0;
  4180. +            d = nullptr;
  4181.          }
  4182.      }
  4183.      else
  4184. @@ -616,7 +616,7 @@ public:
  4185.  };
  4186.  
  4187.  RtpPacket::RtpPacket() :
  4188. -    d(0)
  4189. +    d(nullptr)
  4190.  {
  4191.  }
  4192.  
  4193. @@ -930,7 +930,7 @@ void RtpSession::setAudioOutputDevice(const QString &deviceId)
  4194.  #ifdef QT_GUI_LIB
  4195.  void RtpSession::setVideoOutputWidget(VideoWidget *widget)
  4196.  {
  4197. -    d->c->setVideoOutputWidget(widget ? widget->d : 0);
  4198. +    d->c->setVideoOutputWidget(widget ? widget->d : nullptr);
  4199.  }
  4200.  #endif
  4201.  
  4202. @@ -962,7 +962,7 @@ void RtpSession::setFileLoopEnabled(bool enabled)
  4203.  #ifdef QT_GUI_LIB
  4204.  void RtpSession::setVideoPreviewWidget(VideoWidget *widget)
  4205.  {
  4206. -    d->c->setVideoPreviewWidget(widget ? widget->d : 0);
  4207. +    d->c->setVideoPreviewWidget(widget ? widget->d : nullptr);
  4208.  }
  4209.  #endif
  4210.  
  4211. diff --git a/src/psioptions.cpp b/src/psioptions.cpp
  4212. index e4521060..901b0a7c 100644
  4213. --- a/src/psioptions.cpp
  4214. +++ b/src/psioptions.cpp
  4215. @@ -128,7 +128,7 @@ const PsiOptions* PsiOptions::defaults()
  4216.   */
  4217.  void PsiOptions::reset() {
  4218.      delete instance_;
  4219. -    instance_ = 0;
  4220. +    instance_ = nullptr;
  4221.  }
  4222.  
  4223.  
  4224. @@ -285,7 +285,7 @@ bool PsiOptions::save(QString file)
  4225.  
  4226.  PsiOptions::PsiOptions()
  4227.      : OptionsTree()
  4228. -    , autoSaveTimer_(0)
  4229. +    , autoSaveTimer_(nullptr)
  4230.  {
  4231.      autoSaveTimer_ = new QTimer(this);
  4232.      autoSaveTimer_->setSingleShot(true);
  4233. diff --git a/src/psioptionseditor.cpp b/src/psioptionseditor.cpp
  4234. index 1fb1a607..b706303b 100644
  4235. --- a/src/psioptionseditor.cpp
  4236. +++ b/src/psioptionseditor.cpp
  4237. @@ -41,7 +41,7 @@ OptionEditor::supportedType OptionEditor::supportedTypes[] = {
  4238.      {"QString", QVariant::String},
  4239.      {"QColor", QVariant::Color},
  4240.  //    {"QStringList", QVariant::StringList},  doesn't work
  4241. -    {0, QVariant::Invalid}};
  4242. +    {nullptr, QVariant::Invalid}};
  4243.  
  4244.  
  4245.  OptionEditor::OptionEditor(bool new_, QString name_, QVariant value_)
  4246. diff --git a/src/psipopup.cpp b/src/psipopup.cpp
  4247. index 287a646c..a5eac798 100644
  4248. --- a/src/psipopup.cpp
  4249. +++ b/src/psipopup.cpp
  4250. @@ -52,7 +52,7 @@ static int MaxPopups = 5;
  4251.  /**
  4252.   * Holds a list of Psi Popups.
  4253.   */
  4254. -static QList<PsiPopup *> *psiPopupList = 0;
  4255. +static QList<PsiPopup *> *psiPopupList = nullptr;
  4256.  
  4257.  //----------------------------------------------------------------------------
  4258.  // PsiPopup::Private
  4259. @@ -108,7 +108,7 @@ PsiPopup::Private::~Private()
  4260.          delete popup;
  4261.      if ( titleIcon )
  4262.          delete titleIcon;
  4263. -    popup = 0;
  4264. +    popup = nullptr;
  4265.  }
  4266.  
  4267.  void PsiPopup::Private::init(const PsiIcon *_titleIcon, const QString& titleText, PsiAccount *acc)
  4268. @@ -124,7 +124,7 @@ void PsiPopup::Private::init(const PsiIcon *_titleIcon, const QString& titleText
  4269.      if ( psiPopupList->count() >= MaxPopups && MaxPopups > 0 )
  4270.          delete psiPopupList->first();
  4271.  
  4272. -    FancyPopup *lastPopup = 0;
  4273. +    FancyPopup *lastPopup = nullptr;
  4274.      if ( psiPopupList->count() && psiPopupList->last() )
  4275.          lastPopup = psiPopupList->last()->popup();
  4276.  
  4277. @@ -148,7 +148,7 @@ void PsiPopup::Private::init(const PsiIcon *_titleIcon, const QString& titleText
  4278.  
  4279.  void PsiPopup::Private::popupDestroyed()
  4280.  {
  4281. -    popup = 0;
  4282. +    popup = nullptr;
  4283.      psiPopup->deleteLater();
  4284.  }
  4285.  
  4286. @@ -225,7 +225,7 @@ PsiPopup::~PsiPopup()
  4287.  void PsiPopup::popup(PsiAccount *acc, PopupManager::PopupType type, const Jid &j, const Resource &r, const UserListItem *item, const PsiEvent::Ptr &event)
  4288.  {
  4289.      d->popupType = type;
  4290. -    PsiIcon *icon = 0;
  4291. +    PsiIcon *icon = nullptr;
  4292.      QString text = title(type, &d->doAlertIcon, &icon);
  4293.      d->init(icon, text, acc);
  4294.      setData(j, r, item, event);
  4295. @@ -440,7 +440,7 @@ void PsiPopup::deleteAll()
  4296.  
  4297.      psiPopupList->clear();
  4298.      delete psiPopupList;
  4299. -    psiPopupList = 0;
  4300. +    psiPopupList = nullptr;
  4301.  }
  4302.  
  4303.  #include "psipopup.moc"
  4304. diff --git a/src/psirosterwidget.cpp b/src/psirosterwidget.cpp
  4305. index 70127114..4829d81f 100644
  4306. --- a/src/psirosterwidget.cpp
  4307. +++ b/src/psirosterwidget.cpp
  4308. @@ -108,12 +108,12 @@ protected:
  4309.  
  4310.  PsiRosterWidget::PsiRosterWidget(QWidget* parent)
  4311.      : QWidget(parent)
  4312. -    , stackedWidget_(0)
  4313. -    , contactListPage_(0)
  4314. -    , filterPage_(0)
  4315. -    , contactListPageView_(0)
  4316. -    , filterPageView_(0)
  4317. -    , contactListModel_(0)
  4318. +    , stackedWidget_(nullptr)
  4319. +    , contactListPage_(nullptr)
  4320. +    , filterPage_(nullptr)
  4321. +    , contactListPageView_(nullptr)
  4322. +    , filterPageView_(nullptr)
  4323. +    , contactListModel_(nullptr)
  4324.      , filterModel_(nullptr)
  4325.  {
  4326.      QVBoxLayout* layout = new QVBoxLayout(this);
  4327. @@ -125,7 +125,7 @@ PsiRosterWidget::PsiRosterWidget(QWidget* parent)
  4328.      layout->addWidget(stackedWidget_);
  4329.  
  4330.      // contactListPage_
  4331. -    contactListPage_ = new QWidget(0);
  4332. +    contactListPage_ = new QWidget(nullptr);
  4333.      contactListPage_->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
  4334.      stackedWidget_->addWidget(contactListPage_);
  4335.  
  4336. @@ -137,7 +137,7 @@ PsiRosterWidget::PsiRosterWidget(QWidget* parent)
  4337.      contactListPageLayout->addWidget(contactListPageView_);
  4338.  
  4339.      // filterPage_
  4340. -    filterPage_ = new QWidget(0);
  4341. +    filterPage_ = new QWidget(nullptr);
  4342.      filterPage_->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
  4343.      filterPage_->installEventFilter(this);
  4344.      stackedWidget_->addWidget(filterPage_);
  4345. @@ -280,8 +280,8 @@ void PsiRosterWidget::setFilterModeEnabled(bool enabled)
  4346.      if (enabled == currentlyEnabled)
  4347.          return;
  4348.  
  4349. -    PsiContactListView *selectionSource = 0;
  4350. -    PsiContactListView *selectionDestination = 0;
  4351. +    PsiContactListView *selectionSource = nullptr;
  4352. +    PsiContactListView *selectionDestination = nullptr;
  4353.  
  4354.      if (enabled) {
  4355.          Q_ASSERT(!filterModel_);
  4356. diff --git a/src/psitrayicon.cpp b/src/psitrayicon.cpp
  4357. index aa6cd1e2..0a414fa2 100644
  4358. --- a/src/psitrayicon.cpp
  4359. +++ b/src/psitrayicon.cpp
  4360. @@ -55,7 +55,7 @@ void PsiTrayIcon::setIcon(const PsiIcon *icon, bool alert)
  4361.          icon_->stop();
  4362.  
  4363.          delete icon_;
  4364. -        icon_ = 0;
  4365. +        icon_ = nullptr;
  4366.      }
  4367.  
  4368.      realIcon_ = quintptr(icon);
  4369. diff --git a/src/searchdlg.cpp b/src/searchdlg.cpp
  4370. index ed220cb5..fcaaf49e 100644
  4371. --- a/src/searchdlg.cpp
  4372. +++ b/src/searchdlg.cpp
  4373. @@ -173,8 +173,8 @@ SearchDlg::SearchDlg(const Jid &jid, PsiAccount *pa)
  4374.      d->pa = pa;
  4375.      d->jid = jid;
  4376.      d->pa->dialogRegister(this, d->jid);
  4377. -    d->jt = 0;
  4378. -    d->xdata = 0;
  4379. +    d->jt = nullptr;
  4380. +    d->xdata = nullptr;
  4381.      d->scrollArea = scrollArea;
  4382.  
  4383.  
  4384. @@ -304,7 +304,7 @@ void SearchDlg::jt_finished()
  4385.  {
  4386.      d->busy->stop();
  4387.      JT_XSearch *jt = d->jt;
  4388. -    d->jt = 0;
  4389. +    d->jt = nullptr;
  4390.  
  4391.      if(d->type == 1) {
  4392.          d->gr_form->setEnabled(true);
  4393. @@ -457,7 +457,7 @@ void SearchDlg::doStop()
  4394.          return;
  4395.  
  4396.      delete d->jt;
  4397. -    d->jt = 0;
  4398. +    d->jt = nullptr;
  4399.  
  4400.      d->busy->stop();
  4401.      d->gr_form->setEnabled(true);
  4402. diff --git a/src/statusdlg.cpp b/src/statusdlg.cpp
  4403. index d338cc55..bcf8dc2a 100644
  4404. --- a/src/statusdlg.cpp
  4405. +++ b/src/statusdlg.cpp
  4406. @@ -49,7 +49,7 @@
  4407.  // FIXME: Will no longer be needed once it is out of the groupchat contactview
  4408.  //----------------------------------------------------------------------------
  4409.  StatusShowDlg::StatusShowDlg(const UserListItem &u)
  4410. -    : QDialog(0)
  4411. +    : QDialog(nullptr)
  4412.  {
  4413.      setAttribute(Qt::WA_DeleteOnClose);
  4414.      // build the dialog
  4415. @@ -102,12 +102,12 @@ public:
  4416.  };
  4417.  
  4418.  StatusSetDlg::StatusSetDlg(PsiCon *psi, const Status &s, bool withPriority)
  4419. -    : QDialog(0)
  4420. +    : QDialog(nullptr)
  4421.  {
  4422.      setAttribute(Qt::WA_DeleteOnClose);
  4423.      d = new Private;
  4424.      d->psi = psi;
  4425. -    d->pa = 0;
  4426. +    d->pa = nullptr;
  4427.      d->psi->dialogRegister(this);
  4428.      d->s = s;
  4429.      d->withPriority = withPriority;
  4430. @@ -119,11 +119,11 @@ StatusSetDlg::StatusSetDlg(PsiCon *psi, const Status &s, bool withPriority)
  4431.  }
  4432.  
  4433.  StatusSetDlg::StatusSetDlg(PsiAccount *pa, const Status &s, bool withPriority)
  4434. -    : QDialog(0)
  4435. +    : QDialog(nullptr)
  4436.  {
  4437.      setAttribute(Qt::WA_DeleteOnClose);
  4438.      d = new Private;
  4439. -    d->psi = 0;
  4440. +    d->psi = nullptr;
  4441.      d->pa = pa;
  4442.      d->pa->dialogRegister(this);
  4443.      d->s = s;
  4444. diff --git a/src/sxe/sxemanager.cpp b/src/sxe/sxemanager.cpp
  4445. index a9c5a63f..edabec40 100644
  4446. --- a/src/sxe/sxemanager.cpp
  4447. +++ b/src/sxe/sxemanager.cpp
  4448. @@ -360,7 +360,7 @@ QPointer<SxeSession> SxeManager::processNegotiationMessage(const Message &messag
  4449.          // Ignore the message if contact not in roster
  4450.          if(!pa_->find(message.from())) {
  4451.              qDebug("SXE invitation received from contact that is not in roster.");
  4452. -            return 0;
  4453. +            return nullptr;
  4454.          }
  4455.      }
  4456.  
  4457. @@ -371,7 +371,7 @@ QPointer<SxeSession> SxeManager::processNegotiationMessage(const Message &messag
  4458.          // Only accept further negotiation messages from the source we are already negotiationing with or if we've requested connection to a groupchat session
  4459.          if(!negotiation->peer.compare(message.from()) && !(negotiation->groupChat && negotiation->peer.resource().isEmpty())) {
  4460.              abortNegotiation(negotiation->sessionId, message.from(), true);
  4461. -            return 0;
  4462. +            return nullptr;
  4463.          }
  4464.  
  4465.      } else
  4466. @@ -399,10 +399,10 @@ QPointer<SxeSession> SxeManager::processNegotiationMessage(const Message &messag
  4467.  
  4468.                  if(negotiation->role == SxeNegotiation::Participant) {
  4469.                      if(!processNegotiationAsParticipant(n.childNodes().at(j), negotiation, response))
  4470. -                        return 0;
  4471. +                        return nullptr;
  4472.                  } else if(negotiation->role == SxeNegotiation::Joiner) {
  4473.                      if(!processNegotiationAsJoiner(n.childNodes().at(j), negotiation, response, message))
  4474. -                        return 0;
  4475. +                        return nullptr;
  4476.                  } else {
  4477.                      Q_ASSERT(false);
  4478.                  }
  4479. @@ -457,7 +457,7 @@ QPointer<SxeSession> SxeManager::processNegotiationMessage(const Message &messag
  4480.  
  4481.          }
  4482.      }
  4483. -    return 0;
  4484. +    return nullptr;
  4485.  }
  4486.  
  4487.  SxeManager::SxeNegotiation* SxeManager::findNegotiation(const Jid &jid, const QString &session) {
  4488. @@ -468,7 +468,7 @@ SxeManager::SxeNegotiation* SxeManager::findNegotiation(const Jid &jid, const QS
  4489.              return negotiation;
  4490.      }
  4491.  
  4492. -    return 0;
  4493. +    return nullptr;
  4494.  }
  4495.  
  4496.  void SxeManager::removeNegotiation(SxeNegotiation* negotiation) {
  4497. @@ -485,7 +485,7 @@ SxeManager::SxeNegotiation* SxeManager::createNegotiation(SxeNegotiation::Role r
  4498.      negotiation->peer = target;
  4499.      negotiation->ownJid = ownJid;
  4500.      negotiation->groupChat = groupChat;
  4501. -    negotiation->session = 0;
  4502. +    negotiation->session = nullptr;
  4503.  
  4504.      negotiations_.insert(sessionId, negotiation);
  4505.  
  4506. @@ -688,12 +688,12 @@ QPointer<SxeSession> SxeManager::findSession(const QString &session) {
  4507.          if(w->session() == session)
  4508.              return w;
  4509.      }
  4510. -    return 0;
  4511. +    return nullptr;
  4512.  }
  4513.  
  4514.  QPointer<SxeSession> SxeManager::createSxeSession(const Jid &target, QString session, const Jid &ownJid, bool groupChat, const QList<QString> &features) {
  4515.      if(session.isEmpty() || !target.isValid())
  4516. -        return 0;
  4517. +        return nullptr;
  4518.      if(!ownJids_.contains(ownJid.full()))
  4519.          ownJids_.append(ownJid.full());
  4520.      // FIXME: detect serverside support
  4521. diff --git a/src/tabs/tabbablewidget.cpp b/src/tabs/tabbablewidget.cpp
  4522. index 132ccaa0..93e62dd5 100644
  4523. --- a/src/tabs/tabbablewidget.cpp
  4524. +++ b/src/tabs/tabbablewidget.cpp
  4525. @@ -35,7 +35,7 @@
  4526.  //----------------------------------------------------------------------------
  4527.  
  4528.  TabbableWidget::TabbableWidget(const Jid &jid, PsiAccount *pa, TabManager *tabManager)
  4529. -    : AdvancedWidget<QWidget>(0)
  4530. +    : AdvancedWidget<QWidget>(nullptr)
  4531.      , state_(ActivationState::Deactivated)
  4532.      , jid_(jid)
  4533.      , pa_(pa)
  4534. diff --git a/src/tabs/tabdlg.cpp b/src/tabs/tabdlg.cpp
  4535. index 658d4e66..b45c64cc 100644
  4536. --- a/src/tabs/tabdlg.cpp
  4537. +++ b/src/tabs/tabdlg.cpp
  4538. @@ -60,7 +60,7 @@ TabDlgDelegate::~TabDlgDelegate()
  4539.  
  4540.  Qt::WindowFlags TabDlgDelegate::initWindowFlags() const
  4541.  {
  4542. -    return (Qt::WindowFlags)0;
  4543. +    return (Qt::WindowFlags)nullptr;
  4544.  }
  4545.  
  4546.  void TabDlgDelegate::create(QWidget *)
  4547. @@ -128,21 +128,21 @@ bool TabDlgDelegate::tabEventFilter(QWidget *, QObject *, QEvent *)
  4548.   *        passed.
  4549.   */
  4550.  TabDlg::TabDlg(TabManager* tabManager, const QString& geometryOption, TabDlgDelegate *delegate)
  4551. -        : AdvancedWidget<QWidget>(0, delegate ? delegate->initWindowFlags() : (Qt::WindowFlags)0)
  4552. +        : AdvancedWidget<QWidget>(nullptr, delegate ? delegate->initWindowFlags() : (Qt::WindowFlags)nullptr)
  4553.          , delegate_(delegate)
  4554. -        , tabWidget_(0)
  4555. -        , detachButton_(0)
  4556. -        , closeButton_(0)
  4557. -        , closeCross_(0)
  4558. +        , tabWidget_(nullptr)
  4559. +        , detachButton_(nullptr)
  4560. +        , closeButton_(nullptr)
  4561. +        , closeCross_(nullptr)
  4562.          , tabMenu_(new QMenu(this))
  4563. -        , act_close_(0)
  4564. -        , act_next_(0)
  4565. -        , act_prev_(0)
  4566. +        , act_close_(nullptr)
  4567. +        , act_next_(nullptr)
  4568. +        , act_prev_(nullptr)
  4569.          , tabManager_(tabManager)
  4570.          , userManagement_(true)
  4571.          , tabBarSingles_(true)
  4572.          , simplifiedCaption_(false)
  4573. -        , activateTabMapper_(0)
  4574. +        , activateTabMapper_(nullptr)
  4575.  {
  4576.      if (delegate_) {
  4577.          delegate_->create(this);
  4578. @@ -230,7 +230,7 @@ void TabDlg::setShortcuts()
  4579.          qDeleteAll(tabMapperActions_);
  4580.          tabMapperActions_.clear();
  4581.          delete activateTabMapper_;
  4582. -        activateTabMapper_ = 0;
  4583. +        activateTabMapper_ = nullptr;
  4584.      }
  4585.  }
  4586.  
  4587. @@ -252,7 +252,7 @@ void TabDlg::showTabMenu(int tab, QPoint pos, QContextMenuEvent * event)
  4588.      clearMenu(tabMenu_);
  4589.  
  4590.      if (tab != -1) {
  4591. -        QAction *d = 0;
  4592. +        QAction *d = nullptr;
  4593.          QAction *h = tabMenu_->addAction(tr("Hide Tab"));
  4594.          if(userManagement_) {
  4595.              d = tabMenu_->addAction(tr("Detach Tab"));
  4596. @@ -499,7 +499,7 @@ void TabDlg::closeTab(TabbableWidget* chat, bool doclose)
  4597.      setUpdatesEnabled(false);
  4598.      chat->hide();
  4599.      removeTabWithNoChecks(chat);
  4600. -    chat->setParent(0);
  4601. +    chat->setParent(nullptr);
  4602.      QCoreApplication::postEvent(chat, new QEvent(QEvent::ActivationChange));
  4603.      if (tabWidget_->count() > 0) {
  4604.          updateCaption();
  4605. @@ -604,7 +604,7 @@ TabbableWidget* TabDlg::getTabPointer(PsiAccount* account, QString fullJid)
  4606.          }
  4607.      }
  4608.  
  4609. -    return 0;
  4610. +    return nullptr;
  4611.  }
  4612.  
  4613.  void TabDlg::updateTab()
  4614. diff --git a/src/tabs/tabmanager.cpp b/src/tabs/tabmanager.cpp
  4615. index 7af0870f..a5345654 100644
  4616. --- a/src/tabs/tabmanager.cpp
  4617. +++ b/src/tabs/tabmanager.cpp
  4618. @@ -11,7 +11,7 @@
  4619.  TabManager::TabManager(PsiCon* psiCon, QObject *parent)
  4620.      : QObject(parent)
  4621.      , psiCon_(psiCon)
  4622. -    , tabDlgDelegate_(0)
  4623. +    , tabDlgDelegate_(nullptr)
  4624.      , userManagement_(true)
  4625.      , tabSingles_(true)
  4626.      , simplifiedCaption_(false)
  4627. @@ -144,7 +144,7 @@ TabDlg* TabManager::getManagingTabs(const TabbableWidget* chat) const
  4628.              return tabDlg;
  4629.          }
  4630.      }
  4631. -    return 0;
  4632. +    return nullptr;
  4633.  }
  4634.  
  4635.  const QList<TabDlg*>& TabManager::tabSets()
  4636. diff --git a/src/textutil.cpp b/src/textutil.cpp
  4637. index e838dcfe..07a6ab60 100644
  4638. --- a/src/textutil.cpp
  4639. +++ b/src/textutil.cpp
  4640. @@ -481,7 +481,7 @@ QString TextUtil::emoticonify(const QString &in)
  4641.          while ( i >= 0 ) {
  4642.              // find closest emoticon
  4643.              int ePos = -1;
  4644. -            PsiIcon *closest = 0;
  4645. +            PsiIcon *closest = nullptr;
  4646.  
  4647.              int foundPos = -1, foundLen = -1;
  4648.  
  4649. diff --git a/src/tipdlg.cpp b/src/tipdlg.cpp
  4650. index bf7ee4c3..ae5bd90a 100644
  4651. --- a/src/tipdlg.cpp
  4652. +++ b/src/tipdlg.cpp
  4653. @@ -43,7 +43,7 @@ void TipDlg::show(PsiCon* psi)
  4654.   * \brief A 'Tip Of The Day' dialog
  4655.   */
  4656.  TipDlg::TipDlg(PsiCon* psi)
  4657. -    : QDialog(0)
  4658. +    : QDialog(nullptr)
  4659.      , psi_(psi)
  4660.  {
  4661.      setAttribute(Qt::WA_DeleteOnClose);
  4662. diff --git a/src/tools/advwidget/advwidget.cpp b/src/tools/advwidget/advwidget.cpp
  4663. index b01b354d..4b4c09c3 100644
  4664. --- a/src/tools/advwidget/advwidget.cpp
  4665. +++ b/src/tools/advwidget/advwidget.cpp
  4666. @@ -65,7 +65,7 @@ AdvancedWidgetShared::~AdvancedWidgetShared()
  4667.  {
  4668.  }
  4669.  
  4670. -static AdvancedWidgetShared *advancedWidgetShared = 0;
  4671. +static AdvancedWidgetShared *advancedWidgetShared = nullptr;
  4672.  
  4673.  //----------------------------------------------------------------------------
  4674.  // GAdvancedWidget::Private
  4675. diff --git a/src/tools/iconset/anim.cpp b/src/tools/iconset/anim.cpp
  4676. index e5c7166f..6ddc8142 100644
  4677. --- a/src/tools/iconset/anim.cpp
  4678. +++ b/src/tools/iconset/anim.cpp
  4679. @@ -38,7 +38,7 @@
  4680.   * Each frame of Anim is stored as Impix.
  4681.   */
  4682.  
  4683. -static QThread *animMainThread = 0;
  4684. +static QThread *animMainThread = nullptr;
  4685.  
  4686.  //! \if _hide_doc_
  4687.  class Anim::Private : public QObject, public QSharedData
  4688. diff --git a/src/tools/iconset/iconset.cpp b/src/tools/iconset/iconset.cpp
  4689. index b1248bd6..1d578aba 100644
  4690. --- a/src/tools/iconset/iconset.cpp
  4691. +++ b/src/tools/iconset/iconset.cpp
  4692. @@ -179,7 +179,7 @@ bool Impix::loadFromData(const QByteArray &ba)
  4693.      bool ret = false;
  4694.  
  4695.      delete d->pixmap;
  4696. -    d->pixmap = 0;
  4697. +    d->pixmap = nullptr;
  4698.  
  4699.      QImage img;
  4700.      if ( img.loadFromData(ba) ) {
  4701. @@ -218,7 +218,7 @@ private:
  4702.      friend class PsiIcon;
  4703.  };
  4704.  
  4705. -static IconSharedObject *iconSharedObject = 0;
  4706. +static IconSharedObject *iconSharedObject = nullptr;
  4707.  
  4708.  //----------------------------------------------------------------------------
  4709.  // PsiIcon
  4710. @@ -246,8 +246,8 @@ public:
  4711.      {
  4712.          moveToMainThread(this);
  4713.  
  4714. -        anim = 0;
  4715. -        icon = 0;
  4716. +        anim = nullptr;
  4717. +        icon = nullptr;
  4718.          activatedCount = 0;
  4719.      }
  4720.  
  4721. @@ -271,8 +271,8 @@ public:
  4722.          sound = from.sound;
  4723.          impix = from.impix;
  4724.          rawData = from.rawData;
  4725. -        anim = from.anim ? new Anim ( *from.anim ) : 0;
  4726. -        icon = 0;
  4727. +        anim = from.anim ? new Anim ( *from.anim ) : nullptr;
  4728. +        icon = nullptr;
  4729.          activatedCount = from.activatedCount;
  4730.      }
  4731.  
  4732. @@ -281,7 +281,7 @@ public:
  4733.          if ( anim ) {
  4734.              delete anim;
  4735.          }
  4736. -        anim = 0;
  4737. +        anim = nullptr;
  4738.      }
  4739.  
  4740.      void connectInstance(PsiIcon *icon)
  4741. @@ -332,7 +332,7 @@ public:
  4742.   * Constructs empty PsiIcon.
  4743.   */
  4744.  PsiIcon::PsiIcon()
  4745. -: QObject(0)
  4746. +: QObject(nullptr)
  4747.  {
  4748.      moveToMainThread(this);
  4749.  
  4750. @@ -352,7 +352,7 @@ PsiIcon::~PsiIcon()
  4751.   * other will be changed as well. (that's because image data is shared)
  4752.  */
  4753. PsiIcon::PsiIcon(const PsiIcon &from)
  4754. -: QObject(0)
  4755. +: QObject(nullptr)
  4756. , d(from.d)
  4757. {
  4758.     moveToMainThread(this);
  4759. @@ -392,7 +392,7 @@ void PsiIcon::detach()
  4760.  */
  4761. bool PsiIcon::isAnimated() const
  4762. {
  4763. -    return d->anim != 0;
  4764. +    return d->anim != nullptr;
  4765. }
  4766.  
  4767. /**
  4768. @@ -480,7 +480,7 @@ void PsiIcon::setImpix(const Impix &impix, bool doDetach)
  4769.     d->impix = impix;
  4770.     if ( d->icon ) {
  4771.         delete d->icon;
  4772. -        d->icon = 0;
  4773. +        d->icon = nullptr;
  4774.     }
  4775.  
  4776.     emit d->pixmapChanged();
  4777. @@ -515,7 +515,7 @@ void PsiIcon::setAnim(const Anim &anim, bool doDetach)
  4778.  
  4779.     if ( d->anim->numFrames() < 2 ) {
  4780.         delete d->anim;
  4781. -        d->anim = 0;
  4782. +        d->anim = nullptr;
  4783.     }
  4784.  
  4785.     if ( d->anim && d->activatedCount > 0 ) {
  4786. @@ -545,7 +545,7 @@ void PsiIcon::removeAnim(bool doDetach)
  4787.     stop();
  4788.  
  4789.     delete d->anim;
  4790. -    d->anim = 0;
  4791. +    d->anim = nullptr;
  4792.  
  4793.     emit d->pixmapChanged();
  4794.     //emit d->iconModified();
  4795. @@ -815,8 +815,8 @@ class IconsetFactoryPrivate : public QObject
  4796. private:
  4797.     IconsetFactoryPrivate()
  4798.         : QObject(QCoreApplication::instance())
  4799. -        , iconsets_(0)
  4800. -        , emptyPixmap_(0)
  4801. +        , iconsets_(nullptr)
  4802. +        , emptyPixmap_(nullptr)
  4803.     {
  4804.     }
  4805.  
  4806. @@ -826,12 +826,12 @@ private:
  4807.             while (!iconsets_->empty())
  4808.                 delete iconsets_->takeFirst();
  4809.             delete iconsets_;
  4810. -            iconsets_ = 0;
  4811. +            iconsets_ = nullptr;
  4812.         }
  4813.  
  4814.         if (emptyPixmap_) {
  4815.             delete emptyPixmap_;
  4816. -            emptyPixmap_ = 0;
  4817. +            emptyPixmap_ = nullptr;
  4818.         }
  4819.     }
  4820.  
  4821. @@ -880,7 +880,7 @@ public:
  4822.     static void reset()
  4823.     {
  4824.         delete instance_;
  4825. -        instance_ = 0;
  4826. +        instance_ = nullptr;
  4827.     }
  4828. };
  4829. //! \endif
  4830. @@ -1560,7 +1560,7 @@ bool Iconset::load(const QString &dir)
  4831. const PsiIcon *Iconset::icon(const QString &name) const
  4832. {
  4833.     if ( !d || d->dict.isEmpty() ) {
  4834. -        return 0;
  4835. +        return nullptr;
  4836.     }
  4837.  
  4838.     return d->dict[name];
  4839. diff --git a/src/tools/optionstree/optionstreemodel.cpp b/src/tools/optionstree/optionstreemodel.cpp
  4840. index aa0ab5c4..03f48a1f 100644
  4841. --- a/src/tools/optionstree/optionstreemodel.cpp
  4842. +++ b/src/tools/optionstree/optionstreemodel.cpp
  4843. @@ -110,7 +110,7 @@ Qt::ItemFlags OptionsTreeModel::flags(const QModelIndex& index) const
  4844. {
  4845.     if (!index.isValid()) {
  4846.         // Root item
  4847. -        return 0;
  4848. +        return nullptr;
  4849.     }
  4850.     Qt::ItemFlags f = Qt::ItemIsSelectable | Qt::ItemIsEnabled;
  4851.     if ((index.column() == Value) && !internalNode(indexToOptionName(index)))
  4852. diff --git a/src/tools/optionstree/varianttree.cpp b/src/tools/optionstree/varianttree.cpp
  4853. index e14a1631..5e614a85 100644
  4854. --- a/src/tools/optionstree/varianttree.cpp
  4855. +++ b/src/tools/optionstree/varianttree.cpp
  4856. @@ -32,7 +32,7 @@
  4857. // void VariantTree::variantToElement(const QVariant& var, QDomElement& e)
  4858. // void VariantTree::elementToVariant(const QVariant& var, QDomElement& e)
  4859.  
  4860. -QDomDocument *VariantTree::unknownsDoc=0;
  4861. +QDomDocument *VariantTree::unknownsDoc=nullptr;
  4862.  
  4863. /**
  4864.  * Default Constructor
  4865. diff --git a/src/translationmanager.cpp b/src/translationmanager.cpp
  4866. index 978eb04b..f1d4e0e2 100644
  4867. --- a/src/translationmanager.cpp
  4868. +++ b/src/translationmanager.cpp
  4869. @@ -34,10 +34,10 @@ TranslationManager::TranslationManager()
  4870.     QString currentLanguageName = QT_TR_NOOP("language_name");
  4871.  
  4872.     // The application translator
  4873. -    translator_ = new QTranslator(0);
  4874. +    translator_ = new QTranslator(nullptr);
  4875.  
  4876.     // The qt translator
  4877. -    qt_translator_ = new QTranslator(0);
  4878. +    qt_translator_ = new QTranslator(nullptr);
  4879.  
  4880.     // Self-destruct
  4881.     connect(QCoreApplication::instance(),SIGNAL(aboutToQuit()),SLOT(deleteLater()));
  4882. @@ -47,11 +47,11 @@ TranslationManager::~TranslationManager()
  4883. {
  4884.     QCoreApplication::instance()->removeTranslator(translator_);
  4885.     delete translator_;
  4886. -    translator_ = 0;
  4887. +    translator_ = nullptr;
  4888.  
  4889.     QCoreApplication::instance()->removeTranslator(qt_translator_);
  4890.     delete qt_translator_;
  4891. -    qt_translator_ = 0;
  4892. +    qt_translator_ = nullptr;
  4893. }
  4894.  
  4895. TranslationManager* TranslationManager::instance()
  4896. @@ -153,7 +153,7 @@ VarList TranslationManager::availableTranslations()
  4897.  
  4898.             // get the language_name
  4899.             QString name = QString("[") + str + "]";
  4900. -            QTranslator t(0);
  4901. +            QTranslator t(nullptr);
  4902.             if(!t.load(str, dirName))
  4903.                 continue;
  4904.  
  4905. diff --git a/src/userlist.cpp b/src/userlist.cpp
  4906. index 96a9819e..21ff0536 100644
  4907. --- a/src/userlist.cpp
  4908. +++ b/src/userlist.cpp
  4909. @@ -853,6 +853,6 @@ UserListItem *UserList::find(const XMPP::Jid &j)
  4910.         if(i->jid().compare(j))
  4911.             return i;
  4912.     }
  4913. -    return 0;
  4914. +    return nullptr;
  4915. }
  4916.  
  4917. diff --git a/src/voicecalldlg.cpp b/src/voicecalldlg.cpp
  4918. index 685e21ff..34be8f39 100644
  4919. --- a/src/voicecalldlg.cpp
  4920. +++ b/src/voicecalldlg.cpp
  4921. @@ -24,7 +24,7 @@
  4922. #include "voicecaller.h"
  4923.  
  4924. VoiceCallDlg::VoiceCallDlg(const Jid& jid, VoiceCaller* voiceCaller)
  4925. -    : QDialog(0), jid_(jid), voiceCaller_(voiceCaller)
  4926. +    : QDialog(nullptr), jid_(jid), voiceCaller_(voiceCaller)
  4927. {
  4928.     setAttribute(Qt::WA_DeleteOnClose);
  4929.     ui_.setupUi(this);
  4930. diff --git a/src/whiteboarding/wbdlg.cpp b/src/whiteboarding/wbdlg.cpp
  4931. index 7aec56c7..70bdb9ee 100644
  4932. --- a/src/whiteboarding/wbdlg.cpp
  4933. +++ b/src/whiteboarding/wbdlg.cpp
  4934. @@ -45,7 +45,7 @@ WbDlg::WbDlg(SxeSession* session, PsiAccount* pa) {
  4935.     keepOpen_ = false;
  4936.     allowEdits_ = true;
  4937.  
  4938. -    selfDestruct_ = 0;
  4939. +    selfDestruct_ = nullptr;
  4940.     setAttribute(Qt::WA_DeleteOnClose, false); // we want deferred endSession call and delete from manager
  4941.  
  4942.     setWindowTitle(CAP(tr("Whiteboard (%1)").arg(pa->jid().bare())));
  4943. @@ -81,7 +81,7 @@ WbDlg::WbDlg(SxeSession* session, PsiAccount* pa) {
  4944.     pixmap.fill(QColor(Qt::black));
  4945.     act_color_ = new QAction(QIcon(pixmap), tr("Stroke color"), this);
  4946.     pixmap.fill(QColor(Qt::lightGray));
  4947. -    act_fill_ = new IconAction(tr("Fill color"), "psi/select", tr("Fill color"),0, this, 0, true);
  4948. +    act_fill_ = new IconAction(tr("Fill color"), "psi/select", tr("Fill color"),0, this, nullptr, true);
  4949.     act_fill_->setIcon(QIcon(pixmap));
  4950.     act_fill_->setChecked(false);
  4951.  
  4952. @@ -393,7 +393,7 @@ void WbDlg::setSelfDestruct(int minutes) {
  4953.     if(minutes <= 0) {
  4954.         if(selfDestruct_) {
  4955.             delete selfDestruct_;
  4956. -            selfDestruct_ = 0;
  4957. +            selfDestruct_ = nullptr;
  4958.         }
  4959.         return;
  4960.     }
  4961. diff --git a/src/whiteboarding/wbitem.cpp b/src/whiteboarding/wbitem.cpp
  4962. index 052b1a8d..20ae4f51 100644
  4963. --- a/src/whiteboarding/wbitem.cpp
  4964. +++ b/src/whiteboarding/wbitem.cpp
  4965. @@ -295,7 +295,7 @@ void WbItem::resetPos() {
  4966. }
  4967.  
  4968. WbItemMenu* WbItem::constructContextMenu() {
  4969. -     WbItemMenu* menu = new WbItemMenu(0);
  4970. +     WbItemMenu* menu = new WbItemMenu(nullptr);
  4971.  
  4972.      if(scene_) {
  4973.          // Add the default actions
  4974. @@ -331,7 +331,7 @@ WbItemMenu* WbItem::constructContextMenu() {
  4975.          // menu->addActionGroup(group);
  4976.  
  4977.          // menu->addSeparator();
  4978. -         group = new QActionGroup(0);
  4979. +         group = new QActionGroup(nullptr);
  4980.          IconAction* action = new IconAction(tr("Bring forward"), "psi/bringForwards", tr("Bring forward"), 0, group);
  4981.          connect(action, SIGNAL(triggered()), scene_, SLOT(bringForward()));
  4982.          action = new IconAction(tr("Bring to front"), "psi/bringToFront", tr("Bring to front"), 0, group);
  4983. @@ -343,7 +343,7 @@ WbItemMenu* WbItem::constructContextMenu() {
  4984.          menu->addActionGroup(group);
  4985.  
  4986.          menu->addSeparator();
  4987. -         group = new QActionGroup(0);
  4988. +         group = new QActionGroup(nullptr);
  4989.          action = new IconAction(tr("Group"), "psi/group", tr("Group"), 0, group);
  4990.          connect(action, SIGNAL(triggered()), scene_, SLOT(group()));
  4991.          action = new IconAction(tr("Ungroup"), "psi/ungroup", tr("Ungroup"), 0, group);
  4992. @@ -486,7 +486,7 @@ static qreal toDouble(const QChar *&str)
  4993. #endif
  4994.         {
  4995.             bool ok = false;
  4996. -            val = qstrtod(temp, 0, &ok);
  4997. +            val = qstrtod(temp, nullptr, &ok);
  4998.         }
  4999.     }
  5000.     return val;
  5001. diff --git a/src/whiteboarding/wbmanager.cpp b/src/whiteboarding/wbmanager.cpp
  5002. index 7278dc05..5a3f323f 100644
  5003. --- a/src/whiteboarding/wbmanager.cpp
  5004. +++ b/src/whiteboarding/wbmanager.cpp
  5005. @@ -157,7 +157,7 @@ WbDlg* WbManager::findWbDlg(const Jid &jid) {
  5006.             return w;
  5007.         }
  5008.     }
  5009. -    return 0;
  5010. +    return nullptr;
  5011. }
  5012.  
  5013. void WbManager::createWbDlg(SxeSession* session) {
  5014. diff --git a/src/whiteboarding/wbnewpath.cpp b/src/whiteboarding/wbnewpath.cpp
  5015. index 392d3ac3..5e9383f6 100644
  5016. --- a/src/whiteboarding/wbnewpath.cpp
  5017. +++ b/src/whiteboarding/wbnewpath.cpp
  5018. @@ -24,7 +24,7 @@
  5019. #include <QGraphicsScene>
  5020.  
  5021. WbNewPath::WbNewPath(QGraphicsScene* s, QPointF startPos, int strokeWidth, const QColor &strokeColor, const QColor &fillColor) : WbNewItem(s) {
  5022. -    controlPoint_ = 0;
  5023. +    controlPoint_ = nullptr;
  5024.  
  5025.     graphicsitem_.setZValue(std::numeric_limits<double>::max());
  5026.  
  5027. @@ -52,7 +52,7 @@ void WbNewPath::parseCursorMove(QPointF newPos) {
  5028.         graphicsitem_.setPath(painterpath);
  5029.  
  5030.         delete controlPoint_;
  5031. -        controlPoint_ = 0;
  5032. +        controlPoint_ = nullptr;
  5033.     }
  5034.     else {
  5035.         controlPoint_ = new QPointF(newPos);
  5036. @@ -66,7 +66,7 @@ QDomNode WbNewPath::serializeToSvg(QDomDocument *doc) {
  5037.         graphicsitem_.setPath(painterpath);
  5038.  
  5039.         delete controlPoint_;
  5040. -        controlPoint_ = 0;
  5041. +        controlPoint_ = nullptr;
  5042.     }
  5043.  
  5044.     // trim the generated SVG to remove unnecessary nested <g/>'s
  5045. diff --git a/src/whiteboarding/wbwidget.cpp b/src/whiteboarding/wbwidget.cpp
  5046. index 02518573..e67673fe 100644
  5047. --- a/src/whiteboarding/wbwidget.cpp
  5048. +++ b/src/whiteboarding/wbwidget.cpp
  5049. @@ -26,8 +26,8 @@
  5050.  #include <QApplication>
  5051.  
  5052.  WbWidget::WbWidget(SxeSession* session, QWidget *parent) : QGraphicsView(parent) {
  5053. -    newWbItem_ = 0;
  5054. -    adding_ = 0;
  5055. +    newWbItem_ = nullptr;
  5056. +    adding_ = nullptr;
  5057.      addVertex_ = false;
  5058.      strokeColor_ = Qt::black;
  5059.      fillColor_ = Qt::transparent;
  5060. @@ -111,7 +111,7 @@ void WbWidget::setMode(Mode mode) {
  5061.       if(mode_ < Mode::DrawPath) {
  5062.               if(newWbItem_) {
  5063.                       delete newWbItem_;
  5064. -                     newWbItem_ = 0;
  5065. +                     newWbItem_ = nullptr;
  5066.               }
  5067.       }
  5068.  
  5069. @@ -232,7 +232,7 @@ void WbWidget::mousePressEvent(QMouseEvent * event) {
  5070.      // delete any temporary item being drawn
  5071.      if(newWbItem_) {
  5072.          delete newWbItem_;
  5073. -        newWbItem_ = 0;
  5074. +        newWbItem_ = nullptr;
  5075.      }
  5076.  
  5077.      QPointF startPoint = mapToScene(mapFromGlobal(event->globalPos()));
  5078. @@ -260,7 +260,7 @@ void WbWidget::mousePressEvent(QMouseEvent * event) {
  5079.              session_->insertNodeAfter(newWbItem_->serializeToSvg(&tempDoc), session_->document().documentElement());
  5080.              session_->flush();
  5081.              delete newWbItem_;
  5082. -            newWbItem_ = 0;
  5083. +            newWbItem_ = nullptr;
  5084.          }
  5085.      }
  5086.  
  5087. @@ -276,7 +276,7 @@ void WbWidget::mouseMoveEvent(QMouseEvent * event) {
  5088.      if(QApplication::mouseButtons() != Qt::MouseButtons(Qt::LeftButton)) {
  5089.          if(newWbItem_) {
  5090.               delete newWbItem_;
  5091. -             newWbItem_ = 0;
  5092. +             newWbItem_ = nullptr;
  5093.          }
  5094.          return;
  5095.      }
  5096. @@ -293,7 +293,7 @@ void WbWidget::mouseMoveEvent(QMouseEvent * event) {
  5097.                  session_->removeNode(wbitem->node());
  5098.           }
  5099.           delete eraseRect;
  5100. -         eraseRect = 0;
  5101. +         eraseRect = nullptr;
  5102.  
  5103.           event->ignore();
  5104.           return;
  5105. @@ -312,7 +312,7 @@ void WbWidget::mouseReleaseEvent(QMouseEvent * event) {
  5106.          session_->insertNodeAfter(newWbItem_->serializeToSvg(&tempDoc), session_->document().documentElement());
  5107.          session_->flush();
  5108.          delete newWbItem_;
  5109. -        newWbItem_ = 0;
  5110. +        newWbItem_ = nullptr;
  5111.          return;
  5112.      }
  5113.  
  5114. @@ -324,7 +324,7 @@ WbItem* WbWidget::wbItem(const QDomNode &node) {
  5115.          if(wbitem->node() == node)
  5116.              return wbitem;
  5117.      }
  5118. -    return 0;
  5119. +    return nullptr;
  5120.  }
  5121.  
  5122.  void WbWidget::handleDocumentUpdated(bool remote) {
  5123. diff --git a/src/widgets/actionlineedit.cpp b/src/widgets/actionlineedit.cpp
  5124. index 0e8705ec..c5cb54b6 100644
  5125. --- a/src/widgets/actionlineedit.cpp
  5126. +++ b/src/widgets/actionlineedit.cpp
  5127. @@ -28,7 +28,7 @@
  5128.  #include "actionlineedit.h"
  5129.  
  5130.  ActionLineEditButton::ActionLineEditButton( QWidget *parent )
  5131. -        : QAbstractButton(parent), action_(0), popup_(0)
  5132. +        : QAbstractButton(parent), action_(nullptr), popup_(nullptr)
  5133.  {
  5134.      setCursor(Qt::PointingHandCursor);
  5135.  }
  5136. @@ -162,7 +162,7 @@ ActionLineEditButton * ActionLineEdit::widgetForAction ( QAction * action )
  5137.              return btn;
  5138.          }
  5139.      }
  5140. -    return 0;
  5141. +    return nullptr;
  5142.  }
  5143.  
  5144.  void ActionLineEdit::actionEvent ( QActionEvent * event )
  5145. diff --git a/src/widgets/busywidget.cpp b/src/widgets/busywidget.cpp
  5146. index ade6d2c7..bd6d1bc4 100644
  5147. --- a/src/widgets/busywidget.cpp
  5148. +++ b/src/widgets/busywidget.cpp
  5149. @@ -306,7 +306,7 @@ void BusyWidget::animate()
  5150.          {
  5151.              if (d->t)
  5152.                  d->t->deleteLater();
  5153. -            d->t = 0;
  5154. +            d->t = nullptr;
  5155.          }
  5156.      }
  5157.  
  5158. diff --git a/src/widgets/fancylabel.cpp b/src/widgets/fancylabel.cpp
  5159. index 1a4da3c4..9714f0ed 100644
  5160. --- a/src/widgets/fancylabel.cpp
  5161. +++ b/src/widgets/fancylabel.cpp
  5162. @@ -55,7 +55,7 @@ public:
  5163.      Private(IconLabel *l)
  5164.      {
  5165.          label = l;
  5166. -        icon = 0;
  5167. +        icon = nullptr;
  5168.          copyIcon = false;
  5169.      }
  5170.  
  5171. @@ -76,7 +76,7 @@ public:
  5172.  #ifndef WIDGET_PLUGIN
  5173.              delete icon;
  5174.  #endif
  5175. -            icon = 0;
  5176. +            icon = nullptr;
  5177.          }
  5178.  
  5179.          copyIcon = _copyIcon;
  5180. @@ -89,7 +89,7 @@ public:
  5181.                  icon = const_cast<PsiIcon *>(i);
  5182.          }
  5183.          else {
  5184. -            icon = 0;
  5185. +            icon = nullptr;
  5186.          }
  5187.  
  5188.  #else
  5189. @@ -103,7 +103,7 @@ protected:
  5190.      {
  5191.  #ifndef WIDGET_PLUGIN
  5192.          if ( icon ) {
  5193. -            disconnect(icon, 0, this, 0);
  5194. +            disconnect(icon, nullptr, this, nullptr);
  5195.              icon->stop();
  5196.          }
  5197.  #endif
  5198. diff --git a/src/widgets/fancypopup.cpp b/src/widgets/fancypopup.cpp
  5199. index bcdc2233..4c0ea73f 100644
  5200. --- a/src/widgets/fancypopup.cpp
  5201. +++ b/src/widgets/fancypopup.cpp
  5202. @@ -235,7 +235,7 @@ static const QFlags<Qt::WindowType>
  5203.  POPUP_FLAGS = Qt::ToolTip | Qt::WindowStaysOnTopHint; // | Qt::X11BypassWindowManagerHint | Qt::FramelessWindowHint;
  5204.  
  5205.  FancyPopup::FancyPopup(QString title, const PsiIcon *icon, FancyPopup *prev, bool copyIcon)
  5206. -    : QFrame( 0, POPUP_FLAGS )
  5207. +    : QFrame( nullptr, POPUP_FLAGS )
  5208.  {
  5209.      QWidget::setAttribute(Qt::WA_DeleteOnClose);
  5210.      setWindowModality(Qt::NonModal);
  5211. diff --git a/src/widgets/iconaction.cpp b/src/widgets/iconaction.cpp
  5212. index 87a04b9f..a19d8835 100644
  5213. --- a/src/widgets/iconaction.cpp
  5214. +++ b/src/widgets/iconaction.cpp
  5215. @@ -51,7 +51,7 @@ public:
  5216.      IconAction *action;
  5217.  
  5218.      Private(IconAction *act, QObject *parent) {
  5219. -        icon = 0;
  5220. +        icon = nullptr;
  5221.          action = act;
  5222.          Q_ASSERT(action);
  5223.  
  5224. @@ -68,7 +68,7 @@ public:
  5225.  #ifndef WIDGET_PLUGIN
  5226.          if (icon) {
  5227.              delete icon;
  5228. -            icon = 0;
  5229. +            icon = nullptr;
  5230.          }
  5231.  #endif
  5232.      }
  5233. @@ -151,10 +151,10 @@ void IconAction::setPsiIcon(const PsiIcon *i)
  5234.      Q_UNUSED(i);
  5235.  #else
  5236.      if ( d->icon ) {
  5237. -        disconnect(d->icon, 0, this, 0 );
  5238. +        disconnect(d->icon, nullptr, this, nullptr );
  5239.          d->icon->stop();
  5240.          delete d->icon;
  5241. -        d->icon = 0;
  5242. +        d->icon = nullptr;
  5243.      }
  5244.  
  5245.      QIcon is;
  5246. @@ -339,7 +339,7 @@ void IconAction::setVisible( bool b )
  5247.  
  5248.  IconAction *IconAction::copy() const
  5249.  {
  5250. -    IconAction *act = new IconAction(text(), psiIconName(), statusTip(), shortcut(), 0, objectName(), isCheckable());
  5251. +    IconAction *act = new IconAction(text(), psiIconName(), statusTip(), shortcut(), nullptr, objectName(), isCheckable());
  5252.  
  5253.      *act = *this;
  5254.  
  5255. diff --git a/src/widgets/iconselect.cpp b/src/widgets/iconselect.cpp
  5256. index 14b788c2..6965fbd6 100644
  5257. --- a/src/widgets/iconselect.cpp
  5258. +++ b/src/widgets/iconselect.cpp
  5259. @@ -59,7 +59,7 @@ public:
  5260.      IconSelectButton(QWidget *parent)
  5261.      : QAbstractButton(parent)
  5262.      {
  5263. -        ic = 0;
  5264. +        ic = nullptr;
  5265.          animated = false;
  5266.          connect (this, SIGNAL(clicked()), SLOT(iconSelected()));
  5267.      }
  5268. @@ -70,7 +70,7 @@ public:
  5269.  
  5270.          if ( ic ) {
  5271.              delete ic;
  5272. -            ic = 0;
  5273. +            ic = nullptr;
  5274.          }
  5275.      }
  5276.  
  5277. @@ -80,13 +80,13 @@ public:
  5278.  
  5279.          if ( ic ) {
  5280.              delete ic;
  5281. -            ic = 0;
  5282. +            ic = nullptr;
  5283.          }
  5284.  
  5285.          if ( i )
  5286.              ic = new PsiIcon(*((PsiIcon *)i));
  5287.          else
  5288. -            ic = 0;
  5289. +            ic = nullptr;
  5290.      }
  5291.  
  5292.      const PsiIcon *icon() const
  5293. @@ -130,7 +130,7 @@ private:
  5294.      void iconStop()
  5295.      {
  5296.          if ( ic ) {
  5297. -            disconnect(ic, 0, this, 0 );
  5298. +            disconnect(ic, nullptr, this, nullptr );
  5299.              if ( animated ) {
  5300.                  ic->stop();
  5301.                  animated = false;
  5302. @@ -229,7 +229,7 @@ IconSelect::IconSelect(IconSelectPopup *parentMenu)
  5303.      menu = parentMenu;
  5304.      connect(menu, SIGNAL(textSelected(QString)), SLOT(closeMenu()));
  5305.  
  5306. -    grid = 0;
  5307. +    grid = nullptr;
  5308.      noIcons();
  5309.  
  5310.      Q_UNUSED(shown)
  5311. @@ -253,7 +253,7 @@ void IconSelect::createLayout()
  5312.  {
  5313.      Q_ASSERT(!grid);
  5314.      grid = new QGridLayout(this);
  5315. -    grid->setMargin(style()->pixelMetric(QStyle::PM_MenuPanelWidth, 0, this));
  5316. +    grid->setMargin(style()->pixelMetric(QStyle::PM_MenuPanelWidth, nullptr, this));
  5317.      grid->setSpacing(1);
  5318.  }
  5319.  
  5320. @@ -273,7 +273,7 @@ void IconSelect::setIconset(const Iconset &iconset)
  5321.      // delete all children
  5322.      if (grid) {
  5323.          delete grid;
  5324. -        grid = 0;
  5325. +        grid = nullptr;
  5326.  
  5327.          QObjectList list = children();
  5328.          qDeleteAll(list);
  5329. diff --git a/src/widgets/iconwidget.cpp b/src/widgets/iconwidget.cpp
  5330. index f01f80ad..3431af70 100644
  5331. --- a/src/widgets/iconwidget.cpp
  5332. +++ b/src/widgets/iconwidget.cpp
  5333. @@ -130,7 +130,7 @@ class RealIconWidgetItem : public IconWidgetItem
  5334.  {
  5335.      Q_OBJECT
  5336.  public:
  5337. -    RealIconWidgetItem(QListWidget *parent = 0)
  5338. +    RealIconWidgetItem(QListWidget *parent = nullptr)
  5339.      : IconWidgetItem(parent) {}
  5340.  
  5341.      virtual void paint(QPainter *painter) const = 0;
  5342. @@ -395,11 +395,11 @@ const Iconset *IconsetSelect::iconset() const
  5343.      IconsetSelectItem *i = (IconsetSelectItem *)currentItem();
  5344.      if ( !i ) {
  5345.          QList<QListWidgetItem *> items = selectedItems();
  5346. -        i = !items.isEmpty() ? (IconsetSelectItem *)items.first() : 0;
  5347. +        i = !items.isEmpty() ? (IconsetSelectItem *)items.first() : nullptr;
  5348.      }
  5349.      if ( i )
  5350.          return i->iconset();
  5351. -    return 0;
  5352. +    return nullptr;
  5353.  }
  5354.  
  5355.  QListWidgetItem *IconsetSelect::lastItem() const
  5356. @@ -579,12 +579,12 @@ public:
  5357.      {
  5358.  #ifndef WIDGET_PLUGIN
  5359.          if ( icon ) {
  5360. -            disconnect(icon, 0, this, 0 );
  5361. +            disconnect(icon, nullptr, this, nullptr );
  5362.              if ( activate )
  5363.                  icon->stop();
  5364.  
  5365.              delete icon;
  5366. -            icon = 0;
  5367. +            icon = nullptr;
  5368.          }
  5369.  #endif
  5370.      }
  5371. @@ -751,12 +751,12 @@ public:
  5372.      {
  5373.  #ifndef WIDGET_PLUGIN
  5374.          if ( icon ) {
  5375. -            disconnect(icon, 0, this, 0 );
  5376. +            disconnect(icon, nullptr, this, nullptr );
  5377.              if ( activate )
  5378.                  icon->stop();
  5379.  
  5380.              delete icon;
  5381. -            icon = 0;
  5382. +            icon = nullptr;
  5383.          }
  5384.  #endif
  5385.      }
  5386. diff --git a/src/widgets/psirichtext.cpp b/src/widgets/psirichtext.cpp
  5387. index c546b706..a87c76a8 100644
  5388. --- a/src/widgets/psirichtext.cpp
  5389. +++ b/src/widgets/psirichtext.cpp
  5390. @@ -86,7 +86,7 @@ class TextIconHandler : public QObject, public QTextObjectInterface
  5391.      Q_OBJECT
  5392.      Q_INTERFACES(QTextObjectInterface)
  5393.  public:
  5394. -    TextIconHandler(QObject *parent = 0);
  5395. +    TextIconHandler(QObject *parent = nullptr);
  5396.  
  5397.      virtual QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format);
  5398.      virtual void drawObject(QPainter *painter, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format);
  5399. @@ -150,7 +150,7 @@ void PsiRichText::install(QTextDocument *doc)
  5400.  {
  5401.      Q_ASSERT(doc);
  5402.  #ifndef WIDGET_PLUGIN
  5403. -    static TextIconHandler *handler = 0;
  5404. +    static TextIconHandler *handler = nullptr;
  5405.      if (!handler) {
  5406.          handler = new TextIconHandler(qApp);
  5407.      }
  5408. diff --git a/src/widgets/psitiplabel.cpp b/src/widgets/psitiplabel.cpp
  5409. index 4735c353..c6ad5a63 100644
  5410. --- a/src/widgets/psitiplabel.cpp
  5411. +++ b/src/widgets/psitiplabel.cpp
  5412. @@ -39,7 +39,7 @@ void PsiTipLabel::init(const QString& text)
  5413.      resize(sizeHint());
  5414.      qApp->installEventFilter(this);
  5415.      startHideTimer();
  5416. -    setWindowOpacity(style()->styleHint(QStyle::SH_ToolTipLabel_Opacity, 0, this) / 255.0);
  5417. +    setWindowOpacity(style()->styleHint(QStyle::SH_ToolTipLabel_Opacity, nullptr, this) / 255.0);
  5418.      setForegroundRole(QPalette::ToolTipText);
  5419.      setBackgroundRole(QPalette::ToolTipBase);
  5420.      setPalette(QToolTip::palette());
  5421. @@ -83,7 +83,7 @@ void PsiTipLabel::setText(const QString& text)
  5422.  
  5423.  void PsiTipLabel::initUi()
  5424.  {
  5425. -    margin = 1 + style()->pixelMetric(QStyle::PM_ToolTipLabelFrameWidth, 0, this);
  5426. +    margin = 1 + style()->pixelMetric(QStyle::PM_ToolTipLabelFrameWidth, nullptr, this);
  5427.      setFrameStyle(QFrame::NoFrame);
  5428.  
  5429.      doc = new QTextDocument(this);
  5430. @@ -213,7 +213,7 @@ void PsiTipLabel::paintEvent(QPaintEvent *)
  5431.  
  5432.  PsiTipLabel::~PsiTipLabel()
  5433.  {
  5434. -    instance_ = 0;
  5435. +    instance_ = nullptr;
  5436.  }
  5437.  
  5438.  void PsiTipLabel::hideTip()
  5439. diff --git a/src/widgets/psitooltip.cpp b/src/widgets/psitooltip.cpp
  5440. index 41b77979..3f526ea1 100644
  5441. --- a/src/widgets/psitooltip.cpp
  5442. +++ b/src/widgets/psitooltip.cpp
  5443. @@ -60,7 +60,7 @@ private slots:
  5444.          watchedWidgets_.remove(widget);
  5445.          if(watchedWidgets_.isEmpty()) {
  5446.              instance->deleteLater();
  5447. -            instance = 0;
  5448. +            instance = nullptr;
  5449.          }
  5450.      }
  5451.  
  5452. @@ -92,7 +92,7 @@ private:
  5453.      }
  5454.  };
  5455.  
  5456. -PsiToolTipHandler* PsiToolTipHandler::instance = 0;
  5457. +PsiToolTipHandler* PsiToolTipHandler::instance = nullptr;
  5458.  
  5459.  //----------------------------------------------------------------------------
  5460.  // ToolTipPosition
  5461. @@ -197,7 +197,7 @@ void PsiToolTip::doShowText(const QPoint &pos, const QString &text, const QWidge
  5462.          return;
  5463.      }
  5464.  
  5465. -    bool preventAnimation = (PsiTipLabel::instance() != 0);
  5466. +    bool preventAnimation = (PsiTipLabel::instance() != nullptr);
  5467.  
  5468.      installPsiToolTipFont();
  5469.      QFrame *label = createTipLabel(text, QApplication::desktop()->screen(calc->getScreenNumber()));
  5470. @@ -243,7 +243,7 @@ void PsiToolTip::doInstall(QWidget *w)
  5471.      PsiToolTipHandler::getInstance()->install(w);
  5472.  }
  5473.  
  5474. -PsiToolTip *PsiToolTip::instance_ = 0;
  5475. +PsiToolTip *PsiToolTip::instance_ = nullptr;
  5476.  
  5477.  PsiToolTip* PsiToolTip::instance()
  5478.  {
  5479. diff --git a/src/widgets/typeaheadfind.cpp b/src/widgets/typeaheadfind.cpp
  5480. index 67cebfa1..f90b0dc7 100644
  5481. --- a/src/widgets/typeaheadfind.cpp
  5482. +++ b/src/widgets/typeaheadfind.cpp
  5483. @@ -85,8 +85,8 @@ public:
  5484.  #ifdef WEBKIT
  5485.  #ifdef WEBENGINE
  5486.              QWebEnginePage::FindFlags wkOptions;
  5487. -            wkOptions |= options & QTextDocument::FindBackward? QWebEnginePage::FindBackward : (QWebEnginePage::FindFlags)0;
  5488. -            wkOptions |= options & QTextDocument::FindCaseSensitively? QWebEnginePage::FindCaseSensitively : (QWebEnginePage::FindFlags)0;
  5489. +            wkOptions |= options & QTextDocument::FindBackward? QWebEnginePage::FindBackward : (QWebEnginePage::FindFlags)nullptr;
  5490. +            wkOptions |= options & QTextDocument::FindCaseSensitively? QWebEnginePage::FindCaseSensitively : (QWebEnginePage::FindFlags)nullptr;
  5491.              wv->findText(str, wkOptions, [this](bool found) {
  5492.                  updateFoundStyle(found);
  5493.              });
  5494. @@ -200,7 +200,7 @@ void TypeAheadFindBar::init()
  5495.  TypeAheadFindBar::~TypeAheadFindBar()
  5496.  {
  5497.      delete d;
  5498. -    d = 0;
  5499. +    d = nullptr;
  5500.  }
  5501.  
  5502.  /**
  5503. diff --git a/src/widgets/urlobject.cpp b/src/widgets/urlobject.cpp
  5504. index 779e5f96..8970f4fd 100644
  5505. --- a/src/widgets/urlobject.cpp
  5506. +++ b/src/widgets/urlobject.cpp
  5507. @@ -175,7 +175,7 @@ URLObject::URLObject()
  5508.   */
  5509.  URLObject *URLObject::getInstance()
  5510.  {
  5511. -    static URLObject *urlObject = 0;
  5512. +    static URLObject *urlObject = nullptr;
  5513.      if (!urlObject)
  5514.          urlObject = new URLObject();
  5515.      return urlObject;
  5516. @@ -189,7 +189,7 @@ QMenu *URLObject::createPopupMenu(const QString &lnk)
  5517.  {
  5518.      d->link = lnk;
  5519.      if ( d->link.isEmpty() )
  5520. -        return 0;
  5521. +        return nullptr;
  5522.  
  5523.      int colon = d->link.indexOf(':');
  5524.      if ( colon == -1 )
  5525. diff --git a/src/x11windowsystem.cpp b/src/x11windowsystem.cpp
  5526. index 9fc26e06..23573076 100644
  5527. --- a/src/x11windowsystem.cpp
  5528. +++ b/src/x11windowsystem.cpp
  5529. @@ -5,7 +5,7 @@
  5530.  #include <X11/Xutil.h> // needed for WM_CLASS hinting
  5531.  
  5532.  const long MAX_PROP_SIZE = 100000;
  5533. -X11WindowSystem* X11WindowSystem::_instance = 0;
  5534. +X11WindowSystem* X11WindowSystem::_instance = nullptr;
  5535.  
  5536.  
  5537.  void X11WindowSystem::x11wmClass(WId wid, QString resName)
  5538. diff --git a/src/xdata_widget.cpp b/src/xdata_widget.cpp
  5539. index 9707e591..5f02ecd6 100644
  5540. --- a/src/xdata_widget.cpp
  5541. +++ b/src/xdata_widget.cpp
  5542. @@ -135,7 +135,7 @@ private:
  5543.  class XDataField
  5544.  {
  5545.  public:
  5546. -    XDataField(XData::Field f, XDataWidget *w = 0)
  5547. +    XDataField(XData::Field f, XDataWidget *w = nullptr)
  5548.      {
  5549.          _field = f;
  5550.          _xdWidget = w;
  5551. @@ -284,7 +284,7 @@ public:
  5552.          int row = grid->rowCount();
  5553.          XData::Field::MediaElement me = f.mediaElement();
  5554.          if (!me.isEmpty()) {
  5555. -            XDataField *fromField = 0;
  5556. +            XDataField *fromField = nullptr;
  5557.              Jid j = xdw->owner();
  5558.              if (xdw->registrarType() == "urn:xmpp:captcha"
  5559.                  && (fromField = xdw->fieldByVar("from"))) {
  5560. @@ -628,7 +628,7 @@ void XDataWidget::setForm(const XMPP::XData& d, bool withInstructions)
  5561.      fields_.clear();
  5562.  
  5563.      QLayoutItem *child;
  5564. -    while ((child = layout_->takeAt(0)) != 0) {
  5565. +    while ((child = layout_->takeAt(0)) != nullptr) {
  5566.          delete child->widget();
  5567.          delete child;
  5568.      }
  5569. @@ -763,7 +763,7 @@ XDataField* XDataWidget::fieldByVar(const QString &var) const
  5570.              return field;
  5571.          }
  5572.      }
  5573. -    return 0;
  5574. +    return nullptr;
  5575.  }
  5576.  
  5577.  void XDataWidget::linkActivated(const QString& link)
  5578. diff --git a/src/xmlconsole.cpp b/src/xmlconsole.cpp
  5579. index 58595c15..7ce35974 100644
  5580. --- a/src/xmlconsole.cpp
  5581. +++ b/src/xmlconsole.cpp
  5582. @@ -51,7 +51,7 @@ XmlConsole::XmlConsole(PsiAccount *_pa)
  5583.      connect(pa->psi(), SIGNAL(accountCountChanged()), this, SLOT(updateCaption()));
  5584.      updateCaption();
  5585.  
  5586. -    prompt = 0;
  5587. +    prompt = nullptr;
  5588.  
  5589.      ui_.te->setUndoRedoEnabled(false);
  5590.      ui_.te->setReadOnly(true);
Add Comment
Please, Sign In to add comment