diff --git a/CHANGELOG b/CHANGELOG index 360e90a..d4046cc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,24 @@ -obconf-qt-0.12.0 / 2017-09-24 +obconf-qt-0.13.0 / 2018-05-21 ============================= + * Bumped minor version to 13 + * Spanish translation update + * CMake: Prevent in-source builds + * fixed lxde mentions + * Add Traditional Chinese translation + * Add Traditional Chinese translation + * Add Simplified Chinese translation + * Fixes Qt4 build + * cmake: Use LXQtCompilerSettings + * cmake: Handle CMP0071 + * cmake: Make it compile with Qt4 + * cmake: Update CMake minimum required version + +0.12.0 / 2017-09-24 +=================== + + * Release 0.12.0: Update changelog * Bump version to 0.12.0 * Don't export github templates * Added Lithuanian language diff --git a/CMakeLists.txt b/CMakeLists.txt index aafc986..9ed9cf4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,12 +1,18 @@ project(obconf-qt) # newer cmake is required for CMAKE_AUTOMOC Qt support -cmake_minimum_required(VERSION 2.8.12) +cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) find_program(SED_PROGRAM sed) include(GNUInstallDirs) -set(LXQTBT_MINIMUM_VERSION "0.1.0") +set(LXQTBT_MINIMUM_VERSION "0.5.0") + +set(OBCONFQT_MAJOR_VERSION 0) +set(OBCONFQT_MINOR_VERSION 13) +set(OBCONFQT_PATCH_VERSION 0) +set(OBCONFQT_VERSION ${OBCONFQT_MAJOR_VERSION}.${OBCONFQT_MINOR_VERSION}.${OBCONFQT_PATCH_VERSION}) +add_definitions("-DOBCONFQT_VERSION=\"${OBCONFQT_VERSION}\"") # Support Qt4 for the time being option(USE_QT4 "Build with Qt4." $ENV{USE_QT4}) @@ -14,15 +20,18 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_AUTOMOC ON) + if(USE_QT4) + set(USE_QT5 FALSE) find_package(Qt4 REQUIRED QtCore QtGui) # Qt include(${QT_USE_FILE}) message(STATUS "Building with Qt${QTVERSION}") else() - cmake_minimum_required(VERSION 2.8.11) + set(USE_QT5 TRUE) + cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR) find_package(Qt5Widgets REQUIRED) find_package(Qt5X11Extras REQUIRED) - find_package(Qt5LinguistTools REQUIRED QUIET) + find_package(Qt5LinguistTools REQUIRED) message(STATUS "Building with Qt${Qt5Core_VERSION}") endif() @@ -42,15 +51,11 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release) endif() -set(OBCONFQT_MAJOR_VERSION 0) -set(OBCONFQT_MINOR_VERSION 12) -set(OBCONFQT_PATCH_VERSION 0) -set(OBCONFQT_VERSION ${OBCONFQT_MAJOR_VERSION}.${OBCONFQT_MINOR_VERSION}.${OBCONFQT_PATCH_VERSION}) -add_definitions("-DOBCONFQT_VERSION=\"${OBCONFQT_VERSION}\"") - +include(LXQtPreventInSourceBuilds) include(LXQtTranslateTs) include(LXQtTranslateDesktop) include(LXQtCompilerSettings) +include(LXQtCompilerSettings NO_POLICY_SCOPE) # add src subdirectory add_subdirectory(src) diff --git a/README.md b/README.md index fc2b03e..35b90a9 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ It is maintained by the LXQt project but can be used independently from this des ### Compiling source code Runtime dependencies are Qt X11 Extras, gtk-update-icon-cache, hicolor-icon-theme and Openbox. -Additional build dependencies are CMake and [liblxqt](https://github.com/lxde/liblxqt), optionally Git to pull latest VCS checkouts. The localization files were outsourced to repository [lxqt-l10n](https://github.com/lxde/lxqt-l10n) so the corresponding dependencies are needed, too. Please refer to this repository's `README.md` for further information. +Additional build dependencies are CMake and [liblxqt](https://github.com/lxqt/liblxqt), optionally Git to pull latest VCS checkouts. The localization files were outsourced to repository [lxqt-l10n](https://github.com/lxqt/lxqt-l10n) so the corresponding dependencies are needed, too. Please refer to this repository's `README.md` for further information. Code configuration is handled by CMake. CMake variable `CMAKE_INSTALL_PREFIX` has to be set to `/usr` on most operating systems. diff --git a/debian/changelog b/debian/changelog index c33c386..f16503c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +obconf-qt (0.13.0-1) unstable; urgency=medium + + * Cherry-picked upstream release 0.13.0. + * Bump lxqt-build-tools to >= 0.5.0~ + * Fixed watch file lxde -> lxqt + + -- Alf Gaida Wed, 23 May 2018 20:16:01 +0200 + obconf-qt (0.12.0-4) unstable; urgency=medium * Bumped compat to 11 diff --git a/debian/control b/debian/control index aa54441..4d618aa 100644 --- a/debian/control +++ b/debian/control @@ -9,7 +9,7 @@ Build-Depends: debhelper (>= 11~), libkf5windowsystem-dev, libqt5svg5-dev, libqt5x11extras5-dev, - lxqt-build-tools (>= 0.4.0), + lxqt-build-tools (>= 0.5.0~), openbox-dev Standards-Version: 4.1.4 Vcs-Browser: https://salsa.debian.org/lxqt-team/obconf-qt diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 20ca9f3..88196b4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -42,6 +42,8 @@ else() qt5_wrap_ui(obconf-qt_UI_H ${obconf-qt_UIS}) endif() +set_property(SOURCE ${obconf-qt_UI_H} PROPERTY SKIP_AUTOMOC ON) + # The ui code generated by Qt uic contains QMetaObject::connectSlotsByName() # but we don't want that. Fix it with sed. add_custom_command( @@ -58,8 +60,8 @@ add_custom_command( # add translation for obconf-qt option (UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF) lxqt_translate_ts(QM_FILES - USE_QT4 - ${USE_QT4} + USE_QT5 + ${USE_QT5} UPDATE_TRANSLATIONS ${UPDATE_TRANSLATIONS} SOURCES @@ -100,6 +102,10 @@ add_definitions( -DTHEME_DIR="${CMAKE_INSTALL_FULL_DATAROOTDIR}/openbox/themes" ) +if (USE_QT4) + add_definitions(-DUSE_QT4) +endif() + target_link_libraries(obconf-qt ${QTX_LIBRARIES} ${GLIB_LIBRARIES} diff --git a/src/obconf-qt.cpp b/src/obconf-qt.cpp index 5912fda..207a3ff 100644 --- a/src/obconf-qt.cpp +++ b/src/obconf-qt.cpp @@ -180,7 +180,9 @@ static gboolean prop_get_string_utf8(Window win, Atom prop, gchar** ret) { int main(int argc, char** argv) { QApplication app(argc, argv); +#ifndef USE_QT4 app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); +#endif // load translations QTranslator qtTranslator, translator; diff --git a/src/translations/obconf-qt_es.desktop b/src/translations/obconf-qt_es.desktop new file mode 100644 index 0000000..e585251 --- /dev/null +++ b/src/translations/obconf-qt_es.desktop @@ -0,0 +1,3 @@ +Name[es]=Configuración de Openbox +GenericName[es]=Configuración del gestor de ventanas +Comment[es]=Configurar el gestor de ventanas Openbox diff --git a/src/translations/obconf-qt_zh_CN.desktop b/src/translations/obconf-qt_zh_CN.desktop new file mode 100644 index 0000000..b2a3566 --- /dev/null +++ b/src/translations/obconf-qt_zh_CN.desktop @@ -0,0 +1,3 @@ +Name[zh_CN]=Openbox 设置 +GenericName[zh_CN]=窗口管理器设置 +Comment[zh_CN]=配置窗口管理器 diff --git a/src/translations/obconf-qt_zh_TW.desktop b/src/translations/obconf-qt_zh_TW.desktop new file mode 100644 index 0000000..4b8012c --- /dev/null +++ b/src/translations/obconf-qt_zh_TW.desktop @@ -0,0 +1,3 @@ +Name[zh_TW]=Openbox 設定 +GenericName[zh_TW]=視窗管理員設定 +Comment[zh_TW]=設定視窗管理員