Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/abstracttreeitem.cpp b/src/abstracttreeitem.cpp
- index 45e6753c..fd280a82 100644
- --- a/src/abstracttreeitem.cpp
- +++ b/src/abstracttreeitem.cpp
- @@ -102,7 +102,7 @@ AbstractTreeItem *AbstractTreeItem::child(int row) const
- if (row < childCount())
- return _children.at(row);
- else
- - return 0;
- + return nullptr;
- }
- int AbstractTreeItem::childCount() const
- diff --git a/src/abstracttreemodel.cpp b/src/abstracttreemodel.cpp
- index 6247e1cd..1604952d 100644
- --- a/src/abstracttreemodel.cpp
- +++ b/src/abstracttreemodel.cpp
- @@ -44,7 +44,7 @@ QModelIndex AbstractTreeModel::index(int row, int column, const QModelIndex &par
- else
- parentItem = static_cast<AbstractTreeItem*>(parent.internalPointer());
- - AbstractTreeItem *childItem = 0;
- + AbstractTreeItem *childItem = nullptr;
- if (row >= 0 && row < parentItem->childCount())
- childItem = parentItem->children().at(row);
- diff --git a/src/accountadddlg.cpp b/src/accountadddlg.cpp
- index 7630a1ed..9e0ede18 100644
- --- a/src/accountadddlg.cpp
- +++ b/src/accountadddlg.cpp
- @@ -89,7 +89,7 @@ void AccountAddDlg::add()
- QString aname = createNewAccountName(le_name->text());
- le_name->setText( aname );
- - PsiAccount* newAccount = 0;
- + PsiAccount* newAccount = nullptr;
- if(ck_reg->isChecked()) {
- AccountRegDlg *w = new AccountRegDlg(psi, this);
- int n = w->exec();
- diff --git a/src/accountmanagedlg.cpp b/src/accountmanagedlg.cpp
- index f3aeb598..cc6de6b7 100644
- --- a/src/accountmanagedlg.cpp
- +++ b/src/accountmanagedlg.cpp
- @@ -55,7 +55,7 @@ class AccountRemoveDlg : public QDialog, public Ui::AccountRemove
- {
- Q_OBJECT
- public:
- - AccountRemoveDlg(const UserAccount &, QWidget *parent=0);
- + AccountRemoveDlg(const UserAccount &, QWidget *parent=nullptr);
- ~AccountRemoveDlg();
- protected:
- @@ -321,7 +321,7 @@ void AccountManageTree::dragMoveEvent(QDragMoveEvent *event)
- AccountManageDlg::AccountManageDlg(PsiCon *_psi)
- -:QDialog(0)
- +:QDialog(nullptr)
- {
- setupUi(this);
- setModal(false);
- @@ -377,7 +377,7 @@ void AccountManageDlg::qlv_selectionChanged(QTreeWidgetItem *lvi, QTreeWidgetIte
- void AccountManageDlg::add()
- {
- - AccountAddDlg *w = new AccountAddDlg(psi, 0);
- + AccountAddDlg *w = new AccountAddDlg(psi, nullptr);
- w->show();
- }
- @@ -402,7 +402,7 @@ void AccountManageDlg::remove()
- return;
- if(i->pa->eventQueue()->count()) {
- - QMessageBox::information(0, tr("Error"), qApp->translate("PsiAccount", "Unable to disable the account, as it has pending events."));
- + QMessageBox::information(nullptr, tr("Error"), qApp->translate("PsiAccount", "Unable to disable the account, as it has pending events."));
- return;
- }
- @@ -442,7 +442,7 @@ void AccountManageDlg::accountRemoved(PsiAccount *pa)
- AccountManageItem* i = static_cast<AccountManageItem*>(lv_accs->topLevelItem(index));
- if(i->pa == pa) {
- delete i;
- - qlv_selectionChanged(lv_accs->currentItem(), 0);
- + qlv_selectionChanged(lv_accs->currentItem(), nullptr);
- break;
- }
- }
- diff --git a/src/accountregdlg.cpp b/src/accountregdlg.cpp
- index 7f32f82a..34dc2613 100644
- --- a/src/accountregdlg.cpp
- +++ b/src/accountregdlg.cpp
- @@ -75,7 +75,7 @@ AccountRegDlg::AccountRegDlg(PsiCon *psi, QWidget *parent) :
- // Proxy
- proxy_chooser_ = ProxyManager::instance()->createProxyChooser(ui_.gb_connection);
- replaceWidget(ui_.lb_proxychooser, proxy_chooser_);
- - proxy_chooser_->setCurrentItem(0);
- + proxy_chooser_->setCurrentItem(nullptr);
- // Fields pane
- QVBoxLayout *fields_layout = new QVBoxLayout(ui_.page_fields);
- diff --git a/src/accountscombobox.cpp b/src/accountscombobox.cpp
- index d0c3141d..b16d1f40 100644
- --- a/src/accountscombobox.cpp
- +++ b/src/accountscombobox.cpp
- @@ -24,8 +24,8 @@
- AccountsComboBox::AccountsComboBox(QWidget* parent)
- : QComboBox(parent)
- - , controller_(0)
- - , account_(0)
- + , controller_(nullptr)
- + , account_(nullptr)
- , onlineOnly_(false)
- {
- setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed));
- @@ -86,7 +86,7 @@ void AccountsComboBox::setOnlineOnly(bool onlineOnly)
- void AccountsComboBox::changeAccount()
- {
- - account_ = 0;
- + account_ = nullptr;
- if (currentIndex() >= 0 && currentIndex() < accounts().count())
- account_ = accounts().at(currentIndex());
- emit activated(account_);
- diff --git a/src/actionlist.cpp b/src/actionlist.cpp
- index bf762554..073d85ee 100644
- --- a/src/actionlist.cpp
- +++ b/src/actionlist.cpp
- @@ -156,7 +156,7 @@ ActionList *MetaActionList::actionList( const QString &name ) const
- return a;
- }
- - return 0;
- + return nullptr;
- }
- QList<ActionList*> MetaActionList::actionLists( const unsigned int id ) const
- diff --git a/src/activeprofiles.cpp b/src/activeprofiles.cpp
- index b19d593d..2cee8621 100644
- --- a/src/activeprofiles.cpp
- +++ b/src/activeprofiles.cpp
- @@ -23,7 +23,7 @@
- #include "profiles.h"
- -ActiveProfiles* ActiveProfiles::instance_ = 0;
- +ActiveProfiles* ActiveProfiles::instance_ = nullptr;
- /**
- * \fn virtual ActiveProfiles::~ActiveProfiles();
- diff --git a/src/activeprofiles_dbus.cpp b/src/activeprofiles_dbus.cpp
- index 5608b05c..011bd397 100644
- --- a/src/activeprofiles_dbus.cpp
- +++ b/src/activeprofiles_dbus.cpp
- @@ -204,7 +204,7 @@ ActiveProfiles::ActiveProfiles()
- ActiveProfiles::~ActiveProfiles()
- {
- delete d;
- - d = 0;
- + d = nullptr;
- }
- bool ActiveProfiles::setStatus(const QString &profile, const QString &status, const QString &message) const
- @@ -223,7 +223,7 @@ bool ActiveProfiles::openUri(const QString &profile, const QString &uri) const
- bool ActiveProfiles::raise(const QString &profile, bool withUI) const
- {
- - QLabel *lab=0;
- + QLabel *lab=nullptr;
- QDBusMessage msg = QDBusMessage::createMethodCall ( d->dbusName(profile), "/Main", PSIDBUSMAINIF, "raise" );
- if (withUI) {
- lab = new QLabel(tr("This psi profile is already running...<br>please wait..."));
- diff --git a/src/activitycatalog.cpp b/src/activitycatalog.cpp
- index d3de7daf..adc98cc4 100644
- --- a/src/activitycatalog.cpp
- +++ b/src/activitycatalog.cpp
- @@ -214,4 +214,4 @@ const QList<ActivityCatalog::Entry>& ActivityCatalog::entries() const
- return entries_;
- }
- -ActivityCatalog* ActivityCatalog::instance_ = 0;
- +ActivityCatalog* ActivityCatalog::instance_ = nullptr;
- diff --git a/src/activitydlg.cpp b/src/activitydlg.cpp
- index 4867c47f..a0d47ff2 100644
- --- a/src/activitydlg.cpp
- +++ b/src/activitydlg.cpp
- @@ -26,7 +26,7 @@
- #include "pepmanager.h"
- #include "psiiconset.h"
- -ActivityDlg::ActivityDlg(QList<PsiAccount*> list) : QDialog(0), pa_(list)
- +ActivityDlg::ActivityDlg(QList<PsiAccount*> list) : QDialog(nullptr), pa_(list)
- {
- setAttribute(Qt::WA_DeleteOnClose);
- if(pa_.isEmpty())
- diff --git a/src/adduserdlg.cpp b/src/adduserdlg.cpp
- index 7a9f4caa..b6b80ca6 100644
- --- a/src/adduserdlg.cpp
- +++ b/src/adduserdlg.cpp
- @@ -99,7 +99,7 @@ void AddUserDlg::init(const QStringList &groups, PsiAccount *pa)
- d = new Private;
- d->pa = pa;
- d->pa->dialogRegister(this);
- - d->jt = 0;
- + d->jt = nullptr;
- d->tasks = new TaskList;
- connect(d->tasks, SIGNAL(started()), busy, SLOT(start()));
- connect(d->tasks, SIGNAL(finished()), busy, SLOT(stop()));
- @@ -195,7 +195,7 @@ void AddUserDlg::serviceActivated(int x)
- {
- if(d->jt) {
- delete d->jt;
- - d->jt = 0;
- + d->jt = nullptr;
- d->busy->stop();
- }
- gb_trans->setEnabled(false);
- @@ -236,7 +236,7 @@ void AddUserDlg::getTransID()
- void AddUserDlg::jt_getFinished()
- {
- JT_Gateway *jt = d->jt;
- - d->jt = 0;
- + d->jt = nullptr;
- if(jt->success()) {
- gb_trans->setEnabled(true);
- @@ -254,7 +254,7 @@ void AddUserDlg::jt_setFinished()
- pb_transGet->setEnabled(true);
- JT_Gateway *jt = d->jt;
- - d->jt = 0;
- + d->jt = nullptr;
- if(jt->success()) {
- QString jid = jt->translatedJid().full();
- @@ -301,7 +301,7 @@ void AddUserDlg::getVCardActivated()
- {
- const VCard vcard = VCardFactory::instance()->vcard(jid());
- - InfoDlg *w = new InfoDlg(InfoWidget::Contact, jid(), vcard, d->pa, 0, false);
- + InfoDlg *w = new InfoDlg(InfoWidget::Contact, jid(), vcard, d->pa, nullptr, false);
- w->show();
- // automatically retrieve info if it doesn't exist
- diff --git a/src/ahcformdlg.cpp b/src/ahcformdlg.cpp
- index c5fb6827..f8834ad0 100644
- --- a/src/ahcformdlg.cpp
- +++ b/src/ahcformdlg.cpp
- @@ -32,13 +32,13 @@
- #include "busywidget.h"
- AHCFormDlg::AHCFormDlg(PsiCon *psi, const AHCommand& r, const Jid& receiver, XMPP::Client* client, bool final) :
- - QDialog(0),
- + QDialog(nullptr),
- _psi(psi),
- - _pb_prev(0),
- - _pb_next(0),
- - _pb_complete(0),
- - _pb_cancel(0),
- - _xdata(0),
- + _pb_prev(nullptr),
- + _pb_next(nullptr),
- + _pb_complete(nullptr),
- + _pb_cancel(nullptr),
- + _xdata(nullptr),
- _receiver(receiver),
- _client(client)
- {
- @@ -141,7 +141,7 @@ AHCFormDlg::AHCFormDlg(PsiCon *psi, const AHCommand& r, const Jid& receiver, XMP
- adjustSize();
- show();
- - setParent(0);
- + setParent(nullptr);
- }
- void AHCFormDlg::doPrev()
- diff --git a/src/ahcommanddlg.cpp b/src/ahcommanddlg.cpp
- index 185591b0..f424667a 100644
- --- a/src/ahcommanddlg.cpp
- +++ b/src/ahcommanddlg.cpp
- @@ -143,7 +143,7 @@ private slots:
- // --------------------------------------------------------------------------
- AHCommandDlg::AHCommandDlg(PsiAccount* pa, const Jid& receiver)
- - : QDialog(0), pa_(pa), receiver_(receiver)
- + : QDialog(nullptr), pa_(pa), receiver_(receiver)
- {
- ui_.setupUi(this);
- setAttribute(Qt::WA_DeleteOnClose);
- diff --git a/src/ahcservermanager.cpp b/src/ahcservermanager.cpp
- index 95b0e713..360816e5 100644
- --- a/src/ahcservermanager.cpp
- +++ b/src/ahcservermanager.cpp
- @@ -235,7 +235,7 @@ AHCommandServer* AHCServerManager::findServer(const QString& node) const
- if ((*it)->node() == node)
- return (*it);
- }
- - return 0;
- + return nullptr;
- }
- diff --git a/src/alertable.cpp b/src/alertable.cpp
- index 2fd54a4d..3d9d46fa 100644
- --- a/src/alertable.cpp
- +++ b/src/alertable.cpp
- @@ -30,7 +30,7 @@
- Alertable::Alertable(QObject* parent)
- : QObject(parent)
- {
- - alert_ = 0;
- + alert_ = nullptr;
- }
- /**
- @@ -38,7 +38,7 @@ Alertable::Alertable(QObject* parent)
- */
- Alertable::~Alertable()
- {
- - setAlert(0);
- + setAlert(nullptr);
- }
- /**
- @@ -46,7 +46,7 @@ Alertable::~Alertable()
- */
- bool Alertable::alerting() const
- {
- - return alert_ != 0;
- + return alert_ != nullptr;
- }
- /**
- @@ -70,7 +70,7 @@ void Alertable::setAlert(const PsiIcon* icon)
- if (alert_) {
- alert_->stop();
- delete alert_;
- - alert_ = 0;
- + alert_ = nullptr;
- }
- if (icon) {
- diff --git a/src/alerticon.cpp b/src/alerticon.cpp
- index 7e3f4770..3dbf5804 100644
- --- a/src/alerticon.cpp
- +++ b/src/alerticon.cpp
- @@ -53,7 +53,7 @@ private:
- Impix _blank16;
- };
- -static MetaAlertIcon *metaAlertIcon = 0;
- +static MetaAlertIcon *metaAlertIcon = nullptr;
- MetaAlertIcon::MetaAlertIcon()
- : QObject(qApp)
- @@ -129,7 +129,7 @@ QString AlertIcon::Private::alertStyle = QString();
- AlertIcon::Private::Private(AlertIcon *_ai)
- : ai(_ai)
- - , real(0)
- + , real(nullptr)
- , isActivated(false)
- {
- if ( !metaAlertIcon )
- diff --git a/src/alertmanager.cpp b/src/alertmanager.cpp
- index ed7ff6e5..4abe3eb9 100644
- --- a/src/alertmanager.cpp
- +++ b/src/alertmanager.cpp
- @@ -36,7 +36,7 @@ QWidget* AlertManager::findDialog(const QMetaObject& mo) const {
- return i->widget;
- }
- }
- - return 0;
- + return nullptr;
- }
- void AlertManager::findDialogs(const QMetaObject& mo, QList<void*>* list) const
- diff --git a/src/avatars.cpp b/src/avatars.cpp
- index 9b3022ce..f361247a 100644
- --- a/src/avatars.cpp
- +++ b/src/avatars.cpp
- @@ -268,7 +268,7 @@ public:
- }
- OpResult appendUser(const QString &hash, IconType iconType, const QString &jid,
- - JidIcons **iconsOut = 0, FileCacheItem **itemOut = 0)
- + JidIcons **iconsOut = nullptr, FileCacheItem **itemOut = nullptr)
- {
- auto item = get(hash);
- if (!item) {
- @@ -554,7 +554,7 @@ private:
- static AvatarCache *_instance;
- };
- -AvatarCache* AvatarCache::_instance = 0;
- +AvatarCache* AvatarCache::_instance = nullptr;
- //------------------------------------------------------------------------------
- diff --git a/src/avcall/avcall.cpp b/src/avcall/avcall.cpp
- index 8e508724..d3e09c07 100644
- --- a/src/avcall/avcall.cpp
- +++ b/src/avcall/avcall.cpp
- @@ -44,7 +44,7 @@ static MediaConfiguration getDefaultConfiguration()
- return config;
- }
- -static MediaConfiguration *g_config = 0;
- +static MediaConfiguration *g_config = nullptr;
- static void ensureConfig()
- {
- @@ -165,7 +165,7 @@ public:
- PsiMedia::RtpChannel *audio, *video;
- JingleRtpChannel *transport;
- - AvTransmit(PsiMedia::RtpChannel *_audio, PsiMedia::RtpChannel *_video, JingleRtpChannel *_transport, QObject *parent = 0) :
- + AvTransmit(PsiMedia::RtpChannel *_audio, PsiMedia::RtpChannel *_video, JingleRtpChannel *_transport, QObject *parent = nullptr) :
- QObject(parent),
- audio(_audio),
- video(_video),
- @@ -191,10 +191,10 @@ public:
- ~AvTransmit()
- {
- if(audio)
- - audio->setParent(0);
- + audio->setParent(nullptr);
- if(video)
- - video->setParent(0);
- - transport->setParent(0);
- + video->setParent(nullptr);
- + transport->setParent(nullptr);
- }
- private slots:
- @@ -284,7 +284,7 @@ public:
- {
- Q_ASSERT(avTransmit);
- avTransmit->moveToThread(previousThread);
- - avTransmit = 0;
- + avTransmit = nullptr;
- }
- };
- @@ -295,9 +295,9 @@ class AvTransmitThread : public QCA::SyncThread
- public:
- AvTransmitHandler *handler;
- - AvTransmitThread(QObject *parent = 0) :
- + AvTransmitThread(QObject *parent = nullptr) :
- QCA::SyncThread(parent),
- - handler(0)
- + handler(nullptr)
- {
- }
- @@ -365,13 +365,13 @@ public:
- AvCallPrivate(AvCall *_q) :
- QObject(_q),
- q(_q),
- - manager(0),
- - sess(0),
- + manager(nullptr),
- + sess(nullptr),
- transmitAudio(false),
- transmitVideo(false),
- transmitting(false),
- - avTransmit(0),
- - avTransmitThread(0)
- + avTransmit(nullptr),
- + avTransmitThread(nullptr)
- {
- allowVideo = AvCallManager::isVideoSupported();
- @@ -395,7 +395,7 @@ public:
- // note that the object remains active, just
- // dissociated from the manager
- manager->unlink(q);
- - manager = 0;
- + manager = nullptr;
- }
- }
- @@ -489,15 +489,15 @@ private:
- {
- // if we had a thread, this will move the object back
- delete avTransmitThread;
- - avTransmitThread = 0;
- + avTransmitThread = nullptr;
- delete avTransmit;
- - avTransmit = 0;
- + avTransmit = nullptr;
- rtp.reset();
- delete sess;
- - sess = 0;
- + sess = nullptr;
- }
- void start_rtp()
- @@ -710,8 +710,8 @@ private slots:
- void sess_activated()
- {
- - PsiMedia::RtpChannel *audio = 0;
- - PsiMedia::RtpChannel *video = 0;
- + PsiMedia::RtpChannel *audio = nullptr;
- + PsiMedia::RtpChannel *video = nullptr;
- if(transmitAudio)
- audio = rtp.audioRtpChannel();
- @@ -747,7 +747,7 @@ AvCall::AvCall()
- }
- AvCall::AvCall(const AvCall &from) :
- - QObject(0)
- + QObject(nullptr)
- {
- Q_UNUSED(from);
- fprintf(stderr, "AvCall copy not supported\n");
- @@ -840,7 +840,7 @@ void AvCallManagerPrivate::rtp_incomingReady()
- {
- call->d->sess->reject();
- delete call->d->sess;
- - call->d->sess = 0;
- + call->d->sess = nullptr;
- delete call;
- return;
- }
- @@ -850,7 +850,7 @@ void AvCallManagerPrivate::rtp_incomingReady()
- }
- AvCallManager::AvCallManager(PsiAccount *pa) :
- - QObject(0)
- + QObject(nullptr)
- {
- d = new AvCallManagerPrivate(pa, this);
- }
- diff --git a/src/avcall/calldlg.cpp b/src/avcall/calldlg.cpp
- index d34c0b3f..480ed3e8 100644
- --- a/src/avcall/calldlg.cpp
- +++ b/src/avcall/calldlg.cpp
- @@ -62,8 +62,8 @@ public:
- q(_q),
- active(false),
- activated(false),
- - sess(0),
- - timer(0)
- + sess(nullptr),
- + timer(nullptr)
- {
- ui.setupUi(q);
- q->setWindowTitle(tr("Voice Call"));
- @@ -105,7 +105,7 @@ public:
- if(active)
- sess->reject();
- - sess->setIncomingVideo(0);
- + sess->setIncomingVideo(nullptr);
- sess->disconnect(this);
- sess->unlink();
- sess->deleteLater();
- diff --git a/src/avcall/jinglertp.cpp b/src/avcall/jinglertp.cpp
- index a8955380..cf90073d 100755
- --- a/src/avcall/jinglertp.cpp
- +++ b/src/avcall/jinglertp.cpp
- @@ -146,7 +146,7 @@ public:
- QHostAddress extAddr;
- QHostAddress stunBindAddr, stunRelayUdpAddr, stunRelayTcpAddr;
- - Resolver(QObject *parent = 0) :
- + Resolver(QObject *parent = nullptr) :
- QObject(parent),
- dnsA(parent),
- dnsB(parent),
- @@ -291,10 +291,10 @@ public:
- XMPP::UdpPortReserver *portReserver;
- QList<XMPP::Ice176*> left;
- - IceStopper(QObject *parent = 0) :
- + IceStopper(QObject *parent = nullptr) :
- QObject(parent),
- t(this),
- - portReserver(0)
- + portReserver(nullptr)
- {
- connect(&t, SIGNAL(timeout()), SLOT(t_timeout()));
- t.setSingleShot(true);
- @@ -334,7 +334,7 @@ private slots:
- {
- XMPP::Ice176 *ice = (XMPP::Ice176 *)sender();
- ice->disconnect(this);
- - ice->setParent(0);
- + ice->setParent(nullptr);
- ice->deleteLater();
- left.removeAll(ice);
- if(left.isEmpty())
- @@ -483,19 +483,19 @@ public:
- JingleRtpPrivate(JingleRtp *_q) :
- QObject(_q),
- q(_q),
- - manager(0),
- + manager(nullptr),
- localMaximumBitrate(-1),
- remoteMaximumBitrate(-1),
- - jt(0),
- + jt(nullptr),
- resolver(this),
- - iceA(0),
- - iceV(0),
- + iceA(nullptr),
- + iceV(nullptr),
- local_media_ready(false),
- prov_accepted(false),
- ice_connected(false),
- session_accepted(false),
- session_activated(false),
- - portReserver(0)
- + portReserver(nullptr)
- {
- connect(&resolver, SIGNAL(finished()), SLOT(resolver_finished()));
- @@ -511,7 +511,7 @@ public:
- cleanup();
- manager->unlink(q);
- - handshakeTimer->setParent(0);
- + handshakeTimer->setParent(nullptr);
- handshakeTimer->disconnect(this);
- handshakeTimer->deleteLater();
- @@ -612,8 +612,8 @@ public:
- init_iq_id = iq_id;
- - const JingleRtpContent *audioContent = 0;
- - const JingleRtpContent *videoContent = 0;
- + const JingleRtpContent *audioContent = nullptr;
- + const JingleRtpContent *videoContent = nullptr;
- // find content
- foreach(const JingleRtpContent &c, envelope.contentList)
- @@ -659,8 +659,8 @@ public:
- {
- manager->push_task->respondSuccess(peer, iq_id);
- - const JingleRtpContent *audioContent = 0;
- - const JingleRtpContent *videoContent = 0;
- + const JingleRtpContent *audioContent = nullptr;
- + const JingleRtpContent *videoContent = nullptr;
- // find content
- foreach(const JingleRtpContent &c, envelope.contentList)
- @@ -730,8 +730,8 @@ public:
- {
- manager->push_task->respondSuccess(peer, iq_id);
- - const JingleRtpContent *audioContent = 0;
- - const JingleRtpContent *videoContent = 0;
- + const JingleRtpContent *audioContent = nullptr;
- + const JingleRtpContent *videoContent = nullptr;
- // find content
- foreach(const JingleRtpContent &c, envelope.contentList)
- @@ -790,56 +790,56 @@ private:
- handshakeTimer->stop();
- delete jt;
- - jt = 0;
- + jt = nullptr;
- if(portReserver)
- {
- - portReserver->setParent(0);
- + portReserver->setParent(nullptr);
- QList<XMPP::Ice176*> list;
- if(iceA)
- {
- iceA->disconnect(this);
- - iceA->setParent(0);
- + iceA->setParent(nullptr);
- list += iceA;
- - iceA = 0;
- + iceA = nullptr;
- }
- if(iceV)
- {
- iceV->disconnect(this);
- - iceV->setParent(0);
- + iceV->setParent(nullptr);
- list += iceV;
- - iceV = 0;
- + iceV = nullptr;
- }
- // pass ownership of portReserver, iceA, and iceV
- IceStopper *iceStopper = new IceStopper;
- iceStopper->start(portReserver, list);
- - portReserver = 0;
- + portReserver = nullptr;
- }
- else
- {
- if(iceA)
- {
- iceA->disconnect(this);
- - iceA->setParent(0);
- + iceA->setParent(nullptr);
- iceA->deleteLater();
- - iceA = 0;
- + iceA = nullptr;
- }
- if(iceV)
- {
- iceV->disconnect(this);
- - iceV->setParent(0);
- + iceV->setParent(nullptr);
- iceV->deleteLater();
- - iceV = 0;
- + iceV = nullptr;
- }
- delete portReserver;
- - portReserver = 0;
- + portReserver = nullptr;
- }
- // prevent delivery of events by manager
- @@ -1255,24 +1255,24 @@ private:
- handshakeTimer->stop();
- if(portReserver)
- - portReserver->setParent(0);
- + portReserver->setParent(nullptr);
- if(iceA)
- {
- iceA->disconnect(this);
- - iceA->setParent(0);
- + iceA->setParent(nullptr);
- }
- if(iceV)
- {
- iceV->disconnect(this);
- - iceV->setParent(0);
- + iceV->setParent(nullptr);
- }
- rtpChannel->d->setIceObjects(portReserver, iceA, iceV);
- - portReserver = 0;
- - iceA = 0;
- - iceV = 0;
- + portReserver = nullptr;
- + iceA = nullptr;
- + iceV = nullptr;
- emit q->activated();
- }
- @@ -1413,7 +1413,7 @@ private slots:
- return;
- JT_JingleRtp *task = jt;
- - jt = 0;
- + jt = nullptr;
- if(task->success())
- prov_accept();
- @@ -1509,9 +1509,9 @@ JingleRtpChannel *JingleRtp::rtpChannel()
- JingleRtpChannelPrivate::JingleRtpChannelPrivate(JingleRtpChannel *_q) :
- QObject(_q),
- q(_q),
- - portReserver(0),
- - iceA(0),
- - iceV(0)
- + portReserver(nullptr),
- + iceA(nullptr),
- + iceV(nullptr)
- {
- rtpActivityTimer = new QTimer(this);
- connect(rtpActivityTimer, SIGNAL(timeout()), SLOT(rtpActivity_timeout()));
- @@ -1523,12 +1523,12 @@ JingleRtpChannelPrivate::~JingleRtpChannelPrivate()
- {
- QList<XMPP::Ice176*> list;
- - portReserver->setParent(0);
- + portReserver->setParent(nullptr);
- if(iceA)
- {
- iceA->disconnect(this);
- - iceA->setParent(0);
- + iceA->setParent(nullptr);
- //iceA->deleteLater();
- list += iceA;
- }
- @@ -1536,7 +1536,7 @@ JingleRtpChannelPrivate::~JingleRtpChannelPrivate()
- if(iceV)
- {
- iceV->disconnect(this);
- - iceV->setParent(0);
- + iceV->setParent(nullptr);
- //iceV->deleteLater();
- list += iceV;
- }
- @@ -1546,7 +1546,7 @@ JingleRtpChannelPrivate::~JingleRtpChannelPrivate()
- iceStopper->start(portReserver, list);
- }
- - rtpActivityTimer->setParent(0);
- + rtpActivityTimer->setParent(nullptr);
- rtpActivityTimer->disconnect(this);
- rtpActivityTimer->deleteLater();
- }
- @@ -1814,7 +1814,7 @@ void JingleRtpManagerPrivate::push_task_incomingRequest(const XMPP::Jid &from, c
- }
- JingleRtpManager::JingleRtpManager(XMPP::Client *client) :
- - QObject(0)
- + QObject(nullptr)
- {
- d = new JingleRtpManagerPrivate(client, this);
- }
- diff --git a/src/avcall/jinglertptasks.cpp b/src/avcall/jinglertptasks.cpp
- index f1dade2c..7747d9e3 100644
- --- a/src/avcall/jinglertptasks.cpp
- +++ b/src/avcall/jinglertptasks.cpp
- @@ -174,7 +174,7 @@ static JingleCondEntry jingleCondTable[] =
- { "timeout", JingleRtpReason::Timeout },
- { "unsupported-applications", JingleRtpReason::UnsupportedApplications },
- { "unsupported-transports", JingleRtpReason::UnsupportedTransports },
- - { 0, 0 }
- + { nullptr, 0 }
- };
- static QString conditionToElementName(JingleRtpReason::Condition cond)
- diff --git a/src/bobfilecache.cpp b/src/bobfilecache.cpp
- index 4823b061..50f962d7 100644
- --- a/src/bobfilecache.cpp
- +++ b/src/bobfilecache.cpp
- @@ -26,7 +26,7 @@ using namespace XMPP;
- BoBFileCache::BoBFileCache()
- - : BoBCache(0)
- + : BoBCache(nullptr)
- {
- setParent(QApplication::instance());
- _fileCache = new FileCache(ApplicationInfo::bobDir(), this);
- @@ -61,4 +61,4 @@ BoBData BoBFileCache::get(const QString &cid)
- return bd;
- }
- -BoBFileCache* BoBFileCache::_instance = 0;
- +BoBFileCache* BoBFileCache::_instance = nullptr;
- diff --git a/src/bookmarkmanagedlg.cpp b/src/bookmarkmanagedlg.cpp
- index c1ad4c53..b2ee97d0 100644
- --- a/src/bookmarkmanagedlg.cpp
- +++ b/src/bookmarkmanagedlg.cpp
- @@ -33,7 +33,7 @@
- BookmarkManageDlg::BookmarkManageDlg(PsiAccount* account)
- : QDialog()
- , account_(account)
- - , model_(0)
- + , model_(nullptr)
- {
- setAttribute(Qt::WA_DeleteOnClose, true);
- setWindowFlags(Qt::Dialog | Qt::WindowTitleHint | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint | Qt::CustomizeWindowHint);
- diff --git a/src/chatdlg.cpp b/src/chatdlg.cpp
- index 40836313..28209cd3 100644
- --- a/src/chatdlg.cpp
- +++ b/src/chatdlg.cpp
- @@ -98,12 +98,12 @@ ChatDlg* ChatDlg::create(const Jid& jid, PsiAccount* account, TabManager* tabMan
- ChatDlg::ChatDlg(const Jid& jid, PsiAccount* pa, TabManager* tabManager)
- : TabbableWidget(jid, pa, tabManager)
- , highlightersInstalled_(false)
- - , delayedMessages(0)
- + , delayedMessages(nullptr)
- {
- pending_ = 0;
- keepOpen_ = false;
- warnSend_ = false;
- - selfDestruct_ = 0;
- + selfDestruct_ = nullptr;
- transid_ = -1;
- key_ = "";
- lastWasEncrypted_ = false;
- @@ -134,7 +134,7 @@ ChatDlg::ChatDlg(const Jid& jid, PsiAccount* pa, TabManager* tabManager)
- lastChatState_ = XMPP::StateNone;
- sendComposingEvents_ = false;
- isComposing_ = false;
- - composingTimer_ = 0;
- + composingTimer_ = nullptr;
- updateRealJid();
- }
- @@ -673,7 +673,7 @@ void ChatDlg::setSelfDestruct(int minutes)
- if (minutes <= 0) {
- if (selfDestruct_) {
- delete selfDestruct_;
- - selfDestruct_ = 0;
- + selfDestruct_ = nullptr;
- }
- return;
- }
- @@ -1015,7 +1015,7 @@ void ChatDlg::holdMessages(bool hold)
- displayMessage(mv);
- }
- delete delayedMessages;
- - delayedMessages = 0;
- + delayedMessages = nullptr;
- }
- }
- @@ -1200,7 +1200,7 @@ void ChatDlg::checkComposing()
- if (!isComposing_) {
- // User stopped composing
- composingTimer_->deleteLater();
- - composingTimer_ = 0;
- + composingTimer_ = nullptr;
- emit composing(false);
- }
- isComposing_ = false; // Reset composing
- @@ -1210,7 +1210,7 @@ void ChatDlg::resetComposing()
- {
- if (composingTimer_) {
- delete composingTimer_;
- - composingTimer_ = 0;
- + composingTimer_ = nullptr;
- isComposing_ = false;
- }
- }
- diff --git a/src/chateditproxy.cpp b/src/chateditproxy.cpp
- index ff34ef2a..e21d0463 100644
- --- a/src/chateditproxy.cpp
- +++ b/src/chateditproxy.cpp
- @@ -27,8 +27,8 @@
- ChatEditProxy::ChatEditProxy(QWidget* parent)
- : QWidget(parent)
- , lineEditEnabled_(false)
- - , textEdit_(0)
- - , layout_(0)
- + , textEdit_(nullptr)
- + , layout_(nullptr)
- {
- layout_ = new QVBoxLayout(this);
- layout_->setMargin(0);
- @@ -77,7 +77,7 @@ void ChatEditProxy::moveData(QTextEdit* newTextEdit, QTextEdit* oldTextEdit) con
- QTextCursor cursor = oldTextEdit->textCursor();
- doc->setParent(newTextEdit);
- - oldTextEdit->setDocument(0);
- + oldTextEdit->setDocument(nullptr);
- newTextEdit->setDocument(doc);
- newTextEdit->setTextCursor(cursor);
- diff --git a/src/chatsplitter.cpp b/src/chatsplitter.cpp
- index c314b00e..13e3cc41 100644
- --- a/src/chatsplitter.cpp
- +++ b/src/chatsplitter.cpp
- @@ -32,8 +32,8 @@
- ChatSplitter::ChatSplitter(QWidget* parent)
- : QWidget(parent)
- , splitterEnabled_(true)
- - , splitter_(0)
- - , layout_(0)
- + , splitter_(nullptr)
- + , layout_(nullptr)
- {
- connect(PsiOptions::instance(), SIGNAL(optionChanged(const QString&)), SLOT(optionsChanged()));
- optionsChanged();
- diff --git a/src/chatviewtheme.cpp b/src/chatviewtheme.cpp
- index 18497d7c..9abb9b63 100644
- --- a/src/chatviewtheme.cpp
- +++ b/src/chatviewtheme.cpp
- @@ -131,7 +131,7 @@ bool ChatViewThemePrivate::load(std::function<void(bool)> loadCallback)
- jsUtil.reset(new ChatViewThemeJSUtil(this));
- }
- if (wv.isNull()) {
- - wv = new WebView(0);
- + wv = new WebView(nullptr);
- }
- QString themeType = id.section('/', 0, 0);
- diff --git a/src/chatviewthemeprovider_priv.cpp b/src/chatviewthemeprovider_priv.cpp
- index 71f54424..167621b9 100644
- --- a/src/chatviewthemeprovider_priv.cpp
- +++ b/src/chatviewthemeprovider_priv.cpp
- @@ -232,7 +232,7 @@ ChatViewCon::ChatViewCon(PsiCon *pc) : QObject(pc), pc(pc)
- ChatViewCon::~ChatViewCon()
- {
- #ifdef WEBENGINE
- - QWebEngineProfile::defaultProfile()->setRequestInterceptor(0);
- + QWebEngineProfile::defaultProfile()->setRequestInterceptor(nullptr);
- delete requestInterceptor;
- delete themeServer;
- #endif
- diff --git a/src/coloropt.cpp b/src/coloropt.cpp
- index af98a48e..edac8d08 100644
- --- a/src/coloropt.cpp
- +++ b/src/coloropt.cpp
- @@ -23,7 +23,7 @@
- #include "psioptions.h"
- ColorOpt::ColorOpt()
- - : QObject(0)
- + : QObject(nullptr)
- {
- connect(PsiOptions::instance(), SIGNAL(optionChanged(const QString&)), SLOT(optionChanged(const QString&)));
- connect(PsiOptions::instance(), SIGNAL(destroyed()), SLOT(reset()));
- @@ -99,7 +99,7 @@ ColorOpt* ColorOpt::instance()
- void ColorOpt::reset()
- {
- - instance_.reset(0);
- + instance_.reset(nullptr);
- }
- QScopedPointer<ColorOpt> ColorOpt::instance_;
- diff --git a/src/common.cpp b/src/common.cpp
- index 52e21795..654796f2 100644
- --- a/src/common.cpp
- +++ b/src/common.cpp
- @@ -375,7 +375,7 @@ QLayout *rw_recurseFindLayout(QLayout *lo, QWidget *w)
- return lo;
- }
- }
- - return 0;
- + return nullptr;
- }
- QLayout *rw_findLayoutOf(QWidget *w)
- @@ -450,7 +450,7 @@ void reorderGridLayout(QGridLayout* layout, int maxCols)
- TabbableWidget* findActiveTab()
- {
- QWidget* chat = QApplication::activeWindow();
- - TabbableWidget* tw = 0;
- + TabbableWidget* tw = nullptr;
- if(chat) {
- TabDlg* td = qobject_cast<TabDlg*>(chat);
- if(td) {
- diff --git a/src/contactlistaccountmenu.cpp b/src/contactlistaccountmenu.cpp
- index f3c85a20..73ac1483 100644
- --- a/src/contactlistaccountmenu.cpp
- +++ b/src/contactlistaccountmenu.cpp
- @@ -67,14 +67,14 @@ class ContactListAccountMenu::Private : public QObject
- public:
- Private(ContactListAccountMenu *menu, PsiAccount *_account)
- - : QObject(0)
- + : QObject(nullptr)
- , account(_account)
- {
- connect(menu, SIGNAL(aboutToShow()), SLOT(updateActions()));
- connect(account, SIGNAL(updatedActivity()), SLOT(updateActions()));
- connect(account, SIGNAL(updatedAccount()), SLOT(updateActions()));
- - statusMenu_ = new AccountStatusMenu(0, account->psi(), account);
- + statusMenu_ = new AccountStatusMenu(nullptr, account->psi(), account);
- statusMenu_->fill();
- statusMenu_->setTitle(tr("&Status"));
- statusMenu_->setIcon(PsiIconset::instance()->status(makeSTATUS(account->status())).icon());
- diff --git a/src/contactlistdragmodel.cpp b/src/contactlistdragmodel.cpp
- index 4c022253..4ac0a26e 100644
- --- a/src/contactlistdragmodel.cpp
- +++ b/src/contactlistdragmodel.cpp
- @@ -313,12 +313,12 @@ PsiAccount* ContactListDragModel::getDropAccount(PsiAccount* account, const QMod
- Q_UNUSED(account);
- if (!parent.isValid())
- - return 0;
- + return nullptr;
- ContactListItem *item = static_cast<ContactListItem*>(parent.internalPointer());
- Q_ASSERT(item);
- if (!item)
- - return 0;
- + return nullptr;
- if (item->isContact()) {
- return item->contact()->account();
- @@ -327,7 +327,7 @@ PsiAccount* ContactListDragModel::getDropAccount(PsiAccount* account, const QMod
- return item->account();
- }
- - return 0;
- + return nullptr;
- }
- QString ContactListDragModel::getDropGroupName(const QModelIndex& parent) const
- @@ -338,7 +338,7 @@ QString ContactListDragModel::getDropGroupName(const QModelIndex& parent) const
- ContactListItem *item = static_cast<ContactListItem*>(parent.internalPointer());
- Q_ASSERT(item);
- if (!item)
- - return 0;
- + return nullptr;
- if (item->isGroup()) {
- return item->name();
- diff --git a/src/contactlistdragview.cpp b/src/contactlistdragview.cpp
- index db41e421..3d146ef8 100644
- --- a/src/contactlistdragview.cpp
- +++ b/src/contactlistdragview.cpp
- @@ -47,15 +47,15 @@
- ContactListDragView::ContactListDragView(QWidget* parent)
- : ContactListView(parent)
- - , backedUpSelection_(0)
- - , removeAction_(0)
- + , backedUpSelection_(nullptr)
- + , removeAction_(nullptr)
- , dropIndicatorRect_(QRect())
- , dropIndicatorPosition_(QAbstractItemView::OnViewport)
- , keyboardModifiers_(Qt::NoModifier)
- , dirty_(false)
- - , pressedIndex_(0)
- + , pressedIndex_(nullptr)
- , pressedIndexWasSelected_(false)
- - , viewportMenu_(0)
- + , viewportMenu_(nullptr)
- , editing(false)
- {
- removeAction_ = new IconAction("", "psi/remove", QString(), ShortcutManager::instance()->shortcuts("contactlist.delete"), this, "act_remove");
- @@ -154,7 +154,7 @@ void ContactListDragView::mouseDoubleClickEvent(QMouseEvent* e)
- {
- ContactListDragModel* model = qobject_cast<ContactListDragModel*>(realModel());
- if (model && pressedIndex_) {
- - QModelIndexList indexes = model->indexesFor(0, pressedIndex_);
- + QModelIndexList indexes = model->indexesFor(nullptr, pressedIndex_);
- if (e->button() == Qt::LeftButton
- && indexes.count() == 1
- && model->toItem(indexes.first())->isGroup()) {
- @@ -201,7 +201,7 @@ QModelIndexList ContactListDragView::indexesFor(PsiContact* contact, QMimeData*
- void ContactListDragView::toolTipEntered(PsiContact* contact, QMimeData* contactSelection)
- {
- Q_UNUSED(contact); // we don't want tooltips on multiple selections
- - QModelIndexList indexes = indexesFor(0, contactSelection);
- + QModelIndexList indexes = indexesFor(nullptr, contactSelection);
- if (indexes.count() == 1) {
- updateCursor(proxyIndex(indexes.first()), UC_TooltipEntered, false);
- }
- @@ -312,7 +312,7 @@ bool ContactListDragView::supportsDropOnIndex(QDropEvent *e, const QModelIndex &
- ContactListModelSelection selection(e->mimeData());
- ContactListDragModel *model = qobject_cast<ContactListDragModel*>(realModel());
- if (!selection.haveRosterSelection())
- - model = 0;
- + model = nullptr;
- if (model && !model->supportsMimeDataOnIndex(e->mimeData(), realIndex(index))) {
- return false;
- @@ -612,7 +612,7 @@ QMimeData* ContactListDragView::selection() const
- if (model && model->contactList() && !selectedIndexes().isEmpty()) {
- return model->mimeData(realIndexes(selectedIndexes()));
- }
- - return 0;
- + return nullptr;
- }
- void ContactListDragView::restoreSelection(QMimeData* _mimeData)
- @@ -749,7 +749,7 @@ void ContactListDragView::mousePressEvent(QMouseEvent* e)
- {
- pressPosition_ = e->pos();
- delete pressedIndex_;
- - pressedIndex_ = 0;
- + pressedIndex_ = nullptr;
- pressedIndexWasSelected_ = false;
- QModelIndex index = indexAt(e->pos());
- @@ -834,7 +834,7 @@ void ContactListDragView::backupCurrentSelection()
- {
- if (backedUpSelection_) {
- delete backedUpSelection_;
- - backedUpSelection_ = 0;
- + backedUpSelection_ = nullptr;
- }
- backedUpSelection_ = selection();
- @@ -885,7 +885,7 @@ void ContactListDragView::mouseReleaseEvent(QMouseEvent* event)
- bool filter = false;
- ContactListDragModel* model = qobject_cast<ContactListDragModel*>(realModel());
- if (model && pressedIndex_) {
- - QModelIndexList indexes = model->indexesFor(0, pressedIndex_);
- + QModelIndexList indexes = model->indexesFor(nullptr, pressedIndex_);
- QModelIndex index = indexes.count() == 1 ? proxyIndex(indexes.first()) : QModelIndex();
- if (event->button() == Qt::LeftButton &&
- index.isValid() &&
- @@ -908,7 +908,7 @@ void ContactListDragView::mouseReleaseEvent(QMouseEvent* event)
- pressPosition_ = QPoint();
- delete pressedIndex_;
- - pressedIndex_ = 0;
- + pressedIndex_ = nullptr;
- }
- void ContactListDragView::setViewportMenu(QMenu* menu)
- diff --git a/src/contactlistgroupmenu.cpp b/src/contactlistgroupmenu.cpp
- index 73560e7a..9555b94a 100644
- --- a/src/contactlistgroupmenu.cpp
- +++ b/src/contactlistgroupmenu.cpp
- @@ -27,7 +27,7 @@
- ContactListGroupMenu::Private::Private(ContactListGroupMenu *menu, ContactListItem *item)
- - : QObject(0)
- + : QObject(nullptr)
- , q(menu)
- , group(item)
- {
- @@ -69,10 +69,10 @@ ContactListGroupMenu::Private::Private(ContactListGroupMenu *menu, ContactListIt
- actionMucLeave_ = new IconAction(tr("Leave All"), this, "psi/action_muc_leave");
- connect(actionMucLeave_, SIGNAL(triggered()), SLOT(mucLeave()));
- - actionHide_ = new IconAction(tr("Hidden"), "psi/show_hidden", tr("Hidden"), 0, this, 0, true);
- + actionHide_ = new IconAction(tr("Hidden"), "psi/show_hidden", tr("Hidden"), 0, this, nullptr, true);
- connect(actionHide_, SIGNAL(triggered(bool)), SLOT(actHide(bool)));
- - authMenu_ = 0;
- + authMenu_ = nullptr;
- if (item->specialGroupType() != ContactListItem::SpecialGroupType::ConferenceSpecialGroupType) {
- q->addAction(renameAction_);
- diff --git a/src/contactlistitemmenu.cpp b/src/contactlistitemmenu.cpp
- index 0d9840fb..00d33c47 100644
- --- a/src/contactlistitemmenu.cpp
- +++ b/src/contactlistitemmenu.cpp
- @@ -26,7 +26,7 @@
- #include <QLabel>
- ContactListItemMenu::ContactListItemMenu(ContactListItem* item, ContactListModel* model)
- - : QMenu(0)
- + : QMenu(nullptr)
- , item_(item)
- , model_(model)
- , _lblTitle(nullptr)
- diff --git a/src/contactlistmodel.cpp b/src/contactlistmodel.cpp
- index 513c84fc..b29a68ce 100644
- --- a/src/contactlistmodel.cpp
- +++ b/src/contactlistmodel.cpp
- @@ -316,7 +316,7 @@ void ContactListModel::Private::clear()
- QHashIterator<PsiContact*, QPersistentModelIndex> it(monitoredContacts);
- while (it.hasNext()) {
- it.next();
- - disconnect(it.key(), 0, this, 0);
- + disconnect(it.key(), nullptr, this, nullptr);
- }
- monitoredContacts.clear();
- @@ -369,7 +369,7 @@ void ContactListModel::Private::removeContact(PsiContact *contact)
- emit q->dataChanged(index, index);
- }
- }
- - disconnect(contact, 0, this, 0);
- + disconnect(contact, nullptr, this, nullptr);
- operationQueue.remove(contact);
- }
- @@ -443,7 +443,7 @@ void ContactListModel::Private::updateAccount()
- void ContactListModel::Private::cleanUpAccount(PsiAccount *account)
- {
- - disconnect(account, 0, this, nullptr);
- + disconnect(account, nullptr, this, nullptr);
- ContactListItem *root = static_cast<ContactListItem*>(q->root());
- ContactListItem *item = root->findAccount(account);
- if (!item) {
- diff --git a/src/contactlistmodelselection.cpp b/src/contactlistmodelselection.cpp
- index 642f252e..b7439b89 100644
- --- a/src/contactlistmodelselection.cpp
- +++ b/src/contactlistmodelselection.cpp
- @@ -32,7 +32,7 @@ static const QString psiRosterSelectionMimeType = "application/psi-roster-select
- ContactListModelSelection::ContactListModelSelection(QList<ContactListItem*> items)
- : QMimeData()
- - , mimeData_(0)
- + , mimeData_(nullptr)
- {
- QDomDocument doc;
- QDomElement root = doc.createElement("items");
- diff --git a/src/contactmanager/contactmanagerdlg.cpp b/src/contactmanager/contactmanagerdlg.cpp
- index 6b0d0d6c..3c21675f 100644
- --- a/src/contactmanager/contactmanagerdlg.cpp
- +++ b/src/contactmanager/contactmanagerdlg.cpp
- @@ -35,9 +35,9 @@
- ContactManagerDlg::ContactManagerDlg(PsiAccount *pa) :
- - QDialog(0, Qt::Window),
- + QDialog(nullptr, Qt::Window),
- pa_(pa),
- - um(0)
- + um(nullptr)
- {
- setAttribute(Qt::WA_DeleteOnClose, true);
- ui_.setupUi(this);
- diff --git a/src/discodlg.cpp b/src/discodlg.cpp
- index 7d015fbf..79439ba9 100644
- --- a/src/discodlg.cpp
- +++ b/src/discodlg.cpp
- @@ -1246,7 +1246,7 @@ void DiscoDlg::Private::actionActivated(int id)
- void DiscoDlg::Private::objectDestroyed(QObject *obj)
- {
- if ( obj == busy )
- - busy = 0;
- + busy = nullptr;
- }
- //----------------------------------------------------------------------------
- @@ -1254,7 +1254,7 @@ void DiscoDlg::Private::objectDestroyed(QObject *obj)
- //----------------------------------------------------------------------------
- DiscoDlg::DiscoDlg(PsiAccount *pa, const Jid &jid, const QString &node)
- - : QDialog(0)
- + : QDialog(nullptr)
- {
- setAttribute(Qt::WA_DeleteOnClose);
- setWindowFlags(Qt::Dialog | Qt::WindowTitleHint | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint | Qt::CustomizeWindowHint);
- diff --git a/src/edbflatfile.cpp b/src/edbflatfile.cpp
- index b228a633..880b49b7 100644
- --- a/src/edbflatfile.cpp
- +++ b/src/edbflatfile.cpp
- @@ -182,7 +182,7 @@ EDBFlatFile::File *EDBFlatFile::findFile(const Jid &j) const
- if(i->j.compare(j, false))
- return i;
- }
- - return 0;
- + return nullptr;
- }
- EDBFlatFile::File *EDBFlatFile::ensureFile(const Jid &j)
- @@ -637,7 +637,7 @@ PsiEvent::Ptr EDBFlatFile::File::lineToEvent(const QString &line)
- m.urlAdd(Url(url, logdecode(strData.at(UrlDesc))));
- m.setSpooled(true);
- - MessageEvent::Ptr me(new MessageEvent(m, 0));
- + MessageEvent::Ptr me(new MessageEvent(m, nullptr));
- me->setOriginLocal(originLocal);
- return me.staticCast<PsiEvent>();
- @@ -661,7 +661,7 @@ PsiEvent::Ptr EDBFlatFile::File::lineToEvent(const QString &line)
- else if(type == 8)
- subType = "unsubscribed";
- - AuthEvent::Ptr ae(new AuthEvent(j, subType, 0));
- + AuthEvent::Ptr ae(new AuthEvent(j, subType, nullptr));
- ae->setTimeStamp(QDateTime::fromString(strData.at(Time), Qt::ISODate));
- return ae.staticCast<PsiEvent>();
- }
- diff --git a/src/eventdlg.cpp b/src/eventdlg.cpp
- index 5e271f44..c8cdf5af 100644
- --- a/src/eventdlg.cpp
- +++ b/src/eventdlg.cpp
- @@ -331,10 +331,10 @@ void AttachView::contextMenuEvent(QContextMenuEvent* e)
- if(!i)
- return;
- - QAction* goToUrlAction = 0;
- - QAction* copyLocationAction = 0;
- - QAction* joinGroupChatAction = 0;
- - QAction* removeAction = 0;
- + QAction* goToUrlAction = nullptr;
- + QAction* copyLocationAction = nullptr;
- + QAction* joinGroupChatAction = nullptr;
- + QAction* removeAction = nullptr;
- QMenu pm(this);
- if(i->type == 0) {
- @@ -557,16 +557,16 @@ public slots:
- };
- EventDlg::EventDlg(const QString &to, PsiCon *psi, PsiAccount *pa)
- - : AdvancedWidget<QWidget>(0)
- + : AdvancedWidget<QWidget>(nullptr)
- {
- setAttribute(Qt::WA_DeleteOnClose);
- d = new Private(this);
- d->composing = true;
- d->psi = psi;
- - d->pa = 0;
- + d->pa = nullptr;
- d->psi->dialogRegister(this);
- - d->anim = 0;
- + d->anim = nullptr;
- d->nextAmount = 0;
- d->urlOnShow = false;
- @@ -617,7 +617,7 @@ EventDlg::EventDlg(const QString &to, PsiCon *psi, PsiAccount *pa)
- }
- EventDlg::EventDlg(const Jid &j, PsiAccount *pa, bool unique)
- - : AdvancedWidget<QWidget>(0)
- + : AdvancedWidget<QWidget>(nullptr)
- {
- setAttribute(Qt::WA_DeleteOnClose);
- d = new Private(this);
- @@ -632,7 +632,7 @@ EventDlg::EventDlg(const Jid &j, PsiAccount *pa, bool unique)
- else
- d->pa->dialogRegister(this);
- - d->anim = 0;
- + d->anim = nullptr;
- d->nextAmount = 0;
- d->urlOnShow = false;
- @@ -681,13 +681,13 @@ void EventDlg::init()
- d->transid = -1;
- if(d->composing) {
- - d->lb_ident = 0;
- + d->lb_ident = nullptr;
- d->cb_ident = d->psi->accountsComboBox(this);
- connect(d->cb_ident, SIGNAL(activated(PsiAccount *)), SLOT(updateIdentity(PsiAccount *)));
- hb1->addWidget(d->cb_ident);
- }
- else {
- - d->cb_ident = 0;
- + d->cb_ident = nullptr;
- d->lb_ident = new AccountLabel(this);
- d->lb_ident->setAccount(d->pa);
- d->lb_ident->setSizePolicy(QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed ));
- @@ -767,12 +767,12 @@ void EventDlg::init()
- d->tb_pgp = new IconToolButton(this);
- d->tb_pgp->setCheckable(true);
- d->tb_pgp->setToolTip(tr("Toggle encryption"));
- - d->lb_pgp = 0;
- + d->lb_pgp = nullptr;
- }
- else {
- d->lb_pgp = new IconLabel(this);
- d->lb_pgp->setPsiIcon(IconsetFactory::iconPtr("psi/cryptoNo"));
- - d->tb_pgp = 0;
- + d->tb_pgp = nullptr;
- }
- d->tb_url = new IconToolButton(this);
- @@ -1372,7 +1372,7 @@ void EventDlg::optionsUpdate()
- QIcon i;
- i.addPixmap(IconsetFactory::icon("psi/cryptoNo").impix(), QIcon::Normal, QIcon::Off);
- i.addPixmap(IconsetFactory::icon("psi/cryptoYes").impix(), QIcon::Normal, QIcon::On);
- - d->tb_pgp->setPsiIcon(0);
- + d->tb_pgp->setPsiIcon(nullptr);
- d->tb_pgp->setIcon(i);
- }
- if(d->lb_pgp)
- @@ -1719,7 +1719,7 @@ void EventDlg::updateContact(const Jid &jid)
- if(d->jid.compare(jid, false)) {
- QString rname = d->jid.resource();
- QList<UserListItem*> ul = d->pa->findRelevant(d->jid);
- - UserListItem *u = 0;
- + UserListItem *u = nullptr;
- int status = -1;
- if(!ul.isEmpty()) {
- u = ul.first();
- @@ -2042,8 +2042,8 @@ void EventDlg::updateReadNext(PsiIcon *nextAnim, int nextAmount)
- d->nextAmount = nextAmount;
- if(nextAmount == 0) {
- - d->setNextAnim(0);
- - d->pb_next->forceSetPsiIcon(0);
- + d->setNextAnim(nullptr);
- + d->pb_next->forceSetPsiIcon(nullptr);
- d->pb_next->setEnabled(false);
- d->pb_next->setText(tr("&Next"));
- diff --git a/src/filecache.cpp b/src/filecache.cpp
- index 516e0d64..8473e40c 100644
- --- a/src/filecache.cpp
- +++ b/src/filecache.cpp
- @@ -246,7 +246,7 @@ FileCacheItem *FileCache::get(const QString &id, bool reborn)
- }
- remove(id);
- }
- - return 0;
- + return nullptr;
- }
- QByteArray FileCache::getData(const QString &id, bool reborn)
- diff --git a/src/filetransdlg.cpp b/src/filetransdlg.cpp
- index 10145a17..20635705 100644
- --- a/src/filetransdlg.cpp
- +++ b/src/filetransdlg.cpp
- @@ -66,7 +66,7 @@ static int calcProgressStep(qlonglong big, int complement, int shift)
- return ((big + complement) >> shift);
- }
- -static QStringList *activeFiles = 0;
- +static QStringList *activeFiles = nullptr;
- static void active_file_add(const QString &s)
- {
- @@ -140,7 +140,7 @@ FileTransferHandler::FileTransferHandler(PsiAccount *pa, FileTransfer *ft)
- {
- d = new Private;
- d->pa = pa;
- - d->c = 0;
- + d->c = nullptr;
- if(ft) {
- d->sending = false;
- @@ -158,7 +158,7 @@ FileTransferHandler::FileTransferHandler(PsiAccount *pa, FileTransfer *ft)
- }
- else {
- d->sending = true;
- - d->ft = 0;
- + d->ft = nullptr;
- }
- }
- @@ -373,7 +373,7 @@ void FileTransferHandler::ft_connected()
- }
- if(!ok) {
- delete d->ft;
- - d->ft = 0;
- + d->ft = nullptr;
- error(ErrFile, 0, d->f.errorString());
- return;
- }
- @@ -400,7 +400,7 @@ void FileTransferHandler::ft_connected()
- }
- if(!ok) {
- delete d->ft;
- - d->ft = 0;
- + d->ft = nullptr;
- error(ErrFile, 0, d->f.errorString());
- return;
- }
- @@ -424,7 +424,7 @@ void FileTransferHandler::ft_readyRead(const QByteArray &a)
- if(r < 0) {
- d->f.close();
- delete d->ft;
- - d->ft = 0;
- + d->ft = nullptr;
- error(ErrFile, 0, d->f.errorString());
- return;
- }
- @@ -441,7 +441,7 @@ void FileTransferHandler::ft_bytesWritten(qint64 x)
- if(d->sent == d->fileSize) {
- d->f.close();
- delete d->ft;
- - d->ft = 0;
- + d->ft = nullptr;
- }
- else
- QTimer::singleShot(0, this, SLOT(trySend()));
- @@ -454,7 +454,7 @@ void FileTransferHandler::ft_error(int x)
- if(d->f.isOpen())
- d->f.close();
- delete d->ft;
- - d->ft = 0;
- + d->ft = nullptr;
- if(x == FileTransfer::ErrReject)
- error(ErrReject, x, "");
- @@ -495,7 +495,7 @@ void FileTransferHandler::trySend()
- if(r < 0) {
- d->f.close();
- delete d->ft;
- - d->ft = 0;
- + d->ft = nullptr;
- error(ErrFile, 0, d->f.errorString());
- return;
- }
- @@ -509,7 +509,7 @@ void FileTransferHandler::doFinish()
- if(d->sent == d->fileSize) {
- d->f.close();
- delete d->ft;
- - d->ft = 0;
- + d->ft = nullptr;
- }
- progress(calcProgressStep(d->sent, d->complement, d->shift), d->sent);
- }
- @@ -547,7 +547,7 @@ public:
- FileRequestDlg::FileRequestDlg(const Jid &j, PsiCon *psi, PsiAccount *pa)
- - : QDialog(0, psi_dialog_flags)
- + : QDialog(nullptr, psi_dialog_flags)
- {
- setAttribute(Qt::WA_DeleteOnClose);
- setModal(false);
- @@ -558,18 +558,18 @@ FileRequestDlg::FileRequestDlg(const Jid &j, PsiCon *psi, PsiAccount *pa)
- FileRequestDlg::FileRequestDlg(const Jid &jid, PsiCon *psi, PsiAccount *pa, const QStringList& files, bool direct)
- - : QDialog(0, psi_dialog_flags)
- + : QDialog(nullptr, psi_dialog_flags)
- {
- setAttribute(Qt::WA_DeleteOnClose);
- d = new Private;
- setModal(false);
- setupUi(this);
- d->psi = psi;
- - d->pa = 0;
- + d->pa = nullptr;
- d->jid = jid;
- - d->ft = 0;
- + d->ft = nullptr;
- d->sending = true;
- - d->lb_ident = 0;
- + d->lb_ident = nullptr;
- updateIdentity(pa);
- QFrame *hb = new QFrame(this);
- @@ -643,14 +643,14 @@ FileRequestDlg::FileRequestDlg(const Jid &jid, PsiCon *psi, PsiAccount *pa, cons
- }
- FileRequestDlg::FileRequestDlg(const QDateTime &ts, FileTransfer *ft, PsiAccount *pa)
- - : QDialog(0, psi_dialog_flags)
- + : QDialog(nullptr, psi_dialog_flags)
- {
- setAttribute(Qt::WA_DeleteOnClose);
- d = new Private;
- setModal(false);
- setupUi(this);
- - d->psi = 0;
- - d->pa = 0;
- + d->psi = nullptr;
- + d->pa = nullptr;
- d->jid = ft->peer();
- d->ft = new FileTransferHandler(pa, ft);
- d->sending = false;
- @@ -659,7 +659,7 @@ FileRequestDlg::FileRequestDlg(const QDateTime &ts, FileTransfer *ft, PsiAccount
- d->fileName = ft->fileName();
- d->fileSize = ft->fileSize();
- - d->cb_ident = 0;
- + d->cb_ident = nullptr;
- QFrame *hb = new QFrame(this);
- QHBoxLayout *hbLayout = new QHBoxLayout(hb);
- hbLayout->setMargin(0);
- @@ -740,7 +740,7 @@ void FileRequestDlg::done(int r)
- // close/reject FT if there is one
- if(d->ft) {
- delete d->ft;
- - d->ft = 0;
- + d->ft = nullptr;
- }
- }
- @@ -926,7 +926,7 @@ void FileRequestDlg::ft_connected()
- busy->stop();
- FileTransDlg *w = d->pa->psi()->ftdlg();
- FileTransferHandler *h = d->ft;
- - d->ft = 0;
- + d->ft = nullptr;
- closeDialogs(this);
- close();
- w->showWithoutActivation();
- @@ -940,7 +940,7 @@ void FileRequestDlg::ft_error(int x, int fx, const QString &)
- busy->stop();
- delete d->ft;
- - d->ft = 0;
- + d->ft = nullptr;
- closeDialogs(this);
- @@ -986,7 +986,7 @@ void FileRequestDlg::ft_error(int x, int fx, const QString &)
- void FileRequestDlg::t_timeout()
- {
- delete d->ft;
- - d->ft = 0;
- + d->ft = nullptr;
- busy->stop();
- closeDialogs(this);
- @@ -1450,7 +1450,7 @@ class FileTransView : public QListWidget
- public:
- ColumnWidthManager *cm;
- - FileTransView(QWidget *parent=0, const char *name=0)
- + FileTransView(QWidget *parent=nullptr, const char *name=nullptr)
- :QListWidget(parent)
- {
- Q_UNUSED(name)
- @@ -1566,7 +1566,7 @@ private:
- FileTransDelegate::FileTransDelegate(QObject* p)
- : QItemDelegate(p)
- - , ftv(0)
- + , ftv(nullptr)
- {
- ftv = static_cast<FileTransView*>(p);
- }
- @@ -1672,7 +1672,7 @@ public:
- if(fi->id == id)
- return fi;
- }
- - return 0;
- + return nullptr;
- }
- QList<FileTransItem*> getFinished()
- @@ -1694,7 +1694,7 @@ public:
- if((*it)->h == h)
- return *it;
- }
- - return 0;
- + return nullptr;
- }
- TransferMapping *findMapping(int id)
- @@ -1704,7 +1704,7 @@ public:
- if((*it)->id == id)
- return *it;
- }
- - return 0;
- + return nullptr;
- }
- void updateProgress(TransferMapping *i, bool updateAll=true)
- @@ -1759,7 +1759,7 @@ public:
- };
- FileTransDlg::FileTransDlg(PsiCon *psi)
- -:AdvancedWidget<QDialog>(0, psi_dialog_flags)
- +:AdvancedWidget<QDialog>(nullptr, psi_dialog_flags)
- {
- d = new Private(this);
- d->psi = psi;
- diff --git a/src/gcuserview.cpp b/src/gcuserview.cpp
- index fa59bb2b..d4a05c3d 100644
- --- a/src/gcuserview.cpp
- +++ b/src/gcuserview.cpp
- @@ -424,7 +424,7 @@ QString GCUserModel::makeToolTip(const MUCContact &contact) const
- QMimeData* GCUserModel::mimeData(const QModelIndexList &indexes) const
- {
- - QMimeData* data = 0;
- + QMimeData* data = nullptr;
- if(!indexes.isEmpty()) {
- data = new QMimeData();
- data->setText(_selfJid.withResource(indexes.first().data().toString()).full());
- diff --git a/src/geolocationdlg.cpp b/src/geolocationdlg.cpp
- index 07783127..e9f8929a 100644
- --- a/src/geolocationdlg.cpp
- +++ b/src/geolocationdlg.cpp
- @@ -28,7 +28,7 @@
- #include <QLineEdit>
- #include "iconset.h"
- -GeoLocationDlg::GeoLocationDlg(QList<PsiAccount*> list) : QDialog(0), pa_(list)
- +GeoLocationDlg::GeoLocationDlg(QList<PsiAccount*> list) : QDialog(nullptr), pa_(list)
- {
- setAttribute(Qt::WA_DeleteOnClose);
- if(pa_.isEmpty())
- diff --git a/src/groupchatdlg.cpp b/src/groupchatdlg.cpp
- index 203a4143..43587bb2 100644
- --- a/src/groupchatdlg.cpp
- +++ b/src/groupchatdlg.cpp
- @@ -385,7 +385,7 @@ join <channel>{,<channel>} [pass{,<pass>}
- if(cmd == "clear") {
- dlg->doClear();
- histAt = 0;
- - newstate = 0;
- + newstate = nullptr;
- } else if(cmd == "nick") {
- if (command.count() > 1) {
- QString nick = command[1].trimmed();
- @@ -393,7 +393,7 @@ join <channel>{,<channel>} [pass{,<pass>}
- prev_self = self;
- self = nick;
- dlg->account()->groupChatChangeNick(dlg->jid().domain(), dlg->jid().node(), self, dlg->account()->status());
- - newstate = 0;
- + newstate = nullptr;
- } else {
- // FIXME DRY with doNick
- MCmdSimpleState *state = new MCmdSimpleState("nick", tr("new nick") + '=', MCMDSTATE_UNPARSED);
- @@ -403,7 +403,7 @@ join <channel>{,<channel>} [pass{,<pass>}
- }
- } else if(cmd == "sping") {
- doSPing();
- - newstate = 0;
- + newstate = nullptr;
- } else if(cmd == "kick" && command.count() > 1) {
- command.removeFirst();
- const QString nick = command.takeFirst().trimmed();
- @@ -440,14 +440,14 @@ join <channel>{,<channel>} [pass{,<pass>}
- connect(version, SIGNAL(finished()), SLOT(version_finished()));
- version->get(target);
- version->go();
- - newstate = 0;
- + newstate = nullptr;
- } else if (cmd == "idle" && command.count() > 1) {
- QString nick = command[1].trimmed();
- Jid target = dlg->jid().withResource(nick);
- LastActivityTask *idle = new LastActivityTask(target, dlg->account()->client()->rootTask());
- connect(idle, SIGNAL(finished()), SLOT(lastactivity_finished()));
- idle->go();
- - newstate = 0;
- + newstate = nullptr;
- } else if (cmd == "quote") {
- dlg->appendSysMsg(command.join("|"), false);
- preset = command;
- @@ -829,7 +829,7 @@ GCMainDlg::GCMainDlg(PsiAccount *pa, const Jid &j, TabManager *tabManager)
- d->histAt = 0;
- //d->findDlg = 0;
- - d->configDlg = 0;
- + d->configDlg = nullptr;
- d->usersModel = new GCUserModel(pa, j, this);
- d->state = Private::Connected;
- @@ -875,7 +875,7 @@ GCMainDlg::GCMainDlg(PsiAccount *pa, const Jid &j, TabManager *tabManager)
- // typeahead find bar
- QHBoxLayout *hb3a = new QHBoxLayout();
- - d->typeahead = new TypeAheadFindBar(ui_.log->textWidget(), tr("Find toolbar"), 0);
- + d->typeahead = new TypeAheadFindBar(ui_.log->textWidget(), tr("Find toolbar"), nullptr);
- hb3a->addWidget( d->typeahead );
- ui_.vboxLayout1->addLayout(hb3a);
- diff --git a/src/groupmenu.cpp b/src/groupmenu.cpp
- index 098c56f3..345486eb 100644
- --- a/src/groupmenu.cpp
- +++ b/src/groupmenu.cpp
- @@ -90,11 +90,11 @@ void GroupMenu::createNewGroup()
- {
- while (contact_) {
- bool ok = false;
- - QString newgroup = QInputDialog::getText(0, tr("Create New Group"),
- + QString newgroup = QInputDialog::getText(nullptr, tr("Create New Group"),
- tr("Enter the new group name:"),
- QLineEdit::Normal,
- QString::null,
- - &ok, 0);
- + &ok, nullptr);
- if (!ok)
- break;
- if (newgroup.isEmpty())
- diff --git a/src/historycontactlistmodel.cpp b/src/historycontactlistmodel.cpp
- index 41f82adf..824727b6 100644
- --- a/src/historycontactlistmodel.cpp
- +++ b/src/historycontactlistmodel.cpp
- @@ -110,7 +110,7 @@ QVariant HistoryContactListModel::data(const QModelIndex &index, int role) const
- Qt::ItemFlags HistoryContactListModel::flags(const QModelIndex &index) const
- {
- if (!index.isValid())
- - return 0;
- + return nullptr;
- return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
- }
- diff --git a/src/historydlg.cpp b/src/historydlg.cpp
- index 8fa6a2f2..e495d2f5 100644
- --- a/src/historydlg.cpp
- +++ b/src/historydlg.cpp
- @@ -101,7 +101,7 @@ static QStringList wrapString(const QString &str, int wid)
- SearchProxy::SearchProxy(PsiCon *p, DisplayProxy *d)
- - : QObject(0)
- + : QObject(nullptr)
- , active(false)
- {
- psi = p;
- @@ -296,7 +296,7 @@ void SearchProxy::handlePadding(const EDBResult &r)
- DisplayProxy::DisplayProxy(PsiCon *p, PsiTextView *v)
- - : QObject(0)
- + : QObject(nullptr)
- {
- psi = p;
- viewWid = v;
- @@ -635,7 +635,7 @@ public:
- };
- HistoryDlg::HistoryDlg(const Jid &jid, PsiAccount *pa)
- - : AdvancedWidget<QDialog>(0, Qt::Window)
- + : AdvancedWidget<QDialog>(nullptr, Qt::Window)
- , lastFocus(nullptr)
- {
- ui_.setupUi(this);
- @@ -1284,7 +1284,7 @@ void HistoryDlg::updateSearchHint()
- UserListItem* HistoryDlg::currentUserListItem() const
- {
- - UserListItem* u = 0;
- + UserListItem* u = nullptr;
- if (d->pa && !d->jid.isEmpty())
- u = d->pa->findFirstRelevant(d->jid);
- return u;
- diff --git a/src/htmltextcontroller.cpp b/src/htmltextcontroller.cpp
- index 9c4e1ae9..58baab3e 100644
- --- a/src/htmltextcontroller.cpp
- +++ b/src/htmltextcontroller.cpp
- @@ -25,7 +25,7 @@ class HTMLTextMenu : public QMenu
- {
- Q_OBJECT
- public:
- - HTMLTextMenu(QWidget* parent = 0): QMenu(parent)
- + HTMLTextMenu(QWidget* parent = nullptr): QMenu(parent)
- {
- actBold = addAction(tr("Bold"));
- actBold->setCheckable(true);
- diff --git a/src/infodlg.cpp b/src/infodlg.cpp
- index 4b890440..498444e7 100644
- --- a/src/infodlg.cpp
- +++ b/src/infodlg.cpp
- @@ -130,7 +130,7 @@ InfoWidget::InfoWidget(int type, const Jid &j, const VCard &vcard, PsiAccount *p
- d->pa = pa;
- d->busy = false;
- d->te_edited = false;
- - d->jt = 0;
- + d->jt = nullptr;
- d->pa->dialogRegister(this, j);
- d->cacheVCard = cacheVCard;
- d->dateTextFormat = "d MMM yyyy";
- @@ -244,7 +244,7 @@ InfoWidget::~InfoWidget()
- {
- d->pa->dialogUnregister(this);
- delete d->userListItem;
- - d->userListItem = 0;
- + d->userListItem = nullptr;
- delete d;
- }
- @@ -271,7 +271,7 @@ bool InfoWidget::aboutToClose() {
- // cancel active transaction (refresh only)
- if(d->busy && d->actionType == 0) {
- delete d->jt;
- - d->jt = 0;
- + d->jt = nullptr;
- }
- return true;
- @@ -279,7 +279,7 @@ bool InfoWidget::aboutToClose() {
- void InfoWidget::jt_finished()
- {
- - d->jt = 0;
- + d->jt = nullptr;
- JT_VCard* jtVCard = static_cast<JT_VCard*> (sender());
- d->busy = false;
- diff --git a/src/invitetogroupchatmenu.cpp b/src/invitetogroupchatmenu.cpp
- index ba1c6fd4..34c2add0 100644
- --- a/src/invitetogroupchatmenu.cpp
- +++ b/src/invitetogroupchatmenu.cpp
- @@ -26,7 +26,7 @@
- InviteToGroupChatMenu::InviteToGroupChatMenu(QWidget* parent)
- : QMenu(parent)
- - , controller_(0)
- + , controller_(nullptr)
- {
- }
- diff --git a/src/main.cpp b/src/main.cpp
- index 1980d962..b45fbab0 100644
- --- a/src/main.cpp
- +++ b/src/main.cpp
- @@ -96,7 +96,7 @@ PsiMain::PsiMain(const QHash<QString, QString>& commandline, QObject *par)
- : QObject(par)
- , cmdline(commandline)
- {
- - pcon = 0;
- + pcon = nullptr;
- // migrate old (pre 0.11) registry settings...
- QSettings sUser(QSettings::UserScope, "psi-im.org", "Psi");
- @@ -205,7 +205,7 @@ void PsiMain::useLocalInstance()
- else {
- // Create & open the default profile
- if (!profileExists("default") && !profileNew("default")) {
- - QMessageBox::critical(0, tr("Error"),
- + QMessageBox::critical(nullptr, tr("Error"),
- tr("There was an error creating the default profile."));
- QTimer::singleShot(0, this, SLOT(bail()));
- } else {
- @@ -221,7 +221,7 @@ void PsiMain::chooseProfile()
- {
- if(pcon) {
- delete pcon;
- - pcon = 0;
- + pcon = nullptr;
- }
- QString str = "";
- @@ -288,7 +288,7 @@ void PsiMain::sessionStart()
- {
- if (!ActiveProfiles::instance()->setThisProfile(activeProfile)) { // already running
- if (!ActiveProfiles::instance()->raise(activeProfile, true)) {
- - QMessageBox::critical(0, tr("Error"), tr("Cannot open this profile - it is already running, but not responding"));
- + QMessageBox::critical(nullptr, tr("Error"), tr("Cannot open this profile - it is already running, but not responding"));
- }
- quit();
- return;
- @@ -300,7 +300,7 @@ void PsiMain::sessionStart()
- pcon = new PsiCon();
- if (!pcon->init()) {
- delete pcon;
- - pcon = 0;
- + pcon = nullptr;
- quit();
- return;
- }
- @@ -332,7 +332,7 @@ void PsiMain::bail()
- if(pcon) {
- pcon->gracefulDeinit([this](){
- pcon->deleteLater();
- - pcon = 0;
- + pcon = nullptr;
- quit();
- });
- }
- @@ -503,7 +503,7 @@ PSI_EXPORT_FUNC int main(int argc, char *argv[])
- return restart_process(argc, argv, cmdline["uri"]);
- #else
- // otherwise, it should enough to modify argc/argv
- - argv[argc] = 0;
- + argv[argc] = nullptr;
- #endif
- }
- diff --git a/src/mainwin.cpp b/src/mainwin.cpp
- index ab806ca8..d98ffba8 100644
- --- a/src/mainwin.cpp
- +++ b/src/mainwin.cpp
- @@ -218,7 +218,7 @@ MainWin::Private::Private(PsiCon* _psi, MainWin* _mainWin) :
- prefilterShowAway = false;
- char* squishStr = getenv("SQUISH_ENABLED");
- - squishEnabled = squishStr != 0;
- + squishEnabled = squishStr != nullptr;
- }
- MainWin::Private::~Private()
- @@ -315,7 +315,7 @@ const QString rosterGeometryPath = "options.ui.save.roster-width";
- const QString tabsGeometryPath = "options.ui.save.log-width";
- MainWin::MainWin(bool _onTop, bool _asTool, PsiCon* psi)
- -:AdvancedWidget<QMainWindow>(0, (_onTop ? Qt::WindowStaysOnTopHint : Qt::Widget) | (_asTool ? Qt::Tool : Qt::Widget))
- +:AdvancedWidget<QMainWindow>(nullptr, (_onTop ? Qt::WindowStaysOnTopHint : Qt::Widget) | (_asTool ? Qt::Tool : Qt::Widget))
- {
- setObjectName("MainWin");
- setAttribute(Qt::WA_AlwaysShowToolTips);
- @@ -333,12 +333,12 @@ MainWin::MainWin(bool _onTop, bool _asTool, PsiCon* psi)
- d->lastStatus = -2;
- d->nextAmount = 0;
- - d->nextAnim = 0;
- - d->tray = 0;
- - d->trayMenu = 0;
- + d->nextAnim = nullptr;
- + d->tray = nullptr;
- + d->trayMenu = nullptr;
- d->statusTip = "";
- d->nickname = "";
- - d->defaultAccount = 0;
- + d->defaultAccount = nullptr;
- QWidget *rosterBar = new QWidget(this);
- bool allInOne = false;
- @@ -350,7 +350,7 @@ MainWin::MainWin(bool _onTop, bool _asTool, PsiCon* psi)
- setCentralWidget(d->splitter);
- allInOne = true;
- - d->mainTabs = d->psi->tabManager()->newTabs(0);
- + d->mainTabs = d->psi->tabManager()->newTabs(nullptr);
- d->psi->tabManager()->setPreferredTabsForKind('C', d->mainTabs);
- d->psi->tabManager()->setPreferredTabsForKind('M', d->mainTabs);
- @@ -559,7 +559,7 @@ MainWin::~MainWin()
- {
- if(d->tray) {
- delete d->tray;
- - d->tray = 0;
- + d->tray = nullptr;
- }
- saveToolbarsState();
- @@ -658,7 +658,7 @@ void MainWin::registerAction( IconAction* action )
- { "help_diag_qcaplugin", activated, this, SLOT( actDiagQCAPluginActivated() ) },
- { "help_diag_qcakeystore", activated, this, SLOT( actDiagQCAKeyStoreActivated() ) },
- - { "", 0, 0, 0 }
- + { "", nullptr, nullptr, nullptr }
- };
- int i;
- @@ -700,8 +700,8 @@ void MainWin::registerAction( IconAction* action )
- { "show_offline", contactList, SIGNAL(showOfflineChanged(bool)), setChecked, contactList->showOffline()},
- { "show_self", contactList, SIGNAL(showSelfChanged(bool)), setChecked, contactList->showSelf()},
- { "show_agents", contactList, SIGNAL(showAgentsChanged(bool)), setChecked, contactList->showAgents()},
- - { "show_statusmsg", 0, 0, 0, false},
- - { "", 0, 0, 0, false }
- + { "show_statusmsg", nullptr, nullptr, nullptr, false},
- + { "", nullptr, nullptr, nullptr, false }
- };
- for ( i = 0; !(aName = QString(reverseactionlist[i].name)).isEmpty(); i++ ) {
- @@ -734,7 +734,7 @@ void MainWin::reinitAutoHide()
- }
- } else {
- delete d->hideTimer;
- - d->hideTimer = 0;
- + d->hideTimer = nullptr;
- }
- }
- @@ -784,13 +784,13 @@ void MainWin::setWindowOpts(bool _onTop, bool _asTool)
- void MainWin::setUseDock(bool use)
- {
- - if (use == (d->tray != 0)) {
- + if (use == (d->tray != nullptr)) {
- return;
- }
- if (d->tray) {
- delete d->tray;
- - d->tray = 0;
- + d->tray = nullptr;
- }
- Q_ASSERT(!d->tray);
- @@ -885,7 +885,7 @@ void MainWin::buildToolbars()
- } else {
- if (d && d->viewToolBar) {
- delete d->viewToolBar;
- - d->viewToolBar = 0;
- + d->viewToolBar = nullptr;
- }
- tb = new PsiToolBar(base, this, d->psi->actionList());
- }
- @@ -1670,7 +1670,7 @@ void MainWin::trayHide()
- void MainWin::updateReadNext(PsiIcon* anim, int amount)
- {
- d->nextAnim = anim;
- - if(anim == 0) {
- + if(anim == nullptr) {
- d->nextAmount = 0;
- }
- else {
- diff --git a/src/mainwin_p.cpp b/src/mainwin_p.cpp
- index f9d6ea5e..db282ca6 100644
- --- a/src/mainwin_p.cpp
- +++ b/src/mainwin_p.cpp
- @@ -48,7 +48,7 @@ class PopupActionButton : public QPushButton
- {
- Q_OBJECT
- public:
- - PopupActionButton(QWidget *parent = 0, const char *name = 0);
- + PopupActionButton(QWidget *parent = nullptr, const char *name = nullptr);
- ~PopupActionButton();
- void setIcon(PsiIcon *, bool showText);
- @@ -72,7 +72,7 @@ private:
- };
- PopupActionButton::PopupActionButton(QWidget *parent, const char *name)
- -: QPushButton(parent), icon(0), showText(true)
- +: QPushButton(parent), icon(nullptr), showText(true)
- {
- setObjectName(name);
- }
- @@ -101,8 +101,8 @@ void PopupActionButton::setIcon(PsiIcon *i, bool st)
- {
- if ( icon ) {
- icon->stop();
- - disconnect (icon, 0, this, 0);
- - icon = 0;
- + disconnect (icon, nullptr, this, nullptr);
- + icon = nullptr;
- }
- icon = i;
- @@ -231,7 +231,7 @@ public:
- Private (QObject *parent)
- : QObject (parent)
- {
- - icon = 0;
- + icon = nullptr;
- showText = true;
- }
- @@ -263,10 +263,10 @@ void PopupAction::setAlert (const PsiIcon *icon)
- void PopupAction::setIcon (const PsiIcon *icon, bool showText, bool alert)
- {
- - PsiIcon *oldIcon = 0;
- + PsiIcon *oldIcon = nullptr;
- if ( d->icon ) {
- oldIcon = d->icon;
- - d->icon = 0;
- + d->icon = nullptr;
- }
- d->showText = showText;
- @@ -280,7 +280,7 @@ void PopupAction::setIcon (const PsiIcon *icon, bool showText, bool alert)
- IconAction::setIcon(icon->icon());
- }
- else {
- - d->icon = 0;
- + d->icon = nullptr;
- IconAction::setIcon(QIcon());
- }
- @@ -339,7 +339,7 @@ void PopupAction::setEnabled (bool e)
- IconAction *PopupAction::copy() const
- {
- - PopupAction *act = new PopupAction(text(), menu(), 0, objectName().toLatin1());
- + PopupAction *act = new PopupAction(text(), menu(), nullptr, objectName().toLatin1());
- *act = *this;
- @@ -457,7 +457,7 @@ void MAction::numAccountsChanged()
- IconAction *MAction::copy() const
- {
- - MAction *act = new MAction(text(), id_, controller_, 0);
- + MAction *act = new MAction(text(), id_, controller_, nullptr);
- *act = *this;
- @@ -473,7 +473,7 @@ MAction &MAction::operator=( const MAction &from )
- void MAction::doSetMenu(QMenu* menu)
- {
- - IconActionGroup::doSetMenu(findChildren<QAction*>().count() > 1 ? menu : 0);
- + IconActionGroup::doSetMenu(findChildren<QAction*>().count() > 1 ? menu : nullptr);
- }
- //----------------------------------------------------------------------------
- @@ -507,7 +507,7 @@ bool SpacerAction::addTo(QWidget *w)
- IconAction *SpacerAction::copy() const
- {
- - return new SpacerAction( 0 );
- + return new SpacerAction( nullptr );
- }
- //----------------------------------------------------------------------------
- @@ -535,7 +535,7 @@ bool SeparatorAction::addTo(QWidget *w)
- IconAction *SeparatorAction::copy() const
- {
- - return new SeparatorAction(0);
- + return new SeparatorAction(nullptr);
- }
- //----------------------------------------------------------------------------
- @@ -658,7 +658,7 @@ void EventNotifierAction::updateVisibility()
- IconAction *EventNotifierAction::copy() const
- {
- - EventNotifierAction *act = new EventNotifierAction( 0 );
- + EventNotifierAction *act = new EventNotifierAction( nullptr );
- *act = *this;
- diff --git a/src/mcmdmanager.cpp b/src/mcmdmanager.cpp
- index ba3fee73..a3296414 100644
- --- a/src/mcmdmanager.cpp
- +++ b/src/mcmdmanager.cpp
- @@ -40,7 +40,7 @@ MCmdSimpleState::MCmdSimpleState(QString name, QString prompt, int flags)
- MCmdSimpleState::~MCmdSimpleState() {
- }
- -MCmdManager::MCmdManager(MCmdUiSiteIface* site_) : state_(0), uiSite_(site_) {
- +MCmdManager::MCmdManager(MCmdUiSiteIface* site_) : state_(nullptr), uiSite_(site_) {
- };
- MCmdManager::~MCmdManager() {
- @@ -129,7 +129,7 @@ QString MCmdManager::serializeCommand(const QStringList &list)
- bool MCmdManager::processCommand(QString command) {
- - MCmdStateIface *tmpstate=0;
- + MCmdStateIface *tmpstate=nullptr;
- QStringList preset;
- QStringList items;
- if (state_->getFlags() & MCMDSTATE_UNPARSED) {
- @@ -143,7 +143,7 @@ bool MCmdManager::processCommand(QString command) {
- foreach(MCmdProviderIface *prov, providers_) {
- if (prov->mCmdTryStateTransit(state_, items, tmpstate, preset)) {
- state_ = tmpstate;
- - if (state_ != 0) {
- + if (state_ != nullptr) {
- QString prompt = state_->getPrompt();
- QString def;
- if (state_->getFlags() & MCMDSTATE_UNPARSED) {
- @@ -163,8 +163,8 @@ bool MCmdManager::processCommand(QString command) {
- tmpstate = state_;
- bool ret = state_->unhandled(items);
- - state_ = 0;
- - if (state_ == 0) {
- + state_ = nullptr;
- + if (state_ == nullptr) {
- tmpstate->dispose();
- uiSite_->mCmdClose();
- }
- @@ -173,7 +173,7 @@ bool MCmdManager::processCommand(QString command) {
- bool MCmdManager::open(MCmdStateIface *state, QStringList preset) {
- - if (0 != state_) state_->dispose();
- + if (nullptr != state_) state_->dispose();
- state_ = state;
- QString prompt = state->getPrompt();
- @@ -229,7 +229,7 @@ QStringList MCmdManager::completeCommand(QString &command, int pos, int &start,
- }
- bool MCmdManager::isActive() {
- - return state_ != 0;
- + return state_ != nullptr;
- }
- diff --git a/src/mcmdsimplesite.cpp b/src/mcmdsimplesite.cpp
- index efdc8a9c..445206ea 100644
- --- a/src/mcmdsimplesite.cpp
- +++ b/src/mcmdsimplesite.cpp
- @@ -33,8 +33,8 @@ MCmdSimpleSite::MCmdSimpleSite(QLabel *p, QTextEdit *i)
- }
- MCmdSimpleSite::MCmdSimpleSite()
- - : promptWidget(0)
- - , inputWidget(0)
- + : promptWidget(nullptr)
- + , inputWidget(nullptr)
- , open(false)
- {
- }
- diff --git a/src/messageview.cpp b/src/messageview.cpp
- index 2db53c6f..ce6fb795 100644
- --- a/src/messageview.cpp
- +++ b/src/messageview.cpp
- @@ -28,7 +28,7 @@ static const QString me_cmd = "/me ";
- MessageView::MessageView(Type t) :
- _type(t),
- - _flags(0),
- + _flags(nullptr),
- _status(0),
- _statusPriority(0),
- _dateTime(QDateTime::currentDateTime()),
- diff --git a/src/miniclient.cpp b/src/miniclient.cpp
- index 28602fef..8b4c33d2 100644
- --- a/src/miniclient.cpp
- +++ b/src/miniclient.cpp
- @@ -38,10 +38,10 @@ MiniClient::MiniClient(QObject *parent)
- {
- _client = new Client;
- _client->bobManager()->setCache(BoBFileCache::instance());
- - conn = 0;
- - tls = 0;
- - tlsHandler = 0;
- - stream = 0;
- + conn = nullptr;
- + tls = nullptr;
- + tlsHandler = nullptr;
- + stream = nullptr;
- auth = false;
- force_ssl = false;
- error_disconnect = true;
- @@ -56,14 +56,14 @@ MiniClient::~MiniClient()
- void MiniClient::reset()
- {
- delete stream;
- - stream = 0;
- + stream = nullptr;
- delete tls;
- - tls = 0;
- - tlsHandler = 0;
- + tls = nullptr;
- + tlsHandler = nullptr;
- delete conn;
- - conn = 0;
- + conn = nullptr;
- }
- void MiniClient::connectToServer(const Jid &jid, bool legacy_ssl_probe, bool legacy_ssl, bool forcessl, const QString &_host, int _port, QString proxy, QString *_pass)
- @@ -165,7 +165,7 @@ void MiniClient::setErrorOnDisconnect(bool b)
- void MiniClient::tls_handshaken()
- {
- - if (CertificateHelpers::checkCertificate(tls, tlsHandler, tlsOverrideDomain, tlsOverrideCert, 0,
- + if (CertificateHelpers::checkCertificate(tls, tlsHandler, tlsOverrideDomain, tlsOverrideCert, nullptr,
- tr("Server Authentication"),
- j.domain())) {
- tlsHandler->continueAfterHandshake();
- @@ -235,7 +235,7 @@ void MiniClient::cs_warning(int err)
- {
- if (err == ClientStream::WarnNoTLS && force_ssl) {
- close();
- - QMessageBox::critical(0, tr("Server Error"), tr("The server does not support TLS encryption."));
- + QMessageBox::critical(nullptr, tr("Server Error"), tr("The server does not support TLS encryption."));
- }
- else {
- stream->continueAfterWarning();
- @@ -255,7 +255,7 @@ void MiniClient::cs_error(int err)
- close();
- if (needAlert)
- - QMessageBox::critical(0, tr("Server Error"), tr("There was an error communicating with the XMPP server.\nDetails: %1").arg(str));
- + QMessageBox::critical(nullptr, tr("Server Error"), tr("There was an error communicating with the XMPP server.\nDetails: %1").arg(str));
- error();
- }
- diff --git a/src/moodcatalog.cpp b/src/moodcatalog.cpp
- index 9d740b18..a5b346ff 100644
- --- a/src/moodcatalog.cpp
- +++ b/src/moodcatalog.cpp
- @@ -187,4 +187,4 @@ const QList<MoodCatalog::Entry>& MoodCatalog::entries() const
- return entries_;
- }
- -MoodCatalog* MoodCatalog::instance_ = 0;
- +MoodCatalog* MoodCatalog::instance_ = nullptr;
- diff --git a/src/mooddlg.cpp b/src/mooddlg.cpp
- index 756b79e5..5893d36f 100644
- --- a/src/mooddlg.cpp
- +++ b/src/mooddlg.cpp
- @@ -27,7 +27,7 @@
- #include "psiiconset.h"
- MoodDlg::MoodDlg(QList<PsiAccount*> list)
- - : QDialog(0), pa_(list)
- + : QDialog(nullptr), pa_(list)
- {
- setAttribute(Qt::WA_DeleteOnClose);
- if(pa_.isEmpty())
- diff --git a/src/mucjoindlg.cpp b/src/mucjoindlg.cpp
- index a43141ea..be98390f 100644
- --- a/src/mucjoindlg.cpp
- +++ b/src/mucjoindlg.cpp
- @@ -36,7 +36,7 @@ static const int nickConflictCode = 409;
- static const QString additionalSymbol = "_";
- MUCJoinDlg::MUCJoinDlg(PsiCon* psi, PsiAccount* pa)
- - : QDialog(0)
- + : QDialog(nullptr)
- , nickAlreadyCompleted_(false)
- {
- setAttribute(Qt::WA_DeleteOnClose);
- @@ -47,7 +47,7 @@ MUCJoinDlg::MUCJoinDlg(PsiCon* psi, PsiAccount* pa)
- setWindowIcon(IconsetFactory::icon("psi/groupChat").icon());
- #endif
- controller_ = psi;
- - account_ = 0;
- + account_ = nullptr;
- controller_->dialogRegister(this);
- ui_.ck_history->setChecked(true);
- ui_.ck_history->hide();
- @@ -123,7 +123,7 @@ void MUCJoinDlg::updateIdentityVisibility()
- void MUCJoinDlg::updateFavorites()
- {
- - QListWidgetItem *recentLwi = 0, *lwi;
- + QListWidgetItem *recentLwi = nullptr, *lwi;
- ui_.lwFavorites->clear();
- diff --git a/src/networkaccessmanager.cpp b/src/networkaccessmanager.cpp
- index 4dd917fa..c788339f 100644
- --- a/src/networkaccessmanager.cpp
- +++ b/src/networkaccessmanager.cpp
- @@ -30,7 +30,7 @@ NetworkAccessManager::NetworkAccessManager(QObject *parent)
- }
- QNetworkReply *NetworkAccessManager::createRequest(Operation op, const QNetworkRequest & req,
- - QIODevice * outgoingData = 0)
- + QIODevice * outgoingData = nullptr)
- {
- if (req.url().host() != QLatin1String("psi")) {
- return QNetworkAccessManager::createRequest(op, req, outgoingData);
- diff --git a/src/options/opt_advanced.cpp b/src/options/opt_advanced.cpp
- index 85df3439..66d3e7f3 100644
- --- a/src/options/opt_advanced.cpp
- +++ b/src/options/opt_advanced.cpp
- @@ -24,7 +24,7 @@ public:
- OptionsTabAdvanced::OptionsTabAdvanced(QObject *parent)
- : OptionsTab(parent, "misc", "", tr("Misc."), tr("Extra uncategorized options"), "psi/advanced")
- {
- - w = 0;
- + w = nullptr;
- }
- OptionsTabAdvanced::~OptionsTabAdvanced()
- @@ -34,7 +34,7 @@ OptionsTabAdvanced::~OptionsTabAdvanced()
- QWidget *OptionsTabAdvanced::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new OptAdvancedUI();
- OptAdvancedUI *d = static_cast<OptAdvancedUI *>(w);
- diff --git a/src/options/opt_appearance.cpp b/src/options/opt_appearance.cpp
- index 93b06d44..80aec5db 100644
- --- a/src/options/opt_appearance.cpp
- +++ b/src/options/opt_appearance.cpp
- @@ -119,7 +119,7 @@ OptionsTabAppearanceMisc::~OptionsTabAppearanceMisc()
- QWidget *OptionsTabAppearanceMisc::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new OptAppearanceMiscUI();
- @@ -191,7 +191,7 @@ static QPixmap color2pixmap(QColor c) // taken from opt_general.cpp
- QWidget *OptionsTabAppearanceGeneral::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new OptAppearanceUI();
- OptAppearanceUI *d = static_cast<OptAppearanceUI *>(w);
- diff --git a/src/options/opt_application.cpp b/src/options/opt_application.cpp
- index eeae6cc7..d5565b22 100644
- --- a/src/options/opt_application.cpp
- +++ b/src/options/opt_application.cpp
- @@ -52,7 +52,7 @@ OptionsTabApplication::~OptionsTabApplication()
- QWidget *OptionsTabApplication::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new OptApplicationUI();
- OptApplicationUI *d = static_cast<OptApplicationUI *>(w);
- @@ -136,7 +136,7 @@ void OptionsTabApplication::applyOptions()
- }
- if(curLang != itemData && !itemData.isEmpty()) {
- TranslationManager::instance()->loadTranslation(itemData);
- - QMessageBox::information(0, tr("Information"), tr("Some of the options you changed will only have full effect upon restart."));
- + QMessageBox::information(nullptr, tr("Information"), tr("Some of the options you changed will only have full effect upon restart."));
- }
- QSettings s(ApplicationInfo::homeDir(ApplicationInfo::ConfigLocation) + "/psirc", QSettings::IniFormat);
- s.setValue("last_lang", itemData);
- diff --git a/src/options/opt_avcall.cpp b/src/options/opt_avcall.cpp
- index 0e43f4ff..1cb543eb 100644
- --- a/src/options/opt_avcall.cpp
- +++ b/src/options/opt_avcall.cpp
- @@ -25,7 +25,7 @@ public:
- OptionsTabAvCall::OptionsTabAvCall(QObject *parent)
- : OptionsTab(parent, "avcall", "", tr("Voice Calling"), AvCallManager::isVideoSupported() ? tr("Audio and video device configuration") : tr("Audio device configuration"), "psi/avcall")
- {
- - w = 0;
- + w = nullptr;
- connect(MediaDeviceWatcher::instance(), &MediaDeviceWatcher::updated, this, [this](){
- restoreOptions();
- });
- @@ -38,7 +38,7 @@ OptionsTabAvCall::~OptionsTabAvCall()
- QWidget *OptionsTabAvCall::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new OptAvCallUI();
- //OptAvCallUI *d = static_cast<OptAvCallUI *>(w);
- diff --git a/src/options/opt_chat.cpp b/src/options/opt_chat.cpp
- index ba410a74..f188c707 100644
- --- a/src/options/opt_chat.cpp
- +++ b/src/options/opt_chat.cpp
- @@ -25,8 +25,8 @@ public:
- OptionsTabChat::OptionsTabChat(QObject *parent)
- : OptionsTab(parent, "chat", "", tr("Chat"), tr("Configure the chat dialog"), "psi/start-chat")
- {
- - w = 0;
- - bg_delChats = bg_defAct = 0;
- + w = nullptr;
- + bg_delChats = bg_defAct = nullptr;
- }
- OptionsTabChat::~OptionsTabChat()
- @@ -40,7 +40,7 @@ OptionsTabChat::~OptionsTabChat()
- QWidget *OptionsTabChat::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new OptChatUI();
- OptChatUI *d = static_cast<OptChatUI *>(w);
- diff --git a/src/options/opt_events.cpp b/src/options/opt_events.cpp
- index 0863f702..455e43a7 100644
- --- a/src/options/opt_events.cpp
- +++ b/src/options/opt_events.cpp
- @@ -24,14 +24,14 @@ public:
- OptionsTabEvents::OptionsTabEvents(QObject *parent)
- : OptionsTab(parent, "events", "", tr("Events"), tr("The events behaviour"), "psi/events")
- - , w(0)
- + , w(nullptr)
- {
- }
- QWidget *OptionsTabEvents::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new OptEventsUI();
- OptEventsUI *d = static_cast<OptEventsUI *>(w);
- diff --git a/src/options/opt_groupchat.cpp b/src/options/opt_groupchat.cpp
- index 6a4a32fb..469375c2 100644
- --- a/src/options/opt_groupchat.cpp
- +++ b/src/options/opt_groupchat.cpp
- @@ -39,7 +39,7 @@ void OptionsTabGroupchat::setData(PsiCon *, QWidget *_dlg)
- QWidget *OptionsTabGroupchat::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new GeneralGroupchatUI();
- GeneralGroupchatUI *d = static_cast<GeneralGroupchatUI *>(w);
- @@ -92,8 +92,8 @@ void OptionsTabGroupchat::restoreOptions()
- GeneralGroupchatUI *d = static_cast<GeneralGroupchatUI *>(w);
- // no need to call dataChanged() when these widgets are modified
- - disconnect(d->le_newNickColor, SIGNAL(textChanged(const QString &)), 0, 0);
- - disconnect(d->le_newHighlightWord, SIGNAL(textChanged(const QString &)), 0, 0);
- + disconnect(d->le_newNickColor, SIGNAL(textChanged(const QString &)), nullptr, nullptr);
- + disconnect(d->le_newHighlightWord, SIGNAL(textChanged(const QString &)), nullptr, nullptr);
- connect(d->le_newNickColor, SIGNAL(textChanged(const QString &)), SLOT(displayGCNickColor()));
- d->ck_gcHighlights->setChecked( true );
- diff --git a/src/options/opt_iconset.cpp b/src/options/opt_iconset.cpp
- index 78d38595..1c93bfb4 100644
- --- a/src/options/opt_iconset.cpp
- +++ b/src/options/opt_iconset.cpp
- @@ -349,7 +349,7 @@ void IconsetLoadThread::run()
- }
- for(int i = 0; i < failedList.size(); i++) {
- - postEvent(new IconsetLoadEvent(this, 0));
- + postEvent(new IconsetLoadEvent(this, nullptr));
- }
- getout:
- @@ -363,8 +363,8 @@ getout:
- OptionsTabIconsetSystem::OptionsTabIconsetSystem(QObject *parent)
- : OptionsTab(parent, "iconset_system", "", tr("System Icons"), tr("Select the system iconset"))
- - , w(0)
- - , thread(0)
- + , w(nullptr)
- + , thread(nullptr)
- {
- }
- @@ -376,7 +376,7 @@ OptionsTabIconsetSystem::~OptionsTabIconsetSystem()
- QWidget *OptionsTabIconsetSystem::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new IconsetSystemUI;
- IconsetSystemUI *d = static_cast<IconsetSystemUI *>(w);
- @@ -463,7 +463,7 @@ bool OptionsTabIconsetSystem::event(QEvent *e)
- d->progress->hide();
- d->unsetCursor();
- - thread = 0;
- + thread = nullptr;
- return true;
- }
- @@ -493,7 +493,7 @@ void OptionsTabIconsetSystem::cancelThread()
- thread->cancelled = true;
- threadCancelled.unlock();
- - thread = 0;
- + thread = nullptr;
- }
- }
- @@ -503,8 +503,8 @@ void OptionsTabIconsetSystem::cancelThread()
- OptionsTabIconsetEmoticons::OptionsTabIconsetEmoticons(QObject *parent)
- : OptionsTab(parent, "iconset_emoticons", "", tr("Emoticons"), tr("Select your emoticon iconsets"))
- - , w(0)
- - , thread(0)
- + , w(nullptr)
- + , thread(nullptr)
- {
- }
- @@ -516,7 +516,7 @@ OptionsTabIconsetEmoticons::~OptionsTabIconsetEmoticons()
- QWidget *OptionsTabIconsetEmoticons::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new IconsetEmoUI;
- IconsetEmoUI *d = static_cast<IconsetEmoUI *>(w);
- @@ -641,7 +641,7 @@ bool OptionsTabIconsetEmoticons::event(QEvent *e)
- d->progress->hide();
- d->unsetCursor();
- - thread = 0;
- + thread = nullptr;
- return true;
- }
- @@ -671,7 +671,7 @@ void OptionsTabIconsetEmoticons::cancelThread()
- thread->cancelled = true;
- threadCancelled.unlock();
- - thread = 0;
- + thread = nullptr;
- }
- }
- @@ -682,8 +682,8 @@ void OptionsTabIconsetEmoticons::cancelThread()
- OptionsTabIconsetMoods::OptionsTabIconsetMoods(QObject *parent)
- : OptionsTab(parent, "iconset_moods", "", tr("Moods"), tr("Select your mood iconset"))
- - , w(0)
- - , thread(0)
- + , w(nullptr)
- + , thread(nullptr)
- {
- }
- @@ -695,7 +695,7 @@ OptionsTabIconsetMoods::~OptionsTabIconsetMoods()
- QWidget *OptionsTabIconsetMoods::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new IconsetMoodUI;
- IconsetMoodUI *d = static_cast<IconsetMoodUI *>(w);
- @@ -790,7 +790,7 @@ bool OptionsTabIconsetMoods::event(QEvent *e)
- d->progress->hide();
- d->unsetCursor();
- - thread = 0;
- + thread = nullptr;
- return true;
- }
- @@ -820,7 +820,7 @@ void OptionsTabIconsetMoods::cancelThread()
- thread->cancelled = true;
- threadCancelled.unlock();
- - thread = 0;
- + thread = nullptr;
- }
- }
- //----------------------------------------------------------------------------
- @@ -829,8 +829,8 @@ void OptionsTabIconsetMoods::cancelThread()
- OptionsTabIconsetActivity::OptionsTabIconsetActivity(QObject *parent)
- : OptionsTab(parent, "iconset_activities", "", tr("Activity"), tr("Select your activity iconset"))
- - , w(0)
- - , thread(0)
- + , w(nullptr)
- + , thread(nullptr)
- {
- }
- @@ -842,7 +842,7 @@ OptionsTabIconsetActivity::~OptionsTabIconsetActivity()
- QWidget *OptionsTabIconsetActivity::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new IconsetActivityUI;
- IconsetActivityUI *d = static_cast<IconsetActivityUI *>(w);
- @@ -937,7 +937,7 @@ bool OptionsTabIconsetActivity::event(QEvent *e)
- d->progress->hide();
- d->unsetCursor();
- - thread = 0;
- + thread = nullptr;
- return true;
- }
- @@ -967,7 +967,7 @@ void OptionsTabIconsetActivity::cancelThread()
- thread->cancelled = true;
- threadCancelled.unlock();
- - thread = 0;
- + thread = nullptr;
- }
- }
- //----------------------------------------------------------------------------
- @@ -976,8 +976,8 @@ void OptionsTabIconsetActivity::cancelThread()
- OptionsTabIconsetAffiliations::OptionsTabIconsetAffiliations(QObject *parent)
- : OptionsTab(parent, "iconset_affiliations", "", tr("Affiliations"), tr("Select your affiliations iconset"))
- - , w(0)
- - , thread(0)
- + , w(nullptr)
- + , thread(nullptr)
- {
- }
- @@ -989,7 +989,7 @@ OptionsTabIconsetAffiliations::~OptionsTabIconsetAffiliations()
- QWidget *OptionsTabIconsetAffiliations::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new IconsetAffiliationUI;
- IconsetAffiliationUI *d = static_cast<IconsetAffiliationUI *>(w);
- @@ -1084,7 +1084,7 @@ bool OptionsTabIconsetAffiliations::event(QEvent *e)
- d->progress->hide();
- d->unsetCursor();
- - thread = 0;
- + thread = nullptr;
- return true;
- }
- @@ -1114,7 +1114,7 @@ void OptionsTabIconsetAffiliations::cancelThread()
- thread->cancelled = true;
- threadCancelled.unlock();
- - thread = 0;
- + thread = nullptr;
- }
- }
- @@ -1124,8 +1124,8 @@ void OptionsTabIconsetAffiliations::cancelThread()
- OptionsTabIconsetClients::OptionsTabIconsetClients(QObject *parent)
- : OptionsTab(parent, "iconset_clients", "", tr("Clients"), tr("Select your clients iconset"))
- - , w(0)
- - , thread(0)
- + , w(nullptr)
- + , thread(nullptr)
- {
- }
- @@ -1137,7 +1137,7 @@ OptionsTabIconsetClients::~OptionsTabIconsetClients()
- QWidget *OptionsTabIconsetClients::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new IconsetClientUI;
- IconsetClientUI *d = static_cast<IconsetClientUI *>(w);
- @@ -1232,7 +1232,7 @@ bool OptionsTabIconsetClients::event(QEvent *e)
- d->progress->hide();
- d->unsetCursor();
- - thread = 0;
- + thread = nullptr;
- return true;
- }
- @@ -1262,7 +1262,7 @@ void OptionsTabIconsetClients::cancelThread()
- thread->cancelled = true;
- threadCancelled.unlock();
- - thread = 0;
- + thread = nullptr;
- }
- }
- @@ -1272,8 +1272,8 @@ void OptionsTabIconsetClients::cancelThread()
- OptionsTabIconsetRoster::OptionsTabIconsetRoster(QObject *parent)
- : OptionsTab(parent, "iconset_roster", "", tr("Roster Icons"), tr("Select iconsets for your roster"))
- - , w(0)
- - , thread(0)
- + , w(nullptr)
- + , thread(nullptr)
- {
- }
- @@ -1293,7 +1293,7 @@ void OptionsTabIconsetRoster::addService(const QString& id, const QString& name)
- QWidget *OptionsTabIconsetRoster::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new IconsetRosterUI;
- IconsetRosterUI *d = static_cast<IconsetRosterUI *>(w);
- @@ -1323,7 +1323,7 @@ QWidget *OptionsTabIconsetRoster::widget()
- connect(d->iss_servicesRoster, SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)), SLOT(isServices_iconsetSelected(QListWidgetItem *, QListWidgetItem *)));
- connect(d->tw_isServices, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), SLOT(isServices_selectionChanged(QTreeWidgetItem *)));
- connect(d->pb_servicesDetails, SIGNAL(clicked()), SLOT(servicesDetails()));
- - isServices_selectionChanged(0);
- + isServices_selectionChanged(nullptr);
- connect(d->iss_customRoster, SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)), SLOT(isCustom_iconsetSelected(QListWidgetItem *, QListWidgetItem *)));
- connect(d->tw_customRoster, SIGNAL(currentItemChanged(QTreeWidgetItem *, QTreeWidgetItem *)), SLOT(isCustom_selectionChanged(QTreeWidgetItem *)));
- @@ -1333,7 +1333,7 @@ QWidget *OptionsTabIconsetRoster::widget()
- connect(d->le_customRoster, SIGNAL(textChanged(const QString &)), SLOT(isCustom_textChanged()));
- connect(d->pb_customRosterAdd, SIGNAL(clicked()), SLOT(isCustom_add()));
- connect(d->pb_customRosterDelete, SIGNAL(clicked()), SLOT(isCustom_delete()));
- - isCustom_selectionChanged(0);
- + isCustom_selectionChanged(nullptr);
- d->ck_useTransportIconsForContacts->setWhatsThis(
- tr("Toggles use of transport icons to the contacts, that use that transports."));
- @@ -1482,7 +1482,7 @@ bool OptionsTabIconsetRoster::event(QEvent *e)
- // roster - custom
- {
- // Then, fill the QListView
- - QTreeWidgetItem *last = 0;
- + QTreeWidgetItem *last = nullptr;
- QStringList customicons = PsiOptions::instance()->getChildOptionNames("options.iconsets.custom-status", true, true);
- foreach(QString base, customicons) {
- QString regexp = PsiOptions::instance()->getOption(base + ".regexp").toString();
- @@ -1513,7 +1513,7 @@ bool OptionsTabIconsetRoster::event(QEvent *e)
- d->progress->hide();
- d->unsetCursor();
- - thread = 0;
- + thread = nullptr;
- return true;
- }
- @@ -1578,8 +1578,8 @@ void OptionsTabIconsetRoster::isServices_iconsetSelected(QListWidgetItem *item,
- void OptionsTabIconsetRoster::isServices_selectionChanged(QTreeWidgetItem *it)
- {
- IconsetRosterUI *d = static_cast<IconsetRosterUI *>(w);
- - d->iss_servicesRoster->setEnabled( it != 0 );
- - d->pb_servicesDetails->setEnabled( it != 0 );
- + d->iss_servicesRoster->setEnabled( it != nullptr );
- + d->pb_servicesDetails->setEnabled( it != nullptr );
- d->iss_servicesRoster->clearSelection();
- if ( !it )
- return;
- @@ -1631,11 +1631,11 @@ void OptionsTabIconsetRoster::isCustom_iconsetSelected(QListWidgetItem *item, QL
- void OptionsTabIconsetRoster::isCustom_selectionChanged(QTreeWidgetItem *it)
- {
- IconsetRosterUI *d = static_cast<IconsetRosterUI *>(w);
- - d->iss_customRoster->setEnabled( it != 0 );
- - d->pb_customRosterDetails->setEnabled( it != 0 );
- + d->iss_customRoster->setEnabled( it != nullptr );
- + d->pb_customRosterDetails->setEnabled( it != nullptr );
- //d->pb_customRosterAdd->setEnabled( it != 0 );
- - d->pb_customRosterDelete->setEnabled( it != 0 );
- - d->le_customRoster->setEnabled( it != 0 );
- + d->pb_customRosterDelete->setEnabled( it != nullptr );
- + d->le_customRoster->setEnabled( it != nullptr );
- d->iss_customRoster->clearSelection();
- if ( !it )
- return;
- @@ -1710,7 +1710,7 @@ void OptionsTabIconsetRoster::isCustom_delete()
- return;
- delete item;
- - isCustom_selectionChanged(0);
- + isCustom_selectionChanged(nullptr);
- d->tw_customRoster->clearSelection();
- emit dataChanged();
- }
- @@ -1732,6 +1732,6 @@ void OptionsTabIconsetRoster::cancelThread()
- thread->cancelled = true;
- threadCancelled.unlock();
- - thread = 0;
- + thread = nullptr;
- }
- }
- diff --git a/src/options/opt_input.cpp b/src/options/opt_input.cpp
- index e7f2040c..0f25e01e 100644
- --- a/src/options/opt_input.cpp
- +++ b/src/options/opt_input.cpp
- @@ -26,8 +26,8 @@ public:
- OptionsTabInput::OptionsTabInput(QObject *parent)
- : OptionsTab(parent, "input", "", tr("Input"), tr("Input options"), "psi/action_templates_edit"),
- - w_(0),
- - psi_(0)
- + w_(nullptr),
- + psi_(nullptr)
- {
- }
- @@ -37,7 +37,7 @@ OptionsTabInput::~OptionsTabInput()
- QWidget *OptionsTabInput::widget()
- {
- if (w_) {
- - return 0;
- + return nullptr;
- }
- w_ = new OptInputUI();
- diff --git a/src/options/opt_messages_common.cpp b/src/options/opt_messages_common.cpp
- index efcbbdd6..e05f2cff 100644
- --- a/src/options/opt_messages_common.cpp
- +++ b/src/options/opt_messages_common.cpp
- @@ -17,8 +17,8 @@ public:
- OptionsTabMsgCommon::OptionsTabMsgCommon(QObject *parent)
- : OptionsTab(parent, "common", "", tr("Common"), tr("Сommon options for messages section"), "psi/advanced"),
- - w_(0),
- - psi_(0)
- + w_(nullptr),
- + psi_(nullptr)
- {
- }
- @@ -28,7 +28,7 @@ OptionsTabMsgCommon::~OptionsTabMsgCommon()
- QWidget *OptionsTabMsgCommon::widget()
- {
- if (w_) {
- - return 0;
- + return nullptr;
- }
- w_ = new OptMsgCommonUI();
- diff --git a/src/options/opt_plugins.cpp b/src/options/opt_plugins.cpp
- index 5856d5dc..1e5f9282 100644
- --- a/src/options/opt_plugins.cpp
- +++ b/src/options/opt_plugins.cpp
- @@ -40,7 +40,7 @@ class PluginsOptionsDlg : public OptionsDlgBase
- {
- Q_OBJECT
- public:
- - PluginsOptionsDlg(const QString &pluginName, PsiCon *psi, QWidget *parent = 0) :
- + PluginsOptionsDlg(const QString &pluginName, PsiCon *psi, QWidget *parent = nullptr) :
- OptionsDlgBase(psi, parent)
- {
- setWindowTitle(QString("%1: %2").arg(pluginName).arg(windowTitle()));
- @@ -82,7 +82,7 @@ void OptionsTabPlugins::setData(PsiCon *psi, QWidget *)
- QWidget *OptionsTabPlugins::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new OptPluginsUI();
- OptPluginsUI *d = static_cast<OptPluginsUI *>(w);
- diff --git a/src/options/opt_popups.cpp b/src/options/opt_popups.cpp
- index 64e61adf..0a06e161 100644
- --- a/src/options/opt_popups.cpp
- +++ b/src/options/opt_popups.cpp
- @@ -34,15 +34,15 @@ public:
- OptionsTabPopups::OptionsTabPopups(QObject *parent)
- : OptionsTab(parent, "popups", "", tr("Popups"), tr("The popups behaviour"), "psi/tip")
- - , w(0)
- - , popup_(0)
- + , w(nullptr)
- + , popup_(nullptr)
- {
- }
- QWidget *OptionsTabPopups::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new OptPopupsUI();
- return w;
- diff --git a/src/options/opt_roster_main.cpp b/src/options/opt_roster_main.cpp
- index e8c63e41..19030426 100644
- --- a/src/options/opt_roster_main.cpp
- +++ b/src/options/opt_roster_main.cpp
- @@ -17,7 +17,7 @@ public:
- OptionsTabRosterMain::OptionsTabRosterMain(QObject *parent)
- : OptionsTab(parent, "roster_main", "", tr("Roster"), tr("Roster window options"), "psi/roster_icon")
- - , w(0)
- + , w(nullptr)
- {
- }
- @@ -28,7 +28,7 @@ OptionsTabRosterMain::~OptionsTabRosterMain()
- QWidget *OptionsTabRosterMain::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new OptRosterMainUI();
- OptRosterMainUI *d = static_cast<OptRosterMainUI *>(w);
- diff --git a/src/options/opt_roster_muc.cpp b/src/options/opt_roster_muc.cpp
- index 17c0625e..10f972c9 100644
- --- a/src/options/opt_roster_muc.cpp
- +++ b/src/options/opt_roster_muc.cpp
- @@ -18,7 +18,7 @@ public:
- OptionsTabRosterMuc::OptionsTabRosterMuc(QObject *parent)
- : OptionsTab(parent, "roster_muc", "", tr("Groupchat"), tr("Groupchat roster options"), "psi/groupChat")
- - , w(0)
- + , w(nullptr)
- {
- }
- @@ -45,7 +45,7 @@ void OptionsTabRosterMuc::changeEvent(QEvent *e)
- QWidget *OptionsTabRosterMuc::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new OptRosterMucUI();
- OptRosterMucUI *d = static_cast<OptRosterMucUI *>(w);
- diff --git a/src/options/opt_shortcuts.cpp b/src/options/opt_shortcuts.cpp
- index e6fde557..0700ceb5 100644
- --- a/src/options/opt_shortcuts.cpp
- +++ b/src/options/opt_shortcuts.cpp
- @@ -50,7 +50,7 @@ public:
- OptionsTabShortcuts::OptionsTabShortcuts(QObject *parent)
- : OptionsTab(parent, "shortcuts", "", tr("Shortcuts"), tr("Options for Psi Shortcuts"), "psi/shortcuts")
- {
- - w = 0;
- + w = nullptr;
- }
- /**
- @@ -67,7 +67,7 @@ OptionsTabShortcuts::~OptionsTabShortcuts()
- QWidget *OptionsTabShortcuts::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new OptShortcutsUI();
- OptShortcutsUI *d = static_cast<OptShortcutsUI *>(w);
- diff --git a/src/options/opt_sound.cpp b/src/options/opt_sound.cpp
- index 5f4ea44a..555b5f08 100644
- --- a/src/options/opt_sound.cpp
- +++ b/src/options/opt_sound.cpp
- @@ -44,7 +44,7 @@ OptionsTabSound::~OptionsTabSound()
- QWidget *OptionsTabSound::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new OptSoundUI();
- OptSoundUI *d = static_cast<OptSoundUI *>(w);
- diff --git a/src/options/opt_statusauto.cpp b/src/options/opt_statusauto.cpp
- index e919d801..3b703ad4 100644
- --- a/src/options/opt_statusauto.cpp
- +++ b/src/options/opt_statusauto.cpp
- @@ -29,7 +29,7 @@ OptionsTabStatusAuto::~OptionsTabStatusAuto()
- QWidget *OptionsTabStatusAuto::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new OptStatusAutoUI();
- OptStatusAutoUI *d = static_cast<OptStatusAutoUI *>(w);
- diff --git a/src/options/opt_statusgeneral.cpp b/src/options/opt_statusgeneral.cpp
- index 191f4cab..ca211c19 100644
- --- a/src/options/opt_statusgeneral.cpp
- +++ b/src/options/opt_statusgeneral.cpp
- @@ -32,7 +32,7 @@ OptionsTabStatusGeneral::~OptionsTabStatusGeneral()
- QWidget *OptionsTabStatusGeneral::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new OptStatusGeneralUI();
- OptStatusGeneralUI *d = static_cast<OptStatusGeneralUI *>(w);
- @@ -196,8 +196,8 @@ void OptionsTabStatusGeneral::setData(PsiCon *, QWidget *parentDialog)
- void OptionsTabStatusGeneral::currentItemChanged(QListWidgetItem * current, QListWidgetItem * /*previous*/ )
- {
- OptStatusGeneralUI *d = static_cast<OptStatusGeneralUI*>(w);
- - d->pb_spEdit->setEnabled(current != 0);
- - d->pb_spDelete->setEnabled(current != 0);
- + d->pb_spEdit->setEnabled(current != nullptr);
- + d->pb_spDelete->setEnabled(current != nullptr);
- if (current)
- loadStatusPreset();
- else
- diff --git a/src/options/opt_statuspep.cpp b/src/options/opt_statuspep.cpp
- index 27050a77..b1c59b7a 100644
- --- a/src/options/opt_statuspep.cpp
- +++ b/src/options/opt_statuspep.cpp
- @@ -17,8 +17,8 @@ public:
- OptionsTabStatusPep::OptionsTabStatusPep(QObject *parent)
- : OptionsTab(parent, "status_tunes", "", tr("PEP"), tr("Tunes no-video filter and controllers switcher"))
- -, w_(0)
- -, psi_(0)
- +, w_(nullptr)
- +, psi_(nullptr)
- , controllersChanged_(false)
- {
- }
- @@ -30,7 +30,7 @@ OptionsTabStatusPep::~OptionsTabStatusPep()
- QWidget *OptionsTabStatusPep::widget()
- {
- if (w_) {
- - return 0;
- + return nullptr;
- }
- w_ = new OptStatusPepUI();
- diff --git a/src/options/opt_theme.cpp b/src/options/opt_theme.cpp
- index e560e8ea..f9f729e6 100644
- --- a/src/options/opt_theme.cpp
- +++ b/src/options/opt_theme.cpp
- @@ -62,7 +62,7 @@ OptionsTabAppearanceTheme::OptionsTabAppearanceTheme(QObject *parent,
- : OptionsTab(parent, provider_->type(), "",
- provider_->optionsName(),
- provider_->optionsDescription())
- - , w(0)
- + , w(nullptr)
- , provider(provider_)
- {
- @@ -75,7 +75,7 @@ OptionsTabAppearanceTheme::~OptionsTabAppearanceTheme()
- QWidget *OptionsTabAppearanceTheme::widget()
- {
- if ( w )
- - return 0;
- + return nullptr;
- w = new OptAppearanceThemeUI();
- OptAppearanceThemeUI *d = static_cast<OptAppearanceThemeUI *>(w);
- diff --git a/src/options/opt_toolbars.cpp b/src/options/opt_toolbars.cpp
- index 6cb843a7..d220f795 100644
- --- a/src/options/opt_toolbars.cpp
- +++ b/src/options/opt_toolbars.cpp
- @@ -93,7 +93,7 @@ OptionsTabToolbars::OptionsTabToolbars(QObject *parent)
- QWidget *OptionsTabToolbars::widget()
- {
- if (w)
- - return 0;
- + return nullptr;
- w = new LookFeelToolbarsUI();
- LookFeelToolbarsUI *d = (LookFeelToolbarsUI*) w;
- @@ -404,7 +404,7 @@ void OptionsTabToolbars::toolbarSelectionChanged(int item)
- {
- // Fill the TreeWidget with toolbar-specific actions
- QTreeWidget *tw = d->tw_availActions;
- - QTreeWidgetItem *lastRoot = 0;
- + QTreeWidgetItem *lastRoot = nullptr;
- QList<ActionList*> lists = psi->actionList()->actionLists(p->currentType());
- @@ -415,7 +415,7 @@ void OptionsTabToolbars::toolbarSelectionChanged(int item)
- root->setData(0, Qt::UserRole, QString(""));
- root->setExpanded(true);
- - QTreeWidgetItem *last = 0;
- + QTreeWidgetItem *last = nullptr;
- QStringList actionNames = actionList->actions();
- QStringList::Iterator it2 = actionNames.begin();
- for (; it2 != actionNames.end(); ++it2) {
- diff --git a/src/options/opt_tree.cpp b/src/options/opt_tree.cpp
- index 54e6bee5..c28d4368 100644
- --- a/src/options/opt_tree.cpp
- +++ b/src/options/opt_tree.cpp
- @@ -7,7 +7,7 @@
- OptionsTabTree::OptionsTabTree(QObject *parent)
- : OptionsTab(parent, "tree", "", tr("Advanced"), tr("Options for advanced users"), "psi/advanced-plus")
- {
- - w = 0;
- + w = nullptr;
- }
- OptionsTabTree::~OptionsTabTree()
- @@ -17,7 +17,7 @@ OptionsTabTree::~OptionsTabTree()
- QWidget *OptionsTabTree::widget()
- {
- if (w) {
- - return 0;
- + return nullptr;
- }
- w = new QWidget();
- //w->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
- diff --git a/src/options/optionstab.cpp b/src/options/optionstab.cpp
- index 78a0c688..a2fcf105 100644
- --- a/src/options/optionstab.cpp
- +++ b/src/options/optionstab.cpp
- @@ -50,7 +50,7 @@ QString OptionsTab::tabName() const
- PsiIcon *OptionsTab::tabIcon() const
- {
- if ( v_tabIconName.isEmpty() )
- - return 0;
- + return nullptr;
- return (PsiIcon *)IconsetFactory::iconPtr( v_tabIconName );
- }
- @@ -120,7 +120,7 @@ private slots:
- private:
- struct TabData {
- - TabData() { tab = 0; initialized = false; }
- + TabData() { tab = nullptr; initialized = false; }
- TabData(OptionsTab *t) { tab = t; initialized = false; }
- OptionsTab *tab;
- bool initialized;
- @@ -141,7 +141,7 @@ void OptionsTabWidget::addTab(OptionsTab *tab)
- // the widget will have no parent; it will be reparented
- // when inserting it with "addTab"
- - QWidget *w = new QWidget(0);
- + QWidget *w = new QWidget(nullptr);
- w->setObjectName(tab->name());
- if ( !tab->desc().isEmpty() )
- @@ -228,7 +228,7 @@ MetaOptionsTab::~MetaOptionsTab()
- void MetaOptionsTab::init()
- {
- - w = 0;
- + w = nullptr;
- }
- void MetaOptionsTab::addTab(OptionsTab *tab)
- @@ -253,7 +253,7 @@ QWidget *MetaOptionsTab::widget()
- if ( w )
- return w;
- - OptionsTabWidget *t = new OptionsTabWidget(0);
- + OptionsTabWidget *t = new OptionsTabWidget(nullptr);
- w = t;
- connect(w, SIGNAL(connectDataChanged(QWidget *)), SIGNAL(connectDataChanged(QWidget *)));
- diff --git a/src/pgpkeydlg.cpp b/src/pgpkeydlg.cpp
- index 67902e65..b9d0b438 100644
- --- a/src/pgpkeydlg.cpp
- +++ b/src/pgpkeydlg.cpp
- @@ -77,7 +77,7 @@ public:
- PGPKeyDlg::PGPKeyDlg(Type t, const QString& defaultKeyID, QWidget *parent)
- : QDialog(parent)
- - , model_(0)
- + , model_(nullptr)
- {
- ui_.setupUi(this);
- setModal(true);
- @@ -103,8 +103,8 @@ PGPKeyDlg::PGPKeyDlg(Type t, const QString& defaultKeyID, QWidget *parent)
- ui_.le_filter->installEventFilter(this);
- - KeyViewItem* firstItem = 0;
- - KeyViewItem* selectedItem = 0;
- + KeyViewItem* firstItem = nullptr;
- + KeyViewItem* selectedItem = nullptr;
- int row = 0;
- foreach(QCA::KeyStore *ks, PGPUtil::instance().keystores_) {
- diff --git a/src/pgputil.cpp b/src/pgputil.cpp
- index cdb7236c..1900631a 100644
- --- a/src/pgputil.cpp
- +++ b/src/pgputil.cpp
- @@ -8,7 +8,7 @@
- #include "passphrasedlg.h"
- #include "showtextdlg.h"
- -PGPUtil* PGPUtil::instance_ = 0;
- +PGPUtil* PGPUtil::instance_ = nullptr;
- PGPUtil::PGPUtil() : qcaEventHandler_(nullptr), passphraseDlg_(nullptr), cache_no_pgp_(false)
- {
- @@ -301,11 +301,11 @@ void PGPUtil::showDiagnosticText(const QString& event, const QString& diagnostic
- QMessageBox msgbox(QMessageBox::Critical,
- tr("Error"),
- event,
- - QMessageBox::Ok, 0);
- + QMessageBox::Ok, nullptr);
- QPushButton *diag = msgbox.addButton(tr("Diagnostics"), QMessageBox::HelpRole);
- msgbox.exec();
- if (msgbox.clickedButton() == diag) {
- - ShowTextDlg* w = new ShowTextDlg(diagnostic, true, false, 0);
- + ShowTextDlg* w = new ShowTextDlg(diagnostic, true, false, nullptr);
- w->setWindowTitle(tr("OpenPGP Diagnostic Text"));
- w->resize(560, 240);
- w->exec();
- diff --git a/src/pluginhost.cpp b/src/pluginhost.cpp
- index 61db7415..b309b4de 100644
- --- a/src/pluginhost.cpp
- +++ b/src/pluginhost.cpp
- @@ -537,7 +537,7 @@ bool PluginHost::incomingXml(int account, const QDomElement &e)
- }
- // choose handler function depending on iq type
- - bool (IqNamespaceFilter::*handler)(int account, const QDomElement& xml) = 0;
- + bool (IqNamespaceFilter::*handler)(int account, const QDomElement& xml) = nullptr;
- const QString type = e.attribute("type");
- if (type == "get") {
- handler = &IqNamespaceFilter::iqGet;
- @@ -944,7 +944,7 @@ void PluginHost::addIcon(const QString& name, const QByteArray& ba)
- QTextEdit* PluginHost::getEditBox()
- {
- - QTextEdit* ed = 0;
- + QTextEdit* ed = nullptr;
- TabbableWidget* tw = findActiveTab();
- if(tw) {
- QWidget* chatEditProxy = tw->findChild<QWidget*>("mle");
- diff --git a/src/popupmanager.cpp b/src/popupmanager.cpp
- index 0705f9f9..0416b957 100644
- --- a/src/popupmanager.cpp
- +++ b/src/popupmanager.cpp
- @@ -57,15 +57,15 @@ class PopupManager::Private
- public:
- Private()
- - : psi_(0)
- + : psi_(nullptr)
- , lastCustomType_(PopupManager::AlertCustom)
- {
- }
- PsiPopupInterface* popup(const QString& name)
- {
- - PsiPopupInterface* ppi = 0;
- - PsiPopupPluginInterface *plugin = 0;
- + PsiPopupInterface* ppi = nullptr;
- + PsiPopupPluginInterface *plugin = nullptr;
- if(popups_.keys().contains(name)) {
- plugin = popups_.value(name);
- }
- diff --git a/src/privacy/privacydlg.cpp b/src/privacy/privacydlg.cpp
- index 173874c7..39b64b22 100644
- --- a/src/privacy/privacydlg.cpp
- +++ b/src/privacy/privacydlg.cpp
- @@ -287,7 +287,7 @@ void PrivacyDlg::changeList_succeeded(QString name)
- void PrivacyDlg::changeList_failed()
- {
- - QMessageBox::critical(0, QObject::tr("Error"), QObject::tr("There was an error changing the list."));
- + QMessageBox::critical(nullptr, QObject::tr("Error"), QObject::tr("There was an error changing the list."));
- setWidgetsEnabled(true);
- }
- @@ -300,7 +300,7 @@ void PrivacyDlg::change_succeeded()
- void PrivacyDlg::change_failed()
- {
- revertSettings();
- - QMessageBox::critical(0, QObject::tr("Error"), QObject::tr("There was an error processing your request."));
- + QMessageBox::critical(nullptr, QObject::tr("Error"), QObject::tr("There was an error processing your request."));
- setWidgetsEnabled(true);
- }
- diff --git a/src/privacy/psiprivacymanager.cpp b/src/privacy/psiprivacymanager.cpp
- index c3db9785..e6a49260 100644
- --- a/src/privacy/psiprivacymanager.cpp
- +++ b/src/privacy/psiprivacymanager.cpp
- @@ -653,7 +653,7 @@ PrivacyList* PsiPrivacyManager::blockedList() const
- if(lists_.contains(blockedListName_))
- return lists_[blockedListName_];
- - return 0;
- + return nullptr;
- }
- QStringList PsiPrivacyManager::blockedContacts() const
- diff --git a/src/proxy.cpp b/src/proxy.cpp
- index a5dd0f2e..56f8ccf2 100644
- --- a/src/proxy.cpp
- +++ b/src/proxy.cpp
- @@ -142,8 +142,8 @@ public slots:
- {
- q->ui_.lbx_proxy->clear();
- - QListWidgetItem* firstItem = 0;
- - QListWidgetItem* currentItem = 0;
- + QListWidgetItem* firstItem = nullptr;
- + QListWidgetItem* currentItem = nullptr;
- foreach(ProxyItem i, list) {
- QListWidgetItem* item = new QListWidgetItem(i.name);
- addItem(item);
- @@ -515,7 +515,7 @@ public:
- };
- ProxyManager::ProxyManager()
- - : QObject(0)
- + : QObject(nullptr)
- {
- d = new Private;
- }
- @@ -585,7 +585,7 @@ void ProxyManager::openDialog(QString def)
- if(d->pd)
- bringToFront(d->pd);
- else {
- - d->pd = new ProxyDlg(itemList(), def, 0);
- + d->pd = new ProxyDlg(itemList(), def, nullptr);
- connect(d->pd, SIGNAL(applyList(const ProxyItemList &, int)), SLOT(pd_applyList(const ProxyItemList &, int)));
- d->pd->show();
- }
- diff --git a/src/psiactionlist.cpp b/src/psiactionlist.cpp
- index ab55d5d8..758a9da1 100644
- --- a/src/psiactionlist.cpp
- +++ b/src/psiactionlist.cpp
- @@ -115,7 +115,7 @@ void PsiActionList::Private::createCommon()
- ActionNames actions[] = {
- { "separator", separatorAction },
- { "spacer", spacerAction },
- - { "", 0 }
- + { "", nullptr }
- };
- createActionList( tr( "Common Actions" ), Actions_Common, actions );
- @@ -130,26 +130,26 @@ void PsiActionList::Private::createMainWin()
- viewGroups->setUsesDropDown(true);
- viewGroups->setExclusive(false);
- - IconAction *actEnableGroups = new IconAction(tr("Show Roster Groups"), "psi/enable-groups", tr("Show Roster Groups"), 0, viewGroups, 0, true);
- + IconAction *actEnableGroups = new IconAction(tr("Show Roster Groups"), "psi/enable-groups", tr("Show Roster Groups"), 0, viewGroups, nullptr, true);
- actEnableGroups->setWhatsThis(tr("Enable/disable groups in roster"));
- - IconAction *showOffline = new IconAction(tr("Show Offline Contacts"), "psi/show_offline", tr("Show Offline Contacts"), 0, viewGroups, 0, true);
- + IconAction *showOffline = new IconAction(tr("Show Offline Contacts"), "psi/show_offline", tr("Show Offline Contacts"), 0, viewGroups, nullptr, true);
- showOffline->setWhatsThis(tr("Toggles visibility of offline contacts in roster"));
- /*IconAction *showAway = new IconAction(tr("Show Away/XA/DnD Contacts"), "psi/show_away", tr("Show Away/XA/DnD Contacts"), 0,
- PsiOptions::instance()->getOption("options.ui.menu.view.show-away").toBool() ? (QObject*)viewGroups : (QObject*)this, 0, true);
- showAway->setWhatsThis(tr("Toggles visibility of away/xa/dnd contacts in roster"));*/
- - IconAction *showHidden = new IconAction(tr("Show Hidden Contacts"), "psi/show_hidden", tr("Show Hidden Contacts"), 0, viewGroups, 0, true);
- + IconAction *showHidden = new IconAction(tr("Show Hidden Contacts"), "psi/show_hidden", tr("Show Hidden Contacts"), 0, viewGroups, nullptr, true);
- showHidden->setWhatsThis(tr("Toggles visibility of hidden contacts in roster"));
- - IconAction *showAgents = new IconAction(tr("Show Agents/Transports"), "psi/disco", tr("Show Agents/Transports"), 0, viewGroups, 0, true);
- + IconAction *showAgents = new IconAction(tr("Show Agents/Transports"), "psi/disco", tr("Show Agents/Transports"), 0, viewGroups, nullptr, true);
- showAgents->setWhatsThis(tr("Toggles visibility of agents/transports in roster"));
- - IconAction *showSelf = new IconAction(tr("Show Self Contact"), "psi/show_self", tr("Show Self Contact"), 0, viewGroups, 0, true);
- + IconAction *showSelf = new IconAction(tr("Show Self Contact"), "psi/show_self", tr("Show Self Contact"), 0, viewGroups, nullptr, true);
- showSelf->setWhatsThis(tr("Toggles visibility of self contact in roster"));
- - IconAction *showStatusMsg = new IconAction(tr("Show Status Messages"), "psi/statusmsg", tr("Show Status Messages"), 0, viewGroups, 0, true);
- + IconAction *showStatusMsg = new IconAction(tr("Show Status Messages"), "psi/statusmsg", tr("Show Status Messages"), 0, viewGroups, nullptr, true);
- showSelf->setWhatsThis(tr("Toggles visibility of status messages of contacts"));
- ActionNames actions[] = {
- @@ -161,19 +161,19 @@ void PsiActionList::Private::createMainWin()
- { "show_agents", showAgents },
- { "show_self", showSelf },
- { "show_statusmsg", showStatusMsg },
- - { "", 0 }
- + { "", nullptr }
- };
- createActionList(tr("Show Contacts"), Actions_MainWin, actions);
- }
- {
- - PopupAction *optionsButton = new PopupAction (tr("&Psi"), 0, this, "optionsButton");
- + PopupAction *optionsButton = new PopupAction (tr("&Psi"), nullptr, this, "optionsButton");
- optionsButton->setWhatsThis (tr("The main Psi button, that provides access to many actions"));
- optionsButton->setSizePolicy ( QSizePolicy( QSizePolicy::Maximum, QSizePolicy::Preferred ) );
- optionsButton->setIcon ( IconsetFactory::iconPtr("psi/main"), false );
- - PopupAction *statusButton = new PopupAction (tr("&Status"), 0, this, "statusButton");
- + PopupAction *statusButton = new PopupAction (tr("&Status"), nullptr, this, "statusButton");
- statusButton->setWhatsThis (tr("Provides a convenient way to change and to get information about current status"));
- statusButton->setSizePolicy ( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
- @@ -188,7 +188,7 @@ void PsiActionList::Private::createMainWin()
- { "button_status", statusButton },
- { "active_contacts",actActiveContacts},
- { "event_notifier", eventNotifier },
- - { "", 0 }
- + { "", nullptr }
- };
- createActionList( tr( "Buttons" ), Actions_MainWin, actions );
- @@ -196,13 +196,13 @@ void PsiActionList::Private::createMainWin()
- {
- - IconAction *add_act = 0;
- + IconAction *add_act = nullptr;
- if (!PsiOptions::instance()->getOption("options.ui.contactlist.lockdown-roster").toBool())
- add_act = new MAction(IconsetFactory::icon("psi/addContact"), tr("&Add a Contact"), 0, psi, this);
- IconAction *lw_act = new MAction(IconsetFactory::icon("psi/xml"), tr("&XML Console"), 2, psi, this);
- - IconAction *actDisco = 0;
- + IconAction *actDisco = nullptr;
- if(!PsiOptions::instance()->getOption("options.ui.contactlist.disable-service-discovery").toBool())
- actDisco = new MAction(IconsetFactory::icon("psi/disco"), tr("Service &Discovery"), 3, psi, this);
- @@ -228,7 +228,7 @@ void PsiActionList::Private::createMainWin()
- IconAction *actToolbars = new IconAction(tr("Configure Toolbars"), "psi/toolbars", tr("Configure Tool&bars"), 0, this);
- IconAction *actChangeProfile = new IconAction (tr("Change Profile"), "psi/profile", tr("&Change Profile"), 0, this);
- - IconAction *actPlaySounds = new IconAction (tr("Play Sounds"), "psi/playSounds", tr("Play &Sounds"), 0, this, 0, true);
- + IconAction *actPlaySounds = new IconAction (tr("Play Sounds"), "psi/playSounds", tr("Play &Sounds"), 0, this, nullptr, true);
- actPlaySounds->setWhatsThis (tr("Toggles whether sound should be played or not"));
- IconAction *actQuit = new IconAction (tr("Quit"), "psi/quit", tr("&Quit"), 0, this);
- @@ -255,7 +255,7 @@ void PsiActionList::Private::createMainWin()
- { "menu_change_profile", actChangeProfile },
- { "menu_play_sounds", actPlaySounds },
- { "menu_quit", actQuit },
- - { "", 0 }
- + { "", nullptr }
- };
- createActionList( tr( "Menu Items" ), Actions_MainWin, actions );
- @@ -263,7 +263,7 @@ void PsiActionList::Private::createMainWin()
- #ifdef USE_PEP
- {
- - IconAction *actPublishTune = new IconAction (tr("Publish Tune"), "psi/publishTune", tr("Publish &Tune"), 0, this, 0, true);
- + IconAction *actPublishTune = new IconAction (tr("Publish Tune"), "psi/publishTune", tr("Publish &Tune"), 0, this, nullptr, true);
- actPublishTune->setWhatsThis (tr("Toggles whether the currently playing tune should be published or not"));
- IconAction *actSetMood = new IconAction (tr("Set Mood"), "pep/mood", tr("Set Mood"), 0, this);
- @@ -280,7 +280,7 @@ void PsiActionList::Private::createMainWin()
- { "set_mood", actSetMood },
- { "set_activity", actSetActivity },
- { "set_geoloc", actSetGeoloc },
- - { "", 0 }
- + { "", nullptr }
- };
- createActionList( tr( "Publish" ), Actions_MainWin, actions );
- @@ -346,7 +346,7 @@ void PsiActionList::Private::createMainWin()
- { "status_offline", statusOffline },
- { "choose_status", chooseStatus },
- { "reconnect_all", reconnectAll },
- - { "", 0 }
- + { "", nullptr }
- };
- statusActionList = createActionList( tr( "Status" ), Actions_MainWin, actions );
- @@ -401,7 +401,7 @@ void PsiActionList::Private::createMainWin()
- { "help_about_psimedia", actAboutPsiMedia },
- { "help_diag_qcaplugin", actDiagQCAPlugin },
- { "help_diag_qcakeystore", actDiagQCAKeyStore },
- - { "", 0 }
- + { "", nullptr }
- };
- createActionList( tr( "Help" ), Actions_MainWin, actions );
- @@ -434,7 +434,7 @@ void PsiActionList::Private::createChat()
- IconAction *actIcon = new IconAction(tr("Select Icon"), "psi/smile", tr("Select Icon"), 0, this);
- IconAction *actVoice = new IconAction(tr("Voice Call"), "psi/avcall", tr("Voice Call"), 0, this);
- IconAction *actFile = new IconAction(tr("Send File"), "psi/upload", tr("Send File"), 0, this);
- - IconAction *actPgp = new IconAction(tr("Toggle Encryption"), "psi/cryptoYes", tr("Toggle Encryption"), 0, this, 0, true);
- + IconAction *actPgp = new IconAction(tr("Toggle Encryption"), "psi/cryptoYes", tr("Toggle Encryption"), 0, this, nullptr, true);
- IconAction *actInfo = new IconAction(tr("User Info"), "psi/vCard", tr("User Info"), 0, this);
- IconAction *actHistory = new IconAction(tr("Message History"), "psi/history", tr("Message History"), 0, this);
- IconAction *actCompact = new IconAction(tr("Toggle Compact/Full Size"), "psi/compact", tr("Toggle Compact/Full Size"), 0, this);
- @@ -453,7 +453,7 @@ void PsiActionList::Private::createChat()
- { "chat_history", actHistory },
- { "chat_compact", actCompact },
- { "chat_active_contacts", actActiveContacts },
- - { "", 0 }
- + { "", nullptr }
- };
- createActionList(tr("Chat basic buttons"), Actions_Chat, actions);
- @@ -477,7 +477,7 @@ void PsiActionList::Private::createGroupchat()
- { "gchat_html_text", actHtmlText },
- { "gchat_configure", actConfigure },
- { "gchat_icon", actIcon },
- - { "", 0 }
- + { "", nullptr }
- };
- createActionList(tr("Groupchat basic buttons"), Actions_Groupchat, actions);
- diff --git a/src/psichatdlg.cpp b/src/psichatdlg.cpp
- index 98a49c02..6259e579 100644
- --- a/src/psichatdlg.cpp
- +++ b/src/psichatdlg.cpp
- @@ -55,7 +55,7 @@
- #define MCMDCHAT "https://psi-im.org/ids/mcmd#chatmain"
- -PsiIcon* PsiChatDlg::throbber_icon = 0;
- +PsiIcon* PsiChatDlg::throbber_icon = nullptr;
- class PsiChatDlg::ChatDlgMCmdProvider : public QObject, public MCmdProviderIface {
- Q_OBJECT
- @@ -74,25 +74,25 @@ public:
- //qDebug() << "querying: " << dlg_->jid().full();
- version->get(dlg_->jid());
- version->go();
- - newstate = 0;
- + newstate = nullptr;
- } else if (cmd == "idle") {
- LastActivityTask *idle = new LastActivityTask(dlg_->jid(), dlg_->account()->client()->rootTask());
- connect(idle, SIGNAL(finished()), SLOT(lastactivity_finished()));
- idle->go();
- - newstate = 0;
- + newstate = nullptr;
- } else if (cmd == "clear") {
- dlg_->doClear();
- - newstate = 0;
- + newstate = nullptr;
- } else if (cmd == "vcard") {
- dlg_->doInfo();
- - newstate = 0;
- + newstate = nullptr;
- } else if (cmd == "auth") {
- if (command.count() == 2) {
- if (command[1].toLower() == "request") {
- dlg_->account()->actionAuthRequest(dlg_->jid());
- }
- }
- - newstate = 0;
- + newstate = nullptr;
- } else if (cmd == "compact") {
- if (command.count() == 2) {
- QString sub = command[1].toLower();
- @@ -107,7 +107,7 @@ public:
- dlg_->smallChat_ = !dlg_->smallChat_;
- }
- dlg_->setLooks();
- - newstate = 0;
- + newstate = nullptr;
- } else if (!cmd.isEmpty()) {
- return false;
- }
- @@ -274,7 +274,7 @@ void PsiChatDlg::initUi()
- ui_.log->realTextWidget()->installEventFilter(this);
- ui_.mini_prompt->hide();
- - if (throbber_icon == 0) {
- + if (throbber_icon == nullptr) {
- throbber_icon = (PsiIcon *)IconsetFactory::iconPtr("psi/throbber");
- }
- #ifdef PSI_PLUGINS
- @@ -344,7 +344,7 @@ void PsiChatDlg::setLooks()
- QIcon i;
- i.addPixmap(IconsetFactory::icon("psi/cryptoNo").impix(), QIcon::Normal, QIcon::Off);
- i.addPixmap(IconsetFactory::icon("psi/cryptoYes").impix(), QIcon::Normal, QIcon::On);
- - actions_->action("chat_pgp")->setPsiIcon(0);
- + actions_->action("chat_pgp")->setPsiIcon(nullptr);
- actions_->action("chat_pgp")->setIcon(i);
- }
- @@ -449,7 +449,7 @@ void PsiChatDlg::initToolButtons()
- {
- // typeahead find
- QHBoxLayout *hb3a = new QHBoxLayout();
- - typeahead_ = new TypeAheadFindBar(ui_.log->textWidget(), tr("Find toolbar"), 0);
- + typeahead_ = new TypeAheadFindBar(ui_.log->textWidget(), tr("Find toolbar"), nullptr);
- hb3a->addWidget( typeahead_ );
- ui_.vboxLayout1->addLayout(hb3a);
- // -- typeahead
- diff --git a/src/psicon.cpp b/src/psicon.cpp
- index aa63eeaf..10ca94a1 100644
- --- a/src/psicon.cpp
- +++ b/src/psicon.cpp
- @@ -972,7 +972,7 @@ QWidget *PsiCon::dialogFind(const char *className)
- return i->widget;
- }
- }
- - return 0;
- + return nullptr;
- }
- QMenuBar* PsiCon::defaultMenuBar() const
- @@ -1288,12 +1288,12 @@ void PsiCon::openUri(const QUrl &uri)
- // scheme
- if (uri.scheme() != "xmpp") {
- - QMessageBox::critical(0, tr("Unsupported URI type"), QString("URI (link) type \"%1\" is not supported.").arg(uri.scheme()));
- + QMessageBox::critical(nullptr, tr("Unsupported URI type"), QString("URI (link) type \"%1\" is not supported.").arg(uri.scheme()));
- return;
- }
- // authority
- - PsiAccount *pa = 0;
- + PsiAccount *pa = nullptr;
- //if (uri.authority().isEmpty()) {
- TabbableWidget* tw = findActiveTab();
- if (tw) {
- @@ -1304,7 +1304,7 @@ void PsiCon::openUri(const QUrl &uri)
- }
- if (!pa) {
- - QMessageBox::critical(0, tr("Error"), QString("You need to have an account configured and enabled to open URIs (links)."));
- + QMessageBox::critical(nullptr, tr("Error"), QString("You need to have an account configured and enabled to open URIs (links)."));
- return;
- }
- //
- @@ -1716,13 +1716,13 @@ void PsiCon::processEvent(const PsiEvent::Ptr &e, ActivationType activationType)
- e->account()->cpUpdate(*u);
- if(sess) {
- if(!sess->jid().isEmpty()) {
- - CallDlg *w = new CallDlg(e->account(), 0);
- + CallDlg *w = new CallDlg(e->account(), nullptr);
- w->setAttribute(Qt::WA_DeleteOnClose);
- w->setIncoming(sess);
- bringToFront(w);
- }
- else {
- - QMessageBox::information(0, tr("Call ended"), tr("Other party canceled call."));
- + QMessageBox::information(nullptr, tr("Call ended"), tr("Other party canceled call."));
- delete sess;
- }
- }
- @@ -1880,7 +1880,7 @@ void PsiCon::s5b_init()
- int port = PsiOptions::instance()->getOption("options.p2p.bytestreams.listen-port").toInt();
- if (port) {
- if(!d->s5bServer->start(port)) {
- - 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));
- + 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));
- }
- }
- }
- diff --git a/src/psicontact.cpp b/src/psicontact.cpp
- index ebf3d192..398e7e7f 100644
- --- a/src/psicontact.cpp
- +++ b/src/psicontact.cpp
- @@ -50,7 +50,7 @@ public:
- Private(PsiContact* contact)
- : Alertable()
- , q(contact)
- - , account_(0)
- + , account_(nullptr)
- , statusTimer_(nullptr)
- , animTimer_(nullptr)
- , oldStatus_(XMPP::Status::Offline)
- @@ -141,10 +141,10 @@ PsiContact::PsiContact(const UserListItem& u, PsiAccount* account, bool isSelf)
- }
- PsiContact::PsiContact()
- - : QObject(0)
- + : QObject(nullptr)
- {
- d = new Private(this);
- - d->account_ = 0;
- + d->account_ = nullptr;
- }
- /**
- @@ -262,7 +262,7 @@ QIcon PsiContact::picture() const
- ContactListItemMenu* PsiContact::contextMenu(ContactListModel* model)
- {
- if (!account())
- - return 0;
- + return nullptr;
- return new PsiContactMenu(this, model);
- }
- diff --git a/src/psicontactlist.cpp b/src/psicontactlist.cpp
- index d817a36b..9d2021a2 100644
- --- a/src/psicontactlist.cpp
- +++ b/src/psicontactlist.cpp
- @@ -167,7 +167,7 @@ PsiAccount *PsiContactList::defaultAccount() const
- if (!enabledAccounts_.isEmpty()) {
- return enabledAccounts_.first();
- }
- - return 0;
- + return nullptr;
- }
- /**
- @@ -263,7 +263,7 @@ int PsiContactList::queueContactCount() const
- */
- PsiAccount* PsiContactList::queueLowestEventId()
- {
- - PsiAccount *low = 0;
- + PsiAccount *low = nullptr;
- // first try to get event from non-dnd account
- low = tryQueueLowestEventId(false);
- @@ -458,7 +458,7 @@ void PsiContactList::setContactSortStyle(QString style)
- PsiAccount *PsiContactList::tryQueueLowestEventId(bool includeDND)
- {
- - PsiAccount *low = 0;
- + PsiAccount *low = nullptr;
- int low_id = 0;
- int low_prior = EventPriorityDontCare;
- @@ -496,7 +496,7 @@ PsiAccount* PsiContactList::getAccount(const QString& id) const
- if (account->id() == id)
- return account;
- - return 0;
- + return nullptr;
- }
- PsiAccount* PsiContactList::getAccountByJid(const XMPP::Jid& jid) const
- @@ -505,7 +505,7 @@ PsiAccount* PsiContactList::getAccountByJid(const XMPP::Jid& jid) const
- if (account->jid().compare(jid, false))
- return account;
- - return 0;
- + return nullptr;
- }
- const QList<PsiContact*>& PsiContactList::contacts() const
- diff --git a/src/psicontactmenu.cpp b/src/psicontactmenu.cpp
- index 30242d79..4b2236e5 100644
- --- a/src/psicontactmenu.cpp
- +++ b/src/psicontactmenu.cpp
- @@ -57,10 +57,10 @@
- //----------------------------------------------------------------------------
- PsiContactMenu::Private::Private(PsiContactMenu* menu, PsiContact* _contact)
- - : QObject(0)
- + : QObject(nullptr)
- , contact_(_contact)
- , menu_(menu)
- - , authMenu_(0)
- + , authMenu_(nullptr)
- {
- Jid jid = _contact->jid();
- menu->setLabelTitle(_contact->isPrivate() ? jid.full() : jid.bare());
- @@ -180,10 +180,10 @@ PsiContactMenu::Private::Private(PsiContactMenu* menu, PsiContact* _contact)
- connect(mucLeaveAction_, SIGNAL(triggered()), SLOT(mucLeave()));
- mucLeaveAction_->setShortcuts(ShortcutManager::instance()->shortcuts("common.close"));
- - blockAction_ = new IconAction(tr("Block"), "psi/stop", tr("Block"), 0, this, 0, true);
- + blockAction_ = new IconAction(tr("Block"), "psi/stop", tr("Block"), 0, this, nullptr, true);
- connect(blockAction_, SIGNAL(triggered(bool)), SLOT(block(bool)));
- - visibleAction_ = new IconAction(tr("Always Visible"), "psi/eye", tr("Always Visible"), 0, this, 0, true);
- + visibleAction_ = new IconAction(tr("Always Visible"), "psi/eye", tr("Always Visible"), 0, this, nullptr, true);
- connect(visibleAction_, SIGNAL(triggered(bool)), SLOT(setAlwaysVisible(bool)));
- _copyUserJid = new IconAction(tr("Copy User JID"), "", tr("Copy User JID"), 0 , this);
- @@ -431,7 +431,7 @@ void PsiContactMenu::Private::inviteToGroupchat(PsiAccount* account, QString gro
- if (!contact_)
- return;
- account->actionInvite(contact_->jid(), groupchat);
- - QMessageBox::information(0, tr("Invitation"),
- + QMessageBox::information(nullptr, tr("Invitation"),
- tr("Sent groupchat invitation to <b>%1</b>.").arg(contact_->name()));
- }
- @@ -468,7 +468,7 @@ void PsiContactMenu::Private::addAuth()
- else
- contact_->account()->actionAdd(contact_->jid());
- - QMessageBox::information(0, tr("Add"),
- + QMessageBox::information(nullptr, tr("Add"),
- tr("Added/Authorized <b>%1</b> to the contact list.").arg(contact_->name()));
- }
- @@ -536,7 +536,7 @@ void PsiContactMenu::Private::authResend()
- if (!contact_)
- return;
- contact_->account()->actionAuth(contact_->jid());
- - QMessageBox::information(0, tr("Authorize"),
- + QMessageBox::information(nullptr, tr("Authorize"),
- tr("Sent authorization to <b>%1</b>.").arg(contact_->name()));
- }
- @@ -545,7 +545,7 @@ void PsiContactMenu::Private::authRerequest()
- if (!contact_)
- return;
- contact_->account()->actionAuthRequest(contact_->jid());
- - QMessageBox::information(0, tr("Authorize"),
- + QMessageBox::information(nullptr, tr("Authorize"),
- tr("Rerequested authorization from <b>%1</b>.").arg(contact_->name()));
- }
- @@ -554,7 +554,7 @@ void PsiContactMenu::Private::authRemove()
- if (!contact_)
- return;
- - int n = QMessageBox::information(0, tr("Remove"),
- + int n = QMessageBox::information(nullptr, tr("Remove"),
- tr("Are you sure you want to remove authorization from <b>%1</b>?").arg(contact_->name()),
- tr("&Yes"), tr("&No"));
- @@ -574,7 +574,7 @@ void PsiContactMenu::Private::pictureAssign()
- {
- if (!contact_)
- return;
- - QString file = QFileDialog::getOpenFileName(0, tr("Choose an Image"), "", tr("All files (*.png *.jpg *.gif)"));
- + QString file = QFileDialog::getOpenFileName(nullptr, tr("Choose an Image"), "", tr("All files (*.png *.jpg *.gif)"));
- if (!file.isNull()) {
- contact_->account()->avatarFactory()->importManualAvatar(contact_->jid(),file);
- }
- diff --git a/src/psidbusnotifier.cpp b/src/psidbusnotifier.cpp
- index 6a3dd00c..9461514f 100644
- --- a/src/psidbusnotifier.cpp
- +++ b/src/psidbusnotifier.cpp
- @@ -104,7 +104,7 @@ static QDBusMessage createMessage(const QString& method)
- PsiDBusNotifier::PsiDBusNotifier(QObject *parent)
- : QObject(parent)
- , id_(0)
- - , account_(0)
- + , account_(nullptr)
- , lifeTimer_(new QTimer(this))
- {
- QDBusConnection::sessionBus().connect("org.freedesktop.Notifications",
- @@ -168,7 +168,7 @@ void PsiDBusNotifier::popup(PsiAccount* account, PopupManager::PopupType type, c
- if (((int)statusMsg.length()) > len)
- statusMsg = statusMsg.left(len) + "...";
- bool doAlert = false;
- - PsiIcon* ico = 0;
- + PsiIcon* ico = nullptr;
- if (uli && !uli->name().isEmpty()) {
- contact = uli->name();
- diff --git a/src/psievent.cpp b/src/psievent.cpp
- index 2ad87259..eb993498 100644
- --- a/src/psievent.cpp
- +++ b/src/psievent.cpp
- @@ -181,7 +181,7 @@ QString PsiEvent::description() const
- PsiEvent *PsiEvent::copy() const
- {
- - return 0;
- + return nullptr;
- }
- #ifdef PSI_PLUGINS
- @@ -687,7 +687,7 @@ private:
- EventIdGenerator();
- };
- -EventIdGenerator* EventIdGenerator::instance_ = 0;
- +EventIdGenerator* EventIdGenerator::instance_ = nullptr;
- EventIdGenerator* EventIdGenerator::instance()
- {
- @@ -753,7 +753,7 @@ void AvCallEvent::setFrom(const XMPP::Jid &j)
- AvCall *AvCallEvent::takeAvCall()
- {
- AvCall *_sess = sess;
- - sess = 0;
- + sess = nullptr;
- return _sess;
- }
- @@ -808,8 +808,8 @@ PsiEvent::Ptr EventItem::event() const
- //----------------------------------------------------------------------------
- EventQueue::EventQueue(PsiAccount *account)
- - : psi_(0)
- - , account_(0)
- + : psi_(nullptr)
- + , account_(nullptr)
- , enabled_(false)
- {
- account_ = account;
- @@ -819,8 +819,8 @@ EventQueue::EventQueue(PsiAccount *account)
- EventQueue::EventQueue(const EventQueue &from)
- : QObject()
- , list_()
- - , psi_(0)
- - , account_(0)
- + , psi_(nullptr)
- + , account_(nullptr)
- , enabled_(false)
- {
- Q_ASSERT(false);
- @@ -1160,14 +1160,14 @@ bool EventQueue::fromXml(const QDomElement *q)
- PsiEvent::Ptr event;
- QString eventType = e.attribute("type");
- if ( eventType == "MessageEvent" ) {
- - event = MessageEvent::Ptr(new MessageEvent(0));
- + event = MessageEvent::Ptr(new MessageEvent(nullptr));
- if ( !event->fromXml(psi_, account_, &e) ) {
- //delete event;
- event.clear();
- }
- }
- else if ( eventType == "AuthEvent" ) {
- - event = AuthEvent::Ptr(new AuthEvent("", "", 0));
- + event = AuthEvent::Ptr(new AuthEvent("", "", nullptr));
- if ( !event->fromXml(psi_, account_, &e) ) {
- //delete event;
- event.clear();
- diff --git a/src/psiiconset.cpp b/src/psiiconset.cpp
- index 55bba420..ea9642c0 100644
- --- a/src/psiiconset.cpp
- +++ b/src/psiiconset.cpp
- @@ -352,7 +352,7 @@ PsiIconset::~PsiIconset()
- void PsiIconset::reset()
- {
- delete instance_;
- - instance_ = 0;
- + instance_ = nullptr;
- IconsetFactory::reset();
- }
- @@ -858,7 +858,7 @@ PsiIcon PsiIconset::status(const XMPP::Status &s)
- PsiIcon *PsiIconset::transportStatusPtr(QString name, int s)
- {
- - PsiIcon *icon = 0;
- + PsiIcon *icon = nullptr;
- QVariantList serviceicons = PsiOptions::instance()->mapKeyList("options.iconsets.service-status");
- if (serviceicons.contains(name)) {
- @@ -926,7 +926,7 @@ PsiIcon PsiIconset::status(const XMPP::Jid &jid, const XMPP::Status &s)
- PsiIcon *PsiIconset::statusPtr(UserListItem *u)
- {
- if ( !u )
- - return 0;
- + return nullptr;
- int s = 0;
- if ( !u->presenceError().isEmpty() )
- diff --git a/src/psimedia/psimedia.cpp b/src/psimedia/psimedia.cpp
- index 84fa474a..432af898 100644
- --- a/src/psimedia/psimedia.cpp
- +++ b/src/psimedia/psimedia.cpp
- @@ -105,8 +105,8 @@ static PPayloadInfo exportPayloadInfo(const PayloadInfo &p)
- //----------------------------------------------------------------------------
- // Global
- //----------------------------------------------------------------------------
- -static Provider *g_provider = 0;
- -static QPluginLoader *g_pluginLoader = 0;
- +static Provider *g_provider = nullptr;
- +static QPluginLoader *g_pluginLoader = nullptr;
- static void cleanupProvider();
- @@ -115,7 +115,7 @@ Provider *provider()
- if(!g_provider)
- {
- // static plugin around?
- - Provider *provider = 0;
- + Provider *provider = nullptr;
- QObjectList list = QPluginLoader::staticInstances();
- foreach(QObject *obj, list)
- {
- @@ -136,7 +136,7 @@ Provider *provider()
- if(!provider->init(QString()))
- {
- delete provider;
- - return 0;
- + return nullptr;
- }
- g_provider = provider;
- @@ -199,13 +199,13 @@ void cleanupProvider()
- return;
- delete g_provider;
- - g_provider = 0;
- + g_provider = nullptr;
- if(g_pluginLoader)
- {
- g_pluginLoader->unload();
- delete g_pluginLoader;
- - g_pluginLoader = 0;
- + g_pluginLoader = nullptr;
- }
- }
- @@ -252,12 +252,12 @@ public:
- // Device
- //----------------------------------------------------------------------------
- Device::Device() :
- - d(0)
- + d(nullptr)
- {
- }
- Device::Device(const Device &other) :
- - d(other.d ? new Private(*other.d) : 0)
- + d(other.d ? new Private(*other.d) : nullptr)
- {
- }
- @@ -280,7 +280,7 @@ Device & Device::operator=(const Device &other)
- else
- {
- delete d;
- - d = 0;
- + d = nullptr;
- }
- }
- else
- @@ -616,7 +616,7 @@ public:
- };
- RtpPacket::RtpPacket() :
- - d(0)
- + d(nullptr)
- {
- }
- @@ -930,7 +930,7 @@ void RtpSession::setAudioOutputDevice(const QString &deviceId)
- #ifdef QT_GUI_LIB
- void RtpSession::setVideoOutputWidget(VideoWidget *widget)
- {
- - d->c->setVideoOutputWidget(widget ? widget->d : 0);
- + d->c->setVideoOutputWidget(widget ? widget->d : nullptr);
- }
- #endif
- @@ -962,7 +962,7 @@ void RtpSession::setFileLoopEnabled(bool enabled)
- #ifdef QT_GUI_LIB
- void RtpSession::setVideoPreviewWidget(VideoWidget *widget)
- {
- - d->c->setVideoPreviewWidget(widget ? widget->d : 0);
- + d->c->setVideoPreviewWidget(widget ? widget->d : nullptr);
- }
- #endif
- diff --git a/src/psioptions.cpp b/src/psioptions.cpp
- index e4521060..901b0a7c 100644
- --- a/src/psioptions.cpp
- +++ b/src/psioptions.cpp
- @@ -128,7 +128,7 @@ const PsiOptions* PsiOptions::defaults()
- */
- void PsiOptions::reset() {
- delete instance_;
- - instance_ = 0;
- + instance_ = nullptr;
- }
- @@ -285,7 +285,7 @@ bool PsiOptions::save(QString file)
- PsiOptions::PsiOptions()
- : OptionsTree()
- - , autoSaveTimer_(0)
- + , autoSaveTimer_(nullptr)
- {
- autoSaveTimer_ = new QTimer(this);
- autoSaveTimer_->setSingleShot(true);
- diff --git a/src/psioptionseditor.cpp b/src/psioptionseditor.cpp
- index 1fb1a607..b706303b 100644
- --- a/src/psioptionseditor.cpp
- +++ b/src/psioptionseditor.cpp
- @@ -41,7 +41,7 @@ OptionEditor::supportedType OptionEditor::supportedTypes[] = {
- {"QString", QVariant::String},
- {"QColor", QVariant::Color},
- // {"QStringList", QVariant::StringList}, doesn't work
- - {0, QVariant::Invalid}};
- + {nullptr, QVariant::Invalid}};
- OptionEditor::OptionEditor(bool new_, QString name_, QVariant value_)
- diff --git a/src/psipopup.cpp b/src/psipopup.cpp
- index 287a646c..a5eac798 100644
- --- a/src/psipopup.cpp
- +++ b/src/psipopup.cpp
- @@ -52,7 +52,7 @@ static int MaxPopups = 5;
- /**
- * Holds a list of Psi Popups.
- */
- -static QList<PsiPopup *> *psiPopupList = 0;
- +static QList<PsiPopup *> *psiPopupList = nullptr;
- //----------------------------------------------------------------------------
- // PsiPopup::Private
- @@ -108,7 +108,7 @@ PsiPopup::Private::~Private()
- delete popup;
- if ( titleIcon )
- delete titleIcon;
- - popup = 0;
- + popup = nullptr;
- }
- void PsiPopup::Private::init(const PsiIcon *_titleIcon, const QString& titleText, PsiAccount *acc)
- @@ -124,7 +124,7 @@ void PsiPopup::Private::init(const PsiIcon *_titleIcon, const QString& titleText
- if ( psiPopupList->count() >= MaxPopups && MaxPopups > 0 )
- delete psiPopupList->first();
- - FancyPopup *lastPopup = 0;
- + FancyPopup *lastPopup = nullptr;
- if ( psiPopupList->count() && psiPopupList->last() )
- lastPopup = psiPopupList->last()->popup();
- @@ -148,7 +148,7 @@ void PsiPopup::Private::init(const PsiIcon *_titleIcon, const QString& titleText
- void PsiPopup::Private::popupDestroyed()
- {
- - popup = 0;
- + popup = nullptr;
- psiPopup->deleteLater();
- }
- @@ -225,7 +225,7 @@ PsiPopup::~PsiPopup()
- void PsiPopup::popup(PsiAccount *acc, PopupManager::PopupType type, const Jid &j, const Resource &r, const UserListItem *item, const PsiEvent::Ptr &event)
- {
- d->popupType = type;
- - PsiIcon *icon = 0;
- + PsiIcon *icon = nullptr;
- QString text = title(type, &d->doAlertIcon, &icon);
- d->init(icon, text, acc);
- setData(j, r, item, event);
- @@ -440,7 +440,7 @@ void PsiPopup::deleteAll()
- psiPopupList->clear();
- delete psiPopupList;
- - psiPopupList = 0;
- + psiPopupList = nullptr;
- }
- #include "psipopup.moc"
- diff --git a/src/psirosterwidget.cpp b/src/psirosterwidget.cpp
- index 70127114..4829d81f 100644
- --- a/src/psirosterwidget.cpp
- +++ b/src/psirosterwidget.cpp
- @@ -108,12 +108,12 @@ protected:
- PsiRosterWidget::PsiRosterWidget(QWidget* parent)
- : QWidget(parent)
- - , stackedWidget_(0)
- - , contactListPage_(0)
- - , filterPage_(0)
- - , contactListPageView_(0)
- - , filterPageView_(0)
- - , contactListModel_(0)
- + , stackedWidget_(nullptr)
- + , contactListPage_(nullptr)
- + , filterPage_(nullptr)
- + , contactListPageView_(nullptr)
- + , filterPageView_(nullptr)
- + , contactListModel_(nullptr)
- , filterModel_(nullptr)
- {
- QVBoxLayout* layout = new QVBoxLayout(this);
- @@ -125,7 +125,7 @@ PsiRosterWidget::PsiRosterWidget(QWidget* parent)
- layout->addWidget(stackedWidget_);
- // contactListPage_
- - contactListPage_ = new QWidget(0);
- + contactListPage_ = new QWidget(nullptr);
- contactListPage_->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
- stackedWidget_->addWidget(contactListPage_);
- @@ -137,7 +137,7 @@ PsiRosterWidget::PsiRosterWidget(QWidget* parent)
- contactListPageLayout->addWidget(contactListPageView_);
- // filterPage_
- - filterPage_ = new QWidget(0);
- + filterPage_ = new QWidget(nullptr);
- filterPage_->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
- filterPage_->installEventFilter(this);
- stackedWidget_->addWidget(filterPage_);
- @@ -280,8 +280,8 @@ void PsiRosterWidget::setFilterModeEnabled(bool enabled)
- if (enabled == currentlyEnabled)
- return;
- - PsiContactListView *selectionSource = 0;
- - PsiContactListView *selectionDestination = 0;
- + PsiContactListView *selectionSource = nullptr;
- + PsiContactListView *selectionDestination = nullptr;
- if (enabled) {
- Q_ASSERT(!filterModel_);
- diff --git a/src/psitrayicon.cpp b/src/psitrayicon.cpp
- index aa6cd1e2..0a414fa2 100644
- --- a/src/psitrayicon.cpp
- +++ b/src/psitrayicon.cpp
- @@ -55,7 +55,7 @@ void PsiTrayIcon::setIcon(const PsiIcon *icon, bool alert)
- icon_->stop();
- delete icon_;
- - icon_ = 0;
- + icon_ = nullptr;
- }
- realIcon_ = quintptr(icon);
- diff --git a/src/searchdlg.cpp b/src/searchdlg.cpp
- index ed220cb5..fcaaf49e 100644
- --- a/src/searchdlg.cpp
- +++ b/src/searchdlg.cpp
- @@ -173,8 +173,8 @@ SearchDlg::SearchDlg(const Jid &jid, PsiAccount *pa)
- d->pa = pa;
- d->jid = jid;
- d->pa->dialogRegister(this, d->jid);
- - d->jt = 0;
- - d->xdata = 0;
- + d->jt = nullptr;
- + d->xdata = nullptr;
- d->scrollArea = scrollArea;
- @@ -304,7 +304,7 @@ void SearchDlg::jt_finished()
- {
- d->busy->stop();
- JT_XSearch *jt = d->jt;
- - d->jt = 0;
- + d->jt = nullptr;
- if(d->type == 1) {
- d->gr_form->setEnabled(true);
- @@ -457,7 +457,7 @@ void SearchDlg::doStop()
- return;
- delete d->jt;
- - d->jt = 0;
- + d->jt = nullptr;
- d->busy->stop();
- d->gr_form->setEnabled(true);
- diff --git a/src/statusdlg.cpp b/src/statusdlg.cpp
- index d338cc55..bcf8dc2a 100644
- --- a/src/statusdlg.cpp
- +++ b/src/statusdlg.cpp
- @@ -49,7 +49,7 @@
- // FIXME: Will no longer be needed once it is out of the groupchat contactview
- //----------------------------------------------------------------------------
- StatusShowDlg::StatusShowDlg(const UserListItem &u)
- - : QDialog(0)
- + : QDialog(nullptr)
- {
- setAttribute(Qt::WA_DeleteOnClose);
- // build the dialog
- @@ -102,12 +102,12 @@ public:
- };
- StatusSetDlg::StatusSetDlg(PsiCon *psi, const Status &s, bool withPriority)
- - : QDialog(0)
- + : QDialog(nullptr)
- {
- setAttribute(Qt::WA_DeleteOnClose);
- d = new Private;
- d->psi = psi;
- - d->pa = 0;
- + d->pa = nullptr;
- d->psi->dialogRegister(this);
- d->s = s;
- d->withPriority = withPriority;
- @@ -119,11 +119,11 @@ StatusSetDlg::StatusSetDlg(PsiCon *psi, const Status &s, bool withPriority)
- }
- StatusSetDlg::StatusSetDlg(PsiAccount *pa, const Status &s, bool withPriority)
- - : QDialog(0)
- + : QDialog(nullptr)
- {
- setAttribute(Qt::WA_DeleteOnClose);
- d = new Private;
- - d->psi = 0;
- + d->psi = nullptr;
- d->pa = pa;
- d->pa->dialogRegister(this);
- d->s = s;
- diff --git a/src/sxe/sxemanager.cpp b/src/sxe/sxemanager.cpp
- index a9c5a63f..edabec40 100644
- --- a/src/sxe/sxemanager.cpp
- +++ b/src/sxe/sxemanager.cpp
- @@ -360,7 +360,7 @@ QPointer<SxeSession> SxeManager::processNegotiationMessage(const Message &messag
- // Ignore the message if contact not in roster
- if(!pa_->find(message.from())) {
- qDebug("SXE invitation received from contact that is not in roster.");
- - return 0;
- + return nullptr;
- }
- }
- @@ -371,7 +371,7 @@ QPointer<SxeSession> SxeManager::processNegotiationMessage(const Message &messag
- // Only accept further negotiation messages from the source we are already negotiationing with or if we've requested connection to a groupchat session
- if(!negotiation->peer.compare(message.from()) && !(negotiation->groupChat && negotiation->peer.resource().isEmpty())) {
- abortNegotiation(negotiation->sessionId, message.from(), true);
- - return 0;
- + return nullptr;
- }
- } else
- @@ -399,10 +399,10 @@ QPointer<SxeSession> SxeManager::processNegotiationMessage(const Message &messag
- if(negotiation->role == SxeNegotiation::Participant) {
- if(!processNegotiationAsParticipant(n.childNodes().at(j), negotiation, response))
- - return 0;
- + return nullptr;
- } else if(negotiation->role == SxeNegotiation::Joiner) {
- if(!processNegotiationAsJoiner(n.childNodes().at(j), negotiation, response, message))
- - return 0;
- + return nullptr;
- } else {
- Q_ASSERT(false);
- }
- @@ -457,7 +457,7 @@ QPointer<SxeSession> SxeManager::processNegotiationMessage(const Message &messag
- }
- }
- - return 0;
- + return nullptr;
- }
- SxeManager::SxeNegotiation* SxeManager::findNegotiation(const Jid &jid, const QString &session) {
- @@ -468,7 +468,7 @@ SxeManager::SxeNegotiation* SxeManager::findNegotiation(const Jid &jid, const QS
- return negotiation;
- }
- - return 0;
- + return nullptr;
- }
- void SxeManager::removeNegotiation(SxeNegotiation* negotiation) {
- @@ -485,7 +485,7 @@ SxeManager::SxeNegotiation* SxeManager::createNegotiation(SxeNegotiation::Role r
- negotiation->peer = target;
- negotiation->ownJid = ownJid;
- negotiation->groupChat = groupChat;
- - negotiation->session = 0;
- + negotiation->session = nullptr;
- negotiations_.insert(sessionId, negotiation);
- @@ -688,12 +688,12 @@ QPointer<SxeSession> SxeManager::findSession(const QString &session) {
- if(w->session() == session)
- return w;
- }
- - return 0;
- + return nullptr;
- }
- QPointer<SxeSession> SxeManager::createSxeSession(const Jid &target, QString session, const Jid &ownJid, bool groupChat, const QList<QString> &features) {
- if(session.isEmpty() || !target.isValid())
- - return 0;
- + return nullptr;
- if(!ownJids_.contains(ownJid.full()))
- ownJids_.append(ownJid.full());
- // FIXME: detect serverside support
- diff --git a/src/tabs/tabbablewidget.cpp b/src/tabs/tabbablewidget.cpp
- index 132ccaa0..93e62dd5 100644
- --- a/src/tabs/tabbablewidget.cpp
- +++ b/src/tabs/tabbablewidget.cpp
- @@ -35,7 +35,7 @@
- //----------------------------------------------------------------------------
- TabbableWidget::TabbableWidget(const Jid &jid, PsiAccount *pa, TabManager *tabManager)
- - : AdvancedWidget<QWidget>(0)
- + : AdvancedWidget<QWidget>(nullptr)
- , state_(ActivationState::Deactivated)
- , jid_(jid)
- , pa_(pa)
- diff --git a/src/tabs/tabdlg.cpp b/src/tabs/tabdlg.cpp
- index 658d4e66..b45c64cc 100644
- --- a/src/tabs/tabdlg.cpp
- +++ b/src/tabs/tabdlg.cpp
- @@ -60,7 +60,7 @@ TabDlgDelegate::~TabDlgDelegate()
- Qt::WindowFlags TabDlgDelegate::initWindowFlags() const
- {
- - return (Qt::WindowFlags)0;
- + return (Qt::WindowFlags)nullptr;
- }
- void TabDlgDelegate::create(QWidget *)
- @@ -128,21 +128,21 @@ bool TabDlgDelegate::tabEventFilter(QWidget *, QObject *, QEvent *)
- * passed.
- */
- TabDlg::TabDlg(TabManager* tabManager, const QString& geometryOption, TabDlgDelegate *delegate)
- - : AdvancedWidget<QWidget>(0, delegate ? delegate->initWindowFlags() : (Qt::WindowFlags)0)
- + : AdvancedWidget<QWidget>(nullptr, delegate ? delegate->initWindowFlags() : (Qt::WindowFlags)nullptr)
- , delegate_(delegate)
- - , tabWidget_(0)
- - , detachButton_(0)
- - , closeButton_(0)
- - , closeCross_(0)
- + , tabWidget_(nullptr)
- + , detachButton_(nullptr)
- + , closeButton_(nullptr)
- + , closeCross_(nullptr)
- , tabMenu_(new QMenu(this))
- - , act_close_(0)
- - , act_next_(0)
- - , act_prev_(0)
- + , act_close_(nullptr)
- + , act_next_(nullptr)
- + , act_prev_(nullptr)
- , tabManager_(tabManager)
- , userManagement_(true)
- , tabBarSingles_(true)
- , simplifiedCaption_(false)
- - , activateTabMapper_(0)
- + , activateTabMapper_(nullptr)
- {
- if (delegate_) {
- delegate_->create(this);
- @@ -230,7 +230,7 @@ void TabDlg::setShortcuts()
- qDeleteAll(tabMapperActions_);
- tabMapperActions_.clear();
- delete activateTabMapper_;
- - activateTabMapper_ = 0;
- + activateTabMapper_ = nullptr;
- }
- }
- @@ -252,7 +252,7 @@ void TabDlg::showTabMenu(int tab, QPoint pos, QContextMenuEvent * event)
- clearMenu(tabMenu_);
- if (tab != -1) {
- - QAction *d = 0;
- + QAction *d = nullptr;
- QAction *h = tabMenu_->addAction(tr("Hide Tab"));
- if(userManagement_) {
- d = tabMenu_->addAction(tr("Detach Tab"));
- @@ -499,7 +499,7 @@ void TabDlg::closeTab(TabbableWidget* chat, bool doclose)
- setUpdatesEnabled(false);
- chat->hide();
- removeTabWithNoChecks(chat);
- - chat->setParent(0);
- + chat->setParent(nullptr);
- QCoreApplication::postEvent(chat, new QEvent(QEvent::ActivationChange));
- if (tabWidget_->count() > 0) {
- updateCaption();
- @@ -604,7 +604,7 @@ TabbableWidget* TabDlg::getTabPointer(PsiAccount* account, QString fullJid)
- }
- }
- - return 0;
- + return nullptr;
- }
- void TabDlg::updateTab()
- diff --git a/src/tabs/tabmanager.cpp b/src/tabs/tabmanager.cpp
- index 7af0870f..a5345654 100644
- --- a/src/tabs/tabmanager.cpp
- +++ b/src/tabs/tabmanager.cpp
- @@ -11,7 +11,7 @@
- TabManager::TabManager(PsiCon* psiCon, QObject *parent)
- : QObject(parent)
- , psiCon_(psiCon)
- - , tabDlgDelegate_(0)
- + , tabDlgDelegate_(nullptr)
- , userManagement_(true)
- , tabSingles_(true)
- , simplifiedCaption_(false)
- @@ -144,7 +144,7 @@ TabDlg* TabManager::getManagingTabs(const TabbableWidget* chat) const
- return tabDlg;
- }
- }
- - return 0;
- + return nullptr;
- }
- const QList<TabDlg*>& TabManager::tabSets()
- diff --git a/src/textutil.cpp b/src/textutil.cpp
- index e838dcfe..07a6ab60 100644
- --- a/src/textutil.cpp
- +++ b/src/textutil.cpp
- @@ -481,7 +481,7 @@ QString TextUtil::emoticonify(const QString &in)
- while ( i >= 0 ) {
- // find closest emoticon
- int ePos = -1;
- - PsiIcon *closest = 0;
- + PsiIcon *closest = nullptr;
- int foundPos = -1, foundLen = -1;
- diff --git a/src/tipdlg.cpp b/src/tipdlg.cpp
- index bf7ee4c3..ae5bd90a 100644
- --- a/src/tipdlg.cpp
- +++ b/src/tipdlg.cpp
- @@ -43,7 +43,7 @@ void TipDlg::show(PsiCon* psi)
- * \brief A 'Tip Of The Day' dialog
- */
- TipDlg::TipDlg(PsiCon* psi)
- - : QDialog(0)
- + : QDialog(nullptr)
- , psi_(psi)
- {
- setAttribute(Qt::WA_DeleteOnClose);
- diff --git a/src/tools/advwidget/advwidget.cpp b/src/tools/advwidget/advwidget.cpp
- index b01b354d..4b4c09c3 100644
- --- a/src/tools/advwidget/advwidget.cpp
- +++ b/src/tools/advwidget/advwidget.cpp
- @@ -65,7 +65,7 @@ AdvancedWidgetShared::~AdvancedWidgetShared()
- {
- }
- -static AdvancedWidgetShared *advancedWidgetShared = 0;
- +static AdvancedWidgetShared *advancedWidgetShared = nullptr;
- //----------------------------------------------------------------------------
- // GAdvancedWidget::Private
- diff --git a/src/tools/iconset/anim.cpp b/src/tools/iconset/anim.cpp
- index e5c7166f..6ddc8142 100644
- --- a/src/tools/iconset/anim.cpp
- +++ b/src/tools/iconset/anim.cpp
- @@ -38,7 +38,7 @@
- * Each frame of Anim is stored as Impix.
- */
- -static QThread *animMainThread = 0;
- +static QThread *animMainThread = nullptr;
- //! \if _hide_doc_
- class Anim::Private : public QObject, public QSharedData
- diff --git a/src/tools/iconset/iconset.cpp b/src/tools/iconset/iconset.cpp
- index b1248bd6..1d578aba 100644
- --- a/src/tools/iconset/iconset.cpp
- +++ b/src/tools/iconset/iconset.cpp
- @@ -179,7 +179,7 @@ bool Impix::loadFromData(const QByteArray &ba)
- bool ret = false;
- delete d->pixmap;
- - d->pixmap = 0;
- + d->pixmap = nullptr;
- QImage img;
- if ( img.loadFromData(ba) ) {
- @@ -218,7 +218,7 @@ private:
- friend class PsiIcon;
- };
- -static IconSharedObject *iconSharedObject = 0;
- +static IconSharedObject *iconSharedObject = nullptr;
- //----------------------------------------------------------------------------
- // PsiIcon
- @@ -246,8 +246,8 @@ public:
- {
- moveToMainThread(this);
- - anim = 0;
- - icon = 0;
- + anim = nullptr;
- + icon = nullptr;
- activatedCount = 0;
- }
- @@ -271,8 +271,8 @@ public:
- sound = from.sound;
- impix = from.impix;
- rawData = from.rawData;
- - anim = from.anim ? new Anim ( *from.anim ) : 0;
- - icon = 0;
- + anim = from.anim ? new Anim ( *from.anim ) : nullptr;
- + icon = nullptr;
- activatedCount = from.activatedCount;
- }
- @@ -281,7 +281,7 @@ public:
- if ( anim ) {
- delete anim;
- }
- - anim = 0;
- + anim = nullptr;
- }
- void connectInstance(PsiIcon *icon)
- @@ -332,7 +332,7 @@ public:
- * Constructs empty PsiIcon.
- */
- PsiIcon::PsiIcon()
- -: QObject(0)
- +: QObject(nullptr)
- {
- moveToMainThread(this);
- @@ -352,7 +352,7 @@ PsiIcon::~PsiIcon()
- * other will be changed as well. (that's because image data is shared)
- */
- PsiIcon::PsiIcon(const PsiIcon &from)
- -: QObject(0)
- +: QObject(nullptr)
- , d(from.d)
- {
- moveToMainThread(this);
- @@ -392,7 +392,7 @@ void PsiIcon::detach()
- */
- bool PsiIcon::isAnimated() const
- {
- - return d->anim != 0;
- + return d->anim != nullptr;
- }
- /**
- @@ -480,7 +480,7 @@ void PsiIcon::setImpix(const Impix &impix, bool doDetach)
- d->impix = impix;
- if ( d->icon ) {
- delete d->icon;
- - d->icon = 0;
- + d->icon = nullptr;
- }
- emit d->pixmapChanged();
- @@ -515,7 +515,7 @@ void PsiIcon::setAnim(const Anim &anim, bool doDetach)
- if ( d->anim->numFrames() < 2 ) {
- delete d->anim;
- - d->anim = 0;
- + d->anim = nullptr;
- }
- if ( d->anim && d->activatedCount > 0 ) {
- @@ -545,7 +545,7 @@ void PsiIcon::removeAnim(bool doDetach)
- stop();
- delete d->anim;
- - d->anim = 0;
- + d->anim = nullptr;
- emit d->pixmapChanged();
- //emit d->iconModified();
- @@ -815,8 +815,8 @@ class IconsetFactoryPrivate : public QObject
- private:
- IconsetFactoryPrivate()
- : QObject(QCoreApplication::instance())
- - , iconsets_(0)
- - , emptyPixmap_(0)
- + , iconsets_(nullptr)
- + , emptyPixmap_(nullptr)
- {
- }
- @@ -826,12 +826,12 @@ private:
- while (!iconsets_->empty())
- delete iconsets_->takeFirst();
- delete iconsets_;
- - iconsets_ = 0;
- + iconsets_ = nullptr;
- }
- if (emptyPixmap_) {
- delete emptyPixmap_;
- - emptyPixmap_ = 0;
- + emptyPixmap_ = nullptr;
- }
- }
- @@ -880,7 +880,7 @@ public:
- static void reset()
- {
- delete instance_;
- - instance_ = 0;
- + instance_ = nullptr;
- }
- };
- //! \endif
- @@ -1560,7 +1560,7 @@ bool Iconset::load(const QString &dir)
- const PsiIcon *Iconset::icon(const QString &name) const
- {
- if ( !d || d->dict.isEmpty() ) {
- - return 0;
- + return nullptr;
- }
- return d->dict[name];
- diff --git a/src/tools/optionstree/optionstreemodel.cpp b/src/tools/optionstree/optionstreemodel.cpp
- index aa0ab5c4..03f48a1f 100644
- --- a/src/tools/optionstree/optionstreemodel.cpp
- +++ b/src/tools/optionstree/optionstreemodel.cpp
- @@ -110,7 +110,7 @@ Qt::ItemFlags OptionsTreeModel::flags(const QModelIndex& index) const
- {
- if (!index.isValid()) {
- // Root item
- - return 0;
- + return nullptr;
- }
- Qt::ItemFlags f = Qt::ItemIsSelectable | Qt::ItemIsEnabled;
- if ((index.column() == Value) && !internalNode(indexToOptionName(index)))
- diff --git a/src/tools/optionstree/varianttree.cpp b/src/tools/optionstree/varianttree.cpp
- index e14a1631..5e614a85 100644
- --- a/src/tools/optionstree/varianttree.cpp
- +++ b/src/tools/optionstree/varianttree.cpp
- @@ -32,7 +32,7 @@
- // void VariantTree::variantToElement(const QVariant& var, QDomElement& e)
- // void VariantTree::elementToVariant(const QVariant& var, QDomElement& e)
- -QDomDocument *VariantTree::unknownsDoc=0;
- +QDomDocument *VariantTree::unknownsDoc=nullptr;
- /**
- * Default Constructor
- diff --git a/src/translationmanager.cpp b/src/translationmanager.cpp
- index 978eb04b..f1d4e0e2 100644
- --- a/src/translationmanager.cpp
- +++ b/src/translationmanager.cpp
- @@ -34,10 +34,10 @@ TranslationManager::TranslationManager()
- QString currentLanguageName = QT_TR_NOOP("language_name");
- // The application translator
- - translator_ = new QTranslator(0);
- + translator_ = new QTranslator(nullptr);
- // The qt translator
- - qt_translator_ = new QTranslator(0);
- + qt_translator_ = new QTranslator(nullptr);
- // Self-destruct
- connect(QCoreApplication::instance(),SIGNAL(aboutToQuit()),SLOT(deleteLater()));
- @@ -47,11 +47,11 @@ TranslationManager::~TranslationManager()
- {
- QCoreApplication::instance()->removeTranslator(translator_);
- delete translator_;
- - translator_ = 0;
- + translator_ = nullptr;
- QCoreApplication::instance()->removeTranslator(qt_translator_);
- delete qt_translator_;
- - qt_translator_ = 0;
- + qt_translator_ = nullptr;
- }
- TranslationManager* TranslationManager::instance()
- @@ -153,7 +153,7 @@ VarList TranslationManager::availableTranslations()
- // get the language_name
- QString name = QString("[") + str + "]";
- - QTranslator t(0);
- + QTranslator t(nullptr);
- if(!t.load(str, dirName))
- continue;
- diff --git a/src/userlist.cpp b/src/userlist.cpp
- index 96a9819e..21ff0536 100644
- --- a/src/userlist.cpp
- +++ b/src/userlist.cpp
- @@ -853,6 +853,6 @@ UserListItem *UserList::find(const XMPP::Jid &j)
- if(i->jid().compare(j))
- return i;
- }
- - return 0;
- + return nullptr;
- }
- diff --git a/src/voicecalldlg.cpp b/src/voicecalldlg.cpp
- index 685e21ff..34be8f39 100644
- --- a/src/voicecalldlg.cpp
- +++ b/src/voicecalldlg.cpp
- @@ -24,7 +24,7 @@
- #include "voicecaller.h"
- VoiceCallDlg::VoiceCallDlg(const Jid& jid, VoiceCaller* voiceCaller)
- - : QDialog(0), jid_(jid), voiceCaller_(voiceCaller)
- + : QDialog(nullptr), jid_(jid), voiceCaller_(voiceCaller)
- {
- setAttribute(Qt::WA_DeleteOnClose);
- ui_.setupUi(this);
- diff --git a/src/whiteboarding/wbdlg.cpp b/src/whiteboarding/wbdlg.cpp
- index 7aec56c7..70bdb9ee 100644
- --- a/src/whiteboarding/wbdlg.cpp
- +++ b/src/whiteboarding/wbdlg.cpp
- @@ -45,7 +45,7 @@ WbDlg::WbDlg(SxeSession* session, PsiAccount* pa) {
- keepOpen_ = false;
- allowEdits_ = true;
- - selfDestruct_ = 0;
- + selfDestruct_ = nullptr;
- setAttribute(Qt::WA_DeleteOnClose, false); // we want deferred endSession call and delete from manager
- setWindowTitle(CAP(tr("Whiteboard (%1)").arg(pa->jid().bare())));
- @@ -81,7 +81,7 @@ WbDlg::WbDlg(SxeSession* session, PsiAccount* pa) {
- pixmap.fill(QColor(Qt::black));
- act_color_ = new QAction(QIcon(pixmap), tr("Stroke color"), this);
- pixmap.fill(QColor(Qt::lightGray));
- - act_fill_ = new IconAction(tr("Fill color"), "psi/select", tr("Fill color"),0, this, 0, true);
- + act_fill_ = new IconAction(tr("Fill color"), "psi/select", tr("Fill color"),0, this, nullptr, true);
- act_fill_->setIcon(QIcon(pixmap));
- act_fill_->setChecked(false);
- @@ -393,7 +393,7 @@ void WbDlg::setSelfDestruct(int minutes) {
- if(minutes <= 0) {
- if(selfDestruct_) {
- delete selfDestruct_;
- - selfDestruct_ = 0;
- + selfDestruct_ = nullptr;
- }
- return;
- }
- diff --git a/src/whiteboarding/wbitem.cpp b/src/whiteboarding/wbitem.cpp
- index 052b1a8d..20ae4f51 100644
- --- a/src/whiteboarding/wbitem.cpp
- +++ b/src/whiteboarding/wbitem.cpp
- @@ -295,7 +295,7 @@ void WbItem::resetPos() {
- }
- WbItemMenu* WbItem::constructContextMenu() {
- - WbItemMenu* menu = new WbItemMenu(0);
- + WbItemMenu* menu = new WbItemMenu(nullptr);
- if(scene_) {
- // Add the default actions
- @@ -331,7 +331,7 @@ WbItemMenu* WbItem::constructContextMenu() {
- // menu->addActionGroup(group);
- // menu->addSeparator();
- - group = new QActionGroup(0);
- + group = new QActionGroup(nullptr);
- IconAction* action = new IconAction(tr("Bring forward"), "psi/bringForwards", tr("Bring forward"), 0, group);
- connect(action, SIGNAL(triggered()), scene_, SLOT(bringForward()));
- action = new IconAction(tr("Bring to front"), "psi/bringToFront", tr("Bring to front"), 0, group);
- @@ -343,7 +343,7 @@ WbItemMenu* WbItem::constructContextMenu() {
- menu->addActionGroup(group);
- menu->addSeparator();
- - group = new QActionGroup(0);
- + group = new QActionGroup(nullptr);
- action = new IconAction(tr("Group"), "psi/group", tr("Group"), 0, group);
- connect(action, SIGNAL(triggered()), scene_, SLOT(group()));
- action = new IconAction(tr("Ungroup"), "psi/ungroup", tr("Ungroup"), 0, group);
- @@ -486,7 +486,7 @@ static qreal toDouble(const QChar *&str)
- #endif
- {
- bool ok = false;
- - val = qstrtod(temp, 0, &ok);
- + val = qstrtod(temp, nullptr, &ok);
- }
- }
- return val;
- diff --git a/src/whiteboarding/wbmanager.cpp b/src/whiteboarding/wbmanager.cpp
- index 7278dc05..5a3f323f 100644
- --- a/src/whiteboarding/wbmanager.cpp
- +++ b/src/whiteboarding/wbmanager.cpp
- @@ -157,7 +157,7 @@ WbDlg* WbManager::findWbDlg(const Jid &jid) {
- return w;
- }
- }
- - return 0;
- + return nullptr;
- }
- void WbManager::createWbDlg(SxeSession* session) {
- diff --git a/src/whiteboarding/wbnewpath.cpp b/src/whiteboarding/wbnewpath.cpp
- index 392d3ac3..5e9383f6 100644
- --- a/src/whiteboarding/wbnewpath.cpp
- +++ b/src/whiteboarding/wbnewpath.cpp
- @@ -24,7 +24,7 @@
- #include <QGraphicsScene>
- WbNewPath::WbNewPath(QGraphicsScene* s, QPointF startPos, int strokeWidth, const QColor &strokeColor, const QColor &fillColor) : WbNewItem(s) {
- - controlPoint_ = 0;
- + controlPoint_ = nullptr;
- graphicsitem_.setZValue(std::numeric_limits<double>::max());
- @@ -52,7 +52,7 @@ void WbNewPath::parseCursorMove(QPointF newPos) {
- graphicsitem_.setPath(painterpath);
- delete controlPoint_;
- - controlPoint_ = 0;
- + controlPoint_ = nullptr;
- }
- else {
- controlPoint_ = new QPointF(newPos);
- @@ -66,7 +66,7 @@ QDomNode WbNewPath::serializeToSvg(QDomDocument *doc) {
- graphicsitem_.setPath(painterpath);
- delete controlPoint_;
- - controlPoint_ = 0;
- + controlPoint_ = nullptr;
- }
- // trim the generated SVG to remove unnecessary nested <g/>'s
- diff --git a/src/whiteboarding/wbwidget.cpp b/src/whiteboarding/wbwidget.cpp
- index 02518573..e67673fe 100644
- --- a/src/whiteboarding/wbwidget.cpp
- +++ b/src/whiteboarding/wbwidget.cpp
- @@ -26,8 +26,8 @@
- #include <QApplication>
- WbWidget::WbWidget(SxeSession* session, QWidget *parent) : QGraphicsView(parent) {
- - newWbItem_ = 0;
- - adding_ = 0;
- + newWbItem_ = nullptr;
- + adding_ = nullptr;
- addVertex_ = false;
- strokeColor_ = Qt::black;
- fillColor_ = Qt::transparent;
- @@ -111,7 +111,7 @@ void WbWidget::setMode(Mode mode) {
- if(mode_ < Mode::DrawPath) {
- if(newWbItem_) {
- delete newWbItem_;
- - newWbItem_ = 0;
- + newWbItem_ = nullptr;
- }
- }
- @@ -232,7 +232,7 @@ void WbWidget::mousePressEvent(QMouseEvent * event) {
- // delete any temporary item being drawn
- if(newWbItem_) {
- delete newWbItem_;
- - newWbItem_ = 0;
- + newWbItem_ = nullptr;
- }
- QPointF startPoint = mapToScene(mapFromGlobal(event->globalPos()));
- @@ -260,7 +260,7 @@ void WbWidget::mousePressEvent(QMouseEvent * event) {
- session_->insertNodeAfter(newWbItem_->serializeToSvg(&tempDoc), session_->document().documentElement());
- session_->flush();
- delete newWbItem_;
- - newWbItem_ = 0;
- + newWbItem_ = nullptr;
- }
- }
- @@ -276,7 +276,7 @@ void WbWidget::mouseMoveEvent(QMouseEvent * event) {
- if(QApplication::mouseButtons() != Qt::MouseButtons(Qt::LeftButton)) {
- if(newWbItem_) {
- delete newWbItem_;
- - newWbItem_ = 0;
- + newWbItem_ = nullptr;
- }
- return;
- }
- @@ -293,7 +293,7 @@ void WbWidget::mouseMoveEvent(QMouseEvent * event) {
- session_->removeNode(wbitem->node());
- }
- delete eraseRect;
- - eraseRect = 0;
- + eraseRect = nullptr;
- event->ignore();
- return;
- @@ -312,7 +312,7 @@ void WbWidget::mouseReleaseEvent(QMouseEvent * event) {
- session_->insertNodeAfter(newWbItem_->serializeToSvg(&tempDoc), session_->document().documentElement());
- session_->flush();
- delete newWbItem_;
- - newWbItem_ = 0;
- + newWbItem_ = nullptr;
- return;
- }
- @@ -324,7 +324,7 @@ WbItem* WbWidget::wbItem(const QDomNode &node) {
- if(wbitem->node() == node)
- return wbitem;
- }
- - return 0;
- + return nullptr;
- }
- void WbWidget::handleDocumentUpdated(bool remote) {
- diff --git a/src/widgets/actionlineedit.cpp b/src/widgets/actionlineedit.cpp
- index 0e8705ec..c5cb54b6 100644
- --- a/src/widgets/actionlineedit.cpp
- +++ b/src/widgets/actionlineedit.cpp
- @@ -28,7 +28,7 @@
- #include "actionlineedit.h"
- ActionLineEditButton::ActionLineEditButton( QWidget *parent )
- - : QAbstractButton(parent), action_(0), popup_(0)
- + : QAbstractButton(parent), action_(nullptr), popup_(nullptr)
- {
- setCursor(Qt::PointingHandCursor);
- }
- @@ -162,7 +162,7 @@ ActionLineEditButton * ActionLineEdit::widgetForAction ( QAction * action )
- return btn;
- }
- }
- - return 0;
- + return nullptr;
- }
- void ActionLineEdit::actionEvent ( QActionEvent * event )
- diff --git a/src/widgets/busywidget.cpp b/src/widgets/busywidget.cpp
- index ade6d2c7..bd6d1bc4 100644
- --- a/src/widgets/busywidget.cpp
- +++ b/src/widgets/busywidget.cpp
- @@ -306,7 +306,7 @@ void BusyWidget::animate()
- {
- if (d->t)
- d->t->deleteLater();
- - d->t = 0;
- + d->t = nullptr;
- }
- }
- diff --git a/src/widgets/fancylabel.cpp b/src/widgets/fancylabel.cpp
- index 1a4da3c4..9714f0ed 100644
- --- a/src/widgets/fancylabel.cpp
- +++ b/src/widgets/fancylabel.cpp
- @@ -55,7 +55,7 @@ public:
- Private(IconLabel *l)
- {
- label = l;
- - icon = 0;
- + icon = nullptr;
- copyIcon = false;
- }
- @@ -76,7 +76,7 @@ public:
- #ifndef WIDGET_PLUGIN
- delete icon;
- #endif
- - icon = 0;
- + icon = nullptr;
- }
- copyIcon = _copyIcon;
- @@ -89,7 +89,7 @@ public:
- icon = const_cast<PsiIcon *>(i);
- }
- else {
- - icon = 0;
- + icon = nullptr;
- }
- #else
- @@ -103,7 +103,7 @@ protected:
- {
- #ifndef WIDGET_PLUGIN
- if ( icon ) {
- - disconnect(icon, 0, this, 0);
- + disconnect(icon, nullptr, this, nullptr);
- icon->stop();
- }
- #endif
- diff --git a/src/widgets/fancypopup.cpp b/src/widgets/fancypopup.cpp
- index bcdc2233..4c0ea73f 100644
- --- a/src/widgets/fancypopup.cpp
- +++ b/src/widgets/fancypopup.cpp
- @@ -235,7 +235,7 @@ static const QFlags<Qt::WindowType>
- POPUP_FLAGS = Qt::ToolTip | Qt::WindowStaysOnTopHint; // | Qt::X11BypassWindowManagerHint | Qt::FramelessWindowHint;
- FancyPopup::FancyPopup(QString title, const PsiIcon *icon, FancyPopup *prev, bool copyIcon)
- - : QFrame( 0, POPUP_FLAGS )
- + : QFrame( nullptr, POPUP_FLAGS )
- {
- QWidget::setAttribute(Qt::WA_DeleteOnClose);
- setWindowModality(Qt::NonModal);
- diff --git a/src/widgets/iconaction.cpp b/src/widgets/iconaction.cpp
- index 87a04b9f..a19d8835 100644
- --- a/src/widgets/iconaction.cpp
- +++ b/src/widgets/iconaction.cpp
- @@ -51,7 +51,7 @@ public:
- IconAction *action;
- Private(IconAction *act, QObject *parent) {
- - icon = 0;
- + icon = nullptr;
- action = act;
- Q_ASSERT(action);
- @@ -68,7 +68,7 @@ public:
- #ifndef WIDGET_PLUGIN
- if (icon) {
- delete icon;
- - icon = 0;
- + icon = nullptr;
- }
- #endif
- }
- @@ -151,10 +151,10 @@ void IconAction::setPsiIcon(const PsiIcon *i)
- Q_UNUSED(i);
- #else
- if ( d->icon ) {
- - disconnect(d->icon, 0, this, 0 );
- + disconnect(d->icon, nullptr, this, nullptr );
- d->icon->stop();
- delete d->icon;
- - d->icon = 0;
- + d->icon = nullptr;
- }
- QIcon is;
- @@ -339,7 +339,7 @@ void IconAction::setVisible( bool b )
- IconAction *IconAction::copy() const
- {
- - IconAction *act = new IconAction(text(), psiIconName(), statusTip(), shortcut(), 0, objectName(), isCheckable());
- + IconAction *act = new IconAction(text(), psiIconName(), statusTip(), shortcut(), nullptr, objectName(), isCheckable());
- *act = *this;
- diff --git a/src/widgets/iconselect.cpp b/src/widgets/iconselect.cpp
- index 14b788c2..6965fbd6 100644
- --- a/src/widgets/iconselect.cpp
- +++ b/src/widgets/iconselect.cpp
- @@ -59,7 +59,7 @@ public:
- IconSelectButton(QWidget *parent)
- : QAbstractButton(parent)
- {
- - ic = 0;
- + ic = nullptr;
- animated = false;
- connect (this, SIGNAL(clicked()), SLOT(iconSelected()));
- }
- @@ -70,7 +70,7 @@ public:
- if ( ic ) {
- delete ic;
- - ic = 0;
- + ic = nullptr;
- }
- }
- @@ -80,13 +80,13 @@ public:
- if ( ic ) {
- delete ic;
- - ic = 0;
- + ic = nullptr;
- }
- if ( i )
- ic = new PsiIcon(*((PsiIcon *)i));
- else
- - ic = 0;
- + ic = nullptr;
- }
- const PsiIcon *icon() const
- @@ -130,7 +130,7 @@ private:
- void iconStop()
- {
- if ( ic ) {
- - disconnect(ic, 0, this, 0 );
- + disconnect(ic, nullptr, this, nullptr );
- if ( animated ) {
- ic->stop();
- animated = false;
- @@ -229,7 +229,7 @@ IconSelect::IconSelect(IconSelectPopup *parentMenu)
- menu = parentMenu;
- connect(menu, SIGNAL(textSelected(QString)), SLOT(closeMenu()));
- - grid = 0;
- + grid = nullptr;
- noIcons();
- Q_UNUSED(shown)
- @@ -253,7 +253,7 @@ void IconSelect::createLayout()
- {
- Q_ASSERT(!grid);
- grid = new QGridLayout(this);
- - grid->setMargin(style()->pixelMetric(QStyle::PM_MenuPanelWidth, 0, this));
- + grid->setMargin(style()->pixelMetric(QStyle::PM_MenuPanelWidth, nullptr, this));
- grid->setSpacing(1);
- }
- @@ -273,7 +273,7 @@ void IconSelect::setIconset(const Iconset &iconset)
- // delete all children
- if (grid) {
- delete grid;
- - grid = 0;
- + grid = nullptr;
- QObjectList list = children();
- qDeleteAll(list);
- diff --git a/src/widgets/iconwidget.cpp b/src/widgets/iconwidget.cpp
- index f01f80ad..3431af70 100644
- --- a/src/widgets/iconwidget.cpp
- +++ b/src/widgets/iconwidget.cpp
- @@ -130,7 +130,7 @@ class RealIconWidgetItem : public IconWidgetItem
- {
- Q_OBJECT
- public:
- - RealIconWidgetItem(QListWidget *parent = 0)
- + RealIconWidgetItem(QListWidget *parent = nullptr)
- : IconWidgetItem(parent) {}
- virtual void paint(QPainter *painter) const = 0;
- @@ -395,11 +395,11 @@ const Iconset *IconsetSelect::iconset() const
- IconsetSelectItem *i = (IconsetSelectItem *)currentItem();
- if ( !i ) {
- QList<QListWidgetItem *> items = selectedItems();
- - i = !items.isEmpty() ? (IconsetSelectItem *)items.first() : 0;
- + i = !items.isEmpty() ? (IconsetSelectItem *)items.first() : nullptr;
- }
- if ( i )
- return i->iconset();
- - return 0;
- + return nullptr;
- }
- QListWidgetItem *IconsetSelect::lastItem() const
- @@ -579,12 +579,12 @@ public:
- {
- #ifndef WIDGET_PLUGIN
- if ( icon ) {
- - disconnect(icon, 0, this, 0 );
- + disconnect(icon, nullptr, this, nullptr );
- if ( activate )
- icon->stop();
- delete icon;
- - icon = 0;
- + icon = nullptr;
- }
- #endif
- }
- @@ -751,12 +751,12 @@ public:
- {
- #ifndef WIDGET_PLUGIN
- if ( icon ) {
- - disconnect(icon, 0, this, 0 );
- + disconnect(icon, nullptr, this, nullptr );
- if ( activate )
- icon->stop();
- delete icon;
- - icon = 0;
- + icon = nullptr;
- }
- #endif
- }
- diff --git a/src/widgets/psirichtext.cpp b/src/widgets/psirichtext.cpp
- index c546b706..a87c76a8 100644
- --- a/src/widgets/psirichtext.cpp
- +++ b/src/widgets/psirichtext.cpp
- @@ -86,7 +86,7 @@ class TextIconHandler : public QObject, public QTextObjectInterface
- Q_OBJECT
- Q_INTERFACES(QTextObjectInterface)
- public:
- - TextIconHandler(QObject *parent = 0);
- + TextIconHandler(QObject *parent = nullptr);
- virtual QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format);
- virtual void drawObject(QPainter *painter, const QRectF &rect, QTextDocument *doc, int posInDocument, const QTextFormat &format);
- @@ -150,7 +150,7 @@ void PsiRichText::install(QTextDocument *doc)
- {
- Q_ASSERT(doc);
- #ifndef WIDGET_PLUGIN
- - static TextIconHandler *handler = 0;
- + static TextIconHandler *handler = nullptr;
- if (!handler) {
- handler = new TextIconHandler(qApp);
- }
- diff --git a/src/widgets/psitiplabel.cpp b/src/widgets/psitiplabel.cpp
- index 4735c353..c6ad5a63 100644
- --- a/src/widgets/psitiplabel.cpp
- +++ b/src/widgets/psitiplabel.cpp
- @@ -39,7 +39,7 @@ void PsiTipLabel::init(const QString& text)
- resize(sizeHint());
- qApp->installEventFilter(this);
- startHideTimer();
- - setWindowOpacity(style()->styleHint(QStyle::SH_ToolTipLabel_Opacity, 0, this) / 255.0);
- + setWindowOpacity(style()->styleHint(QStyle::SH_ToolTipLabel_Opacity, nullptr, this) / 255.0);
- setForegroundRole(QPalette::ToolTipText);
- setBackgroundRole(QPalette::ToolTipBase);
- setPalette(QToolTip::palette());
- @@ -83,7 +83,7 @@ void PsiTipLabel::setText(const QString& text)
- void PsiTipLabel::initUi()
- {
- - margin = 1 + style()->pixelMetric(QStyle::PM_ToolTipLabelFrameWidth, 0, this);
- + margin = 1 + style()->pixelMetric(QStyle::PM_ToolTipLabelFrameWidth, nullptr, this);
- setFrameStyle(QFrame::NoFrame);
- doc = new QTextDocument(this);
- @@ -213,7 +213,7 @@ void PsiTipLabel::paintEvent(QPaintEvent *)
- PsiTipLabel::~PsiTipLabel()
- {
- - instance_ = 0;
- + instance_ = nullptr;
- }
- void PsiTipLabel::hideTip()
- diff --git a/src/widgets/psitooltip.cpp b/src/widgets/psitooltip.cpp
- index 41b77979..3f526ea1 100644
- --- a/src/widgets/psitooltip.cpp
- +++ b/src/widgets/psitooltip.cpp
- @@ -60,7 +60,7 @@ private slots:
- watchedWidgets_.remove(widget);
- if(watchedWidgets_.isEmpty()) {
- instance->deleteLater();
- - instance = 0;
- + instance = nullptr;
- }
- }
- @@ -92,7 +92,7 @@ private:
- }
- };
- -PsiToolTipHandler* PsiToolTipHandler::instance = 0;
- +PsiToolTipHandler* PsiToolTipHandler::instance = nullptr;
- //----------------------------------------------------------------------------
- // ToolTipPosition
- @@ -197,7 +197,7 @@ void PsiToolTip::doShowText(const QPoint &pos, const QString &text, const QWidge
- return;
- }
- - bool preventAnimation = (PsiTipLabel::instance() != 0);
- + bool preventAnimation = (PsiTipLabel::instance() != nullptr);
- installPsiToolTipFont();
- QFrame *label = createTipLabel(text, QApplication::desktop()->screen(calc->getScreenNumber()));
- @@ -243,7 +243,7 @@ void PsiToolTip::doInstall(QWidget *w)
- PsiToolTipHandler::getInstance()->install(w);
- }
- -PsiToolTip *PsiToolTip::instance_ = 0;
- +PsiToolTip *PsiToolTip::instance_ = nullptr;
- PsiToolTip* PsiToolTip::instance()
- {
- diff --git a/src/widgets/typeaheadfind.cpp b/src/widgets/typeaheadfind.cpp
- index 67cebfa1..f90b0dc7 100644
- --- a/src/widgets/typeaheadfind.cpp
- +++ b/src/widgets/typeaheadfind.cpp
- @@ -85,8 +85,8 @@ public:
- #ifdef WEBKIT
- #ifdef WEBENGINE
- QWebEnginePage::FindFlags wkOptions;
- - wkOptions |= options & QTextDocument::FindBackward? QWebEnginePage::FindBackward : (QWebEnginePage::FindFlags)0;
- - wkOptions |= options & QTextDocument::FindCaseSensitively? QWebEnginePage::FindCaseSensitively : (QWebEnginePage::FindFlags)0;
- + wkOptions |= options & QTextDocument::FindBackward? QWebEnginePage::FindBackward : (QWebEnginePage::FindFlags)nullptr;
- + wkOptions |= options & QTextDocument::FindCaseSensitively? QWebEnginePage::FindCaseSensitively : (QWebEnginePage::FindFlags)nullptr;
- wv->findText(str, wkOptions, [this](bool found) {
- updateFoundStyle(found);
- });
- @@ -200,7 +200,7 @@ void TypeAheadFindBar::init()
- TypeAheadFindBar::~TypeAheadFindBar()
- {
- delete d;
- - d = 0;
- + d = nullptr;
- }
- /**
- diff --git a/src/widgets/urlobject.cpp b/src/widgets/urlobject.cpp
- index 779e5f96..8970f4fd 100644
- --- a/src/widgets/urlobject.cpp
- +++ b/src/widgets/urlobject.cpp
- @@ -175,7 +175,7 @@ URLObject::URLObject()
- */
- URLObject *URLObject::getInstance()
- {
- - static URLObject *urlObject = 0;
- + static URLObject *urlObject = nullptr;
- if (!urlObject)
- urlObject = new URLObject();
- return urlObject;
- @@ -189,7 +189,7 @@ QMenu *URLObject::createPopupMenu(const QString &lnk)
- {
- d->link = lnk;
- if ( d->link.isEmpty() )
- - return 0;
- + return nullptr;
- int colon = d->link.indexOf(':');
- if ( colon == -1 )
- diff --git a/src/x11windowsystem.cpp b/src/x11windowsystem.cpp
- index 9fc26e06..23573076 100644
- --- a/src/x11windowsystem.cpp
- +++ b/src/x11windowsystem.cpp
- @@ -5,7 +5,7 @@
- #include <X11/Xutil.h> // needed for WM_CLASS hinting
- const long MAX_PROP_SIZE = 100000;
- -X11WindowSystem* X11WindowSystem::_instance = 0;
- +X11WindowSystem* X11WindowSystem::_instance = nullptr;
- void X11WindowSystem::x11wmClass(WId wid, QString resName)
- diff --git a/src/xdata_widget.cpp b/src/xdata_widget.cpp
- index 9707e591..5f02ecd6 100644
- --- a/src/xdata_widget.cpp
- +++ b/src/xdata_widget.cpp
- @@ -135,7 +135,7 @@ private:
- class XDataField
- {
- public:
- - XDataField(XData::Field f, XDataWidget *w = 0)
- + XDataField(XData::Field f, XDataWidget *w = nullptr)
- {
- _field = f;
- _xdWidget = w;
- @@ -284,7 +284,7 @@ public:
- int row = grid->rowCount();
- XData::Field::MediaElement me = f.mediaElement();
- if (!me.isEmpty()) {
- - XDataField *fromField = 0;
- + XDataField *fromField = nullptr;
- Jid j = xdw->owner();
- if (xdw->registrarType() == "urn:xmpp:captcha"
- && (fromField = xdw->fieldByVar("from"))) {
- @@ -628,7 +628,7 @@ void XDataWidget::setForm(const XMPP::XData& d, bool withInstructions)
- fields_.clear();
- QLayoutItem *child;
- - while ((child = layout_->takeAt(0)) != 0) {
- + while ((child = layout_->takeAt(0)) != nullptr) {
- delete child->widget();
- delete child;
- }
- @@ -763,7 +763,7 @@ XDataField* XDataWidget::fieldByVar(const QString &var) const
- return field;
- }
- }
- - return 0;
- + return nullptr;
- }
- void XDataWidget::linkActivated(const QString& link)
- diff --git a/src/xmlconsole.cpp b/src/xmlconsole.cpp
- index 58595c15..7ce35974 100644
- --- a/src/xmlconsole.cpp
- +++ b/src/xmlconsole.cpp
- @@ -51,7 +51,7 @@ XmlConsole::XmlConsole(PsiAccount *_pa)
- connect(pa->psi(), SIGNAL(accountCountChanged()), this, SLOT(updateCaption()));
- updateCaption();
- - prompt = 0;
- + prompt = nullptr;
- ui_.te->setUndoRedoEnabled(false);
- ui_.te->setReadOnly(true);
Add Comment
Please, Sign In to add comment