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

List:       kde-panel-devel
Subject:    Re: Plasma::Service in plasma2
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2013-05-03 6:05:33
Message-ID: 3622079.io8SXoMyY5 () freedom
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/alternative)]


On Thursday, May 2, 2013 15:53:28 Marco Martin wrote:
> * the operation description always has an "hidden" key "_name", because is
> needed in Service::startOperationCall (the operation name was before in
> KConfigGroup::name())  yhis is not really clean.

startOperationCall could take a parameter, so:

QVariantMap op = storage.operationDescription("retrieve");
op["group"] = "Test";
Plasma::ServiceJob *job = storage.startOperationCall("retrieve", op);

but then we're making porting work for developers which is bad.

we can't subclass QVariantList as it will eventually get lost somewhere on copy. 

i need to test how well the QObject C++ bindings work with QML.. e.g. if C++ operator overloads 
are proxied through. if so, then operationDescription could return a QObject and it could all be 
masked by that. i have a build going right now that will help me know if this is the case and i will 
test it later today.

otherwise .. i don't see a better solution.

> * It may require Plasma::DataEngine::Data back to a QVariantMap as in
> Plasma1 (with all performance issues it means), besides this would be
> needed for qml to directly read DataEngine::Data, the storage service, that

meh. well, at least is seems these collection classes got an overhaul in Qt5 so they hopefully 
perform better now. still, sorting is slower than not sorting. ah well .. :/

-- 
Aaron J. Seigo

[Attachment #7 (unknown)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" \
"http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" \
content="1" /><style type="text/css"> p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Bitstream Vera Sans'; font-size:12pt; \
font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">On Thursday, May 2, 2013 15:53:28 Marco Martin wrote:</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; * the operation \
description always has an &quot;hidden&quot; key &quot;_name&quot;, because is</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; needed in \
Service::startOperationCall (the operation name was before in</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; KConfigGroup::name())  \
yhis is not really clean.</p> <p style="-qt-paragraph-type:empty; margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; ">&nbsp;</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">startOperationCall could take a parameter, so:</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">QVariantMap op = \
storage.operationDescription(&quot;retrieve&quot;);</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">op[&quot;group&quot;] = &quot;Test&quot;;</p> <p \
style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Plasma::ServiceJob *job = \
storage.startOperationCall(&quot;retrieve&quot;, op);</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">but then we're making porting \
work for developers which is bad.</p> <p style="-qt-paragraph-type:empty; \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; ">&nbsp;</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">we can't subclass QVariantList as it will \
eventually get lost somewhere on copy. </p> <p style="-qt-paragraph-type:empty; \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; ">&nbsp;</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">i need to test how well the QObject C++ bindings \
work with QML.. e.g. if C++ operator overloads are proxied through. if so, then \
operationDescription could return a QObject and it could all be masked by that. i \
have a build going right now that will help me know if this is the case and i will \
test it later today.</p> <p style="-qt-paragraph-type:empty; margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; ">&nbsp;</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">otherwise .. i don't see a better solution.</p> <p \
style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p> <p style=" \
margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; \
-qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; * It may require \
Plasma::DataEngine::Data back to a QVariantMap as in</p> <p style=" margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; -qt-user-state:0;">&gt; Plasma1 (with all performance issues it \
means), besides this would be</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">&gt; needed for qml to directly read DataEngine::Data, the storage \
service, that</p> <p style="-qt-paragraph-type:empty; margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; ">&nbsp;</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">meh. well, at least is seems these collection classes got an \
overhaul in Qt5 so they hopefully perform better now. still, sorting is slower than \
not sorting. ah well .. :/</p> <p style="-qt-paragraph-type:empty; margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px; ">&nbsp;</p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">-- </p> <p style=" margin-top:0px; margin-bottom:0px; \
margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; \
-qt-user-state:0;">Aaron J. Seigo</p></body></html>


["signature.asc" (application/pgp-signature)]

_______________________________________________
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