diff --git a/src/BookmarkHandler.cpp b/src/BookmarkHandler.cpp index 3684bc2c1..69aa5a8b0 100644 --- a/src/BookmarkHandler.cpp +++ b/src/BookmarkHandler.cpp @@ -106,7 +106,7 @@ QUrl BookmarkHandler::currentUrl() const QUrl BookmarkHandler::urlForView(ViewProperties *view) const { if (view != nullptr) { - return QUrl(view->url()); + return view->url(); } else { return QUrl(); } diff --git a/src/ColorScheme.cpp b/src/ColorScheme.cpp index 0f9694c6d..859dd9b2c 100644 --- a/src/ColorScheme.cpp +++ b/src/ColorScheme.cpp @@ -44,39 +44,39 @@ using namespace Konsole; // gamma correction for the dim colors to compensate for bright X screens. // It contains the 8 ansiterm/xterm colors in 2 intensities. const ColorEntry ColorScheme::defaultTable[TABLE_COLORS] = { - ColorEntry(QColor(0x00, 0x00, 0x00)), // Dfore - ColorEntry(QColor(0xFF, 0xFF, 0xFF)), // Dback - ColorEntry(QColor(0x00, 0x00, 0x00)), // Black - ColorEntry(QColor(0xB2, 0x18, 0x18)), // Red - ColorEntry(QColor(0x18, 0xB2, 0x18)), // Green - ColorEntry(QColor(0xB2, 0x68, 0x18)), // Yellow - ColorEntry(QColor(0x18, 0x18, 0xB2)), // Blue - ColorEntry(QColor(0xB2, 0x18, 0xB2)), // Magenta - ColorEntry(QColor(0x18, 0xB2, 0xB2)), // Cyan - ColorEntry(QColor(0xB2, 0xB2, 0xB2)), // White + ColorEntry(0x00, 0x00, 0x00), // Dfore + ColorEntry(0xFF, 0xFF, 0xFF), // Dback + ColorEntry(0x00, 0x00, 0x00), // Black + ColorEntry(0xB2, 0x18, 0x18), // Red + ColorEntry(0x18, 0xB2, 0x18), // Green + ColorEntry(0xB2, 0x68, 0x18), // Yellow + ColorEntry(0x18, 0x18, 0xB2), // Blue + ColorEntry(0xB2, 0x18, 0xB2), // Magenta + ColorEntry(0x18, 0xB2, 0xB2), // Cyan + ColorEntry(0xB2, 0xB2, 0xB2), // White // intensive versions - ColorEntry(QColor(0x00, 0x00, 0x00)), - ColorEntry(QColor(0xFF, 0xFF, 0xFF)), - ColorEntry(QColor(0x68, 0x68, 0x68)), - ColorEntry(QColor(0xFF, 0x54, 0x54)), - ColorEntry(QColor(0x54, 0xFF, 0x54)), - ColorEntry(QColor(0xFF, 0xFF, 0x54)), - ColorEntry(QColor(0x54, 0x54, 0xFF)), - ColorEntry(QColor(0xFF, 0x54, 0xFF)), - ColorEntry(QColor(0x54, 0xFF, 0xFF)), - ColorEntry(QColor(0xFF, 0xFF, 0xFF)), + ColorEntry(0x00, 0x00, 0x00), + ColorEntry(0xFF, 0xFF, 0xFF), + ColorEntry(0x68, 0x68, 0x68), + ColorEntry(0xFF, 0x54, 0x54), + ColorEntry(0x54, 0xFF, 0x54), + ColorEntry(0xFF, 0xFF, 0x54), + ColorEntry(0x54, 0x54, 0xFF), + ColorEntry(0xFF, 0x54, 0xFF), + ColorEntry(0x54, 0xFF, 0xFF), + ColorEntry(0xFF, 0xFF, 0xFF), // Here are faint intensities, which may not be good. // faint versions - ColorEntry(QColor(0x00, 0x00, 0x00)), - ColorEntry(QColor(0xFF, 0xFF, 0xFF)), - ColorEntry(QColor(0x00, 0x00, 0x00)), - ColorEntry(QColor(0x65, 0x00, 0x00)), - ColorEntry(QColor(0x00, 0x65, 0x00)), - ColorEntry(QColor(0x65, 0x5E, 0x00)), - ColorEntry(QColor(0x00, 0x00, 0x65)), - ColorEntry(QColor(0x65, 0x00, 0x65)), - ColorEntry(QColor(0x00, 0x65, 0x65)), - ColorEntry(QColor(0x65, 0x65, 0x65)) + ColorEntry(0x00, 0x00, 0x00), + ColorEntry(0xFF, 0xFF, 0xFF), + ColorEntry(0x00, 0x00, 0x00), + ColorEntry(0x65, 0x00, 0x00), + ColorEntry(0x00, 0x65, 0x00), + ColorEntry(0x65, 0x5E, 0x00), + ColorEntry(0x00, 0x00, 0x65), + ColorEntry(0x65, 0x00, 0x65), + ColorEntry(0x00, 0x65, 0x65), + ColorEntry(0x65, 0x65, 0x65) }; const char * const ColorScheme::colorNames[TABLE_COLORS] = { @@ -363,7 +363,7 @@ void ColorScheme::read(const KConfig &config) const QString schemeDescription = configGroup.readEntry("Description", i18nc("@item", "Un-named Color Scheme")); _description = i18n(schemeDescription.toUtf8().constData()); - _opacity = configGroup.readEntry("Opacity", qreal(1.0)); + _opacity = configGroup.readEntry("Opacity", 1.0); setWallpaper(configGroup.readEntry("Wallpaper", QString())); for (int i = 0; i < TABLE_COLORS; i++) { diff --git a/src/KeyBindingEditor.cpp b/src/KeyBindingEditor.cpp index 6e813fc6c..ba6a35f89 100644 --- a/src/KeyBindingEditor.cpp +++ b/src/KeyBindingEditor.cpp @@ -225,7 +225,7 @@ void KeyBindingEditor::setupKeyBindingTable(const KeyboardTranslator *translator QTableWidgetItem *keyItem = new QTableWidgetItem(entry.conditionToString()); keyItem->setData(Qt::UserRole, QVariant::fromValue(entry)); - QTableWidgetItem *textItem = new QTableWidgetItem(QString(entry.resultToString())); + QTableWidgetItem *textItem = new QTableWidgetItem(entry.resultToString()); _ui->keyBindingTable->setItem(row, 0, keyItem); _ui->keyBindingTable->setItem(row, 1, textItem); diff --git a/src/autotests/CharacterColorTest.cpp b/src/autotests/CharacterColorTest.cpp index 77089c2f1..0571f6695 100644 --- a/src/autotests/CharacterColorTest.cpp +++ b/src/autotests/CharacterColorTest.cpp @@ -30,39 +30,39 @@ using namespace Konsole; const ColorEntry CharacterColorTest::DefaultColorTable[TABLE_COLORS] = { - ColorEntry(QColor(0x00, 0x00, 0x00)), // Dfore - ColorEntry(QColor(0xFF, 0xFF, 0xFF)), // Dback - ColorEntry(QColor(0x00, 0x00, 0x00)), // Black - ColorEntry(QColor(0xB2, 0x18, 0x18)), // Red - ColorEntry(QColor(0x18, 0xB2, 0x18)), // Green - ColorEntry(QColor(0xB2, 0x68, 0x18)), // Yellow - ColorEntry(QColor(0x18, 0x18, 0xB2)), // Blue - ColorEntry(QColor(0xB2, 0x18, 0xB2)), // Magenta - ColorEntry(QColor(0x18, 0xB2, 0xB2)), // Cyan - ColorEntry(QColor(0xB2, 0xB2, 0xB2)), // White + ColorEntry(0x00, 0x00, 0x00), // Dfore + ColorEntry(0xFF, 0xFF, 0xFF), // Dback + ColorEntry(0x00, 0x00, 0x00), // Black + ColorEntry(0xB2, 0x18, 0x18), // Red + ColorEntry(0x18, 0xB2, 0x18), // Green + ColorEntry(0xB2, 0x68, 0x18), // Yellow + ColorEntry(0x18, 0x18, 0xB2), // Blue + ColorEntry(0xB2, 0x18, 0xB2), // Magenta + ColorEntry(0x18, 0xB2, 0xB2), // Cyan + ColorEntry(0xB2, 0xB2, 0xB2), // White // intensive versions - ColorEntry(QColor(0x00, 0x00, 0x00)), - ColorEntry(QColor(0xFF, 0xFF, 0xFF)), - ColorEntry(QColor(0x68, 0x68, 0x68)), - ColorEntry(QColor(0xFF, 0x54, 0x54)), - ColorEntry(QColor(0x54, 0xFF, 0x54)), - ColorEntry(QColor(0xFF, 0xFF, 0x54)), - ColorEntry(QColor(0x54, 0x54, 0xFF)), - ColorEntry(QColor(0xFF, 0x54, 0xFF)), - ColorEntry(QColor(0x54, 0xFF, 0xFF)), - ColorEntry(QColor(0xFF, 0xFF, 0xFF)), + ColorEntry(0x00, 0x00, 0x00), + ColorEntry(0xFF, 0xFF, 0xFF), + ColorEntry(0x68, 0x68, 0x68), + ColorEntry(0xFF, 0x54, 0x54), + ColorEntry(0x54, 0xFF, 0x54), + ColorEntry(0xFF, 0xFF, 0x54), + ColorEntry(0x54, 0x54, 0xFF), + ColorEntry(0xFF, 0x54, 0xFF), + ColorEntry(0x54, 0xFF, 0xFF), + ColorEntry(0xFF, 0xFF, 0xFF), // Here are faint intensities, which may not be good. // faint versions - ColorEntry(QColor(0x00, 0x00, 0x00)), - ColorEntry(QColor(0xFF, 0xFF, 0xFF)), - ColorEntry(QColor(0x00, 0x00, 0x00)), - ColorEntry(QColor(0x65, 0x00, 0x00)), - ColorEntry(QColor(0x00, 0x65, 0x00)), - ColorEntry(QColor(0x65, 0x5E, 0x00)), - ColorEntry(QColor(0x00, 0x00, 0x65)), - ColorEntry(QColor(0x65, 0x00, 0x65)), - ColorEntry(QColor(0x00, 0x65, 0x65)), - ColorEntry(QColor(0x65, 0x65, 0x65)) + ColorEntry(0x00, 0x00, 0x00), + ColorEntry(0xFF, 0xFF, 0xFF), + ColorEntry(0x00, 0x00, 0x00), + ColorEntry(0x65, 0x00, 0x00), + ColorEntry(0x00, 0x65, 0x00), + ColorEntry(0x65, 0x5E, 0x00), + ColorEntry(0x00, 0x00, 0x65), + ColorEntry(0x65, 0x00, 0x65), + ColorEntry(0x00, 0x65, 0x65), + ColorEntry(0x65, 0x65, 0x65) }; void CharacterColorTest::init() @@ -75,10 +75,10 @@ void CharacterColorTest::cleanup() void CharacterColorTest::testColorEntry() { - ColorEntry black = ColorEntry(QColor(0x00, 0x00, 0x00)); - ColorEntry white = ColorEntry(QColor(0xFF, 0xFF, 0xFF)); - ColorEntry red = ColorEntry(QColor(0xB2, 0x18, 0x18)); - ColorEntry green = ColorEntry(QColor(0x18, 0xB2, 0x18)); + ColorEntry black = ColorEntry(0x00, 0x00, 0x00); + ColorEntry white = ColorEntry(0xFF, 0xFF, 0xFF); + ColorEntry red = ColorEntry(0xB2, 0x18, 0x18); + ColorEntry green = ColorEntry(0x18, 0xB2, 0x18); // Test operator== operator!= QCOMPARE(black == white, false); diff --git a/src/autotests/TerminalTest.cpp b/src/autotests/TerminalTest.cpp index 262e68993..abae6e47f 100644 --- a/src/autotests/TerminalTest.cpp +++ b/src/autotests/TerminalTest.cpp @@ -48,16 +48,16 @@ void TerminalTest::testColorTable() { // These are from ColorScheme.cpp but they can be anything to test const ColorEntry defaultTable[TABLE_COLORS] = { - ColorEntry(QColor(0x00, 0x00, 0x00)), ColorEntry(QColor(0xFF, 0xFF, 0xFF)), - ColorEntry(QColor(0x00, 0x00, 0x00)), ColorEntry(QColor(0xB2, 0x18, 0x18)), - ColorEntry(QColor(0x18, 0xB2, 0x18)), ColorEntry(QColor(0xB2, 0x68, 0x18)), - ColorEntry(QColor(0x18, 0x18, 0xB2)), ColorEntry(QColor(0xB2, 0x18, 0xB2)), - ColorEntry(QColor(0x18, 0xB2, 0xB2)), ColorEntry(QColor(0xB2, 0xB2, 0xB2)), - ColorEntry(QColor(0x00, 0x00, 0x00)), ColorEntry(QColor(0xFF, 0xFF, 0xFF)), - ColorEntry(QColor(0x68, 0x68, 0x68)), ColorEntry(QColor(0xFF, 0x54, 0x54)), - ColorEntry(QColor(0x54, 0xFF, 0x54)), ColorEntry(QColor(0xFF, 0xFF, 0x54)), - ColorEntry(QColor(0x54, 0x54, 0xFF)), ColorEntry(QColor(0xFF, 0x54, 0xFF)), - ColorEntry(QColor(0x54, 0xFF, 0xFF)), ColorEntry(QColor(0x00, 0xFF, 0xFF)) + ColorEntry(0x00, 0x00, 0x00), ColorEntry(0xFF, 0xFF, 0xFF), + ColorEntry(0x00, 0x00, 0x00), ColorEntry(0xB2, 0x18, 0x18), + ColorEntry(0x18, 0xB2, 0x18), ColorEntry(0xB2, 0x68, 0x18), + ColorEntry(0x18, 0x18, 0xB2), ColorEntry(0xB2, 0x18, 0xB2), + ColorEntry(0x18, 0xB2, 0xB2), ColorEntry(0xB2, 0xB2, 0xB2), + ColorEntry(0x00, 0x00, 0x00), ColorEntry(0xFF, 0xFF, 0xFF), + ColorEntry(0x68, 0x68, 0x68), ColorEntry(0xFF, 0x54, 0x54), + ColorEntry(0x54, 0xFF, 0x54), ColorEntry(0xFF, 0xFF, 0x54), + ColorEntry(0x54, 0x54, 0xFF), ColorEntry(0xFF, 0x54, 0xFF), + ColorEntry(0x54, 0xFF, 0xFF), ColorEntry(0x00, 0xFF, 0xFF) }; auto display = new TerminalDisplay(nullptr); @@ -70,7 +70,7 @@ void TerminalTest::testColorTable() QCOMPARE(colorTable[i], defaultTable[i]); } - ColorEntry colorEntry = ColorEntry(QColor(0x00, 0x00, 0x00)); + ColorEntry colorEntry = ColorEntry(0x00, 0x00, 0x00); QVERIFY(colorTable[1] != colorEntry); delete display; diff --git a/src/main.cpp b/src/main.cpp index 9ddadcb5d..a352a05c0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -113,7 +113,7 @@ extern "C" int Q_DECL_EXPORT kdemain(int argc, char *argv[]) parser->addVersionOption(); about.setupCommandLine(parser.data()); - QStringList args = QStringList(app->arguments()); + QStringList args = app->arguments(); QStringList customCommand = Application::getCustomCommand(args); Application::populateCommandLineParser(parser.data()); diff --git a/src/tests/demo_konsolepart/src/main.cpp b/src/tests/demo_konsolepart/src/main.cpp index eda348712..8467f4871 100644 --- a/src/tests/demo_konsolepart/src/main.cpp +++ b/src/tests/demo_konsolepart/src/main.cpp @@ -52,7 +52,7 @@ int main(int argc, char **argv) parser->addVersionOption(); about.setupCommandLine(parser.data()); - QStringList args = QStringList(app->arguments()); + QStringList args = app->arguments(); parser->process(args); about.processCommandLine(parser.data());