Commit 26895ba0 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: use nullptr now

parent 822cb8ca
......@@ -61,7 +61,7 @@ class AlarmDialog : public QDialog
{
Q_OBJECT
public:
explicit AlarmDialog(const Akonadi::ETMCalendar::Ptr &calendar, QWidget *parent = Q_NULLPTR);
explicit AlarmDialog(const Akonadi::ETMCalendar::Ptr &calendar, QWidget *parent = nullptr);
~AlarmDialog();
void addIncidence(const Akonadi::Item &incidence, const QDateTime &reminderAt,
......
......@@ -50,8 +50,8 @@ using namespace KCalCore;
KOAlarmClient::KOAlarmClient(QObject *parent)
: QObject(parent),
mDocker(Q_NULLPTR),
mDialog(Q_NULLPTR)
mDocker(nullptr),
mDialog(nullptr)
{
new KOrgacAdaptor(this);
KDBusConnectionPool::threadConnection().registerObject(QStringLiteral("/ac"), this);
......@@ -322,7 +322,7 @@ QStringList KOAlarmClient::dumpAlarms() const
void KOAlarmClient::hide()
{
delete mDocker;
mDocker = Q_NULLPTR;
mDocker = nullptr;
}
void KOAlarmClient::show()
......
......@@ -42,7 +42,7 @@ class KOAlarmClient : public QObject
{
Q_OBJECT
public:
explicit KOAlarmClient(QObject *parent = Q_NULLPTR);
explicit KOAlarmClient(QObject *parent = nullptr);
~KOAlarmClient();
// DBUS interface
......
......@@ -96,15 +96,15 @@
#include <KSharedConfig>
#include <QStandardPaths>
KOWindowList *ActionManager::mWindowList = Q_NULLPTR;
KOWindowList *ActionManager::mWindowList = nullptr;
ActionManager::ActionManager(KXMLGUIClient *client, CalendarView *widget,
QObject *parent, KOrg::MainWindow *mainWindow,
bool isPart, QMenuBar *menuBar)
: QObject(parent),
mCollectionViewShowAction(Q_NULLPTR),
mCollectionView(Q_NULLPTR), mCollectionViewStateSaver(Q_NULLPTR),
mCollectionSelectionModelStateSaver(Q_NULLPTR)
mCollectionViewShowAction(nullptr),
mCollectionView(nullptr), mCollectionViewStateSaver(nullptr),
mCollectionSelectionModelStateSaver(nullptr)
{
new KOrgCalendarAdaptor(this);
QDBusConnection::sessionBus().registerObject(QStringLiteral("/Calendar"), this);
......@@ -113,7 +113,7 @@ ActionManager::ActionManager(KXMLGUIClient *client, CalendarView *widget,
mACollection = mGUIClient->actionCollection();
mCalendarView = widget;
mIsPart = isPart;
mTempFile = Q_NULLPTR;
mTempFile = nullptr;
mHtmlExportSync = false;
mMainWindow = mainWindow;
mMenuBar = menuBar;
......@@ -847,7 +847,7 @@ void ActionManager::file_open(const QUrl &url)
// is that URL already opened somewhere else? Activate that window
KOrg::MainWindow *korg = ActionManager::findInstance(url);
if ((Q_NULLPTR != korg) && (korg != mMainWindow)) {
if ((nullptr != korg) && (korg != mMainWindow)) {
#if KDEPIM_HAVE_X11
KWindowSystem::activateWindow(korg->topLevelWidget()->winId());
#endif
......@@ -1095,7 +1095,7 @@ bool ActionManager::saveAsURL(const QUrl &url)
QString fileOrig = mFile;
QUrl URLOrig = mURL;
QTemporaryFile *tempFile = Q_NULLPTR;
QTemporaryFile *tempFile = nullptr;
if (url.isLocalFile()) {
mFile = url.toLocalFile();
} else {
......@@ -1249,7 +1249,7 @@ KOrg::MainWindow *ActionManager::findInstance(const QUrl &url)
return mWindowList->findInstance(url);
}
} else {
return Q_NULLPTR;
return nullptr;
}
}
......@@ -1433,7 +1433,7 @@ QString ActionManager::localFileName()
class ActionManager::ActionStringsVisitor : public KCalCore::Visitor
{
public:
ActionStringsVisitor() : mShow(Q_NULLPTR), mEdit(Q_NULLPTR), mDelete(Q_NULLPTR) {}
ActionStringsVisitor() : mShow(nullptr), mEdit(nullptr), mDelete(nullptr) {}
bool act(KCalCore::IncidenceBase::Ptr incidence, QAction *show, QAction *edit, QAction *del)
{
......@@ -1615,7 +1615,7 @@ void ActionManager::openEventEditor(const QString &summary,
action = IncidenceEditorNG::IncidenceEditorSettings::Link;
} else if (IncidenceEditorNG::IncidenceEditorSettings::self()->defaultEmailAttachMethod() ==
IncidenceEditorNG::IncidenceEditorSettings::Ask) {
QMenu *menu = new QMenu(Q_NULLPTR);
QMenu *menu = new QMenu(nullptr);
QAction *attachLink = menu->addAction(i18n("Attach as &link"));
QAction *attachInline = menu->addAction(i18n("Attach &inline"));
QAction *attachBody = menu->addAction(i18n("Attach inline &without attachments"));
......@@ -1654,11 +1654,11 @@ void ActionManager::openEventEditor(const QString &summary,
KMime::Message *msg = new KMime::Message();
msg->setContent(f.readAll());
msg->parse();
if (msg == msg->textContent() || msg->textContent() == Q_NULLPTR) { // no attachments
if (msg == msg->textContent() || msg->textContent() == nullptr) { // no attachments
attData = file;
} else {
if (KMessageBox::warningContinueCancel(
Q_NULLPTR,
nullptr,
i18n("Removing attachments from an email might invalidate its signature."),
i18n("Remove Attachments"), KStandardGuiItem::cont(), KStandardGuiItem::cancel(),
QStringLiteral("BodyOnlyInlineAttachment")) != KMessageBox::Continue) {
......@@ -1719,7 +1719,7 @@ void ActionManager::openTodoEditor(const QString &summary,
if (attachmentMimetype != QLatin1String("message/rfc822")) {
action = KOPrefs::TodoAttachLink;
} else if (KOPrefs::instance()->defaultTodoAttachMethod() == KOPrefs::TodoAttachAsk) {
QMenu *menu = new QMenu(Q_NULLPTR);
QMenu *menu = new QMenu(nullptr);
QAction *attachLink = menu->addAction(i18n("Attach as &link"));
QAction *attachInline = menu->addAction(i18n("Attach &inline"));
menu->addSeparator();
......
......@@ -71,7 +71,7 @@ class KORGANIZERPRIVATE_EXPORT ActionManager : public QObject
public:
ActionManager(KXMLGUIClient *client, CalendarView *widget,
QObject *parent, KOrg::MainWindow *mainWindow,
bool isPart, QMenuBar *menuBar = Q_NULLPTR);
bool isPart, QMenuBar *menuBar = nullptr);
virtual ~ActionManager();
/** Peform initialization that requires this* to be full constructed */
......
......@@ -237,7 +237,7 @@ private:
};
AkonadiCollectionViewFactory::AkonadiCollectionViewFactory(CalendarView *view)
: mView(view), mAkonadiCollectionView(Q_NULLPTR)
: mView(view), mAkonadiCollectionView(nullptr)
{
}
......@@ -267,7 +267,7 @@ static bool hasCompatibleMimeTypes(const Akonadi::Collection &collection)
class SortProxyModel : public QSortFilterProxyModel
{
public:
explicit SortProxyModel(QObject *parent = Q_NULLPTR)
explicit SortProxyModel(QObject *parent = nullptr)
: QSortFilterProxyModel(parent)
{
setDynamicSortFilter(true);
......@@ -305,7 +305,7 @@ public:
class ColorProxyModel : public QSortFilterProxyModel
{
public:
explicit ColorProxyModel(QObject *parent = Q_NULLPTR)
explicit ColorProxyModel(QObject *parent = nullptr)
: QSortFilterProxyModel(parent), mInitDefaultCalendar(false)
{
}
......@@ -354,7 +354,7 @@ private:
class CollectionFilter : public QSortFilterProxyModel
{
public:
explicit CollectionFilter(QObject *parent = Q_NULLPTR)
explicit CollectionFilter(QObject *parent = nullptr)
: QSortFilterProxyModel(parent)
{
setDynamicSortFilter(true);
......@@ -379,7 +379,7 @@ protected:
class EnabledModel : public QSortFilterProxyModel
{
public:
explicit EnabledModel(QObject *parent = Q_NULLPTR)
explicit EnabledModel(QObject *parent = nullptr)
: QSortFilterProxyModel(parent)
{
}
......@@ -403,7 +403,7 @@ protected:
class CalendarDelegateModel : public QSortFilterProxyModel
{
public:
explicit CalendarDelegateModel(QObject *parent = Q_NULLPTR)
explicit CalendarDelegateModel(QObject *parent = nullptr)
: QSortFilterProxyModel(parent)
{
}
......@@ -500,15 +500,15 @@ AkonadiCollectionView *AkonadiCollectionViewFactory::collectionView() const
AkonadiCollectionView::AkonadiCollectionView(CalendarView *view, bool hasContextMenu,
QWidget *parent)
: CalendarViewExtension(parent),
mActionManager(Q_NULLPTR),
mCollectionView(Q_NULLPTR),
mBaseModel(Q_NULLPTR),
mSelectionProxyModel(Q_NULLPTR),
mAssignColor(Q_NULLPTR),
mDisableColor(Q_NULLPTR),
mDefaultCalendar(Q_NULLPTR),
mEnableAction(Q_NULLPTR),
mServerSideSubscription(Q_NULLPTR),
mActionManager(nullptr),
mCollectionView(nullptr),
mBaseModel(nullptr),
mSelectionProxyModel(nullptr),
mAssignColor(nullptr),
mDisableColor(nullptr),
mDefaultCalendar(nullptr),
mEnableAction(nullptr),
mServerSideSubscription(nullptr),
mNotSendAddRemoveSignal(false),
mWasDefaultCalendar(false),
mHasContextMenu(hasContextMenu)
......@@ -1032,7 +1032,7 @@ Akonadi::EntityTreeModel *AkonadiCollectionView::entityTreeModel() const
}
qCWarning(KORGANIZER_LOG) << "Couldn't find EntityTreeModel";
return Q_NULLPTR;
return nullptr;
}
void AkonadiCollectionView::edit_disable()
......
......@@ -75,7 +75,7 @@ class AkonadiCollectionView : public CalendarViewExtension
Q_OBJECT
public:
explicit AkonadiCollectionView(CalendarView *view, bool hasContextMenu = true,
QWidget *parent = Q_NULLPTR);
QWidget *parent = nullptr);
~AkonadiCollectionView();
Akonadi::EntityTreeView *view() const;
......
......@@ -105,8 +105,8 @@
CalendarView::CalendarView(QWidget *parent)
: CalendarViewBase(parent)
, mCheckableProxyModel(Q_NULLPTR)
, mETMCollectionView(Q_NULLPTR)
, mCheckableProxyModel(nullptr)
, mETMCollectionView(nullptr)
, mSearchCollectionHelper(this)
{
Akonadi::ControlGui::widgetNeedsAkonadi(this);
......@@ -139,7 +139,7 @@ CalendarView::CalendarView(QWidget *parent)
mReadOnly = false;
mSplitterSizesValid = false;
mCalPrinter = Q_NULLPTR;
mCalPrinter = nullptr;
mDateNavigator = new DateNavigator(this);
mDateChecker = new DateChecker(this);
......@@ -318,7 +318,7 @@ CalendarView::CalendarView(QWidget *parent)
CalendarView::~CalendarView()
{
mCalendar->unregisterObserver(this);
mCalendar->setFilter(Q_NULLPTR); // So calendar doesn't deleted it twice
mCalendar->setFilter(nullptr); // So calendar doesn't deleted it twice
qDeleteAll(mFilters);
qDeleteAll(mExtensions);
......@@ -500,7 +500,7 @@ void CalendarView::readFilterSettings(KConfig *config)
}
int pos = filterList.indexOf(currentFilter);
mCurrentFilter = Q_NULLPTR;
mCurrentFilter = nullptr;
if (pos >= 0) {
mCurrentFilter = mFilters.at(pos);
}
......@@ -590,7 +590,7 @@ void CalendarView::updateConfig(const QByteArray &receiver)
if (mCalPrinter) {
mCalPrinter->deleteLater();
mCalPrinter = Q_NULLPTR;
mCalPrinter = nullptr;
}
KOGlobals::self()->setHolidays(new KHolidays::HolidayRegion(KOPrefs::instance()->mHolidays));
......@@ -860,7 +860,7 @@ void CalendarView::edit_paste()
QDateTime endDT;
KDateTime finalDateTime;
bool useEndTime = false;
KCalUtils::DndFactory::PasteFlags pasteFlags = Q_NULLPTR;
KCalUtils::DndFactory::PasteFlags pasteFlags = nullptr;
KOrg::BaseView *curView = mViewManager->currentView();
KOAgendaView *agendaView = mViewManager->agendaView();
......@@ -2018,7 +2018,7 @@ void CalendarView::updateFilter()
int pos = mFilters.indexOf(mCurrentFilter);
if (pos < 0) {
mCurrentFilter = Q_NULLPTR;
mCurrentFilter = nullptr;
}
filters << i18n("No filter");
......@@ -2037,7 +2037,7 @@ void CalendarView::updateFilter()
void CalendarView::filterActivated(int filterNo)
{
KCalCore::CalFilter *newFilter = Q_NULLPTR;
KCalCore::CalFilter *newFilter = nullptr;
if (filterNo > 0 && filterNo <= int(mFilters.count())) {
newFilter = mFilters.at(filterNo - 1);
}
......@@ -2052,7 +2052,7 @@ void CalendarView::filterActivated(int filterNo)
bool CalendarView::isFiltered() const
{
return mCurrentFilter != Q_NULLPTR;
return mCurrentFilter != nullptr;
}
QString CalendarView::currentFilterName() const
......
......@@ -110,13 +110,13 @@ public:
Constructs a new calendar view widget.
@param parent parent window
*/
explicit CalendarView(QWidget *parent = Q_NULLPTR);
explicit CalendarView(QWidget *parent = nullptr);
virtual ~CalendarView();
class CalendarViewVisitor : public KCalCore::Visitor
{
public:
CalendarViewVisitor() : mView(Q_NULLPTR)
CalendarViewVisitor() : mView(nullptr)
{
}
......
......@@ -48,11 +48,11 @@ using namespace CalendarSupport;
CollectionGeneralPage::CollectionGeneralPage(QWidget *parent)
: CollectionPropertiesPage(parent),
mBlockAlarmsCheckBox(Q_NULLPTR),
mNameEdit(Q_NULLPTR),
mIconCheckBox(Q_NULLPTR),
mIconButton(Q_NULLPTR),
mIncidencesForComboBox(Q_NULLPTR)
mBlockAlarmsCheckBox(nullptr),
mNameEdit(nullptr),
mIconCheckBox(nullptr),
mIconButton(nullptr),
mIncidencesForComboBox(nullptr)
{
setObjectName(QStringLiteral("CalendarSupport::CollectionGeneralPage"));
setPageTitle(i18nc("@title:tab General settings for a folder.", "General"));
......
......@@ -40,7 +40,7 @@ class KORGANIZERPRIVATE_EXPORT CollectionGeneralPage : public Akonadi::Collectio
Q_OBJECT
public:
explicit CollectionGeneralPage(QWidget *parent = Q_NULLPTR);
explicit CollectionGeneralPage(QWidget *parent = nullptr);
~CollectionGeneralPage();
void load(const Akonadi::Collection &collection) Q_DECL_OVERRIDE;
......
......@@ -27,7 +27,7 @@
#include <QTimer>
DateChecker::DateChecker(QObject *parent) : QObject(parent), mUpdateTimer(Q_NULLPTR)
DateChecker::DateChecker(QObject *parent) : QObject(parent), mUpdateTimer(nullptr)
{
enableRollover(FollowMonth);
}
......@@ -43,7 +43,7 @@ void DateChecker::enableRollover(RolloverType r)
if (mUpdateTimer) {
mUpdateTimer->stop();
delete mUpdateTimer;
mUpdateTimer = Q_NULLPTR;
mUpdateTimer = nullptr;
}
break;
case FollowDay:
......
......@@ -35,7 +35,7 @@ class DateChecker: public QObject
{
Q_OBJECT
public:
explicit DateChecker(QObject *parent = Q_NULLPTR);
explicit DateChecker(QObject *parent = nullptr);
~DateChecker();
/**
......
......@@ -42,7 +42,7 @@ class DateNavigator : public QObject
{
Q_OBJECT
public:
explicit DateNavigator(QObject *parent = Q_NULLPTR);
explicit DateNavigator(QObject *parent = nullptr);
~DateNavigator();
KCalCore::DateList selectedDates();
......
......@@ -401,7 +401,7 @@ void DateNavigatorContainer::handleWeekClickedSignal(const QDate &week, const QD
KDateNavigator *DateNavigatorContainer::firstNavigatorForDate(const QDate &date) const
{
KDateNavigator *navigator = Q_NULLPTR;
KDateNavigator *navigator = nullptr;
if (date.isValid()) {
QPair<QDate, QDate> limits = KODayMatrix::matrixLimits(mNavigatorView->month());
......
......@@ -39,7 +39,7 @@ class DateNavigatorContainer: public QFrame
{
Q_OBJECT
public:
explicit DateNavigatorContainer(QWidget *parent = Q_NULLPTR);
explicit DateNavigatorContainer(QWidget *parent = nullptr);
~DateNavigatorContainer();
/**
......
......@@ -68,7 +68,7 @@ FilterEditDialog::FilterEditDialog(QList<KCalCore::CalFilter *> *filters, QWidge
FilterEditDialog::~FilterEditDialog()
{
delete mFilterEdit;
mFilterEdit = Q_NULLPTR;
mFilterEdit = nullptr;
}
void FilterEditDialog::updateFilterList()
......@@ -94,7 +94,7 @@ void FilterEditDialog::setDialogConsistent(bool consistent)
}
FilterEdit::FilterEdit(QList<KCalCore::CalFilter *> *filters, QWidget *parent)
: QWidget(parent), mCurrent(Q_NULLPTR), mCategorySelectDialog(Q_NULLPTR)
: QWidget(parent), mCurrent(nullptr), mCategorySelectDialog(nullptr)
{
setupUi(this);
searchline->setListWidget(mRulesList);
......@@ -278,7 +278,7 @@ void FilterEdit::bDeletePressed()
KCalCore::CalFilter *filter = mFilters->at(selected);
mFilters->removeAll(filter);
delete filter;
mCurrent = Q_NULLPTR;
mCurrent = nullptr;
updateFilterList();
mRulesList->setCurrentRow(qMin(mRulesList->count() - 1, selected));
Q_EMIT filterChanged();
......
......@@ -43,7 +43,7 @@
#include <QVBoxLayout>
#include "korganizer_debug.h"
QAbstractItemModel *NoteEditDialog::_k_noteEditStubModel = Q_NULLPTR;
QAbstractItemModel *NoteEditDialog::_k_noteEditStubModel = nullptr;
NoteEditDialog::NoteEditDialog(QWidget *parent)
: QDialog(parent)
......
......@@ -35,7 +35,7 @@ public:
: q(qq),
mChanges(EventViews::EventView::IncidencesAdded |
EventViews::EventView::DatesChanged),
calendar(Q_NULLPTR)
calendar(nullptr)
{
QByteArray cname = q->metaObject()->className();
cname.replace(':', '_');
......@@ -56,7 +56,7 @@ public:
};
BaseView::BaseView(QWidget *parent)
: QWidget(parent), mChanger(Q_NULLPTR), d(new Private(this))
: QWidget(parent), mChanger(nullptr), d(new Private(this))
{
}
......
......@@ -61,7 +61,7 @@ public:
will be retrieved for display.
@param parent parent widget.
*/
explicit BaseView(QWidget *parent = Q_NULLPTR);
explicit BaseView(QWidget *parent = nullptr);
/**
Destructor. Views will do view-specific cleanups here.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment