Commit 91841c42 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use nullptr

parent 2dbd4dd5
......@@ -42,7 +42,7 @@ namespace KHC {
void activate(const QStringList& args, const QString &workingDirectory);
private:
MainWindow *mMainWindow;
MainWindow *mMainWindow = nullptr;
QUrl mOpen;
QCommandLineParser mCmdParser;
};
......
......@@ -44,7 +44,7 @@ class BookmarkOwner : public QObject, public KBookmarkOwner
void openUrl( const QUrl& url );
private:
View *mView;
View *const mView;
};
}
......
......@@ -123,8 +123,8 @@ namespace KHC {
QString mKhelpcenterSpecial;
List mChildren;
DocEntry *mParent;
DocEntry *mNextSibling;
DocEntry *mParent = nullptr;
DocEntry *mNextSibling = nullptr;
int mWeight;
bool mSearchEnabled : 1;
......
......@@ -34,7 +34,7 @@ namespace KHC {
Q_OBJECT
public:
explicit FontDialog( QWidget *parent );
explicit FontDialog( QWidget *parent = nullptr);
protected Q_SLOTS:
virtual void slotOk();
......@@ -47,16 +47,16 @@ namespace KHC {
void load();
void save();
QSpinBox *m_minFontSize;
QSpinBox *m_medFontSize;
QFontComboBox *m_standardFontCombo;
QFontComboBox *m_fixedFontCombo;
QFontComboBox *m_serifFontCombo;
QFontComboBox *m_sansSerifFontCombo;
QFontComboBox *m_italicFontCombo;
QFontComboBox *m_fantasyFontCombo;
KComboBox *m_defaultEncoding;
QSpinBox *m_fontSizeAdjustement;
QSpinBox *m_minFontSize = nullptr;
QSpinBox *m_medFontSize = nullptr;
QFontComboBox *m_standardFontCombo = nullptr;
QFontComboBox *m_fixedFontCombo = nullptr;
QFontComboBox *m_serifFontCombo = nullptr;
QFontComboBox *m_sansSerifFontCombo = nullptr;
QFontComboBox *m_italicFontCombo = nullptr;
QFontComboBox *m_fantasyFontCombo = nullptr;
KComboBox *m_defaultEncoding = nullptr;
QSpinBox *m_fontSizeAdjustement = nullptr;
};
}
......
......@@ -43,7 +43,7 @@ class GlossaryEntry;
private:
struct Private;
Private *d;
Private *const d;
};
}
......
......@@ -106,8 +106,8 @@ class History : public QObject
int m_goMenuHistoryStartPos;
int m_goMenuHistoryCurrentPos;
public:
KToolBarPopupAction *m_backAction;
KToolBarPopupAction *m_forwardAction;
KToolBarPopupAction *m_backAction = nullptr;
KToolBarPopupAction *m_forwardAction = nullptr;
};
}
......
......@@ -29,16 +29,16 @@ namespace KHC
{
Q_OBJECT
public:
explicit InfoTree( QObject *parent );
explicit InfoTree( QObject *parent = nullptr);
void build( NavigatorItem *parentItem ) override;
private:
void parseInfoDirFile( const QString &fileName );
NavigatorItem *m_parentItem;
NavigatorItem *m_alphabItem;
NavigatorItem *m_categoryItem;
NavigatorItem *m_parentItem = nullptr;
NavigatorItem *m_alphabItem = nullptr;
NavigatorItem *m_categoryItem = nullptr;
};
}
......
......@@ -118,13 +118,13 @@ class MainWindow : public KXmlGuiWindow
private:
void updateFontScaleActions();
QSplitter *mSplitter;
View *mDoc;
Navigator *mNavigator;
QSplitter *mSplitter = nullptr;
View *mDoc = nullptr;
Navigator *mNavigator = nullptr;
QAction *mLastSearchAction;
QAction *mCopyText;
LogDialog *mLogDialog;
QAction *mLastSearchAction = nullptr;
QAction *mCopyText = nullptr;
LogDialog *mLogDialog = nullptr;
};
}
......
......@@ -109,26 +109,26 @@ class Navigator : public QWidget
void insertPlugins();
void hideSearch();
QTreeWidget *mContentsTree;
Glossary *mGlossaryTree;
QTreeWidget *mContentsTree = nullptr;
Glossary *mGlossaryTree = nullptr;
SearchWidget *mSearchWidget;
SearchWidget *mSearchWidget = nullptr;
QTabWidget *mTabWidget;
QTabWidget *mTabWidget = nullptr;
KLineEdit *mSearchEdit;
KLineEdit *mSearchEdit = nullptr;
SearchEngine *mSearchEngine;
SearchEngine *mSearchEngine = nullptr;
View *mView;
View *mView = nullptr;
QUrl mHomeUrl;
bool mSelected;
bool mSelected = false;
DocEntry::List mIndexingQueue;
KProcess *mIndexingProc;
QProgressBar *mIndexingBar;
KProcess *mIndexingProc = nullptr;
QProgressBar *mIndexingBar = nullptr;
QTimer mIndexingTimer;
};
......
......@@ -44,7 +44,7 @@ class NavigatorAppItem : public NavigatorItem
private:
void scheduleTOCBuild();
TOC *mToc;
TOC *mToc = nullptr;
static QMap< QString,NavigatorAppItem* > s_menuItemsMap;
......
......@@ -50,7 +50,7 @@ class NavigatorItem : public QTreeWidgetItem
private:
void init( DocEntry * );
DocEntry *mEntry;
DocEntry *mEntry = nullptr;
bool mAutoDeleteDocEntry;
};
......
......@@ -41,11 +41,11 @@ namespace KHC {
DocEntryTraverser *createChild( DocEntry *entry ) override;
private:
QTreeWidget *mListView;
NavigatorItem *mParentItem;
NavigatorItem *mCurrentItem;
QTreeWidget *mListView = nullptr;
NavigatorItem *mParentItem = nullptr;
NavigatorItem *mCurrentItem = nullptr;
Navigator *mNavigator;
Navigator *mNavigator = nullptr;
};
}
......
......@@ -43,7 +43,7 @@ class ScopeItem : public QTreeWidgetItem
private:
void init() { setCheckState(0, Qt::Checked); }
DocEntry *mEntry;
DocEntry *mEntry = nullptr;
};
}
......
......@@ -68,10 +68,10 @@ class SearchTraverser : public QObject, public DocEntryTraverser
private:
const int mMaxLevel;
SearchEngine *mEngine;
SearchEngine *mEngine = nullptr;
int mLevel;
DocEntry *mEntry;
DocEntry *mEntry = nullptr;
QString mJobData;
QList<QPair<DocEntry *, QString> > mResults;
......
......@@ -55,9 +55,9 @@ namespace KHC {
void slotJobData( KIO::Job *, const QByteArray &data );
protected:
DocEntry *mEntry;
KProcess *mProcess;
KIO::Job *mKioJob;
DocEntry *mEntry = nullptr;
KProcess *mProcess = nullptr;
KIO::Job *mKioJob = nullptr;
QString mCmd;
QString mResult;
QString mError;
......
......@@ -76,12 +76,12 @@ class SearchWidget : public QWidget
void scopeClicked( QTreeWidgetItem* );
private:
SearchEngine *mEngine;
SearchEngine *mEngine = nullptr;
QComboBox *mMethodCombo;
QComboBox *mPagesCombo;
QComboBox *mScopeCombo;
QTreeWidget *mScopeListView;
QComboBox *mMethodCombo = nullptr;
QComboBox *mPagesCombo = nullptr;
QComboBox *mScopeCombo = nullptr;
QTreeWidget *mScopeListView = nullptr;
int mScopeCount;
};
......
......@@ -65,7 +65,7 @@ class TOC : public QObject
QString m_cacheFile;
QString m_sourceFile;
NavigatorItem *m_parentItem;
NavigatorItem *m_parentItem = nullptr;
static bool m_alreadyWarned;
};
......
......@@ -99,8 +99,8 @@ class View : public KHTMLPart
int m_fontScaleStepping;
GrantleeFormatter *mGrantleeFormatter;
KActionCollection *mActionCollection;
GrantleeFormatter *mGrantleeFormatter = nullptr;
KActionCollection *mActionCollection = nullptr;
QString mCopyURL;
void reloadPage();
};
......
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