Hello community,
here is the log from the commit of package kxmlgui for openSUSE:Factory checked in at 2014-04-02 17:22:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kxmlgui (Old)
and /work/SRC/openSUSE:Factory/.kxmlgui.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kxmlgui"
Changes:
--------
--- /work/SRC/openSUSE:Factory/kxmlgui/kxmlgui.changes 2014-03-10 12:18:27.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.kxmlgui.new/kxmlgui.changes 2014-04-02 17:22:46.000000000 +0200
@@ -1,0 +2,9 @@
+Sat Mar 29 19:47:54 UTC 2014 - hrvoje.senjan@gmail.com
+
+- Update to 4.98.0
+ * API improvements and cleanups
+ * Buildsystem fixes
+ * For more details please see:
+ http://www.kde.org/announcements/announce-frameworks5-beta1.php
+
+-------------------------------------------------------------------
Old:
----
kxmlgui-4.97.0.tar.xz
New:
----
kxmlgui-4.98.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kxmlgui.spec ++++++
--- /var/tmp/diff_new_pack.tZIdcH/_old 2014-04-02 17:22:46.000000000 +0200
+++ /var/tmp/diff_new_pack.tZIdcH/_new 2014-04-02 17:22:46.000000000 +0200
@@ -18,11 +18,11 @@
%define lname libKF5XmlGui5
Name: kxmlgui
-Version: 4.97.0
+Version: 4.98.0
Release: 0
BuildRequires: attica-qt5-devel >= %{_kf5_version}
BuildRequires: cmake >= 2.8.12
-BuildRequires: extra-cmake-modules >= 0.0.11
+BuildRequires: extra-cmake-modules >= 0.0.12
BuildRequires: fdupes
BuildRequires: kconfig-devel >= %{_kf5_version}
BuildRequires: kconfigwidgets-devel >= %{_kf5_version}
@@ -109,8 +109,7 @@
%defattr(-,root,root)
%doc COPYING* README*
%{_kf5_libdir}/libKF5XmlGui.so.*
-%dir %{_kf5_configdir}/ui
-%{_kf5_configdir}/ui/ui_standards.rc
+%{_kf5_configdir}/ui/
%{_kf5_libexecdir}/ksendbugmail
%dir %{_kf5_datadir}/kxmlgui
%dir %{_kf5_datadir}/kxmlgui/pics
++++++ kxmlgui-4.97.0.tar.xz -> kxmlgui-4.98.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlgui-4.97.0/CMakeLists.txt new/kxmlgui-4.98.0/CMakeLists.txt
--- old/kxmlgui-4.97.0/CMakeLists.txt 2014-03-01 12:51:50.000000000 +0100
+++ new/kxmlgui-4.98.0/CMakeLists.txt 2014-03-28 20:26:01.000000000 +0100
@@ -3,7 +3,7 @@
project(KXmlGui)
# ECM setup
-find_package(ECM 0.0.11 REQUIRED NO_MODULE)
+find_package(ECM 0.0.12 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
@@ -16,7 +16,7 @@
include(KDEFrameworkCompilerSettings)
include(KDECMakeSettings)
-set(KF5_VERSION "4.97.0")
+set(KF5_VERSION "4.98.0")
ecm_setup_version(${KF5_VERSION}
VARIABLE_PREFIX KXMLGUI
@@ -25,8 +25,8 @@
SOVERSION 5)
# Dependencies
-set(QT_REQUIRED_VERSION 5.2.0)
-find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets DBus Xml Network PrintSupport)
+set(REQUIRED_QT_VERSION 5.2.0)
+find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Widgets DBus Xml Network PrintSupport)
find_package(KF5ItemViews ${KF5_VERSION} REQUIRED)
find_package(KF5Config ${KF5_VERSION} REQUIRED)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlgui-4.97.0/KF5XmlGuiConfig.cmake.in new/kxmlgui-4.98.0/KF5XmlGuiConfig.cmake.in
--- old/kxmlgui-4.97.0/KF5XmlGuiConfig.cmake.in 2014-03-01 12:51:50.000000000 +0100
+++ new/kxmlgui-4.98.0/KF5XmlGuiConfig.cmake.in 2014-03-28 20:26:01.000000000 +0100
@@ -10,8 +10,8 @@
find_dependency(KF5TextWidgets "@KF5_VERSION@")
find_dependency(KF5WindowSystem "@KF5_VERSION@")
-find_dependency(Qt5DBus @QT_REQUIRED_VERSION@)
-find_dependency(Qt5Xml @QT_REQUIRED_VERSION@)
+find_dependency(Qt5DBus @REQUIRED_QT_VERSION@)
+find_dependency(Qt5Xml @REQUIRED_QT_VERSION@)
include("${CMAKE_CURRENT_LIST_DIR}/KF5XmlGuiTargets.cmake")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlgui-4.97.0/autotests/icons/oxygen/index.theme new/kxmlgui-4.98.0/autotests/icons/oxygen/index.theme
--- old/kxmlgui-4.97.0/autotests/icons/oxygen/index.theme 2014-03-01 12:51:50.000000000 +0100
+++ new/kxmlgui-4.98.0/autotests/icons/oxygen/index.theme 2014-03-28 20:26:01.000000000 +0100
@@ -2,6 +2,7 @@
Name=Oxygen
Name[bs]=Oxygen
Name[ca]=Oxygen
+Name[ca@valencia]=Oxygen
Name[cs]=Oxygen
Name[da]=Oxygen
Name[de]=Oxygen
@@ -12,13 +13,17 @@
Name[ga]=Oxygen
Name[hu]=Oxygen
Name[ia]=Oxygen
+Name[ko]=Oxygen
Name[nb]=Oxygen
Name[nds]=Oxygen
Name[nl]=Oxygen
Name[nn]=Oksygen
+Name[pa]=ਆਕਸੀਜਨ
Name[pl]=Oxygen
Name[pt]=Oxygen
Name[pt_BR]=Oxygen
+Name[ro]=Oxygen
+Name[ru]=Oxygen
Name[se]=Oksygena
Name[sk]=Oxygen
Name[sl]=Kisik
@@ -30,11 +35,13 @@
Name[uk]=Oxygen
Name[vi]=Oxy
Name[x-test]=xxOxygenxx
+Name[zh_CN]=Oxygen
Name[zh_TW]=Oxygen
Comment=Oxygen Team
Comment[bs]=Oxygen tim
Comment[ca]=Equip de l'Oxygen
+Comment[ca@valencia]=Equip de l'Oxygen
Comment[cs]=Tým Oxygen
Comment[da]=Oxygen-holdet
Comment[de]=Oxygen-Team
@@ -43,12 +50,16 @@
Comment[fi]=Oxygenin kehitysryhmä
Comment[hu]=Oxygen csapat
Comment[ia]=Equipa de Oxygen
+Comment[ko]=Oxygen 팀
Comment[nb]=Oxygen-laget
Comment[nds]=Oxygen-Koppel
Comment[nl]=Oxygen-team
+Comment[pa]=ਆਕਸੀਜਨ ਟੀਮ
Comment[pl]=Zespół Oxygen
Comment[pt]=Equipa do Oxygen
Comment[pt_BR]=Equipe do Oxygen
+Comment[ro]=Echipa Oxygen
+Comment[ru]=Команда Oxygen
Comment[sk]=Tím Oxygen
Comment[sl]=Ekipa Kisika
Comment[sr]=Тим Кисеоника
@@ -58,6 +69,7 @@
Comment[sv]=Oxygen-gruppen
Comment[uk]=Команда Oxygen
Comment[x-test]=xxOxygen Teamxx
+Comment[zh_CN]=Oxygen 团队
Comment[zh_TW]=Oxygen 開發團隊
DisplayDepth=32
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlgui-4.97.0/autotests/kmainwindow_unittest.cpp new/kxmlgui-4.98.0/autotests/kmainwindow_unittest.cpp
--- old/kxmlgui-4.97.0/autotests/kmainwindow_unittest.cpp 2014-03-01 12:51:50.000000000 +0100
+++ new/kxmlgui-4.98.0/autotests/kmainwindow_unittest.cpp 2014-03-28 20:26:01.000000000 +0100
@@ -32,6 +32,12 @@
void KMainWindow_UnitTest::initTestCase()
{
QStandardPaths::enableTestMode(true);
+ QFile::remove(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + QStringLiteral("/kmainwindow_unittestrc"));
+}
+
+void KMainWindow_UnitTest::cleanupTestCase()
+{
+ QFile::remove(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + QStringLiteral("/kmainwindow_unittestrc"));
}
void KMainWindow_UnitTest::testDefaultName()
@@ -128,6 +134,9 @@
// Send the pending resize event (resize() only sets Qt::WA_PendingResizeEvent)
QResizeEvent e(size(), oldSize);
QApplication::sendEvent(this, &e);
+
+ QCOMPARE(this->width(), width);
+ QCOMPARE(this->height(), height);
}
};
@@ -159,7 +168,8 @@
KToolBar *tb = new KToolBar(&mw); // we need a toolbar to trigger an old bug in saveMainWindowSettings
tb->setObjectName("testtb");
mw.reallyResize(800, 600);
- QTest::qWait(200);
+ QTRY_COMPARE(mw.size(), QSize(800, 600));
+ QTRY_COMPARE(mw.windowHandle()->size(), QSize(800, 600));
mw.saveMainWindowSettings(cfg);
mw.close();
}
@@ -170,8 +180,8 @@
tb->setObjectName("testtb");
mw2.resize(500, 500);
mw2.applyMainWindowSettings(cfg);
- QTest::qWait(200);
- QCOMPARE(mw2.size(), QSize(800, 600));
+
+ QTRY_COMPARE(mw2.size(), QSize(800, 600));
}
void KMainWindow_UnitTest::testAutoSaveSettings()
@@ -185,7 +195,6 @@
tb->setObjectName("testtb");
mw.setAutoSaveSettings(group);
mw.reallyResize(800, 600);
- QTest::qWait(200);
mw.close();
}
@@ -194,8 +203,7 @@
KToolBar *tb = new KToolBar(&mw2);
tb->setObjectName("testtb");
mw2.setAutoSaveSettings(group);
- QTest::qWait(200);
- QCOMPARE(mw2.size(), QSize(800, 600));
+ QTRY_COMPARE(mw2.size(), QSize(800, 600));
}
void KMainWindow_UnitTest::testNoAutoSave()
@@ -208,7 +216,6 @@
mw.show();
mw.setAutoSaveSettings(group, false);
mw.reallyResize(750, 550);
- QTest::qWait(200);
mw.close();
}
@@ -216,8 +223,7 @@
mw2.show();
mw2.setAutoSaveSettings(group, false);
// NOT 750, 550! (the 800,600 comes from testAutoSaveSettings)
- QTest::qWait(200);
- QCOMPARE(mw2.size(), QSize(800, 600));
+ QTRY_COMPARE(mw2.size(), QSize(800, 600));
}
void KMainWindow_UnitTest::testWidgetWithStatusBar()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlgui-4.97.0/autotests/kmainwindow_unittest.h new/kxmlgui-4.98.0/autotests/kmainwindow_unittest.h
--- old/kxmlgui-4.97.0/autotests/kmainwindow_unittest.h 2014-03-01 12:51:50.000000000 +0100
+++ new/kxmlgui-4.98.0/autotests/kmainwindow_unittest.h 2014-03-28 20:26:01.000000000 +0100
@@ -28,6 +28,7 @@
private Q_SLOTS:
void initTestCase();
+ void cleanupTestCase();
void testDefaultName();
void testFixedName();
void testNameWithSpecialChars();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlgui-4.97.0/autotests/ktoolbar_unittest.cpp new/kxmlgui-4.98.0/autotests/ktoolbar_unittest.cpp
--- old/kxmlgui-4.97.0/autotests/ktoolbar_unittest.cpp 2014-03-01 12:51:50.000000000 +0100
+++ new/kxmlgui-4.98.0/autotests/ktoolbar_unittest.cpp 2014-03-28 20:26:01.000000000 +0100
@@ -217,11 +217,12 @@
// Save settings
kmw.saveMainWindowSettings(group);
- QCOMPARE(group.groupList().count(), 2); // two subgroups (one for each toolbar)
// was it the default value?
if (iconSize == KIconLoader::global()->currentSize(KIconLoader::MainToolbar)) {
+ QCOMPARE(group.groupList().count(), 0); // nothing to save
QVERIFY(!group.group("Toolbar mainToolBar").hasKey("IconSize"));
} else {
+ QCOMPARE(group.groupList().count(), 2); // two subgroups (one for each toolbar)
QVERIFY(group.group("Toolbar mainToolBar").hasKey("IconSize"));
}
}
@@ -315,10 +316,10 @@
// Save settings
kmw.saveMainWindowSettings(group);
- QVERIFY(group.groupList().count() >= 6); // one subgroup for each toolbar
// was it the default size? (for the main toolbar, we only check that one)
const bool usingDefaultSize = iconSize == KIconLoader::global()->currentSize(KIconLoader::MainToolbar);
if (usingDefaultSize) {
+ QVERIFY(!group.groupList().contains("Toolbar mainToolBar"));
QVERIFY(!group.group("Toolbar mainToolBar").hasKey("IconSize"));
} else {
QVERIFY(group.group("Toolbar mainToolBar").hasKey("IconSize"));
@@ -402,10 +403,11 @@
// Save settings
kmw.saveMainWindowSettings(group);
- QCOMPARE(group.groupList().count(), 2); // two subgroups (one for each toolbar)
if (selectedDefaultForMainToolbar) {
+ QCOMPARE(group.groupList().count(), 0); // nothing to save
QVERIFY(!group.group("Toolbar mainToolBar").hasKey("ToolButtonStyle"));
} else {
+ QCOMPARE(group.groupList().count(), 2); // two subgroups (one for each toolbar)
QVERIFY(group.group("Toolbar mainToolBar").hasKey("ToolButtonStyle"));
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlgui-4.97.0/src/CMakeLists.txt new/kxmlgui-4.98.0/src/CMakeLists.txt
--- old/kxmlgui-4.97.0/src/CMakeLists.txt 2014-03-01 12:51:50.000000000 +0100
+++ new/kxmlgui-4.98.0/src/CMakeLists.txt 2014-03-28 20:26:01.000000000 +0100
@@ -52,7 +52,6 @@
kxmlguiwindow.cpp
kundoactions.cpp
kcheckaccelerators.cpp
- khelpclient.cpp
)
set(kxmlgui_UI
@@ -113,7 +112,6 @@
KXMLGUIFactory
KXmlGuiWindow
KUndoActions
- KHelpClient
REQUIRED_HEADERS KXmlGui_HEADERS
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlgui-4.97.0/src/Messages.sh new/kxmlgui-4.98.0/src/Messages.sh
--- old/kxmlgui-4.97.0/src/Messages.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/kxmlgui-4.98.0/src/Messages.sh 2014-03-28 20:26:01.000000000 +0100
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# Invoke the extractrc script on all .ui, .rc, and .kcfg files in the sources.
+# The results are stored in a pseudo .cpp file to be picked up by xgettext.
+lst=`find . -name \*.rc -o -name \*.ui -o -name \*.kcfg`
+if [ -n "$lst" ] ; then
+ $EXTRACTRC $lst >> rc.cpp
+fi
+
+# If your framework contains tips-of-the-day, call preparetips as well.
+if [ -f "data/tips" ] ; then
+ ( cd data && $PREPARETIPS > ../tips.cpp )
+fi
+
+# Extract strings from all source files.
+# If your framework depends on KI18n, use $XGETTEXT. If it uses Qt translation
+# system, use $EXTRACT_TR_STRINGS.
+$XGETTEXT `find . -name \*.cpp -o -name \*.h -name \*.qml` -o $podir/kxmlgui5.pot
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlgui-4.97.0/src/kcheckaccelerators.h new/kxmlgui-4.98.0/src/kcheckaccelerators.h
--- old/kxmlgui-4.97.0/src/kcheckaccelerators.h 2014-03-01 12:51:50.000000000 +0100
+++ new/kxmlgui-4.98.0/src/kcheckaccelerators.h 2014-03-28 20:26:01.000000000 +0100
@@ -63,7 +63,7 @@
COPY WIDGET TEXT:
You can copy widgets' texts to find them in translation files faster by middle-clicking them.
- Put the following lines in ~/.kde4/share/config/kdeglobals (or in rc file for specific app):
+ Put the following lines in ~/.config/kdeglobals (or in rc file for specific app):
\code
[Development]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlgui-4.97.0/src/khelpclient.cpp new/kxmlgui-4.98.0/src/khelpclient.cpp
--- old/kxmlgui-4.97.0/src/khelpclient.cpp 2014-03-01 12:51:50.000000000 +0100
+++ new/kxmlgui-4.98.0/src/khelpclient.cpp 1970-01-01 01:00:00.000000000 +0100
@@ -1,78 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright 2012 David Faure
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2 of the License or ( at
- * your option ) version 3 or, at the discretion of KDE e.V. ( which shall
- * act as a proxy as in section 14 of the GPLv3 ), any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#include "khelpclient.h"
-
-#include "kdesktopfile.h"
-
-#include <QCoreApplication>
-#include <QUrl>
-#include <QDirIterator>
-#include <QUrlQuery>
-#include <QDesktopServices>
-
-void KHelpClient::invokeHelp(const QString &anchor, const QString &_appname)
-{
- QString appname;
- if (_appname.isEmpty()) {
- appname = QCoreApplication::instance()->applicationName();
- } else {
- appname = _appname;
- }
-
- // Look for the .desktop file of the application
-
- // was:
- //KService::Ptr service(KService::serviceByDesktopName(appname));
- //if (service)
- // docPath = service->docPath();
- // but we don't want to depend on KService here.
-
- QString docPath;
- const QStringList desktopDirs = QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation);
- Q_FOREACH (const QString &dir, desktopDirs) {
- QDirIterator it(dir, QStringList() << appname + QLatin1String(".desktop"), QDir::NoFilter, QDirIterator::Subdirectories);
- while (it.hasNext()) {
- const QString desktopPath(it.next());
- KDesktopFile desktopFile(desktopPath);
- docPath = desktopFile.readDocPath();
- break;
- }
- }
-
- // docPath could be a path or a full URL, I think.
-
- QUrl url;
- if (!docPath.isEmpty()) {
- url = QUrl(QLatin1String("help:/")).resolved(QUrl::fromUserInput(docPath));
- } else {
- url = QUrl(QString::fromLatin1("help:/%1/index.html").arg(appname));
- }
-
- if (!anchor.isEmpty()) {
- QUrlQuery query(url);
- query.addQueryItem(QString::fromLatin1("anchor"), anchor);
- url.setQuery(query);
- }
-
- // launch khelpcenter, or a browser for URIs not handled by khelpcenter
- QDesktopServices::openUrl(url);
-}
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlgui-4.97.0/src/khelpclient.h new/kxmlgui-4.98.0/src/khelpclient.h
--- old/kxmlgui-4.97.0/src/khelpclient.h 2014-03-01 12:51:50.000000000 +0100
+++ new/kxmlgui-4.98.0/src/khelpclient.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,47 +0,0 @@
-/* This file is part of the KDE libraries
- * Copyright 2012 David Faure
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2 of the License or ( at
- * your option ) version 3 or, at the discretion of KDE e.V. ( which shall
- * act as a proxy as in section 14 of the GPLv3 ), any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef KHELPCLIENT_H
-#define KHELPCLIENT_H
-
-#include "kxmlgui_export.h"
-#include
-#include
-
-namespace KHelpClient
-{
-/**
- * Invokes the KHelpCenter HTML help viewer from docbook sources.
- *
- * @param anchor This has to be a defined anchor in your
- * docbook sources. If empty the main index
- * is loaded
- * @param appname This allows you to show the help of another
- * application. If empty the current name() is
- * used
- * @param startup_id for app startup notification, "0" for none,
- * "" ( empty string ) is the default
- * @since 5.0
- */
-KXMLGUI_EXPORT void invokeHelp(const QString &anchor = QString(), const QString &appname = QString());
-}
-
-#endif /* KHELPCLIENT_H */
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlgui-4.97.0/src/kmainwindow.cpp new/kxmlgui-4.98.0/src/kmainwindow.cpp
--- old/kxmlgui-4.97.0/src/kmainwindow.cpp 2014-03-01 12:51:50.000000000 +0100
+++ new/kxmlgui-4.98.0/src/kmainwindow.cpp 2014-03-28 20:26:01.000000000 +0100
@@ -618,7 +618,7 @@
return true;
}
-void KMainWindow::applyMainWindowSettings(const KConfigGroup &cg, bool force)
+void KMainWindow::applyMainWindowSettings(const KConfigGroup &cg)
{
K_D(KMainWindow);
//qDebug(200) << "KMainWindow::applyMainWindowSettings " << cg.name();
@@ -670,7 +670,7 @@
group += (toolbar->objectName().isEmpty() ? QString::number(n) : QLatin1Char(' ') + toolbar->objectName());
KConfigGroup toolbarGroup(&cg, group);
- toolbar->applySettings(toolbarGroup, force);
+ toolbar->applySettings(toolbarGroup);
n++;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlgui-4.97.0/src/kmainwindow.h new/kxmlgui-4.98.0/src/kmainwindow.h
--- old/kxmlgui-4.97.0/src/kmainwindow.h 2014-03-01 12:51:50.000000000 +0100
+++ new/kxmlgui-4.98.0/src/kmainwindow.h 2014-03-28 20:26:01.000000000 +0100
@@ -371,9 +371,10 @@
* groups in the config file and apply them.
*
* @param config Config group to read the settings from.
- * @param forceGlobal see the same argument in KToolBar::applySettings
+ * KF5 porting note: the unused bool argument was removed, make sure to remove it from your
+ * reimplementations too! And add a Q_DECL_OVERRIDE for good measure.
*/
- virtual void applyMainWindowSettings(const KConfigGroup &config, bool forceGlobal = false);
+ virtual void applyMainWindowSettings(const KConfigGroup &config);
/**
* Save settings for statusbar, menubar and toolbar to their respective
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlgui-4.97.0/src/kshortcuteditwidget.cpp new/kxmlgui-4.98.0/src/kshortcuteditwidget.cpp
--- old/kxmlgui-4.97.0/src/kshortcuteditwidget.cpp 2014-03-01 12:51:50.000000000 +0100
+++ new/kxmlgui-4.98.0/src/kshortcuteditwidget.cpp 2014-03-28 20:26:01.000000000 +0100
@@ -81,8 +81,8 @@
this, SLOT(defaultToggled(bool)));
connect(m_customEditor, SIGNAL(keySequenceChanged(QKeySequence)),
this, SLOT(setCustom(QKeySequence)));
- connect(m_customEditor, SIGNAL(stealShortcut(QKeySequence,KAction*)),
- this, SIGNAL(stealShortcut(QKeySequence,KAction*)));
+ connect(m_customEditor, SIGNAL(stealShortcut(QKeySequence,QAction*)),
+ this, SIGNAL(stealShortcut(QKeySequence,QAction*)));
}
KKeySequenceWidget::ShortcutTypes ShortcutEditWidget::checkForConflictsAgainst() const
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlgui-4.97.0/src/kshortcutsdialog.cpp new/kxmlgui-4.98.0/src/kshortcutsdialog.cpp
--- old/kxmlgui-4.97.0/src/kshortcutsdialog.cpp 2014-03-01 12:51:50.000000000 +0100
+++ new/kxmlgui-4.98.0/src/kshortcutsdialog.cpp 2014-03-28 20:26:01.000000000 +0100
@@ -72,7 +72,8 @@
: q(q),
m_keyChooser(0),
m_schemeEditor(0),
- m_detailsButton(0)
+ m_detailsButton(0),
+ m_saveSettings(false)
{
}
@@ -139,6 +140,7 @@
KShortcutsEditor *m_keyChooser; // ### move
KShortcutSchemesEditor *m_schemeEditor;
QPushButton *m_detailsButton;
+ bool m_saveSettings;
};
KShortcutsDialog::KShortcutsDialog(KShortcutsEditor::ActionTypes types, KShortcutsEditor::LetterShortcuts allowLetterShortcuts, QWidget *parent)
@@ -207,10 +209,7 @@
//FIXME should there be a setSaveSettings method?
bool KShortcutsDialog::configure(bool saveSettings)
{
- disconnect(this, SIGNAL(okClicked()), this, SLOT(save()));
- if (saveSettings) {
- connect(this, SIGNAL(okClicked()), this, SLOT(save()));
- }
+ d->m_saveSettings = saveSettings;
if (isModal()) {
int retcode = exec();
return retcode;
@@ -220,6 +219,14 @@
}
}
+void KShortcutsDialog::accept()
+{
+ if (d->m_saveSettings) {
+ d->save();
+ }
+ QDialog::accept();
+}
+
QSize KShortcutsDialog::sizeHint() const
{
return QSize(600, 480);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlgui-4.97.0/src/kshortcutsdialog.h new/kxmlgui-4.98.0/src/kshortcutsdialog.h
--- old/kxmlgui-4.97.0/src/kshortcutsdialog.h 2014-03-01 12:51:50.000000000 +0100
+++ new/kxmlgui-4.98.0/src/kshortcutsdialog.h 2014-03-28 20:26:01.000000000 +0100
@@ -125,6 +125,12 @@
static int configure(KActionCollection *collection, KShortcutsEditor::LetterShortcuts allowLetterShortcuts =
KShortcutsEditor::LetterShortcutsAllowed, QWidget *parent = 0, bool bSaveSettings = true);
+public Q_SLOTS:
+ /**
+ * @reimp
+ */
+ void accept() Q_DECL_OVERRIDE;
+
Q_SIGNALS:
/**
* emitted after ok is clicked and settings are saved
@@ -133,7 +139,6 @@
private:
Q_PRIVATE_SLOT(d, void changeShortcutScheme(const QString &))
- Q_PRIVATE_SLOT(d, void save())
Q_PRIVATE_SLOT(d, void undoChanges())
Q_PRIVATE_SLOT(d, void toggleDetails())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlgui-4.97.0/src/ktoolbar.cpp new/kxmlgui-4.98.0/src/ktoolbar.cpp
--- old/kxmlgui-4.97.0/src/ktoolbar.cpp 2014-03-01 12:51:50.000000000 +0100
+++ new/kxmlgui-4.98.0/src/ktoolbar.cpp 2014-03-28 20:26:01.000000000 +0100
@@ -146,6 +146,7 @@
static Qt::ToolButtonStyle toolButtonStyleFromString(const QString &style);
static QString toolButtonStyleToString(Qt::ToolButtonStyle);
static Qt::ToolBarArea positionFromString(const QString &position);
+ static Qt::ToolButtonStyle toolButtonStyleSetting();
KToolBar *q;
bool isMainToolBar : 1;
@@ -242,7 +243,6 @@
loadKDESettings();
// also read in our configurable settings (for non-xmlgui toolbars)
- // KDE5: we can probably remove this, if people save settings then they load them too, e.g. using KMainWindow's autosave.
if (readConfig) {
KConfigGroup cg(KSharedConfig::openConfig(), QString());
q->applySettings(cg);
@@ -514,12 +514,19 @@
applyCurrentSettings();
}
+Qt::ToolButtonStyle KToolBar::Private::toolButtonStyleSetting()
+{
+ KConfigGroup group(KSharedConfig::openConfig(), "Toolbar style");
+ const QString fallback = KToolBar::Private::toolButtonStyleToString(Qt::ToolButtonTextBesideIcon);
+ return KToolBar::Private::toolButtonStyleFromString(group.readEntry("ToolButtonStyle", fallback));
+}
+
void KToolBar::Private::loadKDESettings()
{
iconSizeSettings[Level_KDEDefault] = q->iconSizeDefault();
if (isMainToolBar) {
- toolButtonStyleSettings[Level_KDEDefault] = q->toolButtonStyleSetting();
+ toolButtonStyleSettings[Level_KDEDefault] = toolButtonStyleSetting();
} else {
const QString fallBack = toolButtonStyleToString(Qt::ToolButtonTextBesideIcon);
/**
@@ -849,8 +856,6 @@
{
Q_ASSERT(!cg.name().isEmpty());
- cg.deleteEntry("Hidden"); // remove old key to avoid bugs from the compat code in applySettings. KDE5: remove.
-
const int currentIconSize = iconSize().width();
//qDebug() << objectName() << currentIconSize << d->iconSizeSettings.toString() << "defaultValue=" << d->iconSizeSettings.defaultValue();
if (!cg.hasDefault("IconSize") && currentIconSize == d->iconSizeSettings.defaultValue()) {
@@ -908,13 +913,6 @@
QToolBar::contextMenuEvent(event);
}
-Qt::ToolButtonStyle KToolBar::toolButtonStyleSetting()
-{
- KConfigGroup group(KSharedConfig::openConfig(), "Toolbar style");
- const QString fallback = Private::toolButtonStyleToString(Qt::ToolButtonTextBesideIcon);
- return KToolBar::Private::toolButtonStyleFromString(group.readEntry("ToolButtonStyle", fallback));
-}
-
void KToolBar::loadState(const QDomElement &element)
{
QMainWindow *mw = mainWindow();
@@ -1065,22 +1063,9 @@
}
// called by KMainWindow::applyMainWindowSettings to read from the user settings
-void KToolBar::applySettings(const KConfigGroup &cg, bool forceGlobal)
+void KToolBar::applySettings(const KConfigGroup &cg)
{
Q_ASSERT(!cg.name().isEmpty());
- Q_UNUSED(forceGlobal); // KDE5: remove
-
- // a small leftover from kde3: separate bool for hidden/shown. But it's also part of saveMainWindowSettings,
- // it is not really useful anymore, except in the unlikely case where someone would call this by hand.
- // KDE5: remove the block below
- if (cg.hasKey("Hidden")) {
- const bool hidden = cg.readEntry("Hidden", false);
- if (hidden) {
- hide();
- } else {
- show();
- }
- }
if (cg.hasKey("IconSize")) {
d->iconSizeSettings[Level_UserSettings] = cg.readEntry("IconSize", 0);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlgui-4.97.0/src/ktoolbar.h new/kxmlgui-4.98.0/src/ktoolbar.h
--- old/kxmlgui-4.97.0/src/ktoolbar.h 2014-03-01 12:51:50.000000000 +0100
+++ new/kxmlgui-4.98.0/src/ktoolbar.h 2014-03-28 20:26:01.000000000 +0100
@@ -158,12 +158,8 @@
/**
* Read the toolbar settings from group @p configGroup in @p config
* and apply them.
- *
- * @param forceGlobal is deprecated. In kde3 it used to mean
- * "force global settings, i.e. ignore @p cg", but only for visibility/position/index,
- * not for icon size etc. Only visibility is still controlled by this.
*/
- void applySettings(const KConfigGroup &cg, bool forceGlobal = false);
+ void applySettings(const KConfigGroup &cg);
/**
* Sets the XML gui client.
@@ -201,12 +197,6 @@
bool eventFilter(QObject *watched, QEvent *event);
/**
- * Returns the global setting for "Icon Text" for the main toolbar
- * @return global setting for "Icon Text" for the main toolbar
- */
- static Qt::ToolButtonStyle toolButtonStyleSetting(); // KDE5: make private and file-static, nobody is calling this
-
- /**
* Returns whether the toolbars are currently editable (drag & drop of actions).
*/
static bool toolBarsEditable();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlgui-4.97.0/src/kxmlguiwindow.cpp new/kxmlgui-4.98.0/src/kxmlguiwindow.cpp
--- old/kxmlgui-4.97.0/src/kxmlguiwindow.cpp 2014-03-01 12:51:50.000000000 +0100
+++ new/kxmlgui-4.98.0/src/kxmlguiwindow.cpp 2014-03-28 20:26:01.000000000 +0100
@@ -368,10 +368,10 @@
}
}
-void KXmlGuiWindow::applyMainWindowSettings(const KConfigGroup &config, bool force)
+void KXmlGuiWindow::applyMainWindowSettings(const KConfigGroup &config)
{
K_D(KXmlGuiWindow);
- KMainWindow::applyMainWindowSettings(config, force);
+ KMainWindow::applyMainWindowSettings(config);
QStatusBar *sb = findChild();
if (sb && d->showStatusBarAction) {
d->showStatusBarAction->setChecked(!sb->isHidden());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kxmlgui-4.97.0/src/kxmlguiwindow.h new/kxmlgui-4.98.0/src/kxmlguiwindow.h
--- old/kxmlgui-4.97.0/src/kxmlguiwindow.h 2014-03-01 12:51:50.000000000 +0100
+++ new/kxmlgui-4.98.0/src/kxmlguiwindow.h 2014-03-28 20:26:01.000000000 +0100
@@ -292,7 +292,7 @@
void finalizeGUI(bool force);
// reimplemented for internal reasons
- virtual void applyMainWindowSettings(const KConfigGroup &config, bool force = false);
+ void applyMainWindowSettings(const KConfigGroup &config) Q_DECL_OVERRIDE;
public Q_SLOTS:
/**
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org