Commit 71c020d7 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Use nullptr

parent 8fbebfd4
......@@ -168,7 +168,7 @@ void SettingsBase::initHelpMenu()
actionCollection()->addAction( QStringLiteral("help_toolbar_menu"), helpActionMenu );
// Add the custom actions
aboutModuleAction = actionCollection()->addAction( KStandardAction::AboutApp, QStringLiteral("help_about_module"), this, SLOT(about()) );
changeAboutMenu( 0, aboutModuleAction, i18n("About Active Module") );
changeAboutMenu( nullptr, aboutModuleAction, i18n("About Active Module") );
aboutViewAction = actionCollection()->addAction( KStandardAction::AboutApp, QStringLiteral("help_about_view"), this, SLOT(about()) );
}
......@@ -293,9 +293,9 @@ bool SettingsBase::queryClose()
void SettingsBase::about()
{
delete aboutDialog;
aboutDialog = 0;
aboutDialog = nullptr;
const KAboutData * about = 0;
const KAboutData * about = nullptr;
if( sender() == aboutViewAction ) {
about = activeView->aboutData();
} else if( sender() == aboutModuleAction && activeView->moduleView() ) {
......@@ -303,7 +303,7 @@ void SettingsBase::about()
}
if( about ) {
aboutDialog = new KAboutApplicationDialog(*about, 0);
aboutDialog = new KAboutApplicationDialog(*about, nullptr);
aboutDialog->show();
}
}
......
......@@ -38,9 +38,9 @@ class ToolTipManager::Private
{
public:
Private() :
tooltip(0),
view(0),
timer(0),
tooltip(nullptr),
view(nullptr),
timer(nullptr),
delay(300)
{ }
......
......@@ -94,7 +94,7 @@ void ClassicMode::initEvent()
d->proxyModel = new MenuProxyModel( this );
d->proxyModel->setSourceModel( d->model );
d->proxyModel->sort( 0 );
d->classicWidget = new QSplitter( Qt::Horizontal, 0 );
d->classicWidget = new QSplitter( Qt::Horizontal, nullptr );
d->classicWidget->setChildrenCollapsible( false );
d->moduleView = new ModuleView( d->classicWidget );
d->classicTree = nullptr;
......
......@@ -32,7 +32,7 @@ class ExternalAppModule : public QWidget
Q_OBJECT
public:
explicit ExternalAppModule(QWidget * parent = 0, KCModuleInfo * module = 0);
explicit ExternalAppModule(QWidget * parent = nullptr, KCModuleInfo * module = nullptr);
~ExternalAppModule() override;
protected:
......
......@@ -114,7 +114,7 @@ QVariant MenuModel::data( const QModelIndex &index, int role ) const
Qt::ItemFlags MenuModel::flags( const QModelIndex &index ) const
{
if ( !index.isValid() ) {
return 0;
return nullptr;
}
return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
......
......@@ -48,7 +48,7 @@ public:
* @param menuRoot The MenuItem to use as the basis for providing information.
* @param parent The QObject to use as a parent of the MenuModel.
*/
explicit MenuModel( MenuItem * menuRoot, QObject *parent = 0 );
explicit MenuModel( MenuItem * menuRoot, QObject *parent = nullptr );
/**
* Destroys the MenuModel. The menuRoot will not be destroyed.
......
......@@ -48,7 +48,7 @@ public:
*
* @param parent The QObject to use as a parent.
*/
MenuProxyModel( QObject *parent = 0 );
MenuProxyModel( QObject *parent = nullptr );
QHash<int, QByteArray> roleNames() const override;
......
......@@ -55,7 +55,7 @@ public:
/**
* Constructs a ModuleView, with the parent specified.
*/
explicit ModuleView(QWidget * parent = 0);
explicit ModuleView(QWidget * parent = nullptr);
/**
* Destroys the module view, along with all modules loaded, and any changes present in them.
......
......@@ -25,7 +25,7 @@
class CategorizedView : public KCategorizedView
{
public:
CategorizedView( QWidget *parent = 0 );
CategorizedView( QWidget *parent = nullptr );
void setModel( QAbstractItemModel *model ) override;
protected:
......
......@@ -38,7 +38,7 @@ K_PLUGIN_FACTORY( IconModeFactory, registerPlugin<IconMode>(); )
class IconMode::Private {
public:
Private() : categoryDrawer( 0 ), categoryView( 0 ), moduleView( 0 ) {}
Private() : categoryDrawer( nullptr ), categoryView( nullptr ), moduleView( nullptr ) {}
virtual ~Private() {
delete aboutIcon;
}
......@@ -116,7 +116,7 @@ void IconMode::initEvent()
d->moduleView = new ModuleView( d->mainWidget );
connect( d->moduleView, &ModuleView::moduleChanged, this, &IconMode::moduleLoaded );
connect( d->moduleView, &ModuleView::closeRequest, this, &IconMode::backToOverview );
d->categoryView = 0;
d->categoryView = nullptr;
}
void IconMode::searchChanged( const QString& text )
......
......@@ -25,7 +25,7 @@
class CategorizedView : public KCategorizedView
{
public:
CategorizedView( QWidget *parent = 0 );
CategorizedView( QWidget *parent = nullptr );
void setModel( QAbstractItemModel *model ) override;
protected:
......
......@@ -344,7 +344,7 @@ void SidebarMode::initEvent()
d->mainLayout->setContentsMargins(0, 0, 0, 0);
d->moduleView = new ModuleView( d->mainWidget );
connect( d->moduleView, &ModuleView::moduleChanged, this, &SidebarMode::moduleLoaded );
d->quickWidget = 0;
d->quickWidget = nullptr;
moduleView()->setFaceType(KPageView::Plain);
}
......
......@@ -39,9 +39,9 @@ class ToolTipManager::Private
{
public:
Private() :
tooltip(0),
view(0),
timer(0),
tooltip(nullptr),
view(nullptr),
timer(nullptr),
delay(300)
{ }
......
Supports Markdown
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