From e22fb9a560667840b29f3fbe7fc081e726f32e34 Mon Sep 17 00:00:00 2001 From: Alf Gaida Date: Fri, 4 Sep 2015 21:21:06 +0200 Subject: [PATCH] Cherry-picked upstream version 0.9.0+20150831. --- .gitignore | 2 - AUTHORS | 2 +- CMakeLists.txt | 116 +++++++----------- commanditemmodel.cpp | 18 +-- commanditemmodel.h | 4 +- configuredialog/configuredialog.cpp | 2 +- configuredialog/configuredialog.h | 4 +- debian/changelog | 3 +- dialog.cpp | 40 +++--- dialog.h | 12 +- main.cpp | 2 +- man/lxqt-runner.1 | 4 +- providers.cpp | 84 +++---------- providers.h | 52 ++------ translations/lxqt-runner_ar.ts | 4 +- translations/lxqt-runner_cs.ts | 4 +- translations/lxqt-runner_cs_CZ.ts | 4 +- translations/lxqt-runner_da.ts | 2 +- translations/lxqt-runner_da_DK.ts | 8 +- translations/lxqt-runner_de.ts | 74 ++++++----- translations/lxqt-runner_de_DE.ts | 75 ----------- ...lxqt-runner_el_GR.ts => lxqt-runner_el.ts} | 14 ++- translations/lxqt-runner_eo.ts | 6 +- translations/lxqt-runner_es.ts | 10 +- translations/lxqt-runner_es_VE.ts | 10 +- translations/lxqt-runner_eu.ts | 8 +- translations/lxqt-runner_fi.ts | 12 +- translations/lxqt-runner_fr_FR.ts | 4 +- translations/lxqt-runner_hu.ts | 2 +- translations/lxqt-runner_ia.ts | 2 +- translations/lxqt-runner_id_ID.ts | 2 +- ...lxqt-runner_it_IT.ts => lxqt-runner_it.ts} | 16 +-- translations/lxqt-runner_ja.ts | 10 +- translations/lxqt-runner_ko.ts | 2 +- translations/lxqt-runner_lt.ts | 8 +- translations/lxqt-runner_nl.ts | 10 +- translations/lxqt-runner_pl_PL.ts | 8 +- translations/lxqt-runner_pt.ts | 8 +- translations/lxqt-runner_pt_BR.ts | 12 +- translations/lxqt-runner_ro_RO.ts | 6 +- translations/lxqt-runner_sk_SK.ts | 8 +- translations/lxqt-runner_sl.ts | 10 +- translations/lxqt-runner_sr@latin.ts | 2 +- translations/lxqt-runner_sr_BA.ts | 2 +- translations/lxqt-runner_sr_RS.ts | 4 +- translations/lxqt-runner_th_TH.ts | 6 +- translations/lxqt-runner_tr.ts | 12 +- translations/lxqt-runner_uk.ts | 10 +- translations/lxqt-runner_zh_CN.ts | 10 +- translations/lxqt-runner_zh_TW.ts | 12 +- yamlparser.cpp | 40 ++++-- yamlparser.h | 44 +++++-- 52 files changed, 351 insertions(+), 475 deletions(-) delete mode 100644 .gitignore delete mode 100644 translations/lxqt-runner_de_DE.ts rename translations/{lxqt-runner_el_GR.ts => lxqt-runner_el.ts} (87%) rename translations/{lxqt-runner_it_IT.ts => lxqt-runner_it.ts} (84%) diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 384cad1..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -build -nbproject diff --git a/AUTHORS b/AUTHORS index 190d298..5b94db3 100644 --- a/AUTHORS +++ b/AUTHORS @@ -6,5 +6,5 @@ Copyright: Copyright (c) 2010-2012 Razor team Copyright (c) 2012-2014 LXQt team -License: GPL-2 and LGPL-2.1+ +License: LGPL-2.1+ The full text of the licenses can be found in the 'COPYING' file. diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e55887..0f3adc5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,12 +1,24 @@ -cmake_minimum_required(VERSION 2.8.11) +cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR) project(lxqt-runner) set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON) +set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) + +include(CMakeDependentOption) +include(GNUInstallDirs) option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF) +option(USE_MENU_CACHE "Use libmenu-cache from LXDE to generate the app menu" ON) +option(RUNNER_MATH "Math operations support" ON) +option(RUNNER_VBOX "Virtual Box support" ON) +cmake_dependent_option(RUNNER_VBOX_HEADLESS + "Use headless mode instead of default window" OFF + "RUNNER_VBOX" OFF +) find_package(KF5WindowSystem REQUIRED) find_package(Qt5Widgets REQUIRED) @@ -14,33 +26,23 @@ find_package(Qt5Xml REQUIRED) find_package(Qt5Script REQUIRED) find_package(Qt5LinguistTools REQUIRED QUIET) find_package(lxqt REQUIRED) -find_package(Qt5Xdg REQUIRED) find_package(lxqt-globalkeys REQUIRED) find_package(lxqt-globalkeys-ui REQUIRED) message(STATUS "Building with Qt${Qt5Core_VERSION_STRING}") -set(QTX_LIBRARIES Qt5::Widgets Qt5::Xml Qt5::Script) -include(${LXQT_USE_FILE}) -include(${QTXDG_USE_FILE}) -include(${LXQT_GLOBALKEYS_USE_FILE}) -include(${LXQT_GLOBALKEYS_UI_USE_FILE}) +include(LXQtCompilerSettings NO_POLICY_SCOPE) + +set(QTX_LIBRARIES Qt5::Widgets Qt5::Xml Qt5::Script) -# optionally use libmenu-cache from lxde to generate the application menu -find_package(PkgConfig) +if (USE_MENU_CACHE) + # optionally use libmenu-cache from lxde to generate the application menu + find_package(PkgConfig REQUIRED QUIET) -if (NOT WITHOUT_MENU_CACHE) - pkg_check_modules(MENU_CACHE + pkg_check_modules(MENU_CACHE REQUIRED QUIET libmenu-cache>=0.3.3 ) -endif(NOT WITHOUT_MENU_CACHE) - -# if libmenu-cache is available -if (MENU_CACHE_FOUND) - include_directories(${MENU_CACHE_INCLUDE_DIRS}) - add_definitions(-DHAVE_MENU_CACHE=1) endif() - set(lxqt-runner_H_FILES dialog.h commanditemmodel.h @@ -70,16 +72,13 @@ set(QRC_FILES ) set(lxqt-runner_LIBRARIES - ${LXQT_LIBRARIES} - ${LXQT_GLOBALKEYS_LIBRARIES} - ${LXQT_GLOBALKEYS_UI_LIBRARIES} - ${QTXDG_LIBRARIES} + lxqt + lxqt-globalkeys + lxqt-globalkeys-ui ${MENU_CACHE_LIBRARIES} ${QTX_LIBRARIES} ) - - include(LXQtTranslate) lxqt_translate_ts(lxqt-runner_QM_FILES @@ -94,69 +93,42 @@ lxqt_translate_ts(lxqt-runner_QM_FILES lxqt_app_translation_loader(lxqt-runner_QM_LOADER ${PROJECT_NAME}) -#************************************************ - -include_directories( - ${LXQT_INCLUDE_DIRS} - ${LXQT_GLOBALKEYS_INCLUDE_DIRS} - ${LXQT_GLOBALKEYS_UI_INCLUDE_DIRS} - ${QTXDG_INCLUDE_DIRS} -) - if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif() -add_definitions(-Wall) - -set(LXQT_SHARE_DIR "${CMAKE_INSTALL_PREFIX}/share/lxqt") -set(APP_SHARE_DIR "${LXQT_SHARE_DIR}/${PROJECT_NAME}") - -#************************************************ - -if(NOT DEFINED RUNNER_MATH) - set(RUNNER_MATH Yes) -endif() - -if(RUNNER_MATH) - add_definitions(-DMATH_ENABLED) -endif(RUNNER_MATH) - -# ******************************************************************* -# Optional: start VBOX machines in headless mode, -# instead of default window - -if(NOT DEFINED RUNNER_VBOX) - set(RUNNER_VBOX Yes) -endif() - -if(VBOXRUNNER_HEADLESS) - add_definitions(-DVBOXRUNNER_HEADLESS) -endif() - if (RUNNER_VBOX) - set(QRC_FILES - ${QRC_FILES} - virtualbox-icons.qrc - ) - add_definitions(-DVBOX_ENABLED) + list(APPEND QRC_FILES virtualbox-icons.qrc) endif() -qt5_wrap_ui(lxqt-runner_UI_HEADERS ${lxqt-runner_UI_FILES}) -qt5_add_resources(lxqt-runner_QRC_SOURCES ${QRC_FILES}) - add_executable(${PROJECT_NAME} ${lxqt-runner_CPP_FILES} - ${lxqt-runner_UI_FILES} ${lxqt-runner_QRC_SOURCES} ${lxqt-runner_QM_FILES} ${lxqt-runner_QM_LOADER} ) -target_link_libraries(${PROJECT_NAME} ${lxqt-runner_LIBRARIES} KF5::WindowSystem) +target_include_directories(${PROJECT_NAME} + PRIVATE "$<$:${MENU_CACHE_INCLUDE_DIRS}>" +) + +target_compile_definitions(${PROJECT_NAME} + PRIVATE "$<$:MATH_ENABLED>" + PRIVATE "$<$:VBOX_ENABLED>" + PRIVATE "$<$:VBOX_HEADLESS_ENABLED>" + PRIVATE "$<$:HAVE_MENU_CACHE=1>" +) -install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin) -install(FILES ${CONFIG_FILES} DESTINATION ${APP_SHARE_DIR}) +target_link_libraries(${PROJECT_NAME} + ${lxqt-runner_LIBRARIES} + KF5::WindowSystem +) + +install(TARGETS + ${PROJECT_NAME} + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + COMPONENT Runtime +) # building tarball with CPack ------------------------------------------------- include(InstallRequiredSystemLibraries) diff --git a/commanditemmodel.cpp b/commanditemmodel.cpp index 5418929..ebde856 100644 --- a/commanditemmodel.cpp +++ b/commanditemmodel.cpp @@ -42,7 +42,9 @@ CommandItemModel::CommandItemModel(QObject *parent) : mSourceModel(new CommandSourceItemModel(this)), mOnlyHistory(false) { - setDynamicSortFilter(false); // required in Qt5 + setDynamicSortFilter(false); // required in Qt5 + setFilterCaseSensitivity(Qt::CaseInsensitive); + setSortCaseSensitivity(Qt::CaseInsensitive); setSourceModel(mSourceModel); } @@ -138,7 +140,7 @@ int CommandItemModel::itemType(const QModelIndex &index) const return 1; else if (index.row() < mSourceModel->externalProviderStartIndex().row()) return 2; - else + else return 3; } @@ -214,14 +216,12 @@ CommandSourceItemModel::CommandSourceItemModel(QObject *parent) : mProviders.append(new VirtualBoxProvider()); #endif - mProviders.append(new PowerProvider()); - rebuild(); mExternalProviderStartIndex = index(rowCount(), 0); - LxQt::Settings settings("lxqt-runner"); + LXQt::Settings settings("lxqt-runner"); int numExternalProviders = settings.beginReadArray("external providers"); - for (int i = 0; i < numExternalProviders; i++) + for (int i = 0; i < numExternalProviders; i++) { settings.setArrayIndex(i); qDebug() << "Adding external provider:" << settings.value("name") << settings.value("executable"); @@ -237,7 +237,7 @@ CommandSourceItemModel::CommandSourceItemModel(QObject *parent) : connect(provider, SIGNAL(changed()), this, SIGNAL(layoutChanged())); connect(provider, SIGNAL(aboutToBeChanged()), this, SIGNAL(layoutAboutToBeChanged())); } - + rebuild(); } @@ -384,11 +384,11 @@ void CommandSourceItemModel::addHistoryCommand(const QString &command) /*********************************************** - + ***********************************************/ void CommandSourceItemModel::setCommand(const QString& command) { - mCustomCommandProvider->setCommand(command); + mCustomCommandProvider->setCommand(command); foreach (ExternalProvider* externalProvider, mExternalProviders) { externalProvider->setSearchTerm(command); diff --git a/commanditemmodel.h b/commanditemmodel.h index c65dd05..4318c94 100644 --- a/commanditemmodel.h +++ b/commanditemmodel.h @@ -8,7 +8,7 @@ * Authors: * Alexander Sokoloff * - * This program or library is free software; you can/ redistribute it + * This program or library is free software; you can redistribute it * and/or modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. @@ -51,7 +51,7 @@ public: void addHistoryCommand(const QString &command); QString command() const { return mCustomCommandProvider->command(); } - void setCommand(const QString &command); + void setCommand(const QString &command); QPersistentModelIndex customCommandIndex() const { return mCustomCommandIndex; } QPersistentModelIndex externalProviderStartIndex() const { return mExternalProviderStartIndex; } diff --git a/configuredialog/configuredialog.cpp b/configuredialog/configuredialog.cpp index 8a3cfc2..6bb94e4 100644 --- a/configuredialog/configuredialog.cpp +++ b/configuredialog/configuredialog.cpp @@ -49,7 +49,7 @@ ConfigureDialog::ConfigureDialog(QSettings *settings, const QString &defaultShor QDialog(parent), ui(new Ui::ConfigureDialog), mSettings(settings), - mOldSettings(new LxQt::SettingsCache(settings)), + mOldSettings(new LXQt::SettingsCache(settings)), mDefaultShortcut(defaultShortcut) { ui->setupUi(this); diff --git a/configuredialog/configuredialog.h b/configuredialog/configuredialog.h index 1959b42..e19a98f 100644 --- a/configuredialog/configuredialog.h +++ b/configuredialog/configuredialog.h @@ -37,7 +37,7 @@ namespace Ui { class QSettings; -namespace LxQt { +namespace LXQt { class SettingsCache; } @@ -61,7 +61,7 @@ protected: private: Ui::ConfigureDialog *ui; QSettings *mSettings; - LxQt::SettingsCache *mOldSettings; + LXQt::SettingsCache *mOldSettings; QString mDefaultShortcut; private slots: diff --git a/debian/changelog b/debian/changelog index 89b59ba..3902795 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,10 @@ lxqt-runner (0.9.0+20150831-1) unstable; urgency=medium + * Cherry-picked upstream version 0.9.0+20150831. * Added upstream signing key and use in watch file * Fixed control with cme fix - -- Alf Gaida Fri, 04 Sep 2015 21:15:04 +0200 + -- Alf Gaida Fri, 04 Sep 2015 21:20:43 +0200 lxqt-runner (0.9.0-1) experimental; urgency=low diff --git a/dialog.cpp b/dialog.cpp index a3f7ef9..f3bd74f 100644 --- a/dialog.cpp +++ b/dialog.cpp @@ -51,7 +51,7 @@ #include #include -#include +#include #define DEFAULT_SHORTCUT "Alt+F2" @@ -59,9 +59,9 @@ ************************************************/ Dialog::Dialog(QWidget *parent) : - QDialog(parent, Qt::Tool | Qt::WindowStaysOnTopHint | Qt::CustomizeWindowHint), + QDialog(parent, Qt::Dialog | Qt::WindowStaysOnTopHint | Qt::CustomizeWindowHint), ui(new Ui::Dialog), - mSettings(new LxQt::Settings("lxqt-runner", this)), + mSettings(new LXQt::Settings("lxqt-runner", this)), mGlobalShortcut(0), mLockCascadeChanges(false), mConfigureDialog(0) @@ -70,7 +70,7 @@ Dialog::Dialog(QWidget *parent) : setWindowTitle("LXQt Runner"); setAttribute(Qt::WA_TranslucentBackground); - connect(LxQt::Settings::globalSettings(), SIGNAL(iconThemeChanged()), this, SLOT(update())); + connect(LXQt::Settings::globalSettings(), SIGNAL(iconThemeChanged()), this, SLOT(update())); connect(ui->closeButton, SIGNAL(clicked()), this, SLOT(hide())); connect(mSettings, SIGNAL(settingsChanged()), this, SLOT(applySettings())); @@ -87,7 +87,7 @@ Dialog::Dialog(QWidget *parent) : setFilter(""); dataChanged(); - ui->commandList->setItemDelegate(new LxQt::HtmlDelegate(QSize(32, 32), ui->commandList)); + ui->commandList->setItemDelegate(new LXQt::HtmlDelegate(QSize(32, 32), ui->commandList)); // Popup menu ............................... QAction *a = new QAction(XdgIcon::fromTheme("configure"), tr("Configure"), this); @@ -98,9 +98,9 @@ Dialog::Dialog(QWidget *parent) : connect(a, SIGNAL(triggered()), mCommandItemModel, SLOT(clearHistory())); addAction(a); - mPowerManager = new LxQt::PowerManager(this); + mPowerManager = new LXQt::PowerManager(this); addActions(mPowerManager->availableActions()); - mScreenSaver = new LxQt::ScreenSaver(this); + mScreenSaver = new LXQt::ScreenSaver(this); addActions(mScreenSaver->availableActions()); setContextMenuPolicy(Qt::ActionsContextMenu); @@ -108,7 +108,6 @@ Dialog::Dialog(QWidget *parent) : QMenu *menu = new QMenu(this); menu->addActions(actions()); ui->actionButton->setMenu(menu); - ui->actionButton->setIcon(XdgIcon::fromTheme("configure")); // End of popup menu ........................ applySettings(); @@ -117,6 +116,7 @@ Dialog::Dialog(QWidget *parent) : connect(QApplication::desktop(), SIGNAL(workAreaResized(int)), SLOT(realign())); connect(mGlobalShortcut, SIGNAL(activated()), this, SLOT(showHide())); connect(mGlobalShortcut, SIGNAL(shortcutChanged(QString,QString)), this, SLOT(shortcutChanged(QString,QString))); + connect(KWindowSystem::self(), SIGNAL(activeWindowChanged(WId)), this, SLOT(onActiveWindowChanged(WId))); resize(mSettings->value("dialog/width", 400).toInt(), size().height()); @@ -140,7 +140,7 @@ Dialog::~Dialog() void Dialog::closeEvent(QCloseEvent *event) { hide(); - event->ignore(); + event->accept(); } @@ -179,11 +179,6 @@ bool Dialog::eventFilter(QObject *object, QEvent *event) if (object == ui->commandList) return listKeyPressEvent(keyEvent); } - else if (event->type() == QEvent::FocusOut) - { - hide(); - return true; - } return QDialog::eventFilter(object, event); } @@ -292,7 +287,9 @@ bool Dialog::listKeyPressEvent(QKeyEvent *event) ************************************************/ void Dialog::showHide() { - if (isVisible() && isActiveWindow()) + // Using KWindowSystem to detect the active window since + // QWidget::isActiveWindow is not working reliably. + if (isVisible() && (KWindowSystem::activeWindow() == winId())) { hide(); } @@ -375,19 +372,28 @@ void Dialog::shortcutChanged(const QString &/*oldShortcut*/, const QString &newS } +/************************************************ + + ************************************************/ +void Dialog::onActiveWindowChanged(WId id) +{ + if (isVisible() && id != winId()) + showHide(); +} + + /************************************************ ************************************************/ void Dialog::setFilter(const QString &text, bool onlyHistory) { - qDebug() << "Ind i setFilter..."; if (mCommandItemModel->isOutDated()) mCommandItemModel->rebuild(); QString trimmedText = text.simplified(); mCommandItemModel->setCommand(trimmedText); mCommandItemModel->showOnlyHistory(onlyHistory); - mCommandItemModel->setFilterWildcard(trimmedText); + mCommandItemModel->setFilterRegExp(trimmedText); mCommandItemModel->sort(0); } diff --git a/dialog.h b/dialog.h index 9a7de61..92630de 100644 --- a/dialog.h +++ b/dialog.h @@ -34,7 +34,7 @@ namespace Ui { class Dialog; } -namespace LxQt { +namespace LXQt { class Settings; class PowerManager; class ScreenSaver; @@ -69,21 +69,18 @@ protected: private: Ui::Dialog *ui; - LxQt::Settings *mSettings; + LXQt::Settings *mSettings; GlobalKeyShortcut::Action *mGlobalShortcut; CommandItemModel *mCommandItemModel; bool mShowOnTop; int mMonitor; - LxQt::PowerManager *mPowerManager; - LxQt::ScreenSaver *mScreenSaver; + LXQt::PowerManager *mPowerManager; + LXQt::ScreenSaver *mScreenSaver; bool mLockCascadeChanges; ConfigureDialog *mConfigureDialog; - //! \brief handle various additional behaviours (math only for now) - bool editEnterPressed(); - private slots: void realign(); void applySettings(); @@ -93,6 +90,7 @@ private slots: void runCommand(); void showConfigDialog(); void shortcutChanged(const QString &oldShortcut, const QString &newShortcut); + void onActiveWindowChanged(WId id); }; #endif // DIALOG_H diff --git a/main.cpp b/main.cpp index b290df0..1cca392 100644 --- a/main.cpp +++ b/main.cpp @@ -32,7 +32,7 @@ int main(int argc, char *argv[]) { - LxQt::Application a(argc, argv); + LXQt::Application a(argc, argv); a.setQuitOnLastWindowClosed(false); QWidget *hiddenPreviewParent = new QWidget(0, Qt::Tool); diff --git a/man/lxqt-runner.1 b/man/lxqt-runner.1 index 4606d47..d5d2481 100644 --- a/man/lxqt-runner.1 +++ b/man/lxqt-runner.1 @@ -23,7 +23,7 @@ technologies, ships several core desktop components, all of which are optional: .P These components perform similar actions to those available in other desktop environments, and their names are self-descriptive. They are usually not launched -by hand but automatically, when choosing a \fBLxQt\-qt\fR session in the Display +by hand but automatically, when choosing a \fBLXQt\fR session in the Display Manager. .SH BEHAVIOR As you type, suggestions will appear. Once you see the application you wish to run you can navigate @@ -34,7 +34,7 @@ such as \fBlxqt-globalkeyshortcuts\fR. This module only shows at \fBLXQt\fR desktop environment, but you can use in others desktops, by setting an configuring into session startup. .SH "REPORTING BUGS" -Report bugs to https://github.com/lxde/lxde-qt/issues +Report bugs to https://github.com/lxde/lxqt/issues .SH "SEE ALSO" \fBLXQt\fR it has been tailored for users who value simplicity, speed, and an intuitive interface, also intended for less powerful machines. See also: diff --git a/providers.cpp b/providers.cpp index b9fd929..9556089 100644 --- a/providers.cpp +++ b/providers.cpp @@ -89,8 +89,18 @@ bool startProcess(QString command) QString program = expandCommand(command, &args); if (program.isEmpty()) return false; + if (QProcess::startDetached(program, args)) + { + return true; + } else + { + //fallback for executable script with no #! + //trying as in system(2) + args.prepend(program); + args.prepend(QStringLiteral("-c")); + return QProcess::startDetached(QStringLiteral("/bin/sh"), args); + } - return QProcess::startDetached(program, args); } @@ -230,11 +240,8 @@ bool AppLinkItem::compare(const QRegExp ®Exp) const if (regExp.isEmpty()) return false; - QRegExp re(regExp); - - re.setCaseSensitivity(Qt::CaseInsensitive); - return mProgram.contains(re) || - mTitle.contains(re) ; + return mProgram.contains(regExp) || + mTitle.contains(regExp) ; } @@ -255,7 +262,7 @@ AppLinkProvider::AppLinkProvider(): mMenuCacheNotify = 0; #else mXdgMenu = new XdgMenu(); - mXdgMenu->setEnvironments(QStringList() << "X-LXQT" << "LxQt"); + mXdgMenu->setEnvironments(QStringList() << "X-LXQT" << "LXQt"); connect(mXdgMenu, SIGNAL(changed()), this, SLOT(update())); mXdgMenu->read(XdgMenu::getMenuFileName()); update(); @@ -355,7 +362,7 @@ void AppLinkProvider::update() // Otherwise the copied item will have no icon. // FIXME: this is a dirty hack and it should be made cleaner later. if(item->icon().isNull()) - QMetaObject::invokeMethod(item, "updateIcon", Qt::QueuedConnection); + QMetaObject::invokeMethod(item, "updateIcon", Qt::QueuedConnection); delete newItem; } else @@ -407,10 +414,7 @@ bool HistoryItem::run() const ************************************************/ bool HistoryItem::compare(const QRegExp ®Exp) const { - QRegExp re(regExp); - - re.setCaseSensitivity(Qt::CaseSensitive); - return mCommand.contains(re); + return mCommand.contains(regExp); } @@ -597,13 +601,13 @@ VirtualBoxItem::VirtualBoxItem(const QString & MachineName , const QIcon & Icon) void VirtualBoxItem::setRDEPort(const QString & portNum) { - m_rdePortNum = portNum; + m_rdePortNum = portNum; } bool VirtualBoxItem::run() const { QStringList arguments; -#ifdef VBOXRUNNER_HEADLESS +#ifdef VBOX_HEADLESS_ENABLED arguments << "-startvm" << title(); return QProcess::startDetached ("VBoxHeadless" , arguments); #else @@ -615,9 +619,7 @@ bool VirtualBoxItem::run() const bool VirtualBoxItem::compare(const QRegExp ®Exp) const { - QRegExp re(regExp); - re.setCaseSensitivity(Qt::CaseInsensitive); - return (! regExp.isEmpty() && -1 != re.indexIn (title ())); + return (! regExp.isEmpty() && -1 != regExp.indexIn (title ())); } unsigned int VirtualBoxItem::rank(const QString &pattern) const @@ -833,54 +835,6 @@ MathProvider::MathProvider() append(new MathItem()); } - -PowerProviderItem::PowerProviderItem(QAction *action) - : CommandProviderItem(), - m_action(action) -{ - mIcon = action->icon(); - mTitle = action->text(); - mComment = QObject::tr("Power Management"); - mToolTip = mComment; -} - -bool PowerProviderItem::run() const -{ - m_action->activate(QAction::Trigger); - return true; -} - -bool PowerProviderItem::compare(const QRegExp ®Exp) const -{ - if (regExp.isEmpty()) - return false; - - QRegExp re(regExp); - - re.setCaseSensitivity(Qt::CaseInsensitive); - return mTitle.contains(re) ; -} - -unsigned int PowerProviderItem::rank(const QString &pattern) const -{ - return stringRank(mTitle, pattern); -} - -PowerProvider::PowerProvider() : CommandProvider() -{ - m_power = new LxQt::PowerManager(this); - foreach (QAction *a, m_power->availableActions()) - { - append(new PowerProviderItem(a)); - } - - m_screensaver = new LxQt::ScreenSaver(this); - foreach (QAction *a, m_screensaver->availableActions()) - { - append(new PowerProviderItem(a)); - } -} - ExternalProviderItem::ExternalProviderItem() { } diff --git a/providers.h b/providers.h index 14f7cf6..013497a 100644 --- a/providers.h +++ b/providers.h @@ -269,7 +269,7 @@ class VirtualBoxItem: public CommandProviderItem { public: VirtualBoxItem(const QString & MachineName , const QIcon & Icon); - + void setRDEPort (const QString & portNum); bool run() const; bool compare(const QRegExp ®Exp) const; @@ -284,7 +284,7 @@ public: VirtualBoxProvider (); void rebuild(); bool isOutDated() const; - + private: QFile fp; QMap osIcons; @@ -293,40 +293,6 @@ private: }; #endif - -class QAction; -/*! Power management built in into runner - */ -class PowerProviderItem : public CommandProviderItem -{ -public: - PowerProviderItem(QAction *action); - - bool run() const; - bool compare(const QRegExp ®Exp) const; - unsigned int rank(const QString &pattern) const; -private: - QAction *m_action; -}; - -namespace LxQt { - class PowerManager; - class ScreenSaver; -} - -/*! Power management built in into runner - */ -class PowerProvider: public CommandProvider -{ - Q_OBJECT -public: - PowerProvider(); - -private: - LxQt::PowerManager *m_power; - LxQt::ScreenSaver *m_screensaver; -}; - class ExternalProviderItem: public CommandProviderItem { Q_OBJECT @@ -338,7 +304,7 @@ public: bool run() const; bool compare(const QRegExp ®Exp) const {return true;} // We leave the decision to the external process - unsigned int rank(const QString &pattern) const; + unsigned int rank(const QString &pattern) const; QString mCommand; }; @@ -351,21 +317,21 @@ class ExternalProvider: public CommandProvider public: ExternalProvider(const QString name, const QString externalProgram); - + void setSearchTerm(const QString searchTerm); - + signals: void dataChanged(); private slots: void readFromProcess(); void newListOfMaps(QList > maps); - + private: - QString mName; + QString mName; QProcess *mExternalProcess; - QTextStream *mDataToProcess; - YamlParser *mYamlParser; + QTextStream *mDataToProcess; + YamlParser *mYamlParser; QByteArray mBuffer; }; diff --git a/translations/lxqt-runner_ar.ts b/translations/lxqt-runner_ar.ts index 4aa9c42..be7cc46 100644 --- a/translations/lxqt-runner_ar.ts +++ b/translations/lxqt-runner_ar.ts @@ -2,7 +2,7 @@ ConfigureDialog - LxQt-runner Settings + LXQt-runner Settings إعدادات مُطلق ريزر @@ -68,7 +68,7 @@ الرِّياضيَّات - LxQt Power Management + LXQt Power Management إدارة الطاقة لبيئة ريزر diff --git a/translations/lxqt-runner_cs.ts b/translations/lxqt-runner_cs.ts index ba9a7da..224821e 100644 --- a/translations/lxqt-runner_cs.ts +++ b/translations/lxqt-runner_cs.ts @@ -2,7 +2,7 @@ ConfigureDialog - LxQt-runner Settings + LXQt-runner Settings Nastavení spouštěče programů @@ -68,7 +68,7 @@ Matematika - LxQt Power Management + LXQt Power Management Správa energie diff --git a/translations/lxqt-runner_cs_CZ.ts b/translations/lxqt-runner_cs_CZ.ts index 55e3624..128fb06 100644 --- a/translations/lxqt-runner_cs_CZ.ts +++ b/translations/lxqt-runner_cs_CZ.ts @@ -2,7 +2,7 @@ ConfigureDialog - LxQt-runner Settings + LXQt-runner Settings Nastavení spouštěče programů @@ -68,7 +68,7 @@ Matematika - LxQt Power Management + LXQt Power Management Správa energie diff --git a/translations/lxqt-runner_da.ts b/translations/lxqt-runner_da.ts index 2eff5d9..6b31d02 100644 --- a/translations/lxqt-runner_da.ts +++ b/translations/lxqt-runner_da.ts @@ -3,7 +3,7 @@ ConfigureDialog - LxQt-runner Settings + LXQt-runner Settings diff --git a/translations/lxqt-runner_da_DK.ts b/translations/lxqt-runner_da_DK.ts index 2be790c..a962507 100644 --- a/translations/lxqt-runner_da_DK.ts +++ b/translations/lxqt-runner_da_DK.ts @@ -2,7 +2,7 @@ ConfigureDialog - LxQt-runner Settings + LXQt-runner Settings Programstarter Indstillinger @@ -46,7 +46,7 @@ Configure lxqt-runner - Indstil LxQt programstarter + Indstil LXQt programstarter Clear lxqt-runner History @@ -68,8 +68,8 @@ Matematik - LxQt Power Management - LxQt Strømstyring + LXQt Power Management + LXQt Strømstyring \ No newline at end of file diff --git a/translations/lxqt-runner_de.ts b/translations/lxqt-runner_de.ts index 332ca61..b965928 100644 --- a/translations/lxqt-runner_de.ts +++ b/translations/lxqt-runner_de.ts @@ -1,50 +1,57 @@ - + + + ConfigureDialog - LxQt-runner Settings - + Runner Settings + Anwendungsstarter-Einstellungen Appearance - + Aussehen Positioning: - + Positionierung: Show on: - + Anzeigen auf: Shortcut: - + Tastenkürzel: - - Top edge of screen - + + Top edge of the screen + Bildschirmoberkante - - Center of screen - + + Center of the screen + Bildschirmmitte + + + + Focused screen + Fokussierter Bildschirm - - Monitor where the mouse - + + Always on screen %1 + Immer auf Bildschirm %1 - - Always on %1 monitor - + + Reset + Zurücksetzen @@ -52,30 +59,35 @@ Application launcher - + Anwendungsstarter + + + + Configure + Konfigurieren - - Configure lxqt-runner - + + Clear History + Verlauf löschen - - Press "%1" to see dialog. - + + Show/hide runner dialog + Dialog anzeigen/verstecken QObject - + History - + Verlauf - + Mathematics - + Mathematik - \ No newline at end of file + diff --git a/translations/lxqt-runner_de_DE.ts b/translations/lxqt-runner_de_DE.ts deleted file mode 100644 index f12f6c7..0000000 --- a/translations/lxqt-runner_de_DE.ts +++ /dev/null @@ -1,75 +0,0 @@ - - - ConfigureDialog - - LxQt-runner Settings - LxQt-runner-Einstellungen - - - Appearance - Aussehen - - - Positioning: - Positionierung: - - - Show on: - Anzeigen auf: - - - Shortcut: - Tastenkürzel: - - - Top edge of screen - Bildschirmoberkante - - - Center of screen - Bildschirmmitte - - - Monitor where the mouse - Anzeigen, wo die Maus ist - - - Always on %1 monitor - Immer auf Monitor %1 - - - - Dialog - - Application launcher - Anwendungsstarter - - - Configure lxqt-runner - Konfiguriere lxqt-runner - - - Clear lxqt-runner History - LxQt-runner Verlauf löschen - - - Press "%1" to see dialog. - Klicke "%1" für Dialogsansicht. - - - - QObject - - History - Verlauf - - - Mathematics - Mathematik - - - LxQt Power Management - LxQt Energieverwaltung - - - \ No newline at end of file diff --git a/translations/lxqt-runner_el_GR.ts b/translations/lxqt-runner_el.ts similarity index 87% rename from translations/lxqt-runner_el_GR.ts rename to translations/lxqt-runner_el.ts index e408886..3493286 100644 --- a/translations/lxqt-runner_el_GR.ts +++ b/translations/lxqt-runner_el.ts @@ -1,9 +1,11 @@ - + + + ConfigureDialog - LxQt-runner Settings - Ρυθμίσεις εκτελεστή LxQt + LXQt-runner Settings + Ρυθμίσεις εκτελεστή LXQt Appearance @@ -68,8 +70,8 @@ Μαθηματικά - LxQt Power Management - Διαχείριση ενέργειας LxQt + LXQt Power Management + Διαχείριση ενέργειας LXQt - \ No newline at end of file + diff --git a/translations/lxqt-runner_eo.ts b/translations/lxqt-runner_eo.ts index 7b47ba6..87c74ac 100644 --- a/translations/lxqt-runner_eo.ts +++ b/translations/lxqt-runner_eo.ts @@ -2,7 +2,7 @@ ConfigureDialog - LxQt-runner Settings + LXQt-runner Settings Agordoj de lxqt-runner @@ -68,8 +68,8 @@ Matematiko - LxQt Power Management - Kurentmastrumilo de LxQt + LXQt Power Management + Kurentmastrumilo de LXQt \ No newline at end of file diff --git a/translations/lxqt-runner_es.ts b/translations/lxqt-runner_es.ts index 041b48b..901c056 100644 --- a/translations/lxqt-runner_es.ts +++ b/translations/lxqt-runner_es.ts @@ -2,8 +2,8 @@ ConfigureDialog - LxQt-runner Settings - Configuración de LxQt-runner + LXQt-runner Settings + Configuración de LXQt-runner Appearance @@ -50,7 +50,7 @@ Clear lxqt-runner History - Limpiar historial de LxQt-Runner + Limpiar historial de LXQt-Runner Press "%1" to see dialog. @@ -68,8 +68,8 @@ Matemáticas - LxQt Power Management - Administrador de energía de LxQt + LXQt Power Management + Administrador de energía de LXQt \ No newline at end of file diff --git a/translations/lxqt-runner_es_VE.ts b/translations/lxqt-runner_es_VE.ts index e1f4033..1c19d17 100644 --- a/translations/lxqt-runner_es_VE.ts +++ b/translations/lxqt-runner_es_VE.ts @@ -2,8 +2,8 @@ ConfigureDialog - LxQt-runner Settings - Configuraciones de LxQt-Ejecutor + LXQt-runner Settings + Configuraciones de LXQt-Ejecutor Appearance @@ -46,7 +46,7 @@ Configure lxqt-runner - Configurar lanzador de LxQt + Configurar lanzador de LXQt Clear lxqt-runner History @@ -68,8 +68,8 @@ Matematicas - LxQt Power Management - Manejador de energia de LxQt + LXQt Power Management + Manejador de energia de LXQt \ No newline at end of file diff --git a/translations/lxqt-runner_eu.ts b/translations/lxqt-runner_eu.ts index 335c41a..1e6abb4 100644 --- a/translations/lxqt-runner_eu.ts +++ b/translations/lxqt-runner_eu.ts @@ -2,8 +2,8 @@ ConfigureDialog - LxQt-runner Settings - LxQt-runner ezarpenak + LXQt-runner Settings + LXQt-runner ezarpenak Appearance @@ -68,8 +68,8 @@ Matematikak - LxQt Power Management - LxQt energia-kudeaketa + LXQt Power Management + LXQt energia-kudeaketa \ No newline at end of file diff --git a/translations/lxqt-runner_fi.ts b/translations/lxqt-runner_fi.ts index 4bfb6dd..aa8d0e3 100644 --- a/translations/lxqt-runner_fi.ts +++ b/translations/lxqt-runner_fi.ts @@ -2,8 +2,8 @@ ConfigureDialog - LxQt-runner Settings - LxQtin käynnistimen asetukset + LXQt-runner Settings + LXQtin käynnistimen asetukset Appearance @@ -46,11 +46,11 @@ Configure lxqt-runner - Hallitse LxQtin käynnistintä + Hallitse LXQtin käynnistintä Clear lxqt-runner History - Tyhjennä LxQt-käynnistimen historia + Tyhjennä LXQt-käynnistimen historia Press "%1" to see dialog. @@ -68,8 +68,8 @@ Matematiikka - LxQt Power Management - LxQtin virranhallinta + LXQt Power Management + LXQtin virranhallinta \ No newline at end of file diff --git a/translations/lxqt-runner_fr_FR.ts b/translations/lxqt-runner_fr_FR.ts index 255b202..456e89a 100644 --- a/translations/lxqt-runner_fr_FR.ts +++ b/translations/lxqt-runner_fr_FR.ts @@ -2,7 +2,7 @@ ConfigureDialog - LxQt-runner Settings + LXQt-runner Settings Paramètres du lanceur de commandes @@ -68,7 +68,7 @@ Mathématiques - LxQt Power Management + LXQt Power Management Gestion de l'énergie diff --git a/translations/lxqt-runner_hu.ts b/translations/lxqt-runner_hu.ts index b568296..8da2e5f 100644 --- a/translations/lxqt-runner_hu.ts +++ b/translations/lxqt-runner_hu.ts @@ -3,7 +3,7 @@ ConfigureDialog - LxQt-runner Settings + LXQt-runner Settings diff --git a/translations/lxqt-runner_ia.ts b/translations/lxqt-runner_ia.ts index 613b71e..d3a2d6a 100644 --- a/translations/lxqt-runner_ia.ts +++ b/translations/lxqt-runner_ia.ts @@ -3,7 +3,7 @@ ConfigureDialog - LxQt-runner Settings + LXQt-runner Settings diff --git a/translations/lxqt-runner_id_ID.ts b/translations/lxqt-runner_id_ID.ts index d442441..a7c25ba 100644 --- a/translations/lxqt-runner_id_ID.ts +++ b/translations/lxqt-runner_id_ID.ts @@ -3,7 +3,7 @@ ConfigureDialog - LxQt-runner Settings + LXQt-runner Settings diff --git a/translations/lxqt-runner_it_IT.ts b/translations/lxqt-runner_it.ts similarity index 84% rename from translations/lxqt-runner_it_IT.ts rename to translations/lxqt-runner_it.ts index 7c03390..c39f578 100644 --- a/translations/lxqt-runner_it_IT.ts +++ b/translations/lxqt-runner_it.ts @@ -1,9 +1,11 @@ - + + + ConfigureDialog - LxQt-runner Settings - Impostazioni di LxQt-runner + LXQt-runner Settings + Impostazioni di LXQt-runner Appearance @@ -46,7 +48,7 @@ Configure lxqt-runner - Configura LxQt-runner + Configura LXQt-runner Clear lxqt-runner History @@ -68,8 +70,8 @@ Matematica - LxQt Power Management - Gestione energetica di LxQt + LXQt Power Management + Gestione energetica di LXQt - \ No newline at end of file + diff --git a/translations/lxqt-runner_ja.ts b/translations/lxqt-runner_ja.ts index 08bf568..274b967 100644 --- a/translations/lxqt-runner_ja.ts +++ b/translations/lxqt-runner_ja.ts @@ -2,8 +2,8 @@ ConfigureDialog - LxQt-runner Settings - LxQt-runnerの設定 + LXQt-runner Settings + LXQt-runnerの設定 Appearance @@ -50,7 +50,7 @@ Clear lxqt-runner History - LxQt-runnerの履歴を消去 + LXQt-runnerの履歴を消去 Press "%1" to see dialog. @@ -68,8 +68,8 @@ 計算 - LxQt Power Management - LxQt電源管理 + LXQt Power Management + LXQt電源管理 \ No newline at end of file diff --git a/translations/lxqt-runner_ko.ts b/translations/lxqt-runner_ko.ts index 1d3a135..5e94a7e 100644 --- a/translations/lxqt-runner_ko.ts +++ b/translations/lxqt-runner_ko.ts @@ -3,7 +3,7 @@ ConfigureDialog - LxQt-runner Settings + LXQt-runner Settings diff --git a/translations/lxqt-runner_lt.ts b/translations/lxqt-runner_lt.ts index e77d88d..848a39f 100644 --- a/translations/lxqt-runner_lt.ts +++ b/translations/lxqt-runner_lt.ts @@ -2,8 +2,8 @@ ConfigureDialog - LxQt-runner Settings - LxQt paleidiklio nuostatos + LXQt-runner Settings + LXQt paleidiklio nuostatos Appearance @@ -68,8 +68,8 @@ Matematika - LxQt Power Management - LxQt energijos valdymas + LXQt Power Management + LXQt energijos valdymas \ No newline at end of file diff --git a/translations/lxqt-runner_nl.ts b/translations/lxqt-runner_nl.ts index e55c363..8a337d3 100644 --- a/translations/lxqt-runner_nl.ts +++ b/translations/lxqt-runner_nl.ts @@ -2,8 +2,8 @@ ConfigureDialog - LxQt-runner Settings - LxQt-uitvoeren Instellingen + LXQt-runner Settings + LXQt-uitvoeren Instellingen Appearance @@ -46,7 +46,7 @@ Configure lxqt-runner - Configureer LxQt-uitvoeren + Configureer LXQt-uitvoeren Clear lxqt-runner History @@ -68,8 +68,8 @@ Wiskundig - LxQt Power Management - LxQt Energiebeheer + LXQt Power Management + LXQt Energiebeheer \ No newline at end of file diff --git a/translations/lxqt-runner_pl_PL.ts b/translations/lxqt-runner_pl_PL.ts index de03b5e..2bc9290 100644 --- a/translations/lxqt-runner_pl_PL.ts +++ b/translations/lxqt-runner_pl_PL.ts @@ -2,8 +2,8 @@ ConfigureDialog - LxQt-runner Settings - Ustawienia LxQt-runner + LXQt-runner Settings + Ustawienia LXQt-runner Appearance @@ -68,8 +68,8 @@ Matematyka - LxQt Power Management - Zarządzanie zasilaniem LxQt + LXQt Power Management + Zarządzanie zasilaniem LXQt diff --git a/translations/lxqt-runner_pt.ts b/translations/lxqt-runner_pt.ts index 170a8d0..2503014 100644 --- a/translations/lxqt-runner_pt.ts +++ b/translations/lxqt-runner_pt.ts @@ -4,8 +4,8 @@ ConfigureDialog - LxQt-runner Settings - Definições do LxQt-runner + LXQt-runner Settings + Definições do LXQt-runner Appearance @@ -70,8 +70,8 @@ Matemática - LxQt Power Management - Gestão de energia do LxQt + LXQt Power Management + Gestão de energia do LXQt diff --git a/translations/lxqt-runner_pt_BR.ts b/translations/lxqt-runner_pt_BR.ts index a63d2e3..fb25408 100644 --- a/translations/lxqt-runner_pt_BR.ts +++ b/translations/lxqt-runner_pt_BR.ts @@ -2,8 +2,8 @@ ConfigureDialog - LxQt-runner Settings - Configurações do executor do LxQt + LXQt-runner Settings + Configurações do executor do LXQt Appearance @@ -46,11 +46,11 @@ Configure lxqt-runner - Configurar o executor do LxQt + Configurar o executor do LXQt Clear lxqt-runner History - Limpar o histórico do executor do LxQt + Limpar o histórico do executor do LXQt Press "%1" to see dialog. @@ -68,8 +68,8 @@ Matemática - LxQt Power Management - Gerenciamento de energia do LxQt + LXQt Power Management + Gerenciamento de energia do LXQt \ No newline at end of file diff --git a/translations/lxqt-runner_ro_RO.ts b/translations/lxqt-runner_ro_RO.ts index e401d04..b8f6fd2 100644 --- a/translations/lxqt-runner_ro_RO.ts +++ b/translations/lxqt-runner_ro_RO.ts @@ -2,7 +2,7 @@ ConfigureDialog - LxQt-runner Settings + LXQt-runner Settings Setări lxqt-runner @@ -68,8 +68,8 @@ Matematică - LxQt Power Management - Gestiune alimentare LxQt + LXQt Power Management + Gestiune alimentare LXQt \ No newline at end of file diff --git a/translations/lxqt-runner_sk_SK.ts b/translations/lxqt-runner_sk_SK.ts index 78f9e5b..4a55bb1 100644 --- a/translations/lxqt-runner_sk_SK.ts +++ b/translations/lxqt-runner_sk_SK.ts @@ -2,8 +2,8 @@ ConfigureDialog - LxQt-runner Settings - Nastavenia Spúšťača LxQt + LXQt-runner Settings + Nastavenia Spúšťača LXQt Appearance @@ -46,7 +46,7 @@ Configure lxqt-runner - Nastaviť Spúšťač LxQt + Nastaviť Spúšťač LXQt Clear lxqt-runner History @@ -68,7 +68,7 @@ Matematika - LxQt Power Management + LXQt Power Management diff --git a/translations/lxqt-runner_sl.ts b/translations/lxqt-runner_sl.ts index baa79d1..31a9427 100644 --- a/translations/lxqt-runner_sl.ts +++ b/translations/lxqt-runner_sl.ts @@ -2,8 +2,8 @@ ConfigureDialog - LxQt-runner Settings - Nastavitve za LxQt-runner + LXQt-runner Settings + Nastavitve za LXQt-runner Appearance @@ -46,11 +46,11 @@ Configure lxqt-runner - Nastavitve za LxQt-runner + Nastavitve za LXQt-runner Clear lxqt-runner History - Počisti zgodovino za LxQt-runner + Počisti zgodovino za LXQt-runner Press "%1" to see dialog. @@ -68,7 +68,7 @@ Matematika - LxQt Power Management + LXQt Power Management Upravljanje z energijo diff --git a/translations/lxqt-runner_sr@latin.ts b/translations/lxqt-runner_sr@latin.ts index d6818f6..630e3da 100644 --- a/translations/lxqt-runner_sr@latin.ts +++ b/translations/lxqt-runner_sr@latin.ts @@ -3,7 +3,7 @@ ConfigureDialog - LxQt-runner Settings + LXQt-runner Settings diff --git a/translations/lxqt-runner_sr_BA.ts b/translations/lxqt-runner_sr_BA.ts index d0b4527..4e0c702 100644 --- a/translations/lxqt-runner_sr_BA.ts +++ b/translations/lxqt-runner_sr_BA.ts @@ -4,7 +4,7 @@ ConfigureDialog - LxQt-runner Settings + LXQt-runner Settings Подешавања Рејзор-покретача diff --git a/translations/lxqt-runner_sr_RS.ts b/translations/lxqt-runner_sr_RS.ts index 3a58130..7a479a0 100644 --- a/translations/lxqt-runner_sr_RS.ts +++ b/translations/lxqt-runner_sr_RS.ts @@ -2,7 +2,7 @@ ConfigureDialog - LxQt-runner Settings + LXQt-runner Settings Подешавања Рејзор-покретача @@ -68,7 +68,7 @@ Математика - LxQt Power Management + LXQt Power Management diff --git a/translations/lxqt-runner_th_TH.ts b/translations/lxqt-runner_th_TH.ts index b43a455..73f265a 100644 --- a/translations/lxqt-runner_th_TH.ts +++ b/translations/lxqt-runner_th_TH.ts @@ -2,7 +2,7 @@ ConfigureDialog - LxQt-runner Settings + LXQt-runner Settings ค่าตั้งกล่องป้อนคำสั่ง-lxqt @@ -68,8 +68,8 @@ การคำนวณเลข - LxQt Power Management - การจัดการพลังงานของ LxQt + LXQt Power Management + การจัดการพลังงานของ LXQt \ No newline at end of file diff --git a/translations/lxqt-runner_tr.ts b/translations/lxqt-runner_tr.ts index 6f4957c..2382c63 100644 --- a/translations/lxqt-runner_tr.ts +++ b/translations/lxqt-runner_tr.ts @@ -2,8 +2,8 @@ ConfigureDialog - LxQt-runner Settings - LxQt-çalıştırıcı Ayarları + LXQt-runner Settings + LXQt-çalıştırıcı Ayarları Appearance @@ -46,11 +46,11 @@ Configure lxqt-runner - LxQt-çalıştırıcıyı yapılandır + LXQt-çalıştırıcıyı yapılandır Clear lxqt-runner History - LxQt-çalıştırıcı geçmişini temizle + LXQt-çalıştırıcı geçmişini temizle Press "%1" to see dialog. @@ -68,8 +68,8 @@ İşlemler - LxQt Power Management - LxQt Güç Yönetimi + LXQt Power Management + LXQt Güç Yönetimi \ No newline at end of file diff --git a/translations/lxqt-runner_uk.ts b/translations/lxqt-runner_uk.ts index 6b7de33..8480804 100644 --- a/translations/lxqt-runner_uk.ts +++ b/translations/lxqt-runner_uk.ts @@ -2,8 +2,8 @@ ConfigureDialog - LxQt-runner Settings - Налаштування запускача програм LxQt + LXQt-runner Settings + Налаштування запускача програм LXQt Appearance @@ -46,7 +46,7 @@ Configure lxqt-runner - Налаштувати запускач програм LxQt + Налаштувати запускач програм LXQt Clear lxqt-runner History @@ -68,8 +68,8 @@ Математика - LxQt Power Management - Керування живленням LxQt + LXQt Power Management + Керування живленням LXQt \ No newline at end of file diff --git a/translations/lxqt-runner_zh_CN.ts b/translations/lxqt-runner_zh_CN.ts index 4cf0084..15aa1cb 100644 --- a/translations/lxqt-runner_zh_CN.ts +++ b/translations/lxqt-runner_zh_CN.ts @@ -2,8 +2,8 @@ ConfigureDialog - LxQt-runner Settings - LxQt启动器设置 + LXQt-runner Settings + LXQt启动器设置 Appearance @@ -46,7 +46,7 @@ Configure lxqt-runner - 配置LxQt启动器 + 配置LXQt启动器 Clear lxqt-runner History @@ -68,8 +68,8 @@ 数学 - LxQt Power Management - LxQt 电源管理 + LXQt Power Management + LXQt 电源管理 \ No newline at end of file diff --git a/translations/lxqt-runner_zh_TW.ts b/translations/lxqt-runner_zh_TW.ts index 2f46360..5f1c016 100644 --- a/translations/lxqt-runner_zh_TW.ts +++ b/translations/lxqt-runner_zh_TW.ts @@ -2,8 +2,8 @@ ConfigureDialog - LxQt-runner Settings - LxQt快速執行設定 + LXQt-runner Settings + LXQt快速執行設定 Appearance @@ -46,11 +46,11 @@ Configure lxqt-runner - 設定LxQt快速執行 + 設定LXQt快速執行 Clear lxqt-runner History - 清除LxQt快速執行的歷史紀錄 + 清除LXQt快速執行的歷史紀錄 Press "%1" to see dialog. @@ -68,8 +68,8 @@ 數學 - LxQt Power Management - LxQt電源管理 + LXQt Power Management + LXQt電源管理 \ No newline at end of file diff --git a/yamlparser.cpp b/yamlparser.cpp index 0cc0053..454ffad 100644 --- a/yamlparser.cpp +++ b/yamlparser.cpp @@ -1,9 +1,29 @@ -/* - * File: YamlParser.cpp - * Author: christian - * - * Created on 9. maj 2013, 13:13 - */ +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ + * + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Christian Surlykke + * + * This program or library is free software; you can redistribute it + * and/or modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA + * + * END_COMMON_COPYRIGHT_HEADER */ #include #include @@ -28,7 +48,7 @@ void YamlParser::consumeLine(QString line) static QRegExp continuation("(\\s*)(.*)"); static QRegExp documentEnd("...\\s*"); static QRegExp emptyLine("\\s*(#.*)?"); - + qDebug() << line; if (documentStart.exactMatch(line)) @@ -37,7 +57,7 @@ void YamlParser::consumeLine(QString line) state = atdocumentstart; m_CurrentIndent = -1; } - else if (state == error) + else if (state == error) { // Skip } @@ -45,7 +65,7 @@ void YamlParser::consumeLine(QString line) { // Skip } - else if ((state == atdocumentstart || state == inlist) && mapStart.exactMatch(line)) + else if ((state == atdocumentstart || state == inlist) && mapStart.exactMatch(line)) { m_ListOfMaps << QMap(); addEntryToCurrentMap(mapStart.cap(2), mapStart.cap(3)); @@ -66,7 +86,7 @@ void YamlParser::consumeLine(QString line) emit newListOfMaps(m_ListOfMaps); state = documentdone; } - else + else { qWarning() << "Yaml parser could not read:" << line; state = error; diff --git a/yamlparser.h b/yamlparser.h index 9962f27..faf168e 100644 --- a/yamlparser.h +++ b/yamlparser.h @@ -1,12 +1,32 @@ -/* - * File: YamlParser.h - * Author: christian +/* BEGIN_COMMON_COPYRIGHT_HEADER + * (c)LGPL2+ * - * Created on 9. maj 2013, 13:13 - */ + * LXDE-Qt - a lightweight, Qt based, desktop toolset + * http://razor-qt.org + * + * Copyright: 2013 Razor team + * Authors: + * Christian Surlykke + * + * This program or library is free software; you can redistribute it + * and/or modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + + * You should have received a copy of the GNU Lesser General + * Public License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA + * + * END_COMMON_COPYRIGHT_HEADER */ #ifndef YAMLPARSER_H -#define YAMLPARSER_H +#define YAMLPARSER_H #include #include @@ -21,17 +41,17 @@ class YamlParser : public QObject public: YamlParser(); virtual ~YamlParser(); - + void consumeLine(QString line); - + signals: void newListOfMaps(QList > maps); - + private: - + QList > m_ListOfMaps; - enum + enum { start, atdocumentstart, @@ -46,4 +66,4 @@ private: void addEntryToCurrentMap(QString key, QString value); }; -#endif /* YAMLPARSER_H */ +#endif /* YAMLPARSER_H */