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

List:       kde-devel
Subject:    Krazy and QProgressDialog vs. KProgressDialog
From:       Luka Renko <lure () kubuntu ! org>
Date:       2009-03-12 19:39:24
Message-ID: 200903122039.25514.lure () kubuntu ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello,

I really like Krazy checker [1] as it helps improving code. However, I have 
found one suggestion as problematic: replacement of QProgressDialog with 
KProgressDialog - for example, see [2].

With typical Q -> K replacement, K classes derive from Q class and only extend 
the functionality. Therefore migration is pretty straight forward.  This is 
not the case with [QK]ProgressDialog: KProgressDialog derives from KDialog and 
not from QProgressDialog. Such change requires some more code changes (for 
example dialog->progressBar() to get to setValue/setMaximum methods), but also 
has missing functionality. 
The biggest problem for me is the lack of slot for Cancel button 
(QProgressDialog has canceled() slot). It seems the only way to achieve 
similar is to regularly check with wasCanceled() method - not something you 
can always easily do in the code that is currently using QProgressDialog + 
canceled() slot.

Because of the above differences, it does not make sense to suggest direct 
replacements by Krazy - unless more explaination/warning is written in the 
suggestion/warning.

I am also asking myself if it would make sense to get KProgressDialog 
implementation nearer to QProgressDialog in future versions (4.3...)?

Regards,
Luka




[1] http://www.englishbreakfastnetwork.org/krazy/
[2] 
http://www.englishbreakfastnetwork.org/krazy/reports/extragear/graphics/kipi-
plugins/index.html

[Attachment #5 (text/html)]

<!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:'DejaVu Sans'; font-size:8pt; \
font-weight:400; font-style:normal;">Hello,<br> <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; -qt-user-state:0;"><br></p>I really like Krazy \
checker [1] as it helps improving code. However, I have found one suggestion as \
problematic: replacement of QProgressDialog with KProgressDialog - for example, see \
[2].<br> <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; \
-qt-user-state:0;"><br></p>With typical Q -&gt; K replacement, K classes derive from \
Q class and only extend the functionality. Therefore migration is pretty straight \
forward.  This is not the case with [QK]ProgressDialog: KProgressDialog derives from \
KDialog and not from QProgressDialog. Such change requires some more code changes \
(for example dialog-&gt;progressBar() to get to setValue/setMaximum methods), but \
also has missing functionality. <br> The biggest problem for me is the lack of slot \
for Cancel button (QProgressDialog has canceled() slot). It seems the only way to \
achieve similar is to regularly check with wasCanceled() method - not something you \
can always easily do in the code that is currently using QProgressDialog + canceled() \
slot.<br> <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; \
-qt-user-state:0;"><br></p>Because of the above differences, it does not make sense \
to suggest direct replacements by Krazy - unless more explaination/warning is written \
in the suggestion/warning.<br> <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; -qt-user-state:0;"><br></p>I am also asking myself if it would make \
sense to get KProgressDialog implementation nearer to QProgressDialog in future \
versions (4.3...)?<br> <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; -qt-user-state:0;"><br></p>Regards,<br> Luka<br>
<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; \
-qt-user-state:0;"><br></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; -qt-user-state:0;"><br></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; -qt-user-state:0;"><br></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; -qt-user-state:0;"><br></p>[1] \
http://www.englishbreakfastnetwork.org/krazy/<br> [2] \
http://www.englishbreakfastnetwork.org/krazy/reports/extragear/graphics/kipi-plugins/index.html</p></body></html>




>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


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

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