Hello community,
here is the log from the commit of package kconfigwidgets for openSUSE:Factory checked in at 2014-04-02 17:21:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kconfigwidgets (Old)
and /work/SRC/openSUSE:Factory/.kconfigwidgets.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kconfigwidgets"
Changes:
--------
--- /work/SRC/openSUSE:Factory/kconfigwidgets/kconfigwidgets.changes 2014-03-10 12:17:57.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.kconfigwidgets.new/kconfigwidgets.changes 2014-04-02 17:21:56.000000000 +0200
@@ -1,0 +2,9 @@
+Sat Mar 29 19:47:25 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:
----
kconfigwidgets-4.97.0.tar.xz
New:
----
kconfigwidgets-4.98.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kconfigwidgets.spec ++++++
--- /var/tmp/diff_new_pack.FcHkH7/_old 2014-04-02 17:21:57.000000000 +0200
+++ /var/tmp/diff_new_pack.FcHkH7/_new 2014-04-02 17:21:57.000000000 +0200
@@ -18,10 +18,10 @@
%define lname libKF5ConfigWidgets5
Name: kconfigwidgets
-Version: 4.97.0
+Version: 4.98.0
Release: 0
BuildRequires: cmake >= 2.8.12
-BuildRequires: extra-cmake-modules >= 0.0.11
+BuildRequires: extra-cmake-modules >= 0.0.12
BuildRequires: fdupes
BuildRequires: kauth-devel >= %{_kf5_version}
BuildRequires: kcodecs-devel >= %{_kf5_version}
@@ -59,7 +59,7 @@
Summary: Widgets for configuration dialogs: Build Environment
Group: Development/Libraries/KDE
Requires: %lname = %{version}
-Requires: extra-cmake-modules >= 0.0.11
+Requires: extra-cmake-modules >= 0.0.12
Requires: kauth-devel >= %{_kf5_version}
Requires: kcodecs-devel >= %{_kf5_version}
Requires: kconfig-devel >= %{_kf5_version}
++++++ kconfigwidgets-4.97.0.tar.xz -> kconfigwidgets-4.98.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kconfigwidgets-4.97.0/CMakeLists.txt new/kconfigwidgets-4.98.0/CMakeLists.txt
--- old/kconfigwidgets-4.97.0/CMakeLists.txt 2014-03-01 12:50:19.000000000 +0100
+++ new/kconfigwidgets-4.98.0/CMakeLists.txt 2014-03-28 19:16:17.000000000 +0100
@@ -2,7 +2,7 @@
project(KConfigWidgets)
-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})
set(REQUIRED_QT_VERSION "5.2.0")
@@ -15,7 +15,7 @@
include(ECMSetupVersion)
include(ECMGenerateHeaders)
-set(KF5_VERSION "4.97.0")
+set(KF5_VERSION "4.98.0")
ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KCONFIGWIDGETS
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kconfigwidgets_version.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kconfigwidgets-4.97.0/docs/preparetips/man-preparetips5.1.docbook new/kconfigwidgets-4.98.0/docs/preparetips/man-preparetips5.1.docbook
--- old/kconfigwidgets-4.97.0/docs/preparetips/man-preparetips5.1.docbook 2014-03-01 12:50:19.000000000 +0100
+++ new/kconfigwidgets-4.98.0/docs/preparetips/man-preparetips5.1.docbook 2014-03-28 19:16:17.000000000 +0100
@@ -1,6 +1,6 @@
<?xml version="1.0" ?>
-<!DOCTYPE refentry PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN"
-"dtd/kdex.dtd" [
+<!DOCTYPE refentry PUBLIC "-//KDE//DTD DocBook XML V4.5-Based Variant V1.1//EN"
+"dtd/kdedbx45.dtd" [
<!ENTITY % English "INCLUDE">
]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kconfigwidgets-4.97.0/src/CMakeLists.txt new/kconfigwidgets-4.98.0/src/CMakeLists.txt
--- old/kconfigwidgets-4.97.0/src/CMakeLists.txt 2014-03-01 12:50:19.000000000 +0100
+++ new/kconfigwidgets-4.98.0/src/CMakeLists.txt 2014-03-28 19:16:17.000000000 +0100
@@ -6,6 +6,7 @@
kconfigviewstatesaver.cpp
kconfigdialogmanager.cpp
kcmodule.cpp
+ khelpclient.cpp
klanguagebutton.cpp
kpastetextaction.cpp
krecentfilesaction.cpp
@@ -46,6 +47,7 @@
KConfigViewStateSaver
KConfigDialogManager
KCModule
+ KHelpClient
KLanguageButton
KPasteTextAction
KRecentFilesAction
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kconfigwidgets-4.97.0/src/Messages.sh new/kconfigwidgets-4.98.0/src/Messages.sh
--- old/kconfigwidgets-4.97.0/src/Messages.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/kconfigwidgets-4.98.0/src/Messages.sh 2014-03-28 19:16:17.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/kconfigwidgets5.pot
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kconfigwidgets-4.97.0/src/kcmodule.cpp new/kconfigwidgets-4.98.0/src/kcmodule.cpp
--- old/kconfigwidgets-4.97.0/src/kcmodule.cpp 2014-03-01 12:50:19.000000000 +0100
+++ new/kconfigwidgets-4.98.0/src/kcmodule.cpp 2014-03-28 19:16:17.000000000 +0100
@@ -22,9 +22,7 @@
*/
-#define KDE3_SUPPORT
#include "kcmodule.h"
-#undef KDE3_SUPPORT
#include <QLayout>
#include <QTimer>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kconfigwidgets-4.97.0/src/kcolorscheme.h new/kconfigwidgets-4.98.0/src/kcolorscheme.h
--- old/kconfigwidgets-4.97.0/src/kcolorscheme.h 2014-03-01 12:50:19.000000000 +0100
+++ new/kconfigwidgets-4.98.0/src/kcolorscheme.h 2014-03-28 19:16:17.000000000 +0100
@@ -36,12 +36,9 @@
* A set of methods used to work with colors.
*
* KColorScheme currently provides access to the system color palette that the
- * user has selected (in the future, it is expected to do more). As of KDE4,
- * this class is the correct way to look up colors from the system palette,
- * as opposed to KGlobalSettings (such usage is deprecated). It greatly expands
- * on KGlobalSettings and QPalette by providing five distinct "sets" with
- * several color choices each, covering background, foreground, and decoration
- * colors.
+ * user has selected (in the future, it is expected to do more). It greatly
+ * expands on QPalette by providing five distinct "sets" with several color
+ * choices each, covering background, foreground, and decoration colors.
*
* A KColorScheme instance represents colors corresponding to a "set", where a
* set consists of those colors used to draw a particular type of element, such
@@ -52,13 +49,10 @@
* creating an anonymous instance and invoking a lookup member.
*
* @note
- * Historically, it was not needed for applications to give much concern to the
- * state of a widget (active, inactive, disabled) since only the disabled state
- * was different, and only slightly. As a result, the old KGlobalSettings color
- * getters did not care about the widget state. However, starting with KDE4,
- * the color palettes for the various states may be wildly different.
- * Therefore, it is important to take the state into account. This is why the
- * KColorScheme constructor requires a QPalette::ColorGroup as an argument.
+ * The color palettes for the various states of a widget (active, inactive,
+ * disabled) may be wildly different. Therefore, it is important to take the
+ * state into account. This is why the KColorScheme constructor requires a
+ * QPalette::ColorGroup as an argument.
*
* To facilitate working with potentially-varying states, two convenience API's
* are provided. These are KColorScheme::adjustBackground and its sister
@@ -453,9 +447,9 @@
* in QPalette::ColorGroup.
*
* Basically, a stateful brush is used to cache a particular "color" from the
- * KDE system palette (usually, one which does not live in QPalette) in the way
- * you would have used a QColor in KDE3. When you are ready to draw using the
- * brush, you use the current state to retrieve the appropriate brush.
+ * KDE system palette (usually, one which does not live in QPalette). When you
+ * are ready to draw using the brush, you use the current state to retrieve the
+ * appropriate brush.
*
* Stateful brushes can also be used to apply state effects to arbitrary
* brushes, for example when working with a application specific user-defined
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kconfigwidgets-4.97.0/src/kconfigdialog.cpp new/kconfigwidgets-4.98.0/src/kconfigdialog.cpp
--- old/kconfigwidgets-4.97.0/src/kconfigdialog.cpp 2014-03-01 12:50:19.000000000 +0100
+++ new/kconfigwidgets-4.98.0/src/kconfigdialog.cpp 2014-03-28 19:16:17.000000000 +0100
@@ -24,6 +24,7 @@
#include
#include
#include
+#include
#include <QDialogButtonBox>
#include <QIcon>
@@ -85,6 +86,8 @@
void _k_settingsChangedSlot();
KConfigDialog *q;
+ QString mAnchor;
+ QString mHelpApp;
bool shown;
KConfigDialogManager *manager;
QMap managerForPage;
@@ -350,9 +353,15 @@
d->_k_settingsChangedSlot();
}
+void KConfigDialog::setHelp(const QString &anchor, const QString &appname)
+{
+ d->mAnchor = anchor;
+ d->mHelpApp = appname;
+}
+
void KConfigDialog::showHelp()
{
- QDesktopServices::openUrl(QUrl("help:/"));
+ KHelpClient::invokeHelp(d->mAnchor, d->mHelpApp);
}
#include "moc_kconfigdialog.cpp"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kconfigwidgets-4.97.0/src/kconfigdialog.h new/kconfigwidgets-4.98.0/src/kconfigdialog.h
--- old/kconfigwidgets-4.97.0/src/kconfigdialog.h 2014-03-01 12:50:19.000000000 +0100
+++ new/kconfigwidgets-4.98.0/src/kconfigdialog.h 2014-03-28 19:16:17.000000000 +0100
@@ -213,6 +213,21 @@
void settingsChangedSlot();
/**
+ * Sets the help path and topic.
+ *
+ * The HTML file will be found using the X-DocPath entry in the application's desktop file.
+ * It can be either a relative path, or a website URL.
+ *
+ * @param anchor This has to be a defined anchor in your
+ * docbook sources or website. If empty the main index
+ * is loaded.
+ * @param appname This allows you to specify the .desktop file to get the help path from.
+ * If empty the QCoreApplication::applicationName() is used.
+ */
+ void setHelp(const QString &anchor, const QString &appname = QString());
+
+
+ /**
* Displays help for this config dialog.
* @since 5.0
*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kconfigwidgets-4.97.0/src/khelpclient.cpp new/kconfigwidgets-4.98.0/src/khelpclient.cpp
--- old/kconfigwidgets-4.97.0/src/khelpclient.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/kconfigwidgets-4.98.0/src/khelpclient.cpp 2014-03-28 19:16:17.000000000 +0100
@@ -0,0 +1,78 @@
+/* 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/kconfigwidgets-4.97.0/src/khelpclient.h new/kconfigwidgets-4.98.0/src/khelpclient.h
--- old/kconfigwidgets-4.97.0/src/khelpclient.h 1970-01-01 01:00:00.000000000 +0100
+++ new/kconfigwidgets-4.98.0/src/khelpclient.h 2014-03-28 19:16:17.000000000 +0100
@@ -0,0 +1,47 @@
+/* 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 "kconfigwidgets_export.h"
+#include
+#include
+
+namespace KHelpClient
+{
+/**
+ * Invokes the KHelpCenter HTML help viewer from docbook sources.
+ *
+ * The HTML file will be found using the X-DocPath entry in the application's desktop file.
+ * It can be either a relative path, or a website URL.
+ *
+ * @param anchor This has to be a defined anchor in your
+ * docbook sources or website. If empty the main index
+ * is loaded.
+ * @param appname This allows you to specify the .desktop file to get the help path from.
+ * If empty the QCoreApplication::applicationName() is used.
+ * @since 5.0
+ */
+KCONFIGWIDGETS_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/kconfigwidgets-4.97.0/src/krecentfilesaction.h new/kconfigwidgets-4.98.0/src/krecentfilesaction.h
--- old/kconfigwidgets-4.97.0/src/krecentfilesaction.h 2014-03-01 12:50:19.000000000 +0100
+++ new/kconfigwidgets-4.98.0/src/krecentfilesaction.h 2014-03-28 19:16:17.000000000 +0100
@@ -129,7 +129,8 @@
/**
* Loads the recent files entries from a given KConfigGroup object.
* You can provide the name of the group used to load the entries.
- * If the groupname is empty, entries are load from a group called 'RecentFiles'
+ * If the groupname is empty, entries are loaded from a group called 'RecentFiles'.
+ * Local file entries that do not exist anymore are not restored.
*
*/
void loadEntries(const KConfigGroup &config);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kconfigwidgets-4.97.0/tests/CMakeLists.txt new/kconfigwidgets-4.98.0/tests/CMakeLists.txt
--- old/kconfigwidgets-4.97.0/tests/CMakeLists.txt 2014-03-01 12:50:19.000000000 +0100
+++ new/kconfigwidgets-4.98.0/tests/CMakeLists.txt 2014-03-28 19:16:17.000000000 +0100
@@ -24,3 +24,11 @@
add_executable(kcolorutilsdemo ${kcolorUtilsDemoSources})
ecm_mark_as_test(kcolorutilsdemo)
target_link_libraries(kcolorutilsdemo KF5::ConfigWidgets KF5::GuiAddons)
+
+## krecentfilesactiontest (manual)
+
+set(krecentfilesactionTestSources krecentfilesactiontest.cpp)
+qt5_wrap_ui(krecentfilesactionTestSources krecentfilesactiontest.ui)
+add_executable(krecentfilesactiontest ${krecentfilesactionTestSources})
+ecm_mark_as_test(krecentfilesactiontest)
+target_link_libraries(krecentfilesactiontest KF5::ConfigWidgets)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kconfigwidgets-4.97.0/tests/krecentfilesactiontest.cpp new/kconfigwidgets-4.98.0/tests/krecentfilesactiontest.cpp
--- old/kconfigwidgets-4.97.0/tests/krecentfilesactiontest.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/kconfigwidgets-4.98.0/tests/krecentfilesactiontest.cpp 2014-03-28 19:16:17.000000000 +0100
@@ -0,0 +1,116 @@
+/* This file is part of the KDE libraries
+ Copyright (c) 2014 Gregor Mi
+
+ 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 "krecentfilesactiontest.h"
+
+#include <QApplication>
+#include <QMainWindow>
+#include <QWidget>
+#include <QDebug>
+
+#include <KSharedConfig>
+#include <KConfigGroup>
+#include "krecentfilesaction.h"
+#include "kstandardaction.h"
+
+#include "ui_krecentfilesactiontest.h"
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ KRecentFilesActionTest mainWindow;
+ mainWindow.show();
+ return app.exec();
+}
+
+class KRecentFilesActionTestPrivate
+{
+public:
+ Ui::MainWindow *uiMainWindow;
+ KRecentFilesAction *recentFiles;
+
+public:
+ void notifyOutputAvailable()
+ {
+ uiMainWindow->labelOutputAvailable->setText(uiMainWindow->labelOutputAvailable->text() + "A");
+ qDebug() << recentFiles->items();
+ }
+
+ KConfigGroup testConfigGroup()
+ {
+ return KConfigGroup(KSharedConfig::openConfig(), "RecentFilesActionTest");
+ }
+
+};
+
+KRecentFilesActionTest::KRecentFilesActionTest() : d(new KRecentFilesActionTestPrivate)
+{
+ d->uiMainWindow = new Ui::MainWindow();
+ d->uiMainWindow->setupUi(this);
+
+ d->recentFiles = KStandardAction::openRecent(this, SLOT(urlSelected(QUrl)), this);
+
+ connect(d->uiMainWindow->pbAddUrl, SIGNAL(clicked()), this, SLOT(addUrl()));
+ connect(d->uiMainWindow->pbLoadEntries, SIGNAL(clicked()), this, SLOT(loadEntries()));
+ connect(d->uiMainWindow->pbSaveEntries, SIGNAL(clicked()), this, SLOT(saveEntries()));
+
+ d->uiMainWindow->menuFile->addAction(d->recentFiles);
+
+ //loadEntries();
+}
+
+KRecentFilesActionTest::~KRecentFilesActionTest()
+{
+ //saveEntries();
+
+ delete d->uiMainWindow;
+ delete d;
+}
+
+void KRecentFilesActionTest::urlSelected(const QUrl& url)
+{
+ qDebug() << "urlSelected" << url;
+ d->notifyOutputAvailable();
+}
+
+void KRecentFilesActionTest::addUrl()
+{
+ QString url = d->uiMainWindow->lineEditUrl->text();
+ qDebug() << "addUrl" << url;
+
+ d->recentFiles->addUrl(QUrl(url));
+
+ d->notifyOutputAvailable();
+ d->uiMainWindow->lineEditUrl->setText(url + "a");
+}
+
+void KRecentFilesActionTest::loadEntries()
+{
+ d->notifyOutputAvailable();
+ qDebug() << "recentFiles->loadEntries()";
+ d->recentFiles->loadEntries(d->testConfigGroup());
+ d->notifyOutputAvailable();
+}
+
+void KRecentFilesActionTest::saveEntries()
+{
+ qDebug() << "recentFiles->saveEntries()";
+ d->recentFiles->saveEntries(d->testConfigGroup());
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kconfigwidgets-4.97.0/tests/krecentfilesactiontest.h new/kconfigwidgets-4.98.0/tests/krecentfilesactiontest.h
--- old/kconfigwidgets-4.97.0/tests/krecentfilesactiontest.h 1970-01-01 01:00:00.000000000 +0100
+++ new/kconfigwidgets-4.98.0/tests/krecentfilesactiontest.h 2014-03-28 19:16:17.000000000 +0100
@@ -0,0 +1,47 @@
+/* This file is part of the KDE libraries
+ Copyright (c) 2014 Gregor Mi
+
+ 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 KCONFIGWIDGETS_TESTS_KRECENTFILESACTIONTEST_H
+#define KCONFIGWIDGETS_TESTS_KRECENTFILESACTIONTEST_H
+
+#include <QMainWindow>
+
+class KRecentFilesActionTestPrivate;
+
+class KRecentFilesActionTest : public QMainWindow
+{
+ Q_OBJECT
+
+public:
+ KRecentFilesActionTest();
+
+ virtual ~KRecentFilesActionTest();
+
+public Q_SLOTS:
+ void addUrl();
+ void loadEntries();
+ void saveEntries();
+ void urlSelected(const QUrl& url);
+
+private:
+ KRecentFilesActionTestPrivate *const d;
+};
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kconfigwidgets-4.97.0/tests/krecentfilesactiontest.ui new/kconfigwidgets-4.98.0/tests/krecentfilesactiontest.ui
--- old/kconfigwidgets-4.97.0/tests/krecentfilesactiontest.ui 1970-01-01 01:00:00.000000000 +0100
+++ new/kconfigwidgets-4.98.0/tests/krecentfilesactiontest.ui 2014-03-28 19:16:17.000000000 +0100
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MainWindow</class>
+ <widget class="QMainWindow" name="MainWindow">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>434</width>
+ <height>201</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>KRecentFilesAction Test</string>
+ </property>
+ <widget class="QWidget" name="centralwidget">
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Look in the File menu to use the Open Recent menu</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QPushButton" name="pbAddUrl">
+ <property name="text">
+ <string>Add URL</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="lineEditUrl">
+ <property name="text">
+ <string>~/tmp/test1.txt</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Add URL to recent file list</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Note that nonexisting entries will not be restored.</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <widget class="QPushButton" name="pbLoadEntries">
+ <property name="text">
+ <string>LoadEntries</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="pbSaveEntries">
+ <property name="text">
+ <string>SaveEntries</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QLabel" name="label1">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>New console output:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="labelOutputAvailable">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>A</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QMenuBar" name="menubar">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>434</width>
+ <height>19</height>
+ </rect>
+ </property>
+ <widget class="QMenu" name="menuFile">
+ <property name="title">
+ <string>File</string>
+ </property>
+ </widget>
+ <addaction name="menuFile"/>
+ </widget>
+ <widget class="QStatusBar" name="statusbar"/>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org