Pedantic cleanup of filename parameters for QIcon constructor

Using more *::Constants::ICON_* where it makes sense and
wrapping the file names into QLatin1String where they were
missing.

The increased usage of the ICON constants needed a few more
cross plugin includes of *constants.h, here and there.
I think that it is OK, since the dependencies were alredy there
icon resource wise.
This commit is contained in:
Alessandro Portale
2010-07-30 22:16:59 +02:00
parent e55c346f03
commit 3aa3c5688f
48 changed files with 131 additions and 106 deletions

View File

@@ -32,6 +32,8 @@
#include "centralwidget.h"
#include "openpagesmodel.h"
#include <coreplugin/coreconstants.h>
#include <QtGui/QApplication>
#include <QtGui/QPainter>
@@ -70,8 +72,8 @@ void OpenPagesDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opt
if (index.column() == 1 && index.model()->rowCount() > 1
&& option.state & QStyle::State_MouseOver) {
QIcon icon((option.state & QStyle::State_Selected)
? ":/core/images/closebutton.png" : ":/core/images/darkclosebutton.png");
const QIcon icon(QLatin1String((option.state & QStyle::State_Selected) ?
Core::Constants::ICON_CLOSE : Core::Constants::ICON_CLOSE_DARK));
const QRect iconRect(option.rect.right() - option.rect.height(),
option.rect.top(), option.rect.height(), option.rect.height());