Commit 21175006 authored by Kurt Hindenburg's avatar Kurt Hindenburg

modernize use nullptr

parent 7ff23512
......@@ -28,7 +28,7 @@ using namespace Konsole;
void DBusTest::initTestCase()
{
const QString interfaceName = QStringLiteral("org.kde.konsole");
QDBusConnectionInterface* bus = 0;
QDBusConnectionInterface* bus = nullptr;
QStringList konsoleServices;
if (!QDBusConnection::sessionBus().isConnected() ||
......
......@@ -100,10 +100,10 @@ KParts::Part* PartTest::createPart()
{
KService::Ptr service = KService::serviceByDesktopName(QStringLiteral("konsolepart"));
if (!service) // not found
return 0;
return nullptr;
KPluginFactory* factory = KPluginLoader(service->library()).factory();
if (factory == nullptr) // not found
return 0;
return nullptr;
KParts::Part* terminalPart = factory->create<KParts::Part>(this);
......
......@@ -181,10 +181,10 @@ KParts::Part* TerminalInterfaceTest::createPart()
{
KService::Ptr service = KService::serviceByDesktopName(QStringLiteral("konsolepart"));
if (!service) // not found
return 0;
return nullptr;
KPluginFactory* factory = KPluginLoader(service->library()).factory();
if (factory == nullptr) // not found
return 0;
return nullptr;
KParts::Part* terminalPart = factory->create<KParts::Part>(this);
......
......@@ -32,7 +32,7 @@ using namespace Konsole;
void TerminalTest::testScrollBarPositions()
{
auto display = new TerminalDisplay(0);
auto display = new TerminalDisplay(nullptr);
// ScrollBar Positions
display->setScrollBarPosition(Enum::ScrollBarLeft);
......@@ -61,7 +61,7 @@ void TerminalTest::testColorTable()
ColorEntry(QColor(0x54, 0xFF, 0xFF)), ColorEntry(QColor(0x00, 0xFF, 0xFF))
};
auto display = new TerminalDisplay(0);
auto display = new TerminalDisplay(nullptr);
display->setColorTable(defaultTable);
......@@ -78,7 +78,7 @@ void TerminalTest::testColorTable()
void TerminalTest::testSize()
{
auto display = new TerminalDisplay(0);
auto display = new TerminalDisplay(nullptr);
QCOMPARE(display->columns(), 1);
QCOMPARE(display->lines(), 1);
......
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