diff --git a/CMakeLists.txt b/CMakeLists.txt index fa2e267..166785d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0) cmake_policy(SET CMP0017 NEW) # need include() with .cmake project(cd) set(cd_MAJOR 1) -set(cd_MINOR 0) +set(cd_MINOR 1) set(cd_REVISION 0) set(cd_SUFFIX ) set(cd_COMPANY SHS) @@ -29,17 +29,17 @@ if(QAD_FOUND) option(UTILS "Build various utils" ${_plugins_default_}) macro(cd_library NAME _MODULES _LIBS) - shstk_qt_project(cd_${NAME} FALSE "cd" "${_MODULES}" "${_LIBS}" ${ARGN}) - shstk_qt_install("cd" FALSE cd_${NAME} "${out_HDR}" "out_QM") + shstk_qad_project(cd_${NAME} FALSE "cd" "${_MODULES}" "${_LIBS}" ${ARGN}) + shstk_qad_install("cd" FALSE cd_${NAME} "${out_HDR}" "out_QM") endmacro() macro(cd_application NAME _MODULES _LIBS) - shstk_qt_project(${NAME} TRUE "cd" "${_MODULES}" "${_LIBS}" ${ARGN}) - shstk_qt_install("cd" TRUE ${NAME} "" "out_QM") + shstk_qad_project(${NAME} TRUE "cd" "${_MODULES}" "${_LIBS}" ${ARGN}) + shstk_qad_install("cd" TRUE ${NAME} "" "out_QM") endmacro() macro(cd_plugin NAME _MODULES _LIBS) - shstk_qt_plugin(cd_${NAME} "${_MODULES}" "cd_${NAME};${_LIBS}") + shstk_qad_plugin(cd_${NAME} "${_MODULES}" "cd_${NAME};${_LIBS}") endmacro() shstk_install(cd FALSE "" "${cd_VERSION_FILE}") diff --git a/libs/qt/qcd_core.cpp b/libs/qt/qcd_core.cpp index 95511a8..c464bee 100644 --- a/libs/qt/qcd_core.cpp +++ b/libs/qt/qcd_core.cpp @@ -187,7 +187,7 @@ bool QCDCore::bindWidget(QWidget * w, const CDType & k) { void QCDCore::updateBindedWidgets() { - QMapIterator > it(binded_widgets); + QMultiMapIterator > it(binded_widgets); QWidgetList to_remove; updating = true; while (it.hasNext()) { @@ -274,10 +274,8 @@ bool QCDCore::unbindWidget(QWidget * w) { void QCDCore::unbindAllWidgets() { - QMap > bwm = binded_widgets; - QMapIterator > it(bwm); - while (it.hasNext()) { - QWidget * w = it.next().key(); + QList bwk = binded_widgets.keys(); + foreach (QWidget * w, bwk) { unbindWidget(w); } binded_widgets.clear(); @@ -285,7 +283,7 @@ void QCDCore::unbindAllWidgets() { void QCDCore::updateBindedWidget(const CDType & k_) { - QMapIterator > it(binded_widgets); + QMultiMapIterator > it(binded_widgets); updating = true; while (it.hasNext()) { QWidget * w = it.next().key(); diff --git a/libs/qt/qcd_view.cpp b/libs/qt/qcd_view.cpp index 619c46e..8d73b37 100644 --- a/libs/qt/qcd_view.cpp +++ b/libs/qt/qcd_view.cpp @@ -294,7 +294,11 @@ void CDView::calculate() { void CDView::filter(const QString & f) { +#if QT_VERSION_MAJOR <= 5 proxy_->setFilterRegExp(QRegExp(f, Qt::CaseInsensitive)); +#else + proxy_->setFilterRegularExpression(QRegularExpression(f, QRegularExpression::CaseInsensitiveOption)); +#endif } diff --git a/utils/pult/main.cpp b/utils/pult/main.cpp index b0c7285..ea414db 100644 --- a/utils/pult/main.cpp +++ b/utils/pult/main.cpp @@ -3,9 +3,7 @@ int main(int argc, char *argv[]) { QApplication a(argc, argv); -#if QT_VERSION >= 0x050000 - a.setAttribute(Qt::AA_UseHighDpiPixmaps, true); -#endif + enableHighDPI(); CDPultWindow w; w.show(); if (a.arguments().size() > 1)