[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: Menu branch
From:       Ignat Semenov <ragnarokk91 () gmail ! com>
Date:       2013-04-17 10:03:04
Message-ID: 1461439.0Ji3B1RnkY () localhost ! localdomain
[Download RAW message or body]

A small update:

I think that the setCurrentItem() abstraction is superfluous, not to mention 
that the name coincides with that of a QComboBox member function, thus I've 
put the workaround in findComboboxItem(), so now it is clear what is worked 
around, and once qt5 comes, it will be easy to swap the necessary code for 
QComboBox::findData() (in qt5, QVariant::operator==() works fine wrt to enums 
that are Q_DECLARE_METATYPE'd - tested by tsdgeos in a qt5 installation).

For the record:

[Thursday 11 April 2013] [00:07:23] <tsdgeos>	qDebug() << \
(QVariant::fromValue<Test::Foo>(Test::two) == \
QVariant::fromValue<Test::Foo>(Test::two)); [Thursday 11 April 2013] [00:07:24] \
<tsdgeos>	false

[Thursday 11 April 2013] [00:08:30] <tsdgeos>	Compares this QVariant with v and \
returns true if they are equal; otherwise returns false. [Thursday 11 April 2013] \
[00:08:32] <tsdgeos>	In the case of custom types, their equalness operators are not \
called. Instead the values' addresses are compared.

[Thursday 11 April 2013] [00:14:58] <tsdgeos>	isemenov: yeah that works in qt5
[Thursday 11 April 2013] [00:15:05] <tsdgeos>	        qDebug() << \
(QVariant::fromValue<Test::Foo>(Test::two) == \
QVariant::fromValue<Test::Foo>(Test::two)); [Thursday 11 April 2013] [00:15:06] \
<tsdgeos>	returns true

Best regards,
Ignat Semenov
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic