kexi/fix-build-with-qt5.6.patch
Luca Beltrame 818923c8ae Accepting request 589797 from home:wolfi323:branches:KDE:Extra
- Update to 3.1.0:
  * General
    + Bump soname for the libraries to separate from incompatible
      3.0.x versions
  * New features
    + Add social buttons to Kexi menu
    + Make KEXI examples be built and installed by default as it's
      likely expected by users
    + Add support for setting character encoding for source
      database to Import Table Assistant
  * Bug fixes
    + Fix location of example dir
    + Mark and install Kexi example file as read-only on all
      platforms
    + Fix crash when global search box is used after re-opening
      another project
    + Add MainWindow/GlobalSearchBoxEnabled (bool) option that
      controls display of the global search box (kde#390794)
    + Disable compacting action if project is not open as we do not
      support this case for now
    + Do not display "clear" icons in read-only line edits of
      Database connection widget
    + Import table assistant: allow to move back and change source
      connection, react on double clicking
    + Do not display empty message when starting without plugins,
      inform users about the status (kde#389844)
    + Do not disable contents of "Your contributions" page (part of
      the Welcome page)
    + CSV import assistant: switch back to checkboxes from command
      link buttons
    + CSV import assistant: fix layout of delimiter widget
    + CSV import assistant: Improve getting filename selection from
      the new file requester
    + CSV import assistant: Single click on file requester's item
      moves to next page
    + Fix broken CSV import (kde#386102)
    + Rework the KexiFileRequester to use a simple and light
      QTreeView
    + Update mime types info when needed
    + Fix "wait" cursors
    + Fix crash when deleting or renaming a table (kde#379078)
    + Table Designer: don't warn about non-existing table or query
      when lookup fields are cleared
    + Table view's combo box editor: delete the combo button when
      needed, this fixes possible crash when user clicks the
      non-deleted button
    + Fix possible crash when table view containing combo boxes is
      re-used (kde#389029)
    + Fix recent dirs handling for file widgets (bug from Kexi
      3.0.x), move recent start/recent dirs handling to KexiUtils
    + Forms: Fix double moving forward/backward on tab/backtab key
      press
    + Before physical altering or deleting table ask the user to
      close depending table/query/report/form (kde#371896)
    + Queries: Synchronize the "dirty" flag between Design and Text
      views
    + SQL designer: remove possible memory leak if the parsed query
      object is still present on destruction
    + Queries: fix possible crash in data view when the query
      design changes in a design view
    + Queries: after parsing the SQL only assume the query changed
      if the SQL differs from the previous SQL
    + Fix memory leak in Project data object (list of auto-open
      objects)
    + Fix detection of single-click mode for XFCE
    + Reports: Make jumping to specific page possible
    + Reports: Keep information about type of data source (table or
      query). Detects if needed. (kde#385071)
  * Optimizations
    + Improve memory management of raw SQL execution and preparing
  * Improvements
    + Set Cancel as default for critical question message boxes
    + Use Delete verb rather than Remove for consistency
    + Don't use empty space by object tabs (like in web browsers)
    + Backport experimental scripting in Kexi
    + Add config file setting to force the use of KFileWidgets or
      simple file requesters independently of the desktop
    + Detect whether native operating system's dialogs should be
      used
    + Query Designer: Improve "The query you entered is incorrect.
      Do you want to cancel any changes made to this SQL text?"
      question
    + Query Designer: Improve "Do you want to save invalid query?"
      question
    + Import Table assistant: improve appearance of the "Finish"
      page and logic for buttons
    + Project Import assistant: support single-click accepting of
      source databases if needed
    + Translations and typo fixes
    + Add option to build without KFileWidget, default on Windows
    + Connection selector widget: select Next step on double click,
      don't select on highlighting
    + Add location edit and file filter combo work in
      KexiFileRequester, add filename completion
    + Reports: Remove traces of "external data" support, this is
      not supported since Kexi 2.3
    + Reports: Remove no longer necessary "Set Data" button from
      the data source tab
  * Docs and examples
    + Fix and update Simple_Database.kexi example
- Add Install-the-application-icons.patch from upstream, this makes
  it unnecessary to manually copy an application icon to the
  hicolor theme in %install
- Add fix-build-with-qt5.6.patch to make it compile on Leap 42

OBS-URL: https://build.opensuse.org/request/show/589797
OBS-URL: https://build.opensuse.org/package/show/KDE:Extra/kexi?expand=0&rev=10
2018-03-22 05:58:26 +00:00

60 lines
2.5 KiB
Diff

From 14dada252f590246ce400e203aed443d33c7462e Mon Sep 17 00:00:00 2001
From: Jaroslaw Staniek <staniek@kde.org>
Date: Wed, 21 Mar 2018 12:47:46 +0100
Subject: Fix build with Qt 5.6
Summary: QOverload<>::of() is new in Qt 5.7, so "emulate" it with static_cast<>() when building against lower Qt versions.
Test Plan:
Kexi 3.1.0 builds fine now on openSUSE Leap 42.3 with Qt 5.6.2.
Before I got these compiler errors:
```
/home/abuild/rpmbuild/BUILD/kexi-3.1.0/src/widget/KexiFileRequester.cpp: In member function 'void KexiFileRequester::init()':
/home/abuild/rpmbuild/BUILD/kexi-3.1.0/src/widget/KexiFileRequester.cpp:479:30: error: 'QOverload' was not declared in this scope
connect(d->locationEdit, QOverload<>::of(&KUrlComboBox::returnPressed),
^
/home/abuild/rpmbuild/BUILD/kexi-3.1.0/src/widget/KexiFileRequester.cpp:479:40: error: expected primary-expression before '>' token
connect(d->locationEdit, QOverload<>::of(&KUrlComboBox::returnPressed),
^
/home/abuild/rpmbuild/BUILD/kexi-3.1.0/src/widget/KexiFileRequester.cpp:479:41: error: '::of' has not been declared
connect(d->locationEdit, QOverload<>::of(&KUrlComboBox::returnPressed),
^
```
Still builds fine with Qt 5.9.4 and 5.10.0 too...
Reviewers: staniek, piggz
Reviewed By: staniek
Subscribers: #kexi
Tags: #kexi
Differential Revision: https://phabricator.kde.org/D11544
---
src/widget/KexiFileRequester.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/widget/KexiFileRequester.cpp b/src/widget/KexiFileRequester.cpp
index be45db5..3fd4b7e 100644
--- a/src/widget/KexiFileRequester.cpp
+++ b/src/widget/KexiFileRequester.cpp
@@ -476,8 +476,13 @@ void KexiFileRequester::init()
d->locationEdit->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLength);
connect(d->locationEdit, &KUrlComboBox::editTextChanged, d,
&KexiFileRequester::Private::locationEditTextChanged);
+#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
connect(d->locationEdit, QOverload<>::of(&KUrlComboBox::returnPressed),
d, &Private::locationEditReturnPressed);
+#else
+ connect(d->locationEdit, static_cast<void (KUrlComboBox::*)()>(&KUrlComboBox::returnPressed),
+ d, &Private::locationEditReturnPressed);
+#endif
d->urlCompletion = new KexiUrlCompletion(&d->filterRegExps, &d->filterMimeTypes);
d->locationEdit->setCompletionObject(d->urlCompletion);
d->locationEdit->setAutoDeleteCompletionObject(true);
--
cgit v0.11.2