diff --git a/src/PrintOptions.cpp b/src/PrintOptions.cpp index 1fe6d261..723a3f08 100644 --- a/src/PrintOptions.cpp +++ b/src/PrintOptions.cpp @@ -1,46 +1,46 @@ /* Copyright 2012 Kasper Laudrup This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) version 3 or any later version accepted by the membership of KDE e.V. (or its successor appro- ved by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of version 3 of the license. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see http://www.gnu.org/licenses/. + along with this program. If not, see https://www.gnu.org/licenses/. */ // Own #include "PrintOptions.h" // KDE #include #include using namespace Konsole; PrintOptions::PrintOptions(QWidget *parent) : QWidget(parent) { setupUi(this); KConfigGroup configGroup(KSharedConfig::openConfig(), "PrintOptions"); printerFriendly->setChecked(configGroup.readEntry("PrinterFriendly", true)); scaleOutput->setChecked(configGroup.readEntry("ScaleOutput", true)); } PrintOptions::~PrintOptions() = default; void PrintOptions::saveSettings() { KConfigGroup configGroup(KSharedConfig::openConfig(), "PrintOptions"); configGroup.writeEntry("PrinterFriendly", printerFriendly->isChecked()); configGroup.writeEntry("ScaleOutput", scaleOutput->isChecked()); } diff --git a/src/PrintOptions.h b/src/PrintOptions.h index 014fc9cd..834f1641 100644 --- a/src/PrintOptions.h +++ b/src/PrintOptions.h @@ -1,40 +1,40 @@ /* Copyright 2012 Kasper Laudrup This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) version 3 or any later version accepted by the membership of KDE e.V. (or its successor appro- ved by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of version 3 of the license. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see http://www.gnu.org/licenses/. + along with this program. If not, see https://www.gnu.org/licenses/. */ #ifndef PRINTOPTIONS_H #define PRINTOPTIONS_H #include "ui_PrintOptions.h" namespace Konsole { class PrintOptions : public QWidget, private Ui::PrintOptions { Q_OBJECT public: explicit PrintOptions(QWidget *parent = nullptr); ~PrintOptions() override; public Q_SLOTS: void saveSettings(); }; } #endif diff --git a/src/WindowSystemInfo.cpp b/src/WindowSystemInfo.cpp index cbff60bb..86cddc79 100644 --- a/src/WindowSystemInfo.cpp +++ b/src/WindowSystemInfo.cpp @@ -1,26 +1,26 @@ /* Copyright 2012 Jekyll Wu This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) version 3 or any later version accepted by the membership of KDE e.V. (or its successor appro- ved by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of version 3 of the license. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see http://www.gnu.org/licenses/. + along with this program. If not, see https://www.gnu.org/licenses/. */ // Own #include "WindowSystemInfo.h" using Konsole::WindowSystemInfo; bool WindowSystemInfo::HAVE_TRANSPARENCY = false; diff --git a/src/WindowSystemInfo.h b/src/WindowSystemInfo.h index a8c24dca..cd1fc348 100644 --- a/src/WindowSystemInfo.h +++ b/src/WindowSystemInfo.h @@ -1,34 +1,34 @@ /* Copyright 2012 Jekyll Wu This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) version 3 or any later version accepted by the membership of KDE e.V. (or its successor appro- ved by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of version 3 of the license. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see http://www.gnu.org/licenses/. + along with this program. If not, see https://www.gnu.org/licenses/. */ #ifndef WINDOWSYSTEMINFO_H #define WINDOWSYSTEMINFO_H #include "konsoleprivate_export.h" namespace Konsole { class KONSOLEPRIVATE_EXPORT WindowSystemInfo { public: static bool HAVE_TRANSPARENCY; }; } #endif // WINDOWSYSTEMINFO_H diff --git a/src/settings/GeneralSettings.cpp b/src/settings/GeneralSettings.cpp index f687b5d7..6c0325ac 100644 --- a/src/settings/GeneralSettings.cpp +++ b/src/settings/GeneralSettings.cpp @@ -1,43 +1,43 @@ /* Copyright 2011 Kurt Hindenburg This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) version 3 or any later version accepted by the membership of KDE e.V. (or its successor appro- ved by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of version 3 of the license. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see http://www.gnu.org/licenses/. + along with this program. If not, see https://www.gnu.org/licenses/. */ // Own #include "GeneralSettings.h" #include using namespace Konsole; GeneralSettings::GeneralSettings(QWidget* aParent) : QWidget(aParent) { setupUi(this); connect(enableAllMessagesButton, &QPushButton::clicked, this, &Konsole::GeneralSettings::slotEnableAllMessages); kcfg_ShowTerminalSizeHint->setVisible(false); } GeneralSettings::~GeneralSettings() = default; void GeneralSettings::slotEnableAllMessages() { KMessageBox::enableAllMessages(); } diff --git a/src/settings/GeneralSettings.h b/src/settings/GeneralSettings.h index 307f903d..d1d46f4d 100644 --- a/src/settings/GeneralSettings.h +++ b/src/settings/GeneralSettings.h @@ -1,40 +1,40 @@ /* Copyright 2011 Kurt Hindenburg This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) version 3 or any later version accepted by the membership of KDE e.V. (or its successor appro- ved by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of version 3 of the license. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see http://www.gnu.org/licenses/. + along with this program. If not, see https://www.gnu.org/licenses/. */ #ifndef GENERALSETTINGS_H #define GENERALSETTINGS_H #include "ui_GeneralSettings.h" namespace Konsole { class GeneralSettings : public QWidget, private Ui::GeneralSettings { Q_OBJECT public: explicit GeneralSettings(QWidget *aParent = nullptr); ~GeneralSettings() override; public Q_SLOTS: void slotEnableAllMessages(); }; } #endif diff --git a/src/settings/PartInfo.cpp b/src/settings/PartInfo.cpp index 397423f7..c0b253d2 100644 --- a/src/settings/PartInfo.cpp +++ b/src/settings/PartInfo.cpp @@ -1,32 +1,32 @@ /* Copyright 2017 Kurt Hindenburg This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) version 3 or any later version accepted by the membership of KDE e.V. (or its successor appro- ved by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of version 3 of the license. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see http://www.gnu.org/licenses/. + along with this program. If not, see https://www.gnu.org/licenses/. */ // Own #include "PartInfo.h" using namespace Konsole; PartInfoSettings::PartInfoSettings(QWidget* parent) : QWidget(parent) { setupUi(this); } PartInfoSettings::~PartInfoSettings() = default; diff --git a/src/settings/PartInfo.h b/src/settings/PartInfo.h index f504a4bb..1f8c2a8f 100644 --- a/src/settings/PartInfo.h +++ b/src/settings/PartInfo.h @@ -1,37 +1,37 @@ /* Copyright 2017 Kurt Hindenburg This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) version 3 or any later version accepted by the membership of KDE e.V. (or its successor appro- ved by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of version 3 of the license. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see http://www.gnu.org/licenses/. + along with this program. If not, see https://www.gnu.org/licenses/. */ #ifndef PARTINFO_H #define PARTINFO_H #include "ui_PartInfo.h" namespace Konsole { class PartInfoSettings : public QWidget, private Ui::PartInfoSettings { Q_OBJECT public: explicit PartInfoSettings(QWidget *parent = nullptr); ~PartInfoSettings() override; }; } #endif diff --git a/src/settings/TabBarSettings.cpp b/src/settings/TabBarSettings.cpp index 1b610e90..c34d3cae 100644 --- a/src/settings/TabBarSettings.cpp +++ b/src/settings/TabBarSettings.cpp @@ -1,47 +1,47 @@ /* Copyright 2011 Kurt Hindenburg This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) version 3 or any later version accepted by the membership of KDE e.V. (or its successor appro- ved by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of version 3 of the license. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see http://www.gnu.org/licenses/. + along with this program. If not, see https://www.gnu.org/licenses/. */ // Own #include "TabBarSettings.h" using namespace Konsole; TabBarSettings::TabBarSettings(QWidget* parent) : QWidget(parent) { setupUi(this); // For some reason these layouts have invalid sizes when // sizeHint() is read before the widget is shown. appearanceTabLayout->activate(); behaviorTabLayout->activate(); // Enable CSS file selector only when tabbar is visible and custom css is active const auto updateStyleSheetFileEnable = [this](bool) { kcfg_TabBarUserStyleSheetFile->setEnabled(kcfg_TabBarUseUserStyleSheet->isChecked() && !AlwaysHideTabBar->isChecked()); }; connect(kcfg_TabBarUseUserStyleSheet, &QAbstractButton::toggled, this, updateStyleSheetFileEnable); connect(AlwaysHideTabBar, &QAbstractButton::toggled, this, updateStyleSheetFileEnable); } TabBarSettings::~TabBarSettings() = default; diff --git a/src/settings/TabBarSettings.h b/src/settings/TabBarSettings.h index 53fe2193..e53808e2 100644 --- a/src/settings/TabBarSettings.h +++ b/src/settings/TabBarSettings.h @@ -1,37 +1,37 @@ /* Copyright 2011 Kurt Hindenburg This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) version 3 or any later version accepted by the membership of KDE e.V. (or its successor appro- ved by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of version 3 of the license. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see http://www.gnu.org/licenses/. + along with this program. If not, see https://www.gnu.org/licenses/. */ #ifndef TABBARSETTINGS_H #define TABBARSETTINGS_H #include "ui_TabBarSettings.h" namespace Konsole { class TabBarSettings : public QWidget, private Ui::TabBarSettings { Q_OBJECT public: explicit TabBarSettings(QWidget *parent = nullptr); ~TabBarSettings() override; }; } #endif diff --git a/src/settings/TemporaryFilesSettings.cpp b/src/settings/TemporaryFilesSettings.cpp index cee0ceab..ed840d1c 100644 --- a/src/settings/TemporaryFilesSettings.cpp +++ b/src/settings/TemporaryFilesSettings.cpp @@ -1,55 +1,55 @@ /* Copyright 2015 Kurt Hindenburg This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) version 3 or any later version accepted by the membership of KDE e.V. (or its successor appro- ved by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of version 3 of the license. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see http://www.gnu.org/licenses/. + along with this program. If not, see https://www.gnu.org/licenses/. */ // Own #include "TemporaryFilesSettings.h" // Qt #include using namespace Konsole; TemporaryFilesSettings::TemporaryFilesSettings(QWidget* aParent) : QWidget(aParent) { setupUi(this); const QString tempPath = QStandardPaths::writableLocation(QStandardPaths::TempLocation); QString cachePath = QStandardPaths::writableLocation(QStandardPaths::CacheLocation); #ifdef Q_OS_UNIX // Use "~" instead of full path. It looks nice and helps // in cases when home path is really long. const QString homePath = QStandardPaths::writableLocation(QStandardPaths::HomeLocation); if(cachePath.startsWith(homePath)) { cachePath.replace(0, homePath.length(), QStringLiteral("~")); } #endif // There's no way of doing this with strings placed in .ui file kcfg_scrollbackUseSystemLocation->setText( i18nc("@option:radio File location; %1: path to directory placeholder", "System temporary directory (%1)", tempPath)); kcfg_scrollbackUseCacheLocation->setText( i18nc("@option:radio File location; %1: path to directory placeholder", "User cache directory (%1)", cachePath)); kcfg_scrollbackUseSpecifiedLocationDirectory->setMode(KFile::Directory); } diff --git a/src/settings/TemporaryFilesSettings.h b/src/settings/TemporaryFilesSettings.h index 0610ac91..b0ea8b25 100644 --- a/src/settings/TemporaryFilesSettings.h +++ b/src/settings/TemporaryFilesSettings.h @@ -1,37 +1,37 @@ /* Copyright 2015 Kurt Hindenburg This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) version 3 or any later version accepted by the membership of KDE e.V. (or its successor appro- ved by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of version 3 of the license. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see http://www.gnu.org/licenses/. + along with this program. If not, see https://www.gnu.org/licenses/. */ #ifndef TEMPORARYFILESSETTINGS_H #define TEMPORARYFILESSETTINGS_H #include "ui_TemporaryFilesSettings.h" namespace Konsole { class TemporaryFilesSettings : public QWidget, private Ui::TemporaryFilesSettings { Q_OBJECT public: explicit TemporaryFilesSettings(QWidget *aParent = nullptr); ~TemporaryFilesSettings() override = default; }; } #endif diff --git a/src/settings/ThumbnailsSettings.cpp b/src/settings/ThumbnailsSettings.cpp index 541df03a..c700be12 100644 --- a/src/settings/ThumbnailsSettings.cpp +++ b/src/settings/ThumbnailsSettings.cpp @@ -1,29 +1,29 @@ /* Copyright 2020 Tomaz Canabrava This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) version 3 or any later version accepted by the membership of KDE e.V. (or its successor appro- ved by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of version 3 of the license. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see http://www.gnu.org/licenses/. + along with this program. If not, see https://www.gnu.org/licenses/. */ #include "ThumbnailsSettings.h" using namespace Konsole; ThumbnailsSettings::ThumbnailsSettings(QWidget *aParent) : QWidget(aParent) { setupUi(this); } diff --git a/src/settings/ThumbnailsSettings.h b/src/settings/ThumbnailsSettings.h index 44b12295..f4a9351c 100644 --- a/src/settings/ThumbnailsSettings.h +++ b/src/settings/ThumbnailsSettings.h @@ -1,38 +1,38 @@ /* Copyright 2020 Tomaz Canabrava This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) version 3 or any later version accepted by the membership of KDE e.V. (or its successor appro- ved by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of version 3 of the license. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see http://www.gnu.org/licenses/. + along with this program. If not, see https://www.gnu.org/licenses/. */ #ifndef THUMBNAILSSETTINGS_H #define THUMBNAILSSETTINGS_H #include "ui_ThumbnailsSettings.h" namespace Konsole { class ThumbnailsSettings : public QWidget, private Ui::ThumbnailsSettings { Q_OBJECT public: explicit ThumbnailsSettings(QWidget *aParent = nullptr); ~ThumbnailsSettings() override = default; }; } #endif diff --git a/src/tests/demo_konsolepart/src/demo_konsolepart.cpp b/src/tests/demo_konsolepart/src/demo_konsolepart.cpp index 9671b913..51e65570 100644 --- a/src/tests/demo_konsolepart/src/demo_konsolepart.cpp +++ b/src/tests/demo_konsolepart/src/demo_konsolepart.cpp @@ -1,107 +1,107 @@ /* Copyright 2017 by Kurt Hindenburg This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) version 3 or any later version accepted by the membership of KDE e.V. (or its successor approved by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of version 3 of the license. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . */ #include "demo_konsolepart.h" #include #include #include #include #include #include #include #include #include // see below notes //#include "../../../WindowSystemInfo.h" demo_konsolepart::demo_konsolepart() : KMainWindow(), _mainWindow(nullptr), _terminalPart(nullptr), _terminal(nullptr) { const bool useTranslucency = KWindowSystem::compositingActive(); setAttribute(Qt::WA_TranslucentBackground, useTranslucency); setAttribute(Qt::WA_NoSystemBackground, false); // This is used in EditProfileDialog to show the warnings about // transparency issues - needs refactoring as the above // include does not work // WindowSystemInfo::HAVE_TRANSPARENCY = useTranslucency; // Create terminal part and embed in into the main window _terminalPart = createPart(); if (_terminalPart == nullptr) { return; } QMenu* fileMenu = menuBar()->addMenu(QStringLiteral("File")); QAction* manageProfilesAction = fileMenu->addAction(QStringLiteral("Manage Profiles...")); connect(manageProfilesAction, &QAction::triggered, this, &demo_konsolepart::manageProfiles); QAction* quitAction = fileMenu->addAction(QStringLiteral("Quit")); connect(quitAction, &QAction::triggered, this, &demo_konsolepart::quit); connect(_terminalPart, &KParts::ReadOnlyPart::destroyed, this, &demo_konsolepart::quit); setCentralWidget(_terminalPart->widget()); _terminal = qobject_cast(_terminalPart); // Test if blur is enabled for profile bool blurEnabled; QMetaObject::invokeMethod(_terminalPart, "isBlurEnabled", Qt::DirectConnection, Q_RETURN_ARG(bool, blurEnabled)); qWarning()<<"blur enabled: "<library()).factory(); Q_ASSERT(factory); auto* terminalPart = factory->create(this); return terminalPart; } void demo_konsolepart::manageProfiles() { QMetaObject::invokeMethod(_terminalPart, "showManageProfilesDialog", Qt::QueuedConnection, Q_ARG(QWidget*, QApplication::activeWindow())); } void demo_konsolepart::quit() { close(); } diff --git a/src/tests/demo_konsolepart/src/demo_konsolepart.h b/src/tests/demo_konsolepart/src/demo_konsolepart.h index 8507fcdf..9def0073 100644 --- a/src/tests/demo_konsolepart/src/demo_konsolepart.h +++ b/src/tests/demo_konsolepart/src/demo_konsolepart.h @@ -1,53 +1,53 @@ /* Copyright 2017 by Kurt Hindenburg This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) version 3 or any later version accepted by the membership of KDE e.V. (or its successor approved by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of version 3 of the license. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . */ #ifndef DEMO_KONSOLEPART_H #define DEMO_KONSOLEPART_H #include #include #include #include class demo_konsolepart : public KMainWindow { Q_OBJECT public: demo_konsolepart(); ~demo_konsolepart() override; void manageProfiles(); public Q_SLOTS: void quit(); private: Q_DISABLE_COPY(demo_konsolepart) KParts::ReadOnlyPart* createPart(); KMainWindow *_mainWindow; KParts::ReadOnlyPart *_terminalPart; TerminalInterface *_terminal; }; #endif diff --git a/src/tests/demo_konsolepart/src/main.cpp b/src/tests/demo_konsolepart/src/main.cpp index b7b85496..946fa16f 100644 --- a/src/tests/demo_konsolepart/src/main.cpp +++ b/src/tests/demo_konsolepart/src/main.cpp @@ -1,66 +1,66 @@ /* Copyright 2017 by Kurt Hindenburg This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License or (at your option) version 3 or any later version accepted by the membership of KDE e.V. (or its successor approved by the membership of KDE e.V.), which shall act as a proxy defined in Section 14 of version 3 of the license. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . */ // application header #include "demo_konsolepart.h" // KF headers #include #include // Qt headers #include #include int main(int argc, char **argv) { auto app = new QApplication(argc, argv); KLocalizedString::setApplicationDomain("demo_konsolepart"); KAboutData about(QStringLiteral("demo_konsolepart"), i18nc("@title", "Demo KonsolePart"), QStringLiteral("1.0"), i18nc("@title", "Terminal emulator"), KAboutLicense::GPL_V2, i18nc("@info:credit", "(c) 2017, The Konsole Developers"), QString(), QStringLiteral("https://konsole.kde.org/")); KAboutData::setApplicationData(about); QSharedPointer parser(new QCommandLineParser); parser->setApplicationDescription(about.shortDescription()); parser->addHelpOption(); parser->addVersionOption(); about.setupCommandLine(parser.data()); QStringList args = app->arguments(); parser->process(args); about.processCommandLine(parser.data()); auto demo = new demo_konsolepart(); demo->show(); int ret = app->exec(); delete app; return ret; }