HostOsInfo/FileUtils/PersistentSettings: Fix build without QtGui

Interesting for command line tools that want to pull this in but not
QtGui (e.g. sdktool)

Change-Id: Ic2f5c1f3126869cc38bf672345750d7d966560fd
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
This commit is contained in:
Eike Ziller
2017-08-18 14:32:39 +02:00
committed by hjk
parent 19cbd1ac48
commit 51e8a1730a
5 changed files with 48 additions and 12 deletions

View File

@@ -159,9 +159,11 @@ public:
bool fetch(const QString &fileName, QIODevice::OpenMode mode, QString *errorString);
bool fetch(const QString &fileName, QString *errorString)
{ return fetch(fileName, QIODevice::NotOpen, errorString); }
#ifdef QT_GUI_LIB
bool fetch(const QString &fileName, QIODevice::OpenMode mode, QWidget *parent);
bool fetch(const QString &fileName, QWidget *parent)
{ return fetch(fileName, QIODevice::NotOpen, parent); }
#endif // QT_GUI_LIB
const QByteArray &data() const { return m_data; }
const QString &errorString() const { return m_errorString; }
private:
@@ -181,7 +183,9 @@ public:
QString errorString() const { return m_errorString; }
virtual bool finalize();
bool finalize(QString *errStr);
#ifdef QT_GUI_LIB
bool finalize(QWidget *parent);
#endif
bool write(const char *data, int len);
bool write(const QByteArray &bytes);