Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37903865
en ru br
ALT Linux repos
S:1.4.1-alt1

Group :: Graphical desktop/GNOME
RPM: adwaita-qt

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: adwaita-qt-fix-build-with-qt4.patch
Download


From c1e3feb39676a05915110ecb98524cf7daa687c2 Mon Sep 17 00:00:00 2001
From: Jan Grulich <jgrulich@redhat.com>
Date: Tue, 2 Jul 2019 13:08:36 +0200
Subject: Fix build against qt4
diff --git a/style/CMakeLists.txt b/style/CMakeLists.txt
index da9baf5..ce2e483 100644
--- a/style/CMakeLists.txt
+++ b/style/CMakeLists.txt
@@ -43,6 +43,7 @@ if (MSVC)
 endif()
 
 include_directories(
+    ${QT_INCLUDES}
     ${CMAKE_CURRENT_BINARY_DIR} # for adwaita-config.h
     ${CMAKE_CURRENT_SOURCE_DIR}
     ${CMAKE_CURRENT_SOURCE_DIR}/animations/
diff --git a/style/adwaita.h b/style/adwaita.h
index 9b23aa4..165fb6a 100644
--- a/style/adwaita.h
+++ b/style/adwaita.h
@@ -102,8 +102,8 @@ namespace Adwaita
         const bool SidePanelDrawFrame { false };
         const bool MenuItemDrawStrongFocus { true };
         const int WindowDragMode { 0 };
-        const QStringList WindowDragWhiteList { };
-        const QStringList WindowDragBlackList { };
+        const QStringList WindowDragWhiteList;
+        const QStringList WindowDragBlackList;
         const bool UseWMMoveResize { true };
         const bool SplitterProxyEnabled { true };
         const int SplitterProxyWidth { 3 };
diff --git a/style/debug/adwaitawidgetexplorer.cpp b/style/debug/adwaitawidgetexplorer.cpp
index 323121d..93ee880 100644
--- a/style/debug/adwaitawidgetexplorer.cpp
+++ b/style/debug/adwaitawidgetexplorer.cpp
@@ -21,14 +21,20 @@
 #include "adwaitawidgetexplorer.h"
 
 #include "adwaita.h"
+#if QT_VERSION >= 0x050000
 #include "adwaitadebug.h"
+#else
+#include <QDebug>
+#endif
 
 #include <QTextStream>
 #include <QApplication>
 #include <QMouseEvent>
 #include <QPainter>
 
+#if QT_VERSION >= 0x050000
 Q_LOGGING_CATEGORY(ADWAITA, "adwaita.widgetexplorer")
+#endif
 
 namespace Adwaita
 {
@@ -108,8 +114,11 @@ bool WidgetExplorer::eventFilter(QObject *object, QEvent *event)
         QWidget *widget(qobject_cast<QWidget *>(object));
         if (!widget)
             return false;
-
+#if QT_VERSION >= 0x050000
         qCDebug(ADWAITA)
+#else
+        qDebug()
+#endif
                 << "Adwaita::WidgetExplorer::eventFilter -"
                 << " event: " << event << " type: " << eventType(event->type())
                 << " widget: " << widgetInformation(widget);
@@ -117,7 +126,12 @@ bool WidgetExplorer::eventFilter(QObject *object, QEvent *event)
         // print parent information
         QWidget *parent(widget->parentWidget());
         while (parent) {
-            qCDebug(ADWAITA) << "    parent: " << widgetInformation(parent);
+#if QT_VERSION >= 0x050000
+        qCDebug(ADWAITA)
+#else
+        qDebug()
+#endif
+            << "    parent: " << widgetInformation(parent);
             parent = parent->parentWidget();
         }
     }
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin