summaryrefslogtreecommitdiff
path: root/src/plugins/designer/qtcreatorintegration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/designer/qtcreatorintegration.cpp')
-rw-r--r--src/plugins/designer/qtcreatorintegration.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/designer/qtcreatorintegration.cpp b/src/plugins/designer/qtcreatorintegration.cpp
index 138e4e942e..368dcdc381 100644
--- a/src/plugins/designer/qtcreatorintegration.cpp
+++ b/src/plugins/designer/qtcreatorintegration.cpp
@@ -60,6 +60,7 @@
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/session.h>
#include <utils/qtcassert.h>
+#include <utils/fileutils.h>
#include <QtDesigner/QDesignerFormWindowInterface>
#include <QtDesigner/QDesignerFormEditorInterface>
@@ -488,9 +489,9 @@ static Document::Ptr getParsedDocument(const QString &fileName, CppModelManagerI
if (workingCopy.contains(fileName)) {
src = workingCopy.source(fileName);
} else {
- QFile file(fileName);
- if (file.open(QFile::ReadOnly))
- src = QTextStream(&file).readAll(); // ### FIXME
+ Utils::FileReader reader;
+ if (reader.fetch(fileName)) // ### FIXME error reporting
+ src = QString::fromLocal8Bit(reader.data()); // ### FIXME encoding
}
QByteArray source = snapshot.preprocessedCode(src, fileName);