Commit 469d0c90 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Use more nullptr

parent 685d6ec2
...@@ -51,7 +51,7 @@ K_PLUGIN_FACTORY(UAChangerPluginFactory, registerPlugin<UAChangerPlugin>();) ...@@ -51,7 +51,7 @@ K_PLUGIN_FACTORY(UAChangerPluginFactory, registerPlugin<UAChangerPlugin>();)
UAChangerPlugin::UAChangerPlugin(QObject *parent, UAChangerPlugin::UAChangerPlugin(QObject *parent,
const QVariantList &) const QVariantList &)
: KParts::Plugin(parent), : KParts::Plugin(parent),
m_bSettingsLoaded(false), m_part(0L), m_config(0L) m_bSettingsLoaded(false), m_part(nullptr), m_config(nullptr)
{ {
m_pUAMenu = new KActionMenu(QIcon::fromTheme("preferences-web-browser-identification"), m_pUAMenu = new KActionMenu(QIcon::fromTheme("preferences-web-browser-identification"),
i18n("Change Browser Identification"), i18n("Change Browser Identification"),
...@@ -81,7 +81,7 @@ UAChangerPlugin::~UAChangerPlugin() ...@@ -81,7 +81,7 @@ UAChangerPlugin::~UAChangerPlugin()
void UAChangerPlugin::slotReloadDescriptions() void UAChangerPlugin::slotReloadDescriptions()
{ {
delete m_config; delete m_config;
m_config = 0L; m_config = nullptr;
} }
void UAChangerPlugin::parseDescFiles() void UAChangerPlugin::parseDescFiles()
......
...@@ -137,9 +137,9 @@ Sidebar_Widget::Sidebar_Widget(QWidget *parent, KParts::ReadOnlyPart *par, const ...@@ -137,9 +137,9 @@ Sidebar_Widget::Sidebar_Widget(QWidget *parent, KParts::ReadOnlyPart *par, const
{ {
m_somethingVisible = false; m_somethingVisible = false;
m_noUpdate = false; m_noUpdate = false;
m_layout = 0; m_layout = nullptr;
m_currentButtonIndex = -1; m_currentButtonIndex = -1;
m_activeModule = 0; m_activeModule = nullptr;
//m_userMovedSplitter = false; //m_userMovedSplitter = false;
m_latestViewed = -1; m_latestViewed = -1;
setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
...@@ -616,7 +616,7 @@ KonqSidebarModule *Sidebar_Widget::loadModule(QWidget *parent, const QString &de ...@@ -616,7 +616,7 @@ KonqSidebarModule *Sidebar_Widget::loadModule(QWidget *parent, const QString &de
const KConfigGroup configGroup = config->group("Desktop Entry"); const KConfigGroup configGroup = config->group("Desktop Entry");
KonqSidebarPlugin *plugin = buttonInfo.plugin(this); KonqSidebarPlugin *plugin = buttonInfo.plugin(this);
if (!plugin) { if (!plugin) {
return 0; return nullptr;
} }
return plugin->createModule(parent, configGroup, desktopName, QVariant()); return plugin->createModule(parent, configGroup, desktopName, QVariant());
...@@ -629,10 +629,10 @@ KParts::BrowserExtension *Sidebar_Widget::getExtension() ...@@ -629,10 +629,10 @@ KParts::BrowserExtension *Sidebar_Widget::getExtension()
bool Sidebar_Widget::createView(ButtonInfo &buttonInfo) bool Sidebar_Widget::createView(ButtonInfo &buttonInfo)
{ {
buttonInfo.dock = 0; buttonInfo.dock = nullptr;
buttonInfo.module = loadModule(m_area, buttonInfo.file, buttonInfo, buttonInfo.configFile); buttonInfo.module = loadModule(m_area, buttonInfo.file, buttonInfo, buttonInfo.configFile);
if (buttonInfo.module == 0) { if (buttonInfo.module == nullptr) {
return false; return false;
} }
...@@ -858,12 +858,12 @@ KonqSidebarPlugin *ButtonInfo::plugin(QObject *parent) ...@@ -858,12 +858,12 @@ KonqSidebarPlugin *ButtonInfo::plugin(QObject *parent)
KPluginFactory *factory = loader.factory(); KPluginFactory *factory = loader.factory();
if (!factory) { if (!factory) {
qCWarning(SIDEBAR_LOG) << "error loading" << libName << loader.errorString(); qCWarning(SIDEBAR_LOG) << "error loading" << libName << loader.errorString();
return 0; return nullptr;
} }
KonqSidebarPlugin *plugin = factory->create<KonqSidebarPlugin>(parent); KonqSidebarPlugin *plugin = factory->create<KonqSidebarPlugin>(parent);
if (!plugin) { if (!plugin) {
qCWarning(SIDEBAR_LOG) << "error creating object from" << libName; qCWarning(SIDEBAR_LOG) << "error creating object from" << libName;
return 0; return nullptr;
} }
m_plugin = plugin; m_plugin = plugin;
} }
......
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