Commit Hook | 1 May 2012 01:45
Picon
Favicon

Re: Review Request: Change khtml settings to use KParts::HtmlSettingsInteface

This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/104784/

This review has been submitted with commit 8766414fe43eb7c2df9af0ac2e4bf78d4e7558dc by Dawit Alemayehu to branch KDE/4.8.

- Commit


On April 29th, 2012, 6:40 p.m., Dawit Alemayehu wrote:

Review request for kdelibs.
By Dawit Alemayehu.

Updated April 29, 2012, 6:40 p.m.

Description

The attached patch changes khtml to use the javascript policy settings from the new KParts' HtmlSettingsInterface. It also marks the duplicated enums for removal in KDE 5.

Diffs

  • khtml/khtml_settings.h (e678e74)
  • khtml/khtml_settings.cpp (bbe1bb4)

View Diff

Commit Hook | 1 May 2012 01:45
Picon
Favicon

Re: Review Request: Set the parent widget in KIO::SlaveInterface::messageBox

This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/104351/

This review has been submitted with commit 0057256b1a0a601346f3a343bbbec81bf2e48fe3 by Dawit Alemayehu to branch KDE/4.8.

- Commit


On March 20th, 2012, 7:14 p.m., Dawit Alemayehu wrote:

Review request for kdelibs.
By Dawit Alemayehu.

Updated March 20, 2012, 7:14 p.m.

Description

This patch sets the top level window that should be used when displaying message boxes in KIO::SlaveInterface. This is the first step into eliminating those multiple message boxes that are popped up because of the out-process design of KIO. Note that this is not the actual resolution, but the first step.

Diffs

  • kio/kio/scheduler.cpp (8d144bb)
  • kio/kio/slaveinterface.h (3cdc2ae)
  • kio/kio/slaveinterface.cpp (d2f9f93)
  • kio/kio/slaveinterface_p.h (e2ccfe0)

View Diff

Dawit Alemayehu | 1 May 2012 01:50
Picon
Favicon

Re: Review Request: Minor krazy2 warning fixes

This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/104785/

Review request for kdelibs.
By Dawit Alemayehu.

Updated April 30, 2012, 11:50 p.m.

Changes

Added few more fixes.

Description

The following patch fixes the following krazy2 warnings: - Use const references in Q_FOREACH statements where appropriate. - Normalize yet more signal/slot connections (missing from the first go round). - Use brackets instead of double-quotes for the 'config*' header files. - Fix the #ifdef statements in header files to reflect the header filename. I did this a long time ago, but never pushed upstream. As part of my spring clean up I want to push this local changes upstream. Any objections ?

Diffs (updated)

  • kio/bookmarks/kbookmarkdialog.cc (713ceff)
  • kio/bookmarks/kbookmarkdombuilder.cc (8e0be3c)
  • kio/bookmarks/kbookmarkimporter.cc (08210f7)
  • kio/bookmarks/kbookmarkmanager.cc (d8a9cb7)
  • kio/bookmarks/kbookmarkmenu.cc (deb973b)
  • kio/bookmarks/konqbookmarkmenu.cc (4fc6be0)
  • kio/kfile/kfilemetadataprovider.cpp (8caa0c2)
  • kio/kfile/kfilemetadataprovider_p.h (09d924a)
  • kio/kfile/kfilemetadatareaderprocess.cpp (5103087)
  • kio/kfile/kimagefilepreview.cpp (74ef8b7)
  • kio/kio/accessmanager.cpp (e535c8a)
  • kio/kio/chmodjob.cpp (85e0c2c)
  • kio/kio/job.h (aeaffa2)
  • kio/kio/job.cpp (5e18998)
  • kio/kio/jobuidelegate.cpp (85679c2)
  • kio/kio/kdesktopfileactions.cpp (edf2e9c)
  • kio/kio/kfileitemactions.h (27ab4e3)
  • kio/kio/kfileitemactions.cpp (c79a434)
  • kio/kio/kfilemetainfoitem.cpp (1cab458)
  • kio/kio/ksambasharedata.cpp (aebcb04)
  • kio/kio/kurifilter.h (289b910)
  • kio/kio/kurifilter.cpp (0144a2c)
  • kio/kio/renamedialog.cpp (11e55a9)
  • kio/misc/kpac/proxyscout.cpp (0068ce7)
  • kio/misc/kpac/script.cpp (a595301)
  • kioslave/http/kcookiejar/kcookiejar_include.h (4053a53)
  • kioslave/http/tests/httpauthenticationtest.h (35b822a)
  • nepomuk/core/resourcedata.cpp (0a5295b)
  • nepomuk/query/dateparser.cpp (9bd2e1a)
  • nepomuk/rcgen/ontologyparser.cpp (f9f8673)
  • nepomuk/rcgen/property.cpp (51d9c07)
  • nepomuk/types/class.cpp (0210537)
  • nepomuk/types/ontology.cpp (124e88c)
  • nepomuk/types/ontologymanager.cpp (10d1031)
  • nepomuk/types/property.cpp (06daf3c)
  • nepomuk/utils/datefacet.cpp (386aa00)

View Diff

Allan Sandfeld Jensen | 1 May 2012 09:49

Re: Review Request: bilinear scaling for khtml/imload

This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/104743/

Ship it!

Ship It!

- Allan Sandfeld


On April 30th, 2012, 9:22 p.m., Martin Tobias Holmedahl Sandsmark wrote:

Review request for kdelibs.
By Martin Tobias Holmedahl Sandsmark.

Updated April 30, 2012, 9:22 p.m.

Description

Uses bilinear scaling for images. It's a bit prettier, but not much, but should be a reasonable tradeoff for speed.

Testing

ran it against a couple of different images of various sizes.

Diffs

  • khtml/imload/scaledimageplane.h (35fec21)
  • khtml/imload/scaledimageplane.cpp (4977201)

View Diff

Screenshots

Konstantinos Smanis | 1 May 2012 11:55
Picon
Gravatar

Re: Review Request: Minor krazy2 warning fixes

This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/104785/

kio/bookmarks/kbookmarkdombuilder.cc (Diff revision 3) 46 46
KBookmarkDomBuilder::KBookmarkDomBuilder(
SLOT( endFolder() ) ); this, SLOT(endFolder()));
That's a trivial issue, but why unpad the parenthesis here and not in the previous connect statement? This unpadding has nothing to do with SIGNAL/SLOT normalization and/or krazy fixes. I think the kdelibs coding style suggests unpadding parentheses but if you do it, keep it consistent.

kio/bookmarks/kbookmarkmanager.cc (Diff revision 3) 261 261
KBookmarkManager::KBookmarkManager(const QString & bookmarksFile)
QObject::connect( d->m_kDirWatch, SIGNAL(dirty(const QString&)), QObject::connect( d->m_kDirWatch, SIGNAL(dirty(QString)),
If you gonna unpad parentheses, this needs fixing: "QObject::connect( d->m_kDirWatch" -> "QObject::connect(d->m_kDirWatch"

kio/bookmarks/kbookmarkmanager.cc (Diff revision 3) 263 263
KBookmarkManager::KBookmarkManager(const QString & bookmarksFile)
QObject::connect( d->m_kDirWatch, SIGNAL(created(const QString&)), QObject::connect( d->m_kDirWatch, SIGNAL(created(QString)),
Here too.

kio/bookmarks/kbookmarkmanager.cc (Diff revision 3) 265 265
KBookmarkManager::KBookmarkManager(const QString & bookmarksFile)
QObject::connect( d->m_kDirWatch, SIGNAL(deleted(const QString&)), QObject::connect( d->m_kDirWatch, SIGNAL(deleted(QString)),
Here too.

kio/bookmarks/kbookmarkmenu.cc (Diff revision 3) 80 80
KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr,
connect( _parentMenu, SIGNAL( aboutToShow() ), connect( _parentMenu, SIGNAL(aboutToShow()), this, SLOT(slotAboutToShow()));
Here too.

kio/bookmarks/kbookmarkmenu.cc (Diff revision 3) 129 128
KBookmarkMenu::KBookmarkMenu( KBookmarkManager* mgr,
connect( _parentMenu, SIGNAL( aboutToShow() ), SLOT( slotAboutToShow() ) ); connect( _parentMenu, SIGNAL(aboutToShow()), SLOT(slotAboutToShow()));
Here too. Plus, why not introduce a "this" pointer here as well (I mean the connect overload with a destination pointer)? You have changed it everywhere else, it's just inconsistent if you omit it here.

kio/bookmarks/kbookmarkmenu.cc (Diff revision 3) 295 295
void KBookmarkContextMenu::addBookmarkActions()
addAction(KIcon("tab-new"), i18n( "Open Folder in Tabs" ), this, SLOT( slotOpenFolderInTabs() ) ); addAction(KIcon("tab-new"), i18n( "Open Folder in Tabs" ), this, SLOT(slotOpenFolderInTabs()));
Inconsistent unpadding here too. You unpad the addAction function (at the end) but not i18n.

kio/bookmarks/kbookmarkmenu.cc (Diff revision 3) 459 459
void KBookmarkMenu::addOpenInTabs()
connect( paOpenFolderInTabs, SIGNAL( triggered( bool ) ), this, SLOT( slotOpenFolderInTabs() ) ); connect( paOpenFolderInTabs, SIGNAL(triggered(bool)), this, SLOT(slotOpenFolderInTabs()));
Here too.

kio/bookmarks/kbookmarkmenu.cc (Diff revision 3) 476 476
void KBookmarkMenu::addAddBookmarksList()
connect( d->bookmarksToFolder, SIGNAL( triggered( bool ) ), this, SLOT( slotAddBookmarksList() ) ); connect( d->bookmarksToFolder, SIGNAL(triggered(bool)), this, SLOT(slotAddBookmarksList()));
Here too.

kio/bookmarks/kbookmarkmenu.cc (Diff revision 3) 520 520
void KBookmarkMenu::addNewFolder()
connect( d->newBookmarkFolder, SIGNAL( triggered( bool ) ), this, SLOT( slotNewFolder() ) ); connect( d->newBookmarkFolder, SIGNAL(triggered(bool)), this, SLOT(slotNewFolder()));
Here too.

kio/bookmarks/kbookmarkmenu.cc (Diff revision 3) 733 733
KBookmarkAction::KBookmarkAction(const KBookmark &bk, KBookmarkOwner* owner, QObject *parent )
connect(this, SIGNAL( triggered(Qt::MouseButtons, Qt::KeyboardModifiers) ), connect(this, SIGNAL(triggered(Qt::MouseButtons, Qt::KeyboardModifiers)),
You haven't normalized here.

kio/bookmarks/kbookmarkmenu.cc (Diff revision 3) 734 734
KBookmarkAction::KBookmarkAction(const KBookmark &bk, KBookmarkOwner* owner, QObject *parent )
SLOT( slotSelected(Qt::MouseButtons, Qt::KeyboardModifiers) )); this, SLOT(slotSelected(Qt::MouseButtons, Qt::KeyboardModifiers)));
You haven't normalized here. You just used a different connect overload.

kio/bookmarks/konqbookmarkmenu.cc (Diff revision 3) 62 62
void KonqBookmarkContextMenu::addActions()
addAction( SmallIcon(""), text, this, SLOT( toggleShowInToolbar())); addAction( SmallIcon(""), text, this, SLOT(toggleShowInToolbar()));
Incosistent unpadding.

kio/bookmarks/konqbookmarkmenu.cc (Diff revision 3) 71 71
void KonqBookmarkContextMenu::addActions()
addAction( SmallIcon("window-new"), i18n( "Open in New Window" ), this, SLOT( openInNewWindow() ) ); addAction( SmallIcon("window-new"), i18n( "Open in New Window" ), this, SLOT(openInNewWindow()));
Same here.

kio/bookmarks/konqbookmarkmenu.cc (Diff revision 3) 72 72
void KonqBookmarkContextMenu::addActions()
addAction( SmallIcon("tab-new"), i18n( "Open in New Tab" ), this, SLOT( openInNewTab() ) ); addAction( SmallIcon("tab-new"), i18n( "Open in New Tab" ), this, SLOT(openInNewTab()));
Same here.

kio/bookmarks/konqbookmarkmenu.cc (Diff revision 3) 79 79
void KonqBookmarkContextMenu::addActions()
addAction( SmallIcon(""), text, this, SLOT( toggleShowInToolbar())); addAction( SmallIcon(""), text, this, SLOT(toggleShowInToolbar()));
Same here.

kio/kfile/kfilemetadataprovider.cpp (Diff revision 3) 396 396
void KFileMetaDataProvider::setItems(const KFileItemList& items)
Q_PRIVATE_SLOT(d, void slotDataChangeStarted()) Q_PRIVATE_SLOT(d,void slotDataChangeStarted())
This doesn't need normalization. And since kdelibs coding style suggests padding operators, the whitespace should remain.

kio/kfile/kfilemetadataprovider.cpp (Diff revision 3) 397 397
void KFileMetaDataProvider::setItems(const KFileItemList& items)
Q_PRIVATE_SLOT(d, void slotDataChangeFinished()) Q_PRIVATE_SLOT(d,void slotDataChangeFinished())
Same here.

kioslave/http/kcookiejar/kcookiejar_include.h (Diff revision 3) 4
#include <QtDBus/QtDBus>
Does it compile without the include?

nepomuk/core/resourcedata.cpp (Diff revision 3) 414 414
bool Nepomuk::ResourceData::load()
QObject::connect( m_rm->m_watcher, SIGNAL(propertyAdded(Nepomuk::Resource, Nepomuk::Types::Property, QVariant)), QObject::connect( m_rm->m_watcher, SIGNAL(propertyAdded(Nepomuk::Resource,Nepomuk::Types::Property,QVariant)),
Incosistent unpadding.

nepomuk/core/resourcedata.cpp (Diff revision 3) 415 415
bool Nepomuk::ResourceData::load()
m_rm->m_manager, SLOT(slotPropertyAdded(Nepomuk::Resource, Nepomuk::Types::Property, QVariant)) ); m_rm->m_manager, SLOT(slotPropertyAdded(Nepomuk::Resource,Nepomuk::Types::Property,QVariant)) );
Here too.

nepomuk/core/resourcedata.cpp (Diff revision 3) 416 416
bool Nepomuk::ResourceData::load()
QObject::connect( m_rm->m_watcher, SIGNAL(propertyRemoved(Nepomuk::Resource, Nepomuk::Types::Property, QVariant)), QObject::connect( m_rm->m_watcher, SIGNAL(propertyRemoved(Nepomuk::Resource,Nepomuk::Types::Property,QVariant)),
Here too.

nepomuk/core/resourcedata.cpp (Diff revision 3) 417 417
bool Nepomuk::ResourceData::load()
m_rm->m_manager, SLOT(slotPropertyRemoved(Nepomuk::Resource, Nepomuk::Types::Property, QVariant)) ); m_rm->m_manager, SLOT(slotPropertyRemoved(Nepomuk::Resource,Nepomuk::Types::Property,QVariant)) );
Here too.

nepomuk/core/resourcedata.cpp (Diff revision 3) 498 498
void Nepomuk::ResourceData::setProperty( const QUrl& uri, const Nepomuk::Variant& value )
foreach( const Nepomuk::Variant var, value.toVariantList() ) { foreach( const Nepomuk::Variant& var, value.toVariantList() ) {
Here too.

nepomuk/core/resourcedata.cpp (Diff revision 3) 549 549
void Nepomuk::ResourceData::addProperty( const QUrl& uri, const Nepomuk::Variant& value )
foreach( const Nepomuk::Variant var, value.toVariantList() ) { foreach( const Nepomuk::Variant& var, value.toVariantList() ) {
Here too.

nepomuk/query/dateparser.cpp (Diff revision 3) 178 178
public:
if(r.pos != -1) return false; if (m_regexes[i].pos != -1) return false;
You introduced a space after 'if'.

nepomuk/query/dateparser.cpp (Diff revision 3) 178 178
public:
if(r.pos != -1) return false; if (m_regexes[i].pos != -1) return false;
You introduced a space after 'if'.

nepomuk/query/dateparser.cpp (Diff revision 3) 194 194
public:
if(!format.contains( "yy" ) ) if(!format.contains( QLatin1String( "yy" ) ) )
Incosistent unpadding.

nepomuk/query/dateparser.cpp (Diff revision 3) 301 301
public:
if(r.pos != -1) return false; if (m_regexes[i].pos != -1) return false;
Space after 'if'.

I have made a few comments, mostly about code inconsistencies. Since it's a matter of taste of the maintainer I didn't open issues, except when needed.

- Konstantinos


On April 30th, 2012, 11:50 p.m., Dawit Alemayehu wrote:

Review request for kdelibs.
By Dawit Alemayehu.

Updated April 30, 2012, 11:50 p.m.

Description

The following patch fixes the following krazy2 warnings: - Use const references in Q_FOREACH statements where appropriate. - Normalize yet more signal/slot connections (missing from the first go round). - Use brackets instead of double-quotes for the 'config*' header files. - Fix the #ifdef statements in header files to reflect the header filename. I did this a long time ago, but never pushed upstream. As part of my spring clean up I want to push this local changes upstream. Any objections ?

Diffs

  • kio/bookmarks/kbookmarkdialog.cc (713ceff)
  • kio/bookmarks/kbookmarkdombuilder.cc (8e0be3c)
  • kio/bookmarks/kbookmarkimporter.cc (08210f7)
  • kio/bookmarks/kbookmarkmanager.cc (d8a9cb7)
  • kio/bookmarks/kbookmarkmenu.cc (deb973b)
  • kio/bookmarks/konqbookmarkmenu.cc (4fc6be0)
  • kio/kfile/kfilemetadataprovider.cpp (8caa0c2)
  • kio/kfile/kfilemetadataprovider_p.h (09d924a)
  • kio/kfile/kfilemetadatareaderprocess.cpp (5103087)
  • kio/kfile/kimagefilepreview.cpp (74ef8b7)
  • kio/kio/accessmanager.cpp (e535c8a)
  • kio/kio/chmodjob.cpp (85e0c2c)
  • kio/kio/job.h (aeaffa2)
  • kio/kio/job.cpp (5e18998)
  • kio/kio/jobuidelegate.cpp (85679c2)
  • kio/kio/kdesktopfileactions.cpp (edf2e9c)
  • kio/kio/kfileitemactions.h (27ab4e3)
  • kio/kio/kfileitemactions.cpp (c79a434)
  • kio/kio/kfilemetainfoitem.cpp (1cab458)
  • kio/kio/ksambasharedata.cpp (aebcb04)
  • kio/kio/kurifilter.h (289b910)
  • kio/kio/kurifilter.cpp (0144a2c)
  • kio/kio/renamedialog.cpp (11e55a9)
  • kio/misc/kpac/proxyscout.cpp (0068ce7)
  • kio/misc/kpac/script.cpp (a595301)
  • kioslave/http/kcookiejar/kcookiejar_include.h (4053a53)
  • kioslave/http/tests/httpauthenticationtest.h (35b822a)
  • nepomuk/core/resourcedata.cpp (0a5295b)
  • nepomuk/query/dateparser.cpp (9bd2e1a)
  • nepomuk/rcgen/ontologyparser.cpp (f9f8673)
  • nepomuk/rcgen/property.cpp (51d9c07)
  • nepomuk/types/class.cpp (0210537)
  • nepomuk/types/ontology.cpp (124e88c)
  • nepomuk/types/ontologymanager.cpp (10d1031)
  • nepomuk/types/property.cpp (06daf3c)
  • nepomuk/utils/datefacet.cpp (386aa00)

View Diff

Dawit Alemayehu | 1 May 2012 17:38
Picon
Favicon

Re: Review Request: Minor krazy2 warning fixes

This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/104785/

On May 1st, 2012, 9:55 a.m., Konstantinos Smanis wrote:

kio/bookmarks/kbookmarkmenu.cc (Diff revision 3) 733 733
KBookmarkAction::KBookmarkAction(const KBookmark &bk, KBookmarkOwner* owner, QObject *parent )
connect(this, SIGNAL( triggered(Qt::MouseButtons, Qt::KeyboardModifiers) ), connect(this, SIGNAL(triggered(Qt::MouseButtons, Qt::KeyboardModifiers)),
You haven't normalized here.
Well well well... The Qt tool only looked for ".cpp" files and ignores those whose extension is .cc or .c++ or .cxx. I fixed that and it caught these as well.

On May 1st, 2012, 9:55 a.m., Konstantinos Smanis wrote:

kio/kfile/kfilemetadataprovider.cpp (Diff revision 3) 396 396
void KFileMetaDataProvider::setItems(const KFileItemList& items)
Q_PRIVATE_SLOT(d, void slotDataChangeStarted()) Q_PRIVATE_SLOT(d,void slotDataChangeStarted())
This doesn't need normalization. And since kdelibs coding style suggests padding operators, the whitespace should remain.
It is the script that did that. However, I will revert this because it is indeed not necessary.

On May 1st, 2012, 9:55 a.m., Konstantinos Smanis wrote:

kioslave/http/kcookiejar/kcookiejar_include.h (Diff revision 3) 4
#include <QtDBus/QtDBus>
Does it compile without the include?
Yes that compiles fine. Even if certain includes are needed the ones that should have been included are QList and QMetaType, but neither is needed since this header is used in a generated source file that contains the necessary includes already.

On May 1st, 2012, 9:55 a.m., Konstantinos Smanis wrote:

I have made a few comments, mostly about code inconsistencies. Since it's a matter of taste of the maintainer I didn't open issues, except when needed.
Though I appreciate you going through the patch and finding all of those styling issues, I think you completely neglected my last response to David's inquiry of whether I did the normalization fixes by hand or not. All the normalization related changes were done by a tool. It makes no sense to do these changes otherwise. As such, the last thing I worry or care about is the padding changes the tool might introduce to a bunch of connect statements. I got no time for such trivialities. With the exception of the code I manually added and or modified I am not going to go through all these changes and fix padding issues. Sorry.

- Dawit


On April 30th, 2012, 11:50 p.m., Dawit Alemayehu wrote:

Review request for kdelibs.
By Dawit Alemayehu.

Updated April 30, 2012, 11:50 p.m.

Description

The following patch fixes the following krazy2 warnings: - Use const references in Q_FOREACH statements where appropriate. - Normalize yet more signal/slot connections (missing from the first go round). - Use brackets instead of double-quotes for the 'config*' header files. - Fix the #ifdef statements in header files to reflect the header filename. I did this a long time ago, but never pushed upstream. As part of my spring clean up I want to push this local changes upstream. Any objections ?

Diffs

  • kio/bookmarks/kbookmarkdialog.cc (713ceff)
  • kio/bookmarks/kbookmarkdombuilder.cc (8e0be3c)
  • kio/bookmarks/kbookmarkimporter.cc (08210f7)
  • kio/bookmarks/kbookmarkmanager.cc (d8a9cb7)
  • kio/bookmarks/kbookmarkmenu.cc (deb973b)
  • kio/bookmarks/konqbookmarkmenu.cc (4fc6be0)
  • kio/kfile/kfilemetadataprovider.cpp (8caa0c2)
  • kio/kfile/kfilemetadataprovider_p.h (09d924a)
  • kio/kfile/kfilemetadatareaderprocess.cpp (5103087)
  • kio/kfile/kimagefilepreview.cpp (74ef8b7)
  • kio/kio/accessmanager.cpp (e535c8a)
  • kio/kio/chmodjob.cpp (85e0c2c)
  • kio/kio/job.h (aeaffa2)
  • kio/kio/job.cpp (5e18998)
  • kio/kio/jobuidelegate.cpp (85679c2)
  • kio/kio/kdesktopfileactions.cpp (edf2e9c)
  • kio/kio/kfileitemactions.h (27ab4e3)
  • kio/kio/kfileitemactions.cpp (c79a434)
  • kio/kio/kfilemetainfoitem.cpp (1cab458)
  • kio/kio/ksambasharedata.cpp (aebcb04)
  • kio/kio/kurifilter.h (289b910)
  • kio/kio/kurifilter.cpp (0144a2c)
  • kio/kio/renamedialog.cpp (11e55a9)
  • kio/misc/kpac/proxyscout.cpp (0068ce7)
  • kio/misc/kpac/script.cpp (a595301)
  • kioslave/http/kcookiejar/kcookiejar_include.h (4053a53)
  • kioslave/http/tests/httpauthenticationtest.h (35b822a)
  • nepomuk/core/resourcedata.cpp (0a5295b)
  • nepomuk/query/dateparser.cpp (9bd2e1a)
  • nepomuk/rcgen/ontologyparser.cpp (f9f8673)
  • nepomuk/rcgen/property.cpp (51d9c07)
  • nepomuk/types/class.cpp (0210537)
  • nepomuk/types/ontology.cpp (124e88c)
  • nepomuk/types/ontologymanager.cpp (10d1031)
  • nepomuk/types/property.cpp (06daf3c)
  • nepomuk/utils/datefacet.cpp (386aa00)

View Diff

Dawit Alemayehu | 1 May 2012 18:37
Picon
Favicon

Review Request: Mitigate potential crashes associated with the use of QDialog::exec in kdelibs

This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/104802/

Review request for kdelibs.
By Dawit Alemayehu.

Description

This patch attempts to mitigate the unintended crashes that might result from using QDialog::exec in kdelibs. Since nested event loops are potential sources of inadvertent crashes, this patch attempts to prevent that by changing how dialogs are created in kdelibs. All blocking dialog calls, i.e. those that invoke QDialog.exec(), are wrapped with QPointer and the QPointer is checked once QDialog.exec returns. See http://www.kdedevelopers.org/node/3919 for more details. Note that I am aware of other classes that create nested event loops (e.g. QProcess), but this fix is only applicable to QDialog usage.

Diffs

  • kdeui/colors/kcolordialog.cpp (95bb7f5)
  • kdeui/dialogs/kedittoolbar.cpp (bb80952)
  • kdeui/dialogs/kinputdialog.cpp (2801c00)
  • kdeui/dialogs/kpixmapregionselectordialog.cpp (11d964b)
  • kdeui/dialogs/kshortcutsdialog.cpp (a73f8f2)
  • kdeui/dialogs/kshortcutseditor.cpp (5984a9d)
  • kdeui/findreplace/kfinddialog.cpp (de2dd90)
  • kdeui/fonts/kfontdialog.cpp (9bea490)
  • kdeui/widgets/ktextedit.cpp (1e58706)
  • kdeui/xmlgui/kmenumenuhandler_p.cpp (d8c82b6)
  • kfile/kdiroperator.cpp (18ffc34)
  • kfile/kdirselectdialog.cpp (e0dcafa)
  • kfile/kfileplaceeditdialog.cpp (5537551)
  • kio/kfile/kacleditwidget.cpp (d89429f)
  • kio/kfile/kencodingfiledialog.cpp (4686065)
  • kio/kfile/kfiledialog.cpp (d121e4d)
  • kio/kfile/kicondialog.cpp (b7d646f)
  • kio/kfile/kpropertiesdialog.cpp (feb0c9e)
  • kio/kfile/kurlrequesterdialog.cpp (8ee29e1)
  • kio/kio/jobuidelegate.cpp (85679c2)
  • kio/kio/kbuildsycocaprogressdialog.cpp (fba30ec)
  • kio/kio/passworddialog.cpp (faf0c77)
  • kio/kio/paste.cpp (ca451fb)
  • kio/kssl/kcm/cacertificatespage.cpp (0a269a3)
  • knewstuff/knewstuff2/ui/downloaddialog.cpp (b4d2dcd)
  • knewstuff/knewstuff2/ui/kdxsbutton.cpp (e8f8c83)
  • knewstuff/knewstuff3/knewstuffbutton.cpp (9c14e99)
  • kparts/browserrun.cpp (c89829d)
  • kutils/kpluginselector.cpp (505e53f)
  • nepomuk/ui/tagwidget.cpp (7c59922)
  • nepomuk/utils/searchwidget.cpp (f46e72a)

View Diff

Dawit Alemayehu | 1 May 2012 19:05
Picon
Favicon

Re: Review Request: Added option for disabling the offer to save website passwords in Konqueror

This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/104631/

On April 26th, 2012, 5:09 p.m., Albert Astals Cid wrote:

If i understand you correctly you are suggesting to create a bug (option that does nothing)? Doesn't make much sense.
Huh ? I do not follow. By "option that does nothing" you mean this change by itself does nothing that is correct. But that is true of every option in that dialog as well. Moreover, it is a well known fact that you cannot post a patch for different components in reviewboard. Anyhow, the option will most definitely be used by kwebkitpart. Whether or not some body implements support for it in khtml is a question I cannot answer. That is what I meant.

- Dawit


On April 26th, 2012, 3:48 a.m., Dawit Alemayehu wrote:

Review request for KDE Base Apps, kdelibs and David Faure.
By Dawit Alemayehu.

Updated April 26, 2012, 3:48 a.m.

Description

A patch to make that provides an option to disable the "offer to save website passwords". Note that for this patch to take effect this option will have to be used at at the browser engine level. Those patches are separate to this one. This is just the GUI configuration.

Diffs

  • konqueror/settings/konqhtml/htmlopts.h (69f36d8)
  • konqueror/settings/konqhtml/htmlopts.cpp (e5d6deb)

View Diff

Screenshots

Mark Gaiser | 1 May 2012 20:05
Picon

Re: Review Request: Fix KShortcut to really allow the usage of multiple shortcuts

This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/104801/

On April 30th, 2012, 10:19 p.m., David Faure wrote:

I am in favour of the idea, since I was hit by this limitation in the past, too. However I think the API changes should be more conservative, there's no need to deprecate so many of the existing methods, just because it is *possible* to define more than 2 shortcuts. Also, Qt's QAction already has void QAction::setShortcuts(const QList<QKeySequence> &shortcuts)... remind me why we are not using that? Because it doesn't know "default shortcut" vs "current shortcut"?
I would love to remind you, but i simply don't know. I took it for granted since the current documentation talks about it. The doc above http://quickgit.kde.org/index.php?p=kdelibs.git&a=blob&h=d87755435e9131767e63311a8b3edc34adbf87ce&hb=dc217720bd685a30ef7914f09ab8c1e321b92c88&f=kdeui%2Factions%2Fkaction.h (line 316)

On April 30th, 2012, 10:19 p.m., David Faure wrote:

kdeui/actions/kaction.h (Diff revision 1) 326
public:
// KShortcut shortcut() const;
How does this allow multiple shortcuts per action? The docu is a bit confusing, for a method that returns only one shortcut. I think you mean this is the convenience method for returning the primary shortcut, and for other shortcuts, one should use shortcuts(). In that case, just remove the default value from the deprecated method, to fix the ambiguity.
Can i remove the default value? Isn't that going to break the API? As for the name. Yeah, shortcut() returns shortcutS .. it's confusing indeed but i don't think i can change that without breaking the API. It's a function that seems to be used on quite a few places within KDE.

On April 30th, 2012, 10:19 p.m., David Faure wrote:

kdeui/actions/kaction.cpp (Diff revision 1) 185 185
void KAction::setShortcutConfigurable( bool b )
Q_ASSERT(type); Q_UNUSED(type);
This can't possibly be right. You can deprecate the method, but don't break it. It should still return the shortcut number 0 or 1, depending on the type argument.
I don't know about that. This is how the function looks now (without the patch): KShortcut KAction::shortcut(ShortcutTypes type) const { Q_ASSERT(type); if (type == DefaultShortcut) { QKeySequence primary = property("defaultPrimaryShortcut").value<QKeySequence>(); QKeySequence secondary = property("defaultAlternateShortcut").value<QKeySequence>(); return KShortcut(primary, secondary); } QKeySequence primary = shortcuts().value(0); QKeySequence secondary = shortcuts().value(1); return KShortcut(primary, secondary); } What it would do if i leave the if in there is: KShortcut KAction::shortcut(ShortcutTypes type) const { Q_ASSERT(type); if (type == DefaultShortcut) { return KShortcut(shortcuts()); } return KShortcut(shortcuts()); } which is the same as simply returning return KShortcut(shortcuts()); thus "ShortcutTypes type" becomes useless.. Or am i missing something here?

On April 30th, 2012, 10:19 p.m., David Faure wrote:

kdeui/shortcuts/kshortcut.h (Diff revision 1) 91 91
public:
KShortcut(const QKeySequence &primary, const QKeySequence &alternate); KDE_DEPRECATED KShortcut(const QKeySequence &primary, const QKeySequence &alternate);
I see no reason to deprecate this constructor. It's just convenience for the two-shortcuts case.
Reverting this change.

On April 30th, 2012, 10:19 p.m., David Faure wrote:

kdeui/shortcuts/kshortcut.h (Diff revision 1) 101 101
public:
explicit KShortcut(int keyQtPri, int keyQtAlt = 0); KDE_DEPRECATED explicit KShortcut(int keyQtPri, int keyQtAlt = 0);
Ditto.
Reverting this change.

On April 30th, 2012, 10:19 p.m., David Faure wrote:

kdeui/shortcuts/kshortcut.h (Diff revision 1) 139 139
public:
QKeySequence primary() const; KDE_DEPRECATED QKeySequence primary() const;
Ditto.
Reverting this change.

On April 30th, 2012, 10:19 p.m., David Faure wrote:

kdeui/shortcuts/kshortcut.h (Diff revision 1) 145 145
public:
QKeySequence alternate() const; KDE_DEPRECATED QKeySequence alternate() const;
Even this one could stay.
Reverting this change.

On April 30th, 2012, 10:19 p.m., David Faure wrote:

kdeui/shortcuts/kshortcut.h (Diff revision 1) 205 205
public:
QList<QKeySequence> toList(enum EmptyHandling handleEmpty = RemoveEmpty) const; KDE_DEPRECATED QList<QKeySequence> toList(enum EmptyHandling handleEmpty = RemoveEmpty) const;
I don't understand why you want to deprecate this one. The argument is about handling of empty sequences, this is unrelated to "two, or more shortcuts", isn't it?
Yeah, that was just being over eager. Removed KDE_DEPRECATED and fixed it to work with the new internal structure.

- Mark


On April 30th, 2012, 8:59 p.m., Mark Gaiser wrote:

Review request for kdelibs.
By Mark Gaiser.

Updated April 30, 2012, 8:59 p.m.

Description

So i was trying to fix this bug: https://bugs.kde.org/show_bug.cgi?id=181531 That only asked for one more shortcut. That issue seems to be a little more complicated than it looks. Till this point KActions could only have a "Primary" and a "Alternate" shortcut. 2 in total which is - in some situations - not enough. I fixed this by roughly restructuring all of the KShortcut cpp file. The API has remained the same but i would like to deprecate all things that go back to primary/alternate for the KDE 4.x cycle. Remove them for KDE Frameworks. I have 2 issues remaining: 1. QList<QKeySequence> toList() const; 2. KShortcut shortcut() const; If i enable those functions the compiler suddenly doesn't know which function to use.. The old ones or the new ones. Some suggestions on how to fix it would be welcome.

Testing

I tested this by adding the missing bindings for Dolphin's back/forward and it seems to be working just fine. I can use all available shortcuts.

Diffs

  • kdeui/actions/kaction.h (d877554)
  • kdeui/actions/kaction.cpp (309cf82)
  • kdeui/shortcuts/kshortcut.h (c720830)
  • kdeui/shortcuts/kshortcut.cpp (e307ab0)

View Diff

Lamarque Vieira Souza | 1 May 2012 20:15
Picon
Favicon

Re: Review Request: Mitigate potential crashes associated with the use of QDialog::exec in kdelibs

This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/104802/

kdeui/colors/kcolordialog.cpp (Diff revision 1) 1484 1484
void KColorDialog::setColor(const QColor &col)
KColorDialog dlg(parent, true); QPointer<KColorDialog> dlg(new KColorDialog(parent, true));
You should use QWeakPointer instead of QPointer.

kio/kfile/kfiledialog.cpp (Diff revision 1) 561
QStringList KFileDialogPrivate::getOpenFileNames(const KUrl& startDir,
if(selectedFilter) *selectedFilter = dlg->currentMimeFilter();
stick to the code style please.

kio/kfile/kurlrequesterdialog.cpp (Diff revision 1) 132 133
KUrl KUrlRequesterDialog::selectedUrl() const
const KUrl& url = dlg.selectedUrl(); url = dlg->selectedUrl();
replace tab to spaces.

- Lamarque Vieira


On May 1st, 2012, 4:37 p.m., Dawit Alemayehu wrote:

Review request for kdelibs.
By Dawit Alemayehu.

Updated May 1, 2012, 4:37 p.m.

Description

This patch attempts to mitigate the unintended crashes that might result from using QDialog::exec in kdelibs. Since nested event loops are potential sources of inadvertent crashes, this patch attempts to prevent that by changing how dialogs are created in kdelibs. All blocking dialog calls, i.e. those that invoke QDialog.exec(), are wrapped with QPointer and the QPointer is checked once QDialog.exec returns. See http://www.kdedevelopers.org/node/3919 for more details. Note that I am aware of other classes that create nested event loops (e.g. QProcess), but this fix is only applicable to QDialog usage.

Diffs

  • kdeui/colors/kcolordialog.cpp (95bb7f5)
  • kdeui/dialogs/kedittoolbar.cpp (bb80952)
  • kdeui/dialogs/kinputdialog.cpp (2801c00)
  • kdeui/dialogs/kpixmapregionselectordialog.cpp (11d964b)
  • kdeui/dialogs/kshortcutsdialog.cpp (a73f8f2)
  • kdeui/dialogs/kshortcutseditor.cpp (5984a9d)
  • kdeui/findreplace/kfinddialog.cpp (de2dd90)
  • kdeui/fonts/kfontdialog.cpp (9bea490)
  • kdeui/widgets/ktextedit.cpp (1e58706)
  • kdeui/xmlgui/kmenumenuhandler_p.cpp (d8c82b6)
  • kfile/kdiroperator.cpp (18ffc34)
  • kfile/kdirselectdialog.cpp (e0dcafa)
  • kfile/kfileplaceeditdialog.cpp (5537551)
  • kio/kfile/kacleditwidget.cpp (d89429f)
  • kio/kfile/kencodingfiledialog.cpp (4686065)
  • kio/kfile/kfiledialog.cpp (d121e4d)
  • kio/kfile/kicondialog.cpp (b7d646f)
  • kio/kfile/kpropertiesdialog.cpp (feb0c9e)
  • kio/kfile/kurlrequesterdialog.cpp (8ee29e1)
  • kio/kio/jobuidelegate.cpp (85679c2)
  • kio/kio/kbuildsycocaprogressdialog.cpp (fba30ec)
  • kio/kio/passworddialog.cpp (faf0c77)
  • kio/kio/paste.cpp (ca451fb)
  • kio/kssl/kcm/cacertificatespage.cpp (0a269a3)
  • knewstuff/knewstuff2/ui/downloaddialog.cpp (b4d2dcd)
  • knewstuff/knewstuff2/ui/kdxsbutton.cpp (e8f8c83)
  • knewstuff/knewstuff3/knewstuffbutton.cpp (9c14e99)
  • kparts/browserrun.cpp (c89829d)
  • kutils/kpluginselector.cpp (505e53f)
  • nepomuk/ui/tagwidget.cpp (7c59922)
  • nepomuk/utils/searchwidget.cpp (f46e72a)

View Diff


Gmane