summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@qt.io>2018-03-06 19:07:11 +0100
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2018-09-14 13:50:41 +0000
commit7ab0e6e888e049f0d8ae48814eb4ecb1116de1b9 (patch)
treea47802dcf48fd4ee823b88d7c7b46980da9f6446
parent16b889deb868d5c6d8d9d7e735f0f04fcf0b63fd (diff)
downloadqttools-7ab0e6e888e049f0d8ae48814eb4ecb1116de1b9.tar.gz
qmake: minor fixups to ioutils for building in qt creator context
Change-Id: If82a5387a03f400cde04d582dd7e8567a2b661a0 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from qtbase/04b93bfb2127a88f35d2b251e900163f982e7cfe) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r--src/linguist/shared/ioutils.cpp5
-rw-r--r--src/linguist/shared/ioutils.h8
2 files changed, 8 insertions, 5 deletions
diff --git a/src/linguist/shared/ioutils.cpp b/src/linguist/shared/ioutils.cpp
index d73757529..4abbbfc6d 100644
--- a/src/linguist/shared/ioutils.cpp
+++ b/src/linguist/shared/ioutils.cpp
@@ -259,9 +259,8 @@ bool IoUtils::touchFile(const QString &targetFileName, const QString &referenceF
# endif
return true;
}
-#endif
-#ifdef Q_OS_UNIX
+#if defined(QT_BUILD_QMAKE) && defined(Q_OS_UNIX)
bool IoUtils::readLinkTarget(const QString &symlinkPath, QString *target)
{
const QByteArray localSymlinkPath = QFile::encodeName(symlinkPath);
@@ -296,4 +295,6 @@ bool IoUtils::readLinkTarget(const QString &symlinkPath, QString *target)
}
#endif
+#endif // PROEVALUATOR_FULL
+
QT_END_NAMESPACE
diff --git a/src/linguist/shared/ioutils.h b/src/linguist/shared/ioutils.h
index cb68913c5..6887223ef 100644
--- a/src/linguist/shared/ioutils.h
+++ b/src/linguist/shared/ioutils.h
@@ -29,6 +29,8 @@
#ifndef IOUTILS_H
#define IOUTILS_H
+#include "qmake_global.h"
+
#include <qstring.h>
QT_BEGIN_NAMESPACE
@@ -39,7 +41,7 @@ namespace QMakeInternal {
This class provides replacement functionality for QFileInfo, QFile & QDir,
as these are abysmally slow.
*/
-class IoUtils {
+class QMAKE_EXPORT IoUtils {
public:
enum FileType {
FileNotFound = 0,
@@ -64,9 +66,9 @@ public:
#endif
#if defined(PROEVALUATOR_FULL)
static bool touchFile(const QString &targetFileName, const QString &referenceFileName, QString *errorString);
-#endif
-#ifdef Q_OS_UNIX
+# if defined(QT_BUILD_QMAKE) && defined(Q_OS_UNIX)
static bool readLinkTarget(const QString &symlinkPath, QString *target);
+# endif
#endif
};