Hello community, here is the log from the commit of package libyui-qt-rest-api for openSUSE:Factory checked in at 2020-07-09 13:16:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libyui-qt-rest-api (Old) and /work/SRC/openSUSE:Factory/.libyui-qt-rest-api.new.3060 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libyui-qt-rest-api" Thu Jul 9 13:16:33 2020 rev:4 rq:819368 version:0.2.0 Changes: -------- --- /work/SRC/openSUSE:Factory/libyui-qt-rest-api/libyui-qt-rest-api.changes 2020-06-10 00:40:03.101657195 +0200 +++ /work/SRC/openSUSE:Factory/.libyui-qt-rest-api.new.3060/libyui-qt-rest-api.changes 2020-07-09 13:16:34.972741540 +0200 @@ -1,0 +2,9 @@ +Mon Jun 8 14:37:04 UTC 2020 - Rodion Iafarov <[email protected]> + +- Trigger update on YCombobox, YSelectionBox, YInputField, + YMultiSelectionBox (bsc#1139747) +- Add support for YDateField and YTimeField +- Add support for YCheckBoxFrame +- 0.2.0 + +------------------------------------------------------------------- Old: ---- libyui-qt-rest-api-0.1.2.tar.bz2 New: ---- libyui-qt-rest-api-0.2.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libyui-qt-rest-api.spec ++++++ --- /var/tmp/diff_new_pack.IHeUNJ/_old 2020-07-09 13:16:35.636743638 +0200 +++ /var/tmp/diff_new_pack.IHeUNJ/_new 2020-07-09 13:16:35.640743652 +0200 @@ -18,10 +18,10 @@ %define so_version 12 %define bin_name %{name}%{so_version} -%define libyui_devel_version libyui-devel >= 3.6.0 +%define libyui_devel_version libyui-devel >= 3.10.1 Name: libyui-qt-rest-api -Version: 0.1.2 +Version: 0.2.0 Release: 0 Summary: Libyui - The REST API plugin for the Qt frontend License: LGPL-2.1-only OR LGPL-3.0-only ++++++ libyui-qt-rest-api-0.1.2.tar.bz2 -> libyui-qt-rest-api-0.2.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.1.2/README.md new/libyui-qt-rest-api-0.2.0/README.md --- old/libyui-qt-rest-api-0.1.2/README.md 2020-06-08 17:08:24.000000000 +0200 +++ new/libyui-qt-rest-api-0.2.0/README.md 2020-07-08 09:28:32.000000000 +0200 @@ -1,8 +1,14 @@ +## Table of Contents +* [libyui-qt-rest-api](#libyui-qt-rest-api) + # libyui-qt-rest-api These are the [libyui REST API](https://github.com/libyui/libyui-rest-api) bindings for the [libyui-qt](https://github.com/libyui/libyui-ncurses-rest-api) UI frontend. +This package contains Qt specific handling of the actions. Library is dynamically +loaded based on UI being used by the YaST application. + See the libyui REST API [documentation](https://github.com/libyui/libyui-rest-api) for more details. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.1.2/SOURCECONF.cmake new/libyui-qt-rest-api-0.2.0/SOURCECONF.cmake --- old/libyui-qt-rest-api-0.1.2/SOURCECONF.cmake 2020-06-08 17:08:24.000000000 +0200 +++ new/libyui-qt-rest-api-0.2.0/SOURCECONF.cmake 2020-07-08 09:28:32.000000000 +0200 @@ -1,7 +1,9 @@ SET( ${TARGETLIB}_SOURCES YQHttpUI.cc + YQHttpWidgetsActionHandler.cc ) SET( ${TARGETLIB}_HEADERS YQHttpUI.h + YQHttpWidgetsActionHandler.h ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.1.2/VERSION.cmake new/libyui-qt-rest-api-0.2.0/VERSION.cmake --- old/libyui-qt-rest-api-0.1.2/VERSION.cmake 2020-06-08 17:08:24.000000000 +0200 +++ new/libyui-qt-rest-api-0.2.0/VERSION.cmake 2020-07-08 09:28:32.000000000 +0200 @@ -1,6 +1,6 @@ SET( VERSION_MAJOR "0") -SET( VERSION_MINOR "1" ) -SET( VERSION_PATCH "2" ) +SET( VERSION_MINOR "2" ) +SET( VERSION_PATCH "0" ) SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${GIT_SHA1_VERSION}" ) ##### This is need for the libyui core ONLY. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.1.2/package/libyui-qt-rest-api.changes new/libyui-qt-rest-api-0.2.0/package/libyui-qt-rest-api.changes --- old/libyui-qt-rest-api-0.1.2/package/libyui-qt-rest-api.changes 2020-06-08 17:08:24.000000000 +0200 +++ new/libyui-qt-rest-api-0.2.0/package/libyui-qt-rest-api.changes 2020-07-08 09:28:32.000000000 +0200 @@ -1,4 +1,13 @@ ------------------------------------------------------------------- +Mon Jun 8 14:37:04 UTC 2020 - Rodion Iafarov <[email protected]> + +- Trigger update on YCombobox, YSelectionBox, YInputField, + YMultiSelectionBox (bsc#1139747) +- Add support for YDateField and YTimeField +- Add support for YCheckBoxFrame +- 0.2.0 + +------------------------------------------------------------------- Thu Jun 4 13:13:39 UTC 2020 - Stefan Hundhammer <[email protected]> - Use new parent lib SO version libyui.so.12 (bsc#1172513) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.1.2/package/libyui-qt-rest-api.spec new/libyui-qt-rest-api-0.2.0/package/libyui-qt-rest-api.spec --- old/libyui-qt-rest-api-0.1.2/package/libyui-qt-rest-api.spec 2020-06-08 17:08:24.000000000 +0200 +++ new/libyui-qt-rest-api-0.2.0/package/libyui-qt-rest-api.spec 2020-07-08 09:28:32.000000000 +0200 @@ -18,10 +18,10 @@ %define so_version 12 %define bin_name %{name}%{so_version} -%define libyui_devel_version libyui-devel >= 3.6.0 +%define libyui_devel_version libyui-devel >= 3.10.1 Name: libyui-qt-rest-api -Version: 0.1.2 +Version: 0.2.0 Release: 0 Summary: Libyui - The REST API plugin for the Qt frontend License: LGPL-2.1-only OR LGPL-3.0-only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.1.2/src/YQHttpUI.cc new/libyui-qt-rest-api-0.2.0/src/YQHttpUI.cc --- old/libyui-qt-rest-api-0.1.2/src/YQHttpUI.cc 2020-06-08 17:08:24.000000000 +0200 +++ new/libyui-qt-rest-api-0.2.0/src/YQHttpUI.cc 2020-07-08 09:28:32.000000000 +0200 @@ -13,16 +13,17 @@ Floor, Boston, MA 02110-1301 USA */ +#define YUILogComponent "qt-rest-api" + #include <QThread> #include <QSocketNotifier> - -#define YUILogComponent "qt-rest-api" #include <yui/YUILog.h> #include <yui/Libyui_config.h> #include "YHttpServer.h" #include "YQHttpUI.h" #include "YQUI.h" +#include "YQHttpWidgetsActionHandler.h" YQHttpUI::YQHttpUI( bool withThreads ) : YQUI( withThreads, false ) @@ -117,7 +118,7 @@ { if (!YHttpServer::yserver()) { yuiMilestone() << "Creating the YHttpServer..." << std::endl; - YHttpServer * yserver = new YHttpServer(); + YHttpServer * yserver = new YHttpServer( new YQHttpWidgetsActionHandler() ); yserver->start(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.1.2/src/YQHttpWidgetsActionHandler.cc new/libyui-qt-rest-api-0.2.0/src/YQHttpWidgetsActionHandler.cc --- old/libyui-qt-rest-api-0.1.2/src/YQHttpWidgetsActionHandler.cc 1970-01-01 01:00:00.000000000 +0100 +++ new/libyui-qt-rest-api-0.2.0/src/YQHttpWidgetsActionHandler.cc 2020-07-08 09:28:32.000000000 +0200 @@ -0,0 +1,60 @@ +/* + Copyright (C) 2020 SUSE LLC + + 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.1 of the + License, or (at your option) version 3.0 of the License. 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 Lesser General Public + License for more details. You should have received a copy of the GNU + Lesser General Public License along with this library; if not, write + to the Free Software Foundation, Inc., 51 Franklin Street, Fifth + Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef YUILogComponent +#define YUILogComponent "qt-rest-api" +#endif //YUILogComponent + +#include "YUILog.h" + +#include "YQHttpUI.h" +#include "YQHttpWidgetsActionHandler.h" + +void YQHttpWidgetsActionHandler::activate_widget( YCheckBoxFrame * widget ) +{ + widget->handleChildrenEnablement( widget->value() ); + activate_qt_widget( widget ); +} + +void YQHttpWidgetsActionHandler::activate_widget( YComboBox * widget ) +{ + activate_qt_widget( widget ); +} + +void YQHttpWidgetsActionHandler::activate_widget( YDateField * widget ) +{ + activate_qt_widget( widget ); +} + +void YQHttpWidgetsActionHandler::activate_widget( YInputField * widget ) +{ + activate_qt_widget( widget ); +} + +void YQHttpWidgetsActionHandler::activate_widget( YSelectionBox * widget ) +{ + activate_qt_widget( widget ); +} + +void YQHttpWidgetsActionHandler::activate_widget( YTimeField * widget ) +{ + activate_qt_widget( widget ); +} + +void YQHttpWidgetsActionHandler::activate_widget ( YMultiSelectionBox * widget, YItem * item ) +{ + activate_qt_widget( widget, item ); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-qt-rest-api-0.1.2/src/YQHttpWidgetsActionHandler.h new/libyui-qt-rest-api-0.2.0/src/YQHttpWidgetsActionHandler.h --- old/libyui-qt-rest-api-0.1.2/src/YQHttpWidgetsActionHandler.h 1970-01-01 01:00:00.000000000 +0100 +++ new/libyui-qt-rest-api-0.2.0/src/YQHttpWidgetsActionHandler.h 2020-07-08 09:28:32.000000000 +0200 @@ -0,0 +1,63 @@ +/* + Copyright (C) 2020 SUSE LLC + + 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.1 of the + License, or (at your option) version 3.0 of the License. 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 Lesser General Public + License for more details. You should have received a copy of the GNU + Lesser General Public License along with this library; if not, write + to the Free Software Foundation, Inc., 51 Franklin Street, Fifth + Floor, Boston, MA 02110-1301 USA +*/ + +#ifndef YQHttpWidgetsActionHandler_h +#define YQHttpWidgetsActionHandler_h + +#include <iostream> +#include <functional> +#include <microhttpd.h> +#include <yui/YEvent.h> + +#include "YHttpWidgetsActionHandler.h" +#include "YQHttpUI.h" + +class YQHttpWidgetsActionHandler : public YHttpWidgetsActionHandler +{ +public: + + YQHttpWidgetsActionHandler() {} + virtual ~YQHttpWidgetsActionHandler() {} + + +protected: + + virtual void activate_widget( YCheckBoxFrame * widget ); + virtual void activate_widget( YComboBox * widget ); + virtual void activate_widget( YDateField * widget ); + virtual void activate_widget( YInputField * widget ); + virtual void activate_widget( YSelectionBox * widget ); + virtual void activate_widget( YTimeField * widget ); + + virtual void activate_widget ( YMultiSelectionBox * widget, YItem * item ); + +private: + template<typename T> + void activate_qt_widget( T * widget ) { + if( widget->notify() ) + YQHttpUI::ui()->sendEvent( new YWidgetEvent( widget, YEvent::ValueChanged ) ); + } + + template<typename T, typename I> + void activate_qt_widget( T * widget , I * item) { + if( widget->notify() ) + { + YQHttpUI::ui()->sendEvent( new YMenuEvent( item ) ); + } + } +}; + +#endif // YQHttpWidgetsActionHandler_h
