diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d791829 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,49 @@ +name: CI + +on: [push, pull_request] + +jobs: + mac: + runs-on: macos-12 + steps: + - uses: actions/checkout@v2 + - name: Setup Qt + run: curl -L https://github.com/rodlie/NatronPluginManager/releases/download/continuous/qtbase-5.15-static-macos.tar.bz2 --output qt.tar.bz2 && sudo tar xf qt.tar.bz2 -C /opt + - name: Setup libzip + run: curl -L https://github.com/rodlie/NatronPluginManager/releases/download/continuous/libzip-HighSierra.tar.gz --output libzip.tar.gz && sudo tar xf libzip.tar.gz -C /opt + - name: Setup local + run: sudo mkdir -p /opt/local/lib && sudo cp -a /opt/libzip/lib/* /opt/local/lib/ + - name: Build + run: CMAKE=cmake sh share/macos.sh + - name: Artifact + run: sudo cp -a build/NatronPluginManager.dmg /opt/ + - uses: actions/upload-artifact@v2 + with: + name: NatronPluginManager-${{github.sha}}-macOS-Intel + path: /opt/NatronPluginManager.dmg + windows: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Setup + run: sudo mkdir -p /opt/mxe-NatronPluginManager && sudo chmod 777 /opt/mxe-NatronPluginManager + - name: Setup SDK + run: wget https://github.com/rodlie/NatronPluginManager/releases/download/continuous/mxe-NatronPluginManager-20211230.tar.xz && tar xvf mxe-NatronPluginManager-20211230.tar.xz -C /opt/mxe-NatronPluginManager/ + - name: Build + run: bash share/mingw.sh + - name: Artifact + run: sudo cp -a build/NatronPluginManager.exe /opt/ + - uses: actions/upload-artifact@v2 + with: + name: NatronPluginManager-${{github.sha}}-Windows-x64 + path: /opt/NatronPluginManager.exe + linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: apt install + run: sudo apt-get update && sudo apt-get install cmake qtbase5-dev libzip-dev + - name: Configure + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr + - name: Build + run: cmake --build ${{github.workspace}}/build --config Release diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml deleted file mode 100644 index 31ff4aa..0000000 --- a/.github/workflows/cmake.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Ubuntu Jammy - -on: [push, pull_request] - -env: - BUILD_TYPE: Release - -jobs: - build: - runs-on: ubuntu-22.04 - - steps: - - uses: actions/checkout@v2 - - name: apt install - run: sudo apt-get update && sudo apt-get install cmake qtbase5-dev libzip-dev - - name: Configure CMake - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=/usr - - name: Build - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - - name: Package - run: cd ${{github.workspace}}/build; make package diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml deleted file mode 100644 index 767db7d..0000000 --- a/.github/workflows/macos.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: macOS Monterey - -on: [push, pull_request] - -jobs: - monterey: - runs-on: macos-12 - steps: - - uses: actions/checkout@v2 - - name: Setup Qt - run: curl -L https://github.com/rodlie/NatronPluginManager/releases/download/continuous/qtbase-5.15-static-macos.tar.bz2 --output qt.tar.bz2 && sudo tar xf qt.tar.bz2 -C /opt - - name: Setup libzip - run: curl -L https://github.com/rodlie/NatronPluginManager/releases/download/continuous/libzip-HighSierra.tar.gz --output libzip.tar.gz && sudo tar xf libzip.tar.gz -C /opt - - name: Setup local - run: sudo mkdir -p /opt/local/lib && sudo cp -a /opt/libzip/lib/* /opt/local/lib/ - - name: Build - run: CMAKE=cmake sh share/macos.sh - - name: Artifact - run: sudo cp build/NatronPluginManager.dmg /opt/ - - uses: actions/upload-artifact@v2 - with: - name: NatronPluginManager-${{github.sha}}-macOS - path: /opt/NatronPluginManager.dmg diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml deleted file mode 100644 index adb9879..0000000 --- a/.github/workflows/mingw.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Windows (MXE/MinGW) - -on: [push, pull_request] - -jobs: - build: - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v2 - - name: Setup - run: sudo mkdir -p /opt/mxe-NatronPluginManager && sudo chmod 777 /opt/mxe-NatronPluginManager - - name: SDK - run: wget https://github.com/rodlie/NatronPluginManager/releases/download/continuous/mxe-NatronPluginManager-20211230.tar.xz && tar xvf mxe-NatronPluginManager-20211230.tar.xz -C /opt/mxe-NatronPluginManager/ - - name: Build - run: bash share/mingw.sh - - name: Artifact - run: sudo cp build/NatronPluginManager.zip /opt/ - - uses: actions/upload-artifact@v2 - with: - name: NatronPluginManager-${{github.sha}}-Windows-x64 - path: /opt/NatronPluginManager.zip diff --git a/CMakeLists.txt b/CMakeLists.txt index e40eef4..796f017 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,29 +27,17 @@ set(CMAKE_AUTORCC ON) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(CPACK_GENERATOR "DEB") -set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}") -set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}") -set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}") -set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) -set(CPACK_DEBIAN_PACKAGE_MAINTAINER "NatronPluginManager") -set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/rodlie/NatronPluginManager") -#set(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") -set(CPACK_DEBIAN_FILE_NAME "${PROJECT_NAME}.deb") - set(COMPANY "Natron") set(COPYRIGHT "Copyright (c) Ole-Andre Rodlie") set(IDENTIFIER "org.natronvfx.plugins") option(USE_PKGCONF "Use pkg-config" ON) -add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050F00) add_definitions(-DQT_DEPRECATED_WARNINGS) add_definitions(-DAPP_NAME="${PROJECT_NAME}") add_definitions(-DAPP_VERSION="${PROJECT_VERSION}") add_definitions(-DAPP_ORG="Natron") add_definitions(-DAPP_DOMAIN="natronvfx.org") -add_definitions(-DAPP_URL="https://plugins.natronvfx.org") add_compile_options(-Wall -Wextra) if(CMAKE_BUILD_TYPE MATCHES "^(release|Release|RELEASE)$") @@ -59,7 +47,7 @@ else() endif() find_package(QT NAMES Qt6 Qt5 COMPONENTS Core REQUIRED) -find_package(Qt${QT_VERSION_MAJOR} 5.10 COMPONENTS Concurrent Network Widgets REQUIRED) +find_package(Qt${QT_VERSION_MAJOR} 5.14 COMPONENTS Concurrent Network Widgets REQUIRED) if(${USE_PKGCONF}) find_package(PkgConfig REQUIRED) @@ -125,20 +113,19 @@ set(SRC share/assets.qrc ) +add_executable(${PROJECT_NAME} + ${ICON_FILE} + ${WINDOWS_ICON_FILE} + ${WINDOWS_RESOURCE_FILE} + ${SRC} +) + +if(APPLE) + set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_BUNDLE TRUE) +endif() + if(WIN32) - add_executable(${PROJECT_NAME} - WIN32 - ${WINDOWS_ICON_FILE} - ${WINDOWS_RESOURCE_FILE} - ${SRC} - ) -elseif(APPLE) - add_executable(${PROJECT_NAME} - MACOSX_BUNDLE - ${ICON_FILE} - ${SRC}) -else() - add_executable(${PROJECT_NAME} ${SRC}) + set_target_properties(${PROJECT_NAME} PROPERTIES WIN32_EXECUTABLE TRUE) endif() target_link_libraries(${PROJECT_NAME} @@ -165,6 +152,7 @@ if(UNIX AND NOT APPLE) install(FILES LICENSE README.md + docs/repo.md DESTINATION ${CMAKE_INSTALL_DOCDIR}-${PROJECT_VERSION} ) diff --git a/README.md b/README.md index c074a36..b5e9a79 100644 --- a/README.md +++ b/README.md @@ -2,34 +2,23 @@ A plug-in manager for [Natron](https://github.com/NatronGitHub/Natron). -![screenshot](docs/screenshot-plugins.png) -![screenshot](docs/screenshot-plugin.png) - -

- -

+![screenshot of available plug-ins](docs/screenshot-plugins.png) +![screenshot of plug-in page](docs/screenshot-plugin.png) ## Build -This application requires CMake 3.5+, Qt 5.10+ (Concurrent/Network/Widgets) and libzip to build. - -***Note**: Qt 5.14+ is required for markdown support, recommended.* +This application requires Qt 5.14+ *(Concurrent/Network/Widgets)* and libzip. ``` -mkdir build && cd build -cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .. && make +git clone https://github.com/rodlie/NatronPluginManager +cd NatronPluginManager +mkdir build +cd build +cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .. +make ``` ## Documentation * [Natron Plug-in Repository Standard v1.0](docs/repo.md) -## License - -Copyright Ole-André Rodlie. All rights reserved. - -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) any later version. - -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 diff --git a/share/mingw.sh b/share/mingw.sh index 7623800..e074c6d 100755 --- a/share/mingw.sh +++ b/share/mingw.sh @@ -33,10 +33,3 @@ $TOOL-cmake -DCMAKE_BUILD_TYPE=Release .. make $TOOL-strip -s NatronPluginManager.exe - -mkdir -p NatronPluginManager/third-party -cp $CWD/LICENSE NatronPluginManager/ -cp $CWD/README.md NatronPluginManager/ -cp -a $MXE/licenses/* NatronPluginManager/third-party/ -mv NatronPluginManager.exe NatronPluginManager/ -zip -9 -r NatronPluginManager.zip NatronPluginManager diff --git a/src/addrepodialog.cpp b/src/addrepodialog.cpp index a30bce5..f5a4cb4 100644 --- a/src/addrepodialog.cpp +++ b/src/addrepodialog.cpp @@ -46,20 +46,20 @@ AddRepoDialog::AddRepoDialog(QWidget *parent, setObjectName("AddRepoDialog"); setWindowTitle(tr("Add repository")); - QVBoxLayout *mainLayout = new QVBoxLayout(this); + const auto mainLayout = new QVBoxLayout(this); - QWidget *urlEditWidget = new QWidget(this); - QHBoxLayout *urlEditLayout = new QHBoxLayout(urlEditWidget); + const auto urlEditWidget = new QWidget(this); + const auto urlEditLayout = new QHBoxLayout(urlEditWidget); - QLabel *urlEditLabel = new QLabel(tr("Manifest URL"), this); + const auto urlEditLabel = new QLabel(tr("Manifest URL"), this); _urlEdit = new QLineEdit(this); _urlEdit->setPlaceholderText("https://"); urlEditLayout->addWidget(urlEditLabel); urlEditLayout->addWidget(_urlEdit); - QWidget *buttonsWidget = new QWidget(this); - QHBoxLayout *buttonsLayout = new QHBoxLayout(buttonsWidget); + const auto buttonsWidget = new QWidget(this); + const auto buttonsLayout = new QHBoxLayout(buttonsWidget); _applyButton = new QPushButton(tr("Add"), this); _applyButton->setProperty("InstallButton", true); diff --git a/src/app.cpp b/src/app.cpp index 94e57d5..b10177b 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -78,27 +78,27 @@ NatronPluginManager::NatronPluginManager(QWidget *parent) setupPluginList(); setupStatus(); - QWidget *mainWidget = new QWidget(this); + const auto mainWidget = new QWidget(this); mainWidget->setObjectName("MainWidget"); mainWidget->setContentsMargins(0, 0, 0, 0); - QHBoxLayout *mainLayout = new QHBoxLayout(mainWidget); + const auto mainLayout = new QHBoxLayout(mainWidget); mainLayout->setContentsMargins(0, 0, 0, 0); mainLayout->setSpacing(0); setCentralWidget(mainWidget); - QWidget *pluginsWidget = new QWidget(this); + const auto pluginsWidget = new QWidget(this); pluginsWidget->setObjectName("PluginsWidget"); - QVBoxLayout *pluginsWidgetLayout = new QVBoxLayout(pluginsWidget); + const auto pluginsWidgetLayout = new QVBoxLayout(pluginsWidget); - QWidget *pluginsComboWidget = new QWidget(this); + const auto pluginsComboWidget = new QWidget(this); pluginsComboWidget->setObjectName("PluginsComboWidget"); - QHBoxLayout *pluginsComboWidgetLayout = new QHBoxLayout(pluginsComboWidget); + const auto pluginsComboWidgetLayout = new QHBoxLayout(pluginsComboWidget); - QLabel *comboStatusLabel = new QLabel(tr("Status"), this); + const auto comboStatusLabel = new QLabel(tr("Status"), this); comboStatusLabel->setObjectName("ComboStatusLabel"); - QLabel *comboGroupLabel = new QLabel(tr("Groups"), this); + const auto comboGroupLabel = new QLabel(tr("Groups"), this); comboGroupLabel->setObjectName("ComboGroupLabel"); pluginsComboWidgetLayout->addWidget(comboStatusLabel); @@ -280,10 +280,10 @@ void NatronPluginManager::setupMenu() _menuBar->setObjectName("MenuBar"); setMenuWidget(_menuBar); - QMenu *fileMenu = new QMenu(tr("File"), this); + const auto fileMenu = new QMenu(tr("File"), this); _menuBar->addMenu(fileMenu); - QAction *addRepoAction = new QAction(tr("Add repository"), this); + const auto addRepoAction = new QAction(tr("Add repository"), this); addRepoAction->setShortcut(QKeySequence(tr("Ctrl+A"))); fileMenu->addAction(addRepoAction); connect(addRepoAction, @@ -293,7 +293,7 @@ void NatronPluginManager::setupMenu() fileMenu->addSeparator(); - QAction *settingsAction = new QAction(tr("Settings"), this); + const auto settingsAction = new QAction(tr("Settings"), this); settingsAction->setShortcut(QKeySequence(tr("Ctrl+S"))); fileMenu->addAction(settingsAction); connect(settingsAction, @@ -303,7 +303,7 @@ void NatronPluginManager::setupMenu() fileMenu->addSeparator(); - QAction *fileQuitAction = new QAction(tr("Quit"), this); + const auto fileQuitAction = new QAction(tr("Quit"), this); fileQuitAction->setShortcut(QKeySequence(tr("Ctrl+Q"))); fileMenu->addAction(fileQuitAction); connect(fileQuitAction, @@ -311,17 +311,17 @@ void NatronPluginManager::setupMenu() this, SLOT(close())); - QMenu *helpMenu = new QMenu(tr("Help"), this); + const auto helpMenu = new QMenu(tr("Help"), this); _menuBar->addMenu(helpMenu); - QAction *helpAboutAction = new QAction(tr("About"), this); + const auto helpAboutAction = new QAction(tr("About"), this); helpMenu->addAction(helpAboutAction); connect(helpAboutAction, SIGNAL(triggered()), this, SLOT(handleAboutActionTriggered())); - QAction *helpAboutQtAction = new QAction(tr("About Qt"), this); + const auto helpAboutQtAction = new QAction(tr("About Qt"), this); helpMenu->addAction(helpAboutQtAction); connect(helpAboutQtAction, SIGNAL(triggered()), @@ -415,19 +415,19 @@ void NatronPluginManager::setupStatus() _cacheLabel = new QLabel(this); _cacheLabel->setText("0"); - QLabel *statusAvailableLabel = new QLabel(this); + const auto statusAvailableLabel = new QLabel(this); statusAvailableLabel->setObjectName("StatusAvailableLabel"); statusAvailableLabel->setText(tr("Available")); - QLabel *statusInstalledLabel = new QLabel(this); + const auto statusInstalledLabel = new QLabel(this); statusInstalledLabel->setObjectName("StatusInstalledLabel"); statusInstalledLabel->setText(tr("Installed")); - QLabel *statusCacheLabel = new QLabel(this); + const auto statusCacheLabel = new QLabel(this); statusCacheLabel->setObjectName("StatusCacheLabel"); statusCacheLabel->setText(tr("Cache")); - QLabel *statusUpdatesLabel = new QLabel(this); + const auto statusUpdatesLabel = new QLabel(this); statusUpdatesLabel->setObjectName("StatusUpdatesLabel"); statusUpdatesLabel->setText(tr("Updates")); diff --git a/src/pluginlistwidget.cpp b/src/pluginlistwidget.cpp index 3d1dcc1..6bf3a39 100644 --- a/src/pluginlistwidget.cpp +++ b/src/pluginlistwidget.cpp @@ -41,27 +41,27 @@ PluginListWidget::PluginListWidget(const Plugins::PluginSpecs &plugin, { setFixedSize(widgetSize); - QVBoxLayout *mainLayout = new QVBoxLayout(this); + const auto mainLayout = new QVBoxLayout(this); - QFrame *pluginFrame = new QFrame(this); - QVBoxLayout *pluginFrameLayout = new QVBoxLayout(pluginFrame); + const auto pluginFrame = new QFrame(this); + const auto pluginFrameLayout = new QVBoxLayout(pluginFrame); - QWidget *pluginHeader = new QWidget(pluginFrame); - QHBoxLayout *pluginHeaderLayout = new QHBoxLayout(pluginHeader); + const auto pluginHeader = new QWidget(pluginFrame); + const auto pluginHeaderLayout = new QHBoxLayout(pluginHeader); - QWidget *pluginFooter = new QWidget(this); - QHBoxLayout *pluginsFooterLayout = new QHBoxLayout(pluginFooter); + const auto pluginFooter = new QWidget(this); + const auto pluginsFooterLayout = new QHBoxLayout(pluginFooter); - QWidget *pluginHeaderText = new QWidget(this); + const auto pluginHeaderText = new QWidget(this); pluginHeaderText->setContentsMargins(0, 0, 0, 0); - QVBoxLayout *pluginHeaderTextLayout = new QVBoxLayout(pluginHeaderText); + const auto pluginHeaderTextLayout = new QVBoxLayout(pluginHeaderText); pluginHeaderTextLayout->setContentsMargins(0, 0, 0, 0); pluginHeaderTextLayout->setSpacing(0); - QLabel *pluginTitleLabel = new QLabel(_plugin.label, this); - QLabel *pluginGroupLabel = new QLabel(_plugin.group, this); - QLabel *pluginIconLabel = new QLabel(this); + const auto pluginTitleLabel = new QLabel(_plugin.label, this); + const auto pluginGroupLabel = new QLabel(_plugin.group, this); + const auto pluginIconLabel = new QLabel(this); pluginTitleLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); pluginGroupLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); diff --git a/src/pluginviewwidget.cpp b/src/pluginviewwidget.cpp index f5ebdd9..e191f14 100644 --- a/src/pluginviewwidget.cpp +++ b/src/pluginviewwidget.cpp @@ -48,13 +48,13 @@ PluginViewWidget::PluginViewWidget(QWidget *parent, { setObjectName("PluginViewWidget"); - QVBoxLayout *mainLayout = new QVBoxLayout(this); + const auto mainLayout = new QVBoxLayout(this); - QWidget *headerWidget = new QWidget(this); + const auto headerWidget = new QWidget(this); headerWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - QHBoxLayout *headerLayout = new QHBoxLayout(headerWidget); + const auto headerLayout = new QHBoxLayout(headerWidget); _goBackButton = new QPushButton("«", this); _goBackButton->setFocusPolicy(Qt::NoFocus); @@ -76,9 +76,9 @@ PluginViewWidget::PluginViewWidget(QWidget *parent, Qt::KeepAspectRatio, Qt::SmoothTransformation)); - QWidget *pluginHeaderWidget = new QWidget(this); + const auto pluginHeaderWidget = new QWidget(this); pluginHeaderWidget->setObjectName("PluginViewHeaderWidget"); - QVBoxLayout *pluginHeaderLayout = new QVBoxLayout(pluginHeaderWidget); + const auto pluginHeaderLayout = new QVBoxLayout(pluginHeaderWidget); _pluginTitleLabel = new QLabel(tr("Title"), this); _pluginTitleLabel->setObjectName("PluginViewTitleLabel"); @@ -122,11 +122,11 @@ PluginViewWidget::PluginViewWidget(QWidget *parent, _pluginVersionLabel = new QLabel(this); _pluginVersionLabel->setObjectName("PluginViewVersionLabel"); - QWidget *pluginButtonsWidget = new QWidget(this); + const auto pluginButtonsWidget = new QWidget(this); pluginButtonsWidget->setObjectName("PluginViewButtonsWidget"); pluginButtonsWidget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); - QHBoxLayout *pluginButtonsLayout = new QHBoxLayout(pluginButtonsWidget); + const auto pluginButtonsLayout = new QHBoxLayout(pluginButtonsWidget); pluginButtonsLayout->addStretch(); pluginButtonsLayout->addWidget(_pluginVersionLabel); @@ -186,15 +186,12 @@ void PluginViewWidget::showPlugin(const QString &id) "\\1"); _pluginDescBrowser->setSearchPaths(QStringList() << plugin.path); -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - _pluginDescBrowser->setHtml(desc); -#else + if (!plugin.readme.isEmpty()) { QString markdown = plugin.readme; QString title = QString("# %1").arg(QString(plugin.label).replace(" ", "_")); _pluginDescBrowser->setMarkdown(markdown.replace(title, "")); } else { _pluginDescBrowser->setHtml(desc); } -#endif if (_plugins->hasUpdatedPlugin(plugin.id)) { setPluginStatus(plugin.id, Plugins::NATRON_PLUGIN_TYPE_UPDATE); diff --git a/src/settingsdialog.cpp b/src/settingsdialog.cpp index 2172bfc..8aeafa9 100644 --- a/src/settingsdialog.cpp +++ b/src/settingsdialog.cpp @@ -44,12 +44,12 @@ SettingsDialog::SettingsDialog(QWidget *parent, setObjectName("SettingsDialog"); setWindowTitle(tr("Settings")); - QVBoxLayout *mainLayout = new QVBoxLayout(this); + const auto mainLayout = new QVBoxLayout(this); _tabs = new QTabWidget(this); - QWidget *buttonsWidget = new QWidget(this); - QHBoxLayout *buttonsLayout = new QHBoxLayout(buttonsWidget); + const auto buttonsWidget = new QWidget(this); + const auto buttonsLayout = new QHBoxLayout(buttonsWidget); _applyButton = new QPushButton(tr("Apply"), this); _applyButton->setProperty("InstallButton", true); @@ -78,20 +78,20 @@ SettingsDialog::SettingsDialog(QWidget *parent, void SettingsDialog::setupGeneral() { - QWidget *generalWidget = new QWidget(this); - QVBoxLayout *generalLayout = new QVBoxLayout(generalWidget); + const auto generalWidget = new QWidget(this); + const auto generalLayout = new QVBoxLayout(generalWidget); _tabs->addTab(generalWidget, tr("General")); - QWidget *pluginPathEditWidget = new QWidget(this); - QHBoxLayout *pluginPathEditLayout = new QHBoxLayout(pluginPathEditWidget); + const auto pluginPathEditWidget = new QWidget(this); + const auto pluginPathEditLayout = new QHBoxLayout(pluginPathEditWidget); - QLabel *pluginPathEditLabel = new QLabel(tr("Installation path"), this); + const auto pluginPathEditLabel = new QLabel(tr("Installation path"), this); _pluginPath = new QLineEdit(this); _pluginPath->setProperty("StyleEdit", true); _pluginPath->setText(_plugins->getUserPluginPath()); - QPushButton *pluginPathEditButton = new QPushButton(tr("..."), this); + const auto pluginPathEditButton = new QPushButton(tr("..."), this); pluginPathEditButton->setProperty("FileButton", true); connect(pluginPathEditButton, SIGNAL(released()),