summaryrefslogtreecommitdiff
path: root/src/libs/qmleditorwidgets
diff options
context:
space:
mode:
authorMontel Laurent <laurent.montel@kdab.com>2017-04-13 16:26:38 +0200
committerLaurent Montel <laurent.montel@kdab.com>2017-04-14 13:18:28 +0000
commit5d27bc747b622355f5e434824a7d7ae5772683ab (patch)
treee7e9e86eae39a89244b8422db376dfa529cc6f98 /src/libs/qmleditorwidgets
parentf976dc96fd9267bd51bde31ebeec8bdeb21d3fc8 (diff)
downloadqt-creator-5d27bc747b622355f5e434824a7d7ae5772683ab.tar.gz
Use QFileInfo::exists(...) which is faster that QFileInfo(..).exists
Change-Id: I0d2e61d84c74e60ef4f54074a4ca00f2d0835562 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/libs/qmleditorwidgets')
-rw-r--r--src/libs/qmleditorwidgets/contextpanewidgetimage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libs/qmleditorwidgets/contextpanewidgetimage.cpp b/src/libs/qmleditorwidgets/contextpanewidgetimage.cpp
index 4c4db4c116..188e19ae7d 100644
--- a/src/libs/qmleditorwidgets/contextpanewidgetimage.cpp
+++ b/src/libs/qmleditorwidgets/contextpanewidgetimage.cpp
@@ -482,7 +482,7 @@ void ContextPaneWidgetImage::setPixmap(const QString &fileName)
if (m_borderImage) {
QString localFileName(fileName);
- if (QFile(fileName).exists()) {
+ if (QFileInfo::exists(fileName)) {
if (fileName.endsWith(QLatin1String("sci"))) {
QString pixmapFileName;
int left = 0;
@@ -527,7 +527,7 @@ void ContextPaneWidgetImage::setPixmap(const QString &fileName)
}
uiBorderImage->label->setPixmap(pix);
} else {
- if (QFile(fileName).exists()) {
+ if (QFileInfo::exists(fileName)) {
QPixmap source(fileName);
previewDialog()->setPixmap(source, 1);
ui->sizeLabel->setText(QString::number(source.width()) + QLatin1Char('x') + QString::number(source.height()));