forked from qt-creator/qt-creator
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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user