Hello community, here is the log from the commit of package libyui for openSUSE:Factory checked in at 2017-11-23 09:39:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libyui (Old) and /work/SRC/openSUSE:Factory/.libyui.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libyui" Thu Nov 23 09:39:06 2017 rev:33 rq:543905 version:3.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/libyui/libyui.changes 2017-08-12 19:59:12.423370832 +0200 +++ /work/SRC/openSUSE:Factory/.libyui.new/libyui.changes 2017-11-23 09:39:17.491728981 +0100 @@ -1,0 +2,7 @@ +Wed Nov 15 15:06:20 UTC 2017 - [email protected] + +- Support for sending a widget ID with Shift-F6 for automated testing + (fate#324098) +- 3.4.0 + +------------------------------------------------------------------- @@ -1006 +1013 @@ -Thu Jan 1 00:00:00 CET 1970 - [email protected] +Wed Jun 21 00:00:00 CEST 2007 - [email protected] Old: ---- libyui-3.3.3.tar.bz2 New: ---- libyui-3.4.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libyui-doc.spec ++++++ --- /var/tmp/diff_new_pack.rG9PLz/_old 2017-11-23 09:39:20.019636750 +0100 +++ /var/tmp/diff_new_pack.rG9PLz/_new 2017-11-23 09:39:20.023636604 +0100 @@ -20,7 +20,7 @@ %define so_version 8 Name: %{parent}-doc -Version: 3.3.3 +Version: 3.4.0 Release: 0 Source: %{parent}-%{version}.tar.bz2 ++++++ libyui.spec ++++++ --- /var/tmp/diff_new_pack.rG9PLz/_old 2017-11-23 09:39:20.043635874 +0100 +++ /var/tmp/diff_new_pack.rG9PLz/_new 2017-11-23 09:39:20.047635729 +0100 @@ -17,7 +17,7 @@ Name: libyui -Version: 3.3.3 +Version: 3.4.0 Release: 0 Source: %{name}-%{version}.tar.bz2 @@ -66,7 +66,6 @@ YaST for generic (C++) applications. This package has very few dependencies. - %package devel %if 0%{?suse_version} > 1325 @@ -94,7 +93,6 @@ This can be used independently of YaST for generic (C++) applications. This package has very few dependencies. - %prep %setup -q -n %{name}-%{version} ++++++ libyui-3.3.3.tar.bz2 -> libyui-3.4.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-3.3.3/README.md new/libyui-3.4.0/README.md --- old/libyui-3.3.3/README.md 2017-05-04 15:17:37.029375667 +0200 +++ new/libyui-3.4.0/README.md 2017-11-20 15:16:10.320612359 +0100 @@ -68,3 +68,12 @@ ``` rake osc:build ``` + +### Versioning + +Changing `SONAME_MAJOR` in VERSION.cmake currently means that you must also +change `so_version` in libyui.spec *and also in **all** other* libyui-*.spec +files in the other repositories. Yes, such a design is suboptimal. + +This is because the program-libyui API is not distinct +from the libyui-plugin API. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-3.3.3/VERSION.cmake new/libyui-3.4.0/VERSION.cmake --- old/libyui-3.3.3/VERSION.cmake 2017-08-03 13:11:10.664609964 +0200 +++ new/libyui-3.4.0/VERSION.cmake 2017-11-20 15:16:10.332612359 +0100 @@ -1,12 +1,14 @@ SET( VERSION_MAJOR "3") -SET( VERSION_MINOR "3" ) -SET( VERSION_PATCH "3" ) +SET( VERSION_MINOR "4" ) +SET( VERSION_PATCH "0" ) SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${GIT_SHA1_VERSION}" ) ##### This is need for the libyui core, ONLY. ##### These will be overridden from exports in LibyuiConfig.cmake -# must also adjust "Requires: yui_backend = SONAME_MAJOR" in libyui.spec.in +# Currently you must also change so_version in libyui.spec +# *and also in **all** other* libyui-*.spec files in the other repositories. +# Yes, such a design is suboptimal. SET( SONAME_MAJOR "8" ) -SET( SONAME_MINOR "0" ) +SET( SONAME_MINOR "1" ) SET( SONAME_PATCH "0" ) SET( SONAME "${SONAME_MAJOR}.${SONAME_MINOR}.${SONAME_PATCH}" ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-3.3.3/package/libyui-doc.spec new/libyui-3.4.0/package/libyui-doc.spec --- old/libyui-3.3.3/package/libyui-doc.spec 2017-08-03 13:11:10.664609964 +0200 +++ new/libyui-3.4.0/package/libyui-doc.spec 2017-11-20 15:16:10.380612359 +0100 @@ -20,7 +20,7 @@ %define so_version 8 Name: %{parent}-doc -Version: 3.3.3 +Version: 3.4.0 Release: 0 Source: %{parent}-%{version}.tar.bz2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-3.3.3/package/libyui.changes new/libyui-3.4.0/package/libyui.changes --- old/libyui-3.3.3/package/libyui.changes 2017-08-03 13:11:10.668609964 +0200 +++ new/libyui-3.4.0/package/libyui.changes 2017-11-20 15:16:10.380612359 +0100 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Wed Nov 15 15:06:20 UTC 2017 - [email protected] + +- Support for sending a widget ID with Shift-F6 for automated testing + (fate#324098) +- 3.4.0 + +------------------------------------------------------------------- Thu Aug 3 12:51:02 CEST 2017 - [email protected] - CMake 3.9 warns about CMP0028 being obsolete @@ -1003,7 +1010,7 @@ - void setShrinkable( bool shrinkable = true ); ------------------------------------------------------------------- -Thu Jan 1 00:00:00 CET 1970 - [email protected] +Wed Jun 21 00:00:00 CEST 2007 - [email protected] * Parameter YRadioButtonGroup now obsolete: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-3.3.3/package/libyui.spec new/libyui-3.4.0/package/libyui.spec --- old/libyui-3.3.3/package/libyui.spec 2017-08-03 13:11:10.668609964 +0200 +++ new/libyui-3.4.0/package/libyui.spec 2017-11-20 15:16:10.384612359 +0100 @@ -16,7 +16,7 @@ # Name: libyui -Version: 3.3.3 +Version: 3.4.0 Release: 0 Source: %{name}-%{version}.tar.bz2 @@ -65,7 +65,6 @@ YaST for generic (C++) applications. This package has very few dependencies. - %package devel %if 0%{?suse_version} > 1325 @@ -93,7 +92,6 @@ This can be used independently of YaST for generic (C++) applications. This package has very few dependencies. - %prep %setup -q -n %{name}-%{version} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-3.3.3/src/YDialogSpy.cc new/libyui-3.4.0/src/YDialogSpy.cc --- old/libyui-3.3.3/src/YDialogSpy.cc 2017-05-04 15:17:37.037375667 +0200 +++ new/libyui-3.4.0/src/YDialogSpy.cc 2017-11-20 15:16:10.436612359 +0100 @@ -29,6 +29,7 @@ #include <YDialogSpy.h> #include <YWidgetFactory.h> +#include <YWidgetID.h> #include <YDialog.h> #include <YEvent.h> #include <YTable.h> @@ -405,6 +406,8 @@ return ret; } + + /** * Refresh the displayed properties */ @@ -415,48 +418,49 @@ return; propTable->deleteAllItems(); - auto widget = selectedWidget(); - if (!widget) return; - auto propSet = widget->propertySet(); - YItemCollection items; - items.reserve( propSet.size() ); - - for ( YPropertySet::const_iterator it = propSet.propertiesBegin(); - it != propSet.propertiesEnd(); - ++it ) - { - YProperty prop = *it; - YPropertyValue propVal = widget->getProperty( prop.name() ); - std::string propValStr; - - switch ( prop.type() ) - { - case YStringProperty: - propValStr = propVal.stringVal(); - break; - - case YBoolProperty: - propValStr = propVal.boolVal() ? "true" : "false"; - break; - - case YIntegerProperty: - propValStr = std::to_string(propVal.integerVal()); - break; - - default: - propValStr = "???"; - break; - } - - auto item = new YTableItem( prop.name(), propValStr, prop.typeAsStr() ); - YUI_CHECK_NEW( item ); - items.push_back( item ); - } + if ( !widget ) + return; + + YItemCollection items; + auto propSet = widget->propertySet(); + items.reserve( propSet.size() ); + + for ( YPropertySet::const_iterator it = propSet.propertiesBegin(); + it != propSet.propertiesEnd(); + ++it ) + { + YProperty prop = *it; + YPropertyValue propVal = widget->getProperty( prop.name() ); + std::string propValStr; + + switch ( prop.type() ) + { + case YStringProperty: + propValStr = propVal.stringVal(); + break; + + case YBoolProperty: + propValStr = propVal.boolVal() ? "true" : "false"; + break; + + case YIntegerProperty: + propValStr = std::to_string(propVal.integerVal()); + break; + + default: + propValStr = "???"; + break; + } + + auto item = new YTableItem( prop.name(), propValStr, prop.typeAsStr() ); + YUI_CHECK_NEW( item ); + items.push_back( item ); + } - propTable->addItems( items ); - propTable->deselectAllItems(); + propTable->addItems( items ); + propTable->deselectAllItems(); } /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-3.3.3/src/YUI.cc new/libyui-3.4.0/src/YUI.cc --- old/libyui-3.3.3/src/YUI.cc 2017-05-04 15:17:37.053375667 +0200 +++ new/libyui-3.4.0/src/YUI.cc 2017-11-20 15:16:10.560612359 +0100 @@ -47,6 +47,7 @@ #include "YButtonBox.h" #include "YEnvVar.h" #include "YBuiltinCaller.h" +#include "YWidgetID.h" using std::endl; @@ -477,6 +478,31 @@ } +YWidget * +YUI::sendWidgetID( const std::string & id_str ) +{ + yuiMilestone() << "Sending ID \"" << id_str << "\"" << endl; + YWidget * widget = 0; + + try + { + YDialog * dialog = YDialog::currentDialog(); // may throw + YStringWidgetID id( id_str ); + widget = dialog->findWidget( &id ); + widget->setKeyboardFocus(); + } + catch ( YUINoDialogException & ex ) + { + YUI_CAUGHT( ex ); + } + // Cascading any YUIWidgetNotFoundException one level up + + return widget; +} + + + + // // ---------------------------------------------------------------------- // diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-3.3.3/src/YUI.h new/libyui-3.4.0/src/YUI.h --- old/libyui-3.3.3/src/YUI.h 2017-05-04 15:17:37.053375667 +0200 +++ new/libyui-3.4.0/src/YUI.h 2017-11-20 15:16:10.560612359 +0100 @@ -230,6 +230,15 @@ **/ virtual YEvent * runPkgSelection( YWidget * packageSelector ) = 0; + /** + * Send a widget ID. This implementation simply sets the keyboard focus to + * that widget. If there is no widget with that ID, this will throw a + * YUIWidgetNotFoundException. This function returns the widget that was + * found in case the caller wants to do more with it than just set the + * keyboard focus to it. + **/ + YWidget * sendWidgetID( const std::string & id ); + protected: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-3.3.3/src/YUISymbols.h new/libyui-3.4.0/src/YUISymbols.h --- old/libyui-3.3.3/src/YUISymbols.h 2017-05-04 15:17:37.053375667 +0200 +++ new/libyui-3.4.0/src/YUISymbols.h 2017-11-20 15:16:10.560612359 +0100 @@ -177,6 +177,7 @@ #define YUIProperty_InputMaxLength "InputMaxLength" #define YUIProperty_HWeight "HWeight" #define YUIProperty_HStretch "HStretch" +#define YUIProperty_ID "ID" #define YUIProperty_Item "Item" #define YUIProperty_Items "Items" #define YUIProperty_Label "Label" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libyui-3.3.3/src/YWidget.cc new/libyui-3.4.0/src/YWidget.cc --- old/libyui-3.3.3/src/YWidget.cc 2017-05-04 15:17:37.053375667 +0200 +++ new/libyui-3.4.0/src/YWidget.cc 2017-11-20 15:16:10.560612359 +0100 @@ -402,6 +402,7 @@ * @property boolean ContextMenu the current contextmenu state (see also `opt( `notifyContextMenu )) * @property std::string WidgetClass the widget class of this widget (YLabel, YPushButton, ...) * @property std::string DebugLabel (possibly translated) text describing this widget for debugging + * @property std::string ID widget id as a read-only property * @property std::string HelpText help text * @property integer HWeight horizontal layout weight (same as `HWeight(widget()) * @property integer VWeight vertical layout weight (same as `VWeight(widget()) @@ -413,6 +414,7 @@ propSet.add( YProperty( YUIProperty_Notify, YBoolProperty ) ); propSet.add( YProperty( YUIProperty_WidgetClass, YStringProperty, true ) ); // read-only propSet.add( YProperty( YUIProperty_DebugLabel, YStringProperty, true ) ); // read-only + propSet.add( YProperty( YUIProperty_ID, YStringProperty, true ) ); // read-only propSet.add( YProperty( YUIProperty_HelpText, YStringProperty ) ); propSet.add( YProperty( YUIProperty_HWeight, YIntegerProperty ) ); propSet.add( YProperty( YUIProperty_VWeight, YIntegerProperty ) ); @@ -472,6 +474,7 @@ if ( propertyName == YUIProperty_VWeight ) return YPropertyValue( weight( YD_VERT ) ); if ( propertyName == YUIProperty_HStretch ) return YPropertyValue( stretchable( YD_HORIZ ) ); if ( propertyName == YUIProperty_VStretch ) return YPropertyValue( stretchable( YD_VERT ) ); + if ( propertyName == YUIProperty_ID && this->hasId() ) return YPropertyValue(this->id()->toString()); return YPropertyValue( false ); // NOTREACHED }
