Christophe Giboudeaux 2019-10-20 14:34:18 +00:00 committed by Git OBS Bridge
parent e39f11914d
commit f9480beaf2
5 changed files with 140 additions and 2 deletions

View File

@ -0,0 +1,25 @@
From 1c7ef77ee7de9a491a2f0a5aa9bf0581e8c7115f Mon Sep 17 00:00:00 2001
From: Christophe Giboudeaux <christophe@krop.fr>
Date: Sun, 20 Oct 2019 16:10:48 +0200
Subject: [PATCH] Add missing includes
---
src/gametree.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/gametree.h b/src/gametree.h
index 92098a1..eb005a3 100644
--- a/src/gametree.h
+++ b/src/gametree.h
@@ -9,6 +9,8 @@
#include "defines.h"
#include "setting.h"
#include <textview.h>
+#include <iostream>
+#include <memory>
class ImageHandler;
class game_state;
--
2.23.0

View File

@ -0,0 +1,35 @@
From 761a6928b018d9f1717dafe75c1af1e881b565ea Mon Sep 17 00:00:00 2001
From: Bernd Schmidt <bernds_cb1@t-online.de>
Date: Sun, 20 Oct 2019 14:17:23 +0200
Subject: [PATCH] Disable game tree header with Qt < 5.10
It seems Qt 5.9 is still fairly widespread (issue #22), so it's better to just
disable a non-critical feature rather than require a higher version.
I tried reverting 7c58b67d, which added the current header view and replaced
the one based on QHeaderView, but it now doesn't work for me even under Linux.
The headers are too wide, an issue I previously was seeing only on Windows.
---
src/gametree.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gametree.cpp b/src/gametree.cpp
index d6c1bd7..9a5a82a 100644
--- a/src/gametree.cpp
+++ b/src/gametree.cpp
@@ -125,8 +125,12 @@ void GameTree::set_board_win (MainWindow *win, QGraphicsView *header)
QScrollBar *hscr = horizontalScrollBar ();
QScrollBar *hscr2 = m_header_view->horizontalScrollBar ();
connect (hscr, &QScrollBar::valueChanged, hscr2, &QAbstractSlider::setSliderPosition);
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
connect (verticalScrollBar (), &QAbstractSlider::rangeChanged,
[this] (int, int) { QMetaObject::invokeMethod (this, &GameTree::resize_header, Qt::QueuedConnection); });
+#else
+ header->hide ();
+#endif
}
void GameTree::update_prefs ()
--
2.23.0

View File

@ -0,0 +1,67 @@
From 2fe4a0d89af8c40a204b8a5ee6e76cb888c6a046 Mon Sep 17 00:00:00 2001
From: Bernd Schmidt <bernds_cb1@t-online.de>
Date: Fri, 19 Jul 2019 18:49:16 +0200
Subject: [PATCH] Remove PlaceholderText colorroles which were added by Qt
Designer
These cause compilation failures on some systems and are (as far as I know)
unnecessary.
---
src/preferences_gui.ui | 27 ---------------------------
1 file changed, 27 deletions(-)
diff --git a/src/preferences_gui.ui b/src/preferences_gui.ui
index 904ab5f..66e6d64 100644
--- a/src/preferences_gui.ui
+++ b/src/preferences_gui.ui
@@ -4074,15 +4074,6 @@ up to :</string>
</color>
</brush>
</colorrole>
- <colorrole role="PlaceholderText">
- <brush brushstyle="NoBrush">
- <color alpha="128">
- <red>0</red>
- <green>0</green>
- <blue>0</blue>
- </color>
- </brush>
- </colorrole>
</active>
<inactive>
<colorrole role="WindowText">
@@ -4229,15 +4220,6 @@ up to :</string>
</color>
</brush>
</colorrole>
- <colorrole role="PlaceholderText">
- <brush brushstyle="NoBrush">
- <color alpha="128">
- <red>0</red>
- <green>0</green>
- <blue>0</blue>
- </color>
- </brush>
- </colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
@@ -4384,15 +4366,6 @@ up to :</string>
</color>
</brush>
</colorrole>
- <colorrole role="PlaceholderText">
- <brush brushstyle="NoBrush">
- <color alpha="128">
- <red>0</red>
- <green>0</green>
- <blue>0</blue>
- </color>
- </brush>
- </colorrole>
</disabled>
</palette>
</property>
--
2.23.0

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Sun Oct 20 13:04:36 UTC 2019 - Christophe Giboudeaux <christophe@krop.fr>
- Add patches to build with older Qt versions:
* 0001-Disable-game-tree-header-with-Qt-5.10.patch
* 0001-Remove-PlaceholderText-colorroles-which-were-added-b.patch
* 0001-Add-missing-includes.patch
-------------------------------------------------------------------
Thu Sep 19 14:44:36 UTC 2019 - Ferdinand Thiessen <rpm@fthiessen.de>

View File

@ -24,11 +24,14 @@ License: GPL-2.0-or-later
Group: Amusements/Games/Board/Other
URL: https://github.com/bernds/q5go
Source0: https://github.com/bernds/%{name}/archive/%{name}-%{version}.tar.gz
Patch0: 0001-Disable-game-tree-header-with-Qt-5.10.patch
Patch1: 0001-Remove-PlaceholderText-colorroles-which-were-added-b.patch
Patch2: 0001-Add-missing-includes.patch
BuildRequires: libqt5-linguist-devel
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
# Required for https://doc.qt.io/qt-5/qmetaobject.html#invokeMethod-4
BuildRequires: pkgconfig(Qt5Core) >= 5.10
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Multimedia)
BuildRequires: pkgconfig(Qt5Network)
@ -47,7 +50,7 @@ q5Go is a tool for Go players which performs the following functions:
* Export to a variety of formats
%prep
%setup -q -n q5Go-q5go-%{version}
%autosetup -p1 -n q5Go-q5go-%{version}
%build
pushd src