Mentor
|
You just have to write explicit before the constructor.
This gives an compile error because an empty char constant is not valid. You have to change it to
You could send this patch to the mailing list.[hr]
You should ignore this, because I saw there is for example KIcon("phrase") where phrase is an icon installed by the application. krazy cannot know that. You can suppress it with krazy comments
I do not know what you mean by making links of the desktop files. this->open() should be fine. Does krazy complain about it?[hr]
You are using krazy2 locally, aren't you? Perhaps you should start it in a subdirectory and not over all directories.[hr]
Please try if the code still compiles with the changes and if it works and if it is ok, you can send it to the mailing list.
You shouldn't change anything there because it is public API, but you can inform the developers about the issue on the mailing list and ask whether and how to handle it.
Last edited by msoeken on Wed Jan 14, 2009 11:41 am, edited 1 time in total.
[size=x-small]code | [url=cia.vc/stats/author/msoeken]cia.vc[/url] | [url=kde.org/support]donating KDE[/url] | [url=tinyurl.com/cto4ns]wishlist[/url][/size] |
Alumni
|
Thanks for taking a look
Will fix it with commenting issues.
Well these .desktop files represent some kind of books. They're not application, nor directories. But krazy2 tells us that "Type" is required and there are only three valid types available Krazy doesn't complain anymore but i changed open() to this->open(). This might cause another function to be invoked. Krazy thought that open() started the system call open but i think that wasn't the case here.
Last edited by Pconfig on Wed Jan 14, 2009 5:42 pm, edited 1 time in total.
|
KDE Developer
|
I know how to change the foreach of the SizeHint object here below, but for the QPair, krazy2 don't accept it. What I'm doing wrong?
http://lxr.kde.org/source/KDE/kdeplasma ... ut.cpp#162
http://lxr.kde.org/source/KDE/kdeplasma ... ew.cpp#148
bruno, proud to be a member of KDE forums since 2008-Oct.
|
Alumni
|
msoeken: Yup, got your message. I will work on it after preparing for my debate tomorrow (god, school is so annoying!)
A proud KDE user and Linux enthusiast.
|
KDE Developer
|
For the qclasses one, it was weird than just "pastebin/pastebinConfig.ui" required me to add KComboBox, and if not added, the comboxes were present (when tested with plasmoidviewer) but they where empty (instead of having 2 item each).
qclasses [code=diff]Index: comic/config.ui =================================================================== --- comic/config.ui (révision 911112) +++ comic/config.ui (copie de travail) @@ -49,7 +49,7 @@ - + 0 Index: fileWatcher/filtersConfig.ui =================================================================== --- fileWatcher/filtersConfig.ui (révision 911112) +++ fileWatcher/filtersConfig.ui (copie de travail) @@ -50,7 +50,7 @@ - + Index: lancelot/app/src/models/Devices.cpp =================================================================== --- lancelot/app/src/models/Devices.cpp (révision 911112) +++ lancelot/app/src/models/Devices.cpp (copie de travail) @@ -20,7 +20,7 @@ #include "Devices.h" -#include +#include #include #include @@ -238,7 +238,7 @@ access->disconnect(this, SLOT(deviceSetupDone(Solid::ErrorType, QVariant, const QString &))); if (!access || !access->isAccessible()) { - QMessageBox::critical(NULL, i18n("Failed to open"), i18n("The requested device can not be accessed.")); + KMessageBox::error(NULL, i18n("Failed to open"), i18n("The requested device can not be accessed.")); return; } Index: weatherstation/weatherconfig.ui =================================================================== --- weatherstation/weatherconfig.ui (révision 911112) +++ weatherstation/weatherconfig.ui (copie de travail) @@ -189,7 +189,7 @@ - + 0 @@ -218,7 +218,7 @@ - + 0 @@ -247,7 +247,7 @@ - + 0 Index: weatherstation/weatherconfigsearch.ui =================================================================== --- weatherstation/weatherconfigsearch.ui (révision 911112) +++ weatherstation/weatherconfigsearch.ui (copie de travail) @@ -24,7 +24,7 @@ - + @@ -57,7 +57,7 @@ KComboBox - QComboBox + KComboBox kcombobox.h Index: twitter/configuration.ui =================================================================== --- twitter/configuration.ui (révision 911112) +++ twitter/configuration.ui (copie de travail) @@ -37,9 +37,9 @@ - + - QLineEdit::Password + KLineEdit::Password @@ -221,7 +221,7 @@ - + Index: frame/config.ui =================================================================== --- frame/config.ui (révision 911112) +++ frame/config.ui (copie de travail) @@ -29,7 +29,7 @@ - + Image @@ -290,7 +290,7 @@ - + Index: pastebin/pastebinConfig.ui =================================================================== --- pastebin/pastebinConfig.ui (révision 911112) +++ pastebin/pastebinConfig.ui (copie de travail) @@ -13,7 +13,7 @@ - + Pastebin.ca @@ -34,7 +34,7 @@ - + Imagebin.ca @@ -49,6 +49,13 @@ + + + KComboBox + QComboBox + kcombobox.h + + Index: paste/snippetconfig.ui =================================================================== --- paste/snippetconfig.ui (révision 911112) +++ paste/snippetconfig.ui (copie de travail) @@ -55,7 +55,7 @@ - + @@ -82,7 +82,7 @@ - + 0 @@ -90,7 +90,7 @@ - QTextEdit::NoWrap + KTextEdit::NoWrap false Index: paste/addmacro.cpp =================================================================== --- paste/addmacro.cpp (révision 911112) +++ paste/addmacro.cpp (copie de travail) @@ -18,10 +18,10 @@ #include "addmacro.h" #include #include -#include +#include #include #include -#include +#include #include #include #include @@ -39,7 +39,7 @@ m_layout->setMargin(0); m_layout->setSpacing(spacingHint()); - m_macrosComboBox = new QComboBox(m_widget); + m_macrosComboBox = new KComboBox(m_widget); const QMap& macros = PasteMacroExpander::instance().macros(); foreach (const QString& macro, macros.keys()) { m_macrosComboBox->addItem(macros[macro][0].toString(), macro); @@ -77,7 +77,7 @@ } case MacroParam::String: layout->addWidget(new QLabel(param.name + ':', m_params)); - layout->addWidget(w = new QLineEdit(m_params)); + layout->addWidget(w = new KLineEdit(m_params)); break; case MacroParam::Url: layout->addWidget(new QLabel(param.name + ':')); @@ -111,7 +111,7 @@ } case MacroParam::String: { - QLineEdit* w = m_params->findChildren(param.name)[0]; + KLineEdit* w = m_params->findChildren(param.name)[0]; values.append(w->text()); break; } Index: paste/addmacro.h =================================================================== --- paste/addmacro.h (révision 911112) +++ paste/addmacro.h (copie de travail) @@ -21,7 +21,7 @@ #include #include -class QComboBox; +class KComboBox; class QVBoxLayout; class AddMacro : public KDialog @@ -37,7 +37,7 @@ void currentIndexChanged(int index); private: - QComboBox* m_macrosComboBox; + KComboBox* m_macrosComboBox; QVBoxLayout* m_layout; QWidget* m_widget; QWidget* m_params; [/code] doublequote_chars [code=diff]Index: lancelot/app/src/models/MessagesKmail.cpp =================================================================== --- lancelot/app/src/models/MessagesKmail.cpp (révision 910278) +++ lancelot/app/src/models/MessagesKmail.cpp (copie de travail) @@ -128,7 +128,7 @@ QDBusReply ricon = m_folderinterface->normalIconPath(); KIcon icon; add( - name.value() + " (" + QString::number(unread) + ")", path, + name.value() + " (" + QString::number(unread) + ')', path, KIcon( (ricon.isValid() && !ricon.value().isEmpty()) ? (ricon.value()) : "mail-folder-inbox" Index: lancelot/app/src/models/ContactsKopete.cpp =================================================================== --- lancelot/app/src/models/ContactsKopete.cpp (révision 910278) +++ lancelot/app/src/models/ContactsKopete.cpp (copie de travail) @@ -89,7 +89,7 @@ } foreach (const QString& contact, contacts.value()) { - QStringList contactParts = contact.split(":"); + QStringList contactParts = contact.split(':'); if (contactParts.size() != 3) { continue; } @@ -103,7 +103,7 @@ continue; } - QString avatarPath = m_kopeteAvatarsDir + "/" + account + "/" + contactID + ".png"; + QString avatarPath = m_kopeteAvatarsDir + '/' + account + '/' + contactID + ".png"; add(contactName.value(), contactID, KIcon( (QFile::exists(avatarPath))?avatarPath:"user-online" Index: lancelot/app/src/models/BaseModel.cpp =================================================================== --- lancelot/app/src/models/BaseModel.cpp (révision 910278) +++ lancelot/app/src/models/BaseModel.cpp (copie de travail) @@ -92,7 +92,7 @@ { int result = 0; foreach (const QString & serviceAlternatives, serviceNames) { - foreach (const QString & serviceName, serviceAlternatives.split("|")) { + foreach (const QString & serviceName, serviceAlternatives.split('|')) { if (addService(serviceName)) { ++result; break; Index: lancelot/app/src/parts/LancelotPart.cpp =================================================================== --- lancelot/app/src/parts/LancelotPart.cpp (révision 910278) +++ lancelot/app/src/parts/LancelotPart.cpp (copie de travail) @@ -356,7 +356,7 @@ if (loaded) { if (!m_data.isEmpty()) { - m_data += "n"; + m_data += 'n'; } m_data += input; saveConfig(); @@ -393,7 +393,7 @@ if (data.isEmpty()) { return false; } - return loadFromList(data.split("n")); + return loadFromList(data.split('n')); } void LancelotPart::removeModel(int index) @@ -404,7 +404,7 @@ delete model; } - QStringList configs = m_data.split("n"); + QStringList configs = m_data.split('n'); configs.removeAt(index); m_data = configs.join("n"); Index: lancelot/app/src/Serializator.cpp =================================================================== --- lancelot/app/src/Serializator.cpp (révision 910278) +++ lancelot/app/src/Serializator.cpp (copie de travail) @@ -34,11 +34,11 @@ i.next(); if (!result.isEmpty()) { - result += "&"; + result += '&'; } result += - QUrl::toPercentEncoding(i.key()) + "=" + + QUrl::toPercentEncoding(i.key()) + '=' + QUrl::toPercentEncoding(i.value()); } return result; @@ -48,9 +48,9 @@ { QMap result; - QStringList items = data.split("&"); + QStringList items = data.split('&'); foreach (const QString & item, items) { - QStringList broken = item.split("="); + QStringList broken = item.split('='); if (broken.size() != 2) { continue; } Index: lancelot/libs/lancelot/Global.cpp =================================================================== --- lancelot/libs/lancelot/Global.cpp (révision 910278) +++ lancelot/libs/lancelot/Global.cpp (copie de travail) @@ -321,7 +321,7 @@ if (app == "lancelot") { app = ""; } else { - app += "-"; + app += '-'; } d->confMain = new KConfig("lancelot" + app + "rc"); Index: weatherstation/weatherstation.cpp =================================================================== --- weatherstation/weatherstation.cpp (révision 910278) +++ weatherstation/weatherstation.cpp (copie de travail) @@ -285,7 +285,7 @@ void WeatherStation::setHumidity(QString humidity) { - humidity.replace("%", ""); + humidity.remove('%'); m_lcd->setNumber("humidity", humidity); } Index: weatherstation/weatherconfig.cpp =================================================================== --- weatherstation/weatherconfig.cpp (révision 910278) +++ weatherstation/weatherconfig.cpp (copie de travail) @@ -133,7 +133,7 @@ if (m_dataengine) { QVariantList plugins = m_dataengine->query("ions").values(); foreach (const QVariant& plugin, plugins) { - QStringList pluginInfo = plugin.toString().split("|"); + QStringList pluginInfo = plugin.toString().split('|'); providerComboBox->addItem(pluginInfo[0], pluginInfo[1]); } } Index: previewer/previewwidget.cpp =================================================================== --- previewer/previewwidget.cpp (révision 910278) +++ previewer/previewwidget.cpp (copie de travail) @@ -494,7 +494,7 @@ painter->setFont(font); painter->setPen(Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor)); painter->drawText(QRect(39, 3, contentsRect.width() - 39, 30), Qt::AlignBottom | Qt::AlignLeft, - " " + i18n("Previewer")); + ' ' + i18n("Previewer")); QFontMetrics fm(font); int length = fm.width(i18n("Previewer") + " "); font.setBold(false); Index: bluemarble/kwinglutils.cpp =================================================================== --- bluemarble/kwinglutils.cpp (révision 910278) +++ bluemarble/kwinglutils.cpp (copie de travail) @@ -65,7 +65,7 @@ glVersion = MAKE_GL_VERSION(glversioninfo[0].toInt(), glversioninfo[1].toInt(), glversioninfo.count() > 2 ? glversioninfo[2].toInt() : 0); // Get list of supported OpenGL extensions - glExtensions = QString((const char*)glGetString(GL_EXTENSIONS)).split(" "); + glExtensions = QString((const char*)glGetString(GL_EXTENSIONS)).split(' '); // handle OpenGL extensions functions glResolveFunctions(); Index: news/news.cpp =================================================================== --- news/news.cpp (révision 910278) +++ news/news.cpp (copie de travail) @@ -351,7 +351,7 @@ } uint timeStamp = item["time"].toUInt(); QString title = item["title"].toString(); - QString description = item["description"].toString().replace(QRegExp("]*>"), ""); + QString description = item["description"].toString().remove(QRegExp("]*>")); QString line; if (title != 0 && m_showTitles) { Index: rssnow/news.cpp =================================================================== --- rssnow/news.cpp (révision 910278) +++ rssnow/news.cpp (copie de travail) @@ -325,7 +325,7 @@ if (m_showdroptarget && (i == (m_layout->count() - 1))) { m_feedlist.append(feeds); } else { - if (!m_feedlist[i-start].endsWith(" ")) { + if (!m_feedlist[i-start].endsWith(' ')) { m_feedlist[i-start].append(" "); } m_feedlist[i-start].append(feeds); @@ -353,7 +353,7 @@ //group all feeds together so it can fit (only a single time): QString allfeeds; foreach (QString feed, m_feedlist) { - if (!feed.endsWith(" ")) { + if (!feed.endsWith(' ')) { feed.append(" "); } allfeeds.append(feed); Index: pastebin/backends/pastebinca.cpp =================================================================== --- pastebin/backends/pastebinca.cpp (révision 910278) +++ pastebin/backends/pastebinca.cpp (copie de travail) @@ -44,7 +44,7 @@ } QString url(_data); - url.replace("SUCCESS:",""); + url.remove("SUCCESS:"); url.prepend(QString("%1/").arg(m_server)); emit postFinished(url); }[/code] emptystrcompare [code=diff]Index: lancelot/app/src/models/Devices.cpp =================================================================== --- lancelot/app/src/models/Devices.cpp (révision 910278) +++ lancelot/app/src/models/Devices.cpp (copie de travail) @@ -39,7 +39,7 @@ namespace Models { -#define StringCoalesce(A, B) (A == "")?(B):(A) +#define StringCoalesce(A, B) (A.isEmpty())?(B):(A) Devices::Devices(Type filter) : m_filter(filter) Index: lancelot/libs/lancelot/Global.cpp =================================================================== --- lancelot/libs/lancelot/Global.cpp (révision 910278) +++ lancelot/libs/lancelot/Global.cpp (copie de travail) @@ -330,11 +330,11 @@ kDebug() &urls, QObject *parent = 0) + explicit PreviewItemModel(const QList &urls, QObject *parent = 0) : QAbstractListModel(parent), urlList(urls) {} int rowCount(const QModelIndex &parent = QModelIndex()) const; Index: bluemarble/kwinglutils.h =================================================================== --- bluemarble/kwinglutils.h (révision 911112) +++ bluemarble/kwinglutils.h (copie de travail) @@ -64,8 +64,8 @@ { public: GLTexture(); - GLTexture( const QImage& image, GLenum target = GL_TEXTURE_2D ); - GLTexture( const QPixmap& pixmap, GLenum target = GL_TEXTURE_2D ); + explicit GLTexture( const QImage& image, GLenum target = GL_TEXTURE_2D ); + explicit GLTexture( const QPixmap& pixmap, GLenum target = GL_TEXTURE_2D ); GLTexture( const QString& fileName ); GLTexture( int width, int height ); virtual ~GLTexture(); Index: paste/pastemacroexpander.h =================================================================== --- paste/pastemacroexpander.h (révision 911112) +++ paste/pastemacroexpander.h (copie de travail) @@ -33,7 +33,7 @@ Url }; - MacroParam(const QString& n = QString(), ParamType t = String) : name(n), type(t) {}; + explicit MacroParam(const QString& n = QString(), ParamType t = String) : name(n), type(t) {}; QString name; ParamType type; }; [/code] nullstrassign [code=diff]Index: weatherstation/weatherconfig.cpp =================================================================== --- weatherstation/weatherconfig.cpp (révision 911112) +++ weatherstation/weatherconfig.cpp (copie de travail) @@ -93,7 +93,7 @@ places[result[i + 1]] = result[i + 3]; i += 4; } else { - places[result[i + 1]] = QString(); + places[result[i + 1]].clear(); i += 2; } } [/code] nullstrcompare [code=diff]Index: lancelot/libs/lancelot/widgets/Panel.cpp =================================================================== --- lancelot/libs/lancelot/widgets/Panel.cpp (révision 911112) +++ lancelot/libs/lancelot/widgets/Panel.cpp (copie de travail) @@ -29,7 +29,7 @@ public: Private(QIcon icon, QString title, Panel * parent) : layoutItem(NULL), - hasTitle(title != QString()), + hasTitle(!title.isEmpty()), titleWidget(icon, title, "", parent), q(parent) { @@ -38,7 +38,7 @@ Private(QString title, Panel * parent) : layoutItem(NULL), - hasTitle(title != QString()), + hasTitle(!title.isEmpty()), titleWidget(title, "", parent), q(parent) { [/code] sigsandslots [code=diff]Index: lancelot/libs/lancelot/models/ActionListViewModels.h =================================================================== --- lancelot/libs/lancelot/models/ActionListViewModels.h (révision 911112) +++ lancelot/libs/lancelot/models/ActionListViewModels.h (copie de travail) @@ -126,7 +126,7 @@ */ virtual void contextActivate(int index, QAction * context); -public slots: +public Q_SLOTS: /** * Activates the specified element * @param index of the element that should be activated @@ -408,7 +408,7 @@ QList > m_modelsMetadata; bool m_hideEmptyModels; -private slots: +private Q_SLOTS: // listen to model changes void modelUpdated(); void modelItemInserted(int index); Index: lancelot/libs/lancelot/widgets/ActionListView.h =================================================================== --- lancelot/libs/lancelot/widgets/ActionListView.h (révision 911112) +++ lancelot/libs/lancelot/widgets/ActionListView.h (copie de travail) @@ -96,7 +96,7 @@ Q_SIGNALS: void activated(int index); -protected slots: +protected Q_SLOTS: void scrollTimer(); void itemActivated(int index); void itemContextRequested(int index); Index: lancelot/libs/lancelot/widgets/ExtenderButton.h =================================================================== --- lancelot/libs/lancelot/widgets/ExtenderButton.h (révision 911112) +++ lancelot/libs/lancelot/widgets/ExtenderButton.h (copie de travail) @@ -138,7 +138,7 @@ L_Override virtual void paint(QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget = 0); -public slots: +public Q_SLOTS: /** * Sets whether the button is checked. * Has no effect if button is not checkable. @@ -169,7 +169,7 @@ L_Override virtual void hoverEnterEvent(QGraphicsSceneHoverEvent * event); L_Override virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent * event); -protected slots: +protected Q_SLOTS: void activate(); private: [/code] spelling [code=diff]Index: twitter/twitter.cpp =================================================================== --- twitter/twitter.cpp (révision 911112) +++ twitter/twitter.cpp (copie de travail) @@ -303,7 +303,7 @@ if (success && enterWalletFolder(QString::fromLatin1("Plasma-Twitter")) && (m_wallet->readPassword(m_username, pwd) == 0)) { - kDebug() << "successfully retreived password from wallet"; + kDebug() << "successfully retrieved password from wallet"; m_password = pwd; downloadHistory(); } else if (m_password.isEmpty()) { [/code]
Last edited by bruno on Thu Jan 15, 2009 9:43 pm, edited 1 time in total.
bruno, proud to be a member of KDE forums since 2008-Oct.
|
Mentor
|
Great work, Bruno. I already saw your mail to the mailing list. But I am not sure about the following change:
Could you point out where this is used? I am wondering because there are no quotes around the html tags. Not that this change causes a bug somewhere. Also thanks to pklaffert for his bugfixes. He also send a mail to the mailing list. And of couse thanks to the other students. I do not follow each mailing list. If you already mailed something, please post the link as reply to this thread. Cheers, m.
Last edited by msoeken on Thu Jan 15, 2009 8:11 pm, edited 1 time in total.
[size=x-small]code | [url=cia.vc/stats/author/msoeken]cia.vc[/url] | [url=kde.org/support]donating KDE[/url] | [url=tinyurl.com/cto4ns]wishlist[/url][/size] |
KDE Developer
|
Thanks! My bad, I didn't thought about deactivating the smileys. It should read :
bruno, proud to be a member of KDE forums since 2008-Oct.
|
Mentor
|
That's funny ... and very confusing [size=x-small]code | [url=cia.vc/stats/author/msoeken]cia.vc[/url] | [url=kde.org/support]donating KDE[/url] | [url=tinyurl.com/cto4ns]wishlist[/url][/size] |
KDE Developer
|
Indeed Patches sent to the mailing list.
bruno, proud to be a member of KDE forums since 2008-Oct.
|
Alumni
|
I fixed some of the minor krazy2 issues in kdeplasma-addons.
patch already send to the mailing list
Last edited by pklaffert on Fri Jan 16, 2009 4:03 pm, edited 1 time in total.
|
Alumni
|
Patch made for dragonplayer, only very small changes so I figure only one patch is needed (might make another for one of the issues I haven't fixed yet, as explained below.):
Things not fixed: Check for cpp macros and usage [cpp]... 1 issue found: debug.h line 44 contains platform specific macro, this should be done using cmake instead, I don't know how I would fix this. Check for an acceptable license [license]... 2 issues found: app/recentlyPlayedList.cpp and app/recentlyPlayedList.h missing license. It's not my own work, AFAIK the actual author would have to do this (just a formality I guess) Check for Qt classes that should not be used [qclasses]... 2 issues found: app/playDialog.h/.cpp use a QDialog instead of a KDialog, I've tried changing this and got some weird graphical errors, seems it'd require a bit more changes than the other issues, I'll look at it again and if I do get it to work I'll send in another patch, but no luck so far (don't have much experience) Sending it to mailing list now.
Last edited by HappySmileMan on Fri Jan 16, 2009 5:04 pm, edited 1 time in total.
HappySmileMan, proud to be a member of KDE forums since 2008-Oct.
|
Alumni
|
So are my two patches good enough to be sent to the kdelibs-bugs mailing list?
A proud KDE user and Linux enthusiast.
|
Administrator
|
@Fengshaun: I think the mailing list for KDE libs ( patches, discussion, etc ) is kde-core-devel@kde.org
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Alumni
|
Working on konqueror I just wonder why on http://englishbreakfastnetwork.org/kraz ... index.html there are no issues found for i18ncheckarg but my local krazy finds about 50 issues like for example:
Did I miss something?
michael4910, proud to be a member of KDE forums since 2008-Oct.
|
KDE Developer
|
I asked about that, this is the reason : [quote=Chusslove Illich]Re: Krazy : i18ncheckarg's check not showing issues on EBN That's because the --priority=important is used for the web report, reporting only issues that should really be fix. While when you run it locally without the --priority option, all issues are reported. You can see all of those locally reported issues are of "add context" variety. Contexts are very useful for translators, but not so essential on the technical side. So they drowned the web report, causing people not to fix even the essential issues, and therefore we decided to relegate them to lower priority and not show them.[/quote]
bruno, proud to be a member of KDE forums since 2008-Oct.
|
Registered users: Bing [Bot], Google [Bot], kesang, Yahoo [Bot]