From 22042dd769db15cf2b802270a2aee3039bd114d1 Mon Sep 17 00:00:00 2001 From: Ian Dean Date: Fri, 30 Mar 2012 09:03:00 +0100 Subject: Change coreservices -> ios MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace "contains(QT_CONFIG, coreservices)" with "!ios" in config files. Replace "QT_NO_CORESERVICES" with "Q_OS_IOS" in source files. Change-Id: Id3b02316b245a24ce550e0b47596d18a4a409e4f Reviewed-by: Morten Johan Sørvig --- src/corelib/io/io.pri | 2 +- src/corelib/io/qfilesystemengine.cpp | 2 +- src/corelib/io/qfilesystemengine_p.h | 2 +- src/corelib/io/qfilesystemengine_unix.cpp | 16 ++++++++-------- src/corelib/io/qfilesystemmetadata_p.h | 4 ++-- src/corelib/io/qprocess.cpp | 4 ++-- src/corelib/io/qprocess_unix.cpp | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) (limited to 'src/corelib/io') diff --git a/src/corelib/io/io.pri b/src/corelib/io/io.pri index d6379bf0fe..9e89f9fdc0 100644 --- a/src/corelib/io/io.pri +++ b/src/corelib/io/io.pri @@ -113,7 +113,7 @@ win32 { SOURCES += io/qsettings_mac.cpp } macx-*: { - contains(QT_CONFIG, coreservices) { + !ios { SOURCES += io/qstandardpaths_mac.cpp } else { SOURCES += io/qstandardpaths_unix.cpp diff --git a/src/corelib/io/qfilesystemengine.cpp b/src/corelib/io/qfilesystemengine.cpp index 21436c1cfc..c2ac85bd80 100644 --- a/src/corelib/io/qfilesystemengine.cpp +++ b/src/corelib/io/qfilesystemengine.cpp @@ -259,7 +259,7 @@ void QFileSystemMetaData::fillFromStatBuf(const QT_STATBUF &statBuffer) // Attributes entryFlags |= QFileSystemMetaData::ExistsAttribute; size_ = statBuffer.st_size; -#if defined (Q_OS_MAC) && !defined(QT_NO_CORESERVICES) \ +#if defined (Q_OS_MAC) && !defined(Q_OS_IOS) \ && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 if (statBuffer.st_flags & UF_HIDDEN) { entryFlags |= QFileSystemMetaData::HiddenAttribute; diff --git a/src/corelib/io/qfilesystemengine_p.h b/src/corelib/io/qfilesystemengine_p.h index 17413d9c76..b5d28f9a5b 100644 --- a/src/corelib/io/qfilesystemengine_p.h +++ b/src/corelib/io/qfilesystemengine_p.h @@ -83,7 +83,7 @@ public: static QString resolveGroupName(uint groupId); #endif -#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES) +#if defined(Q_OS_MAC) && !defined(Q_OS_IOS) static QString bundleName(const QFileSystemEntry &entry); #else static QString bundleName(const QFileSystemEntry &entry) { Q_UNUSED(entry) return QString(); } diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index 6dca129545..d1a0621cbe 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE -#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES) +#if defined(Q_OS_MAC) && !defined(Q_OS_IOS) static inline bool _q_isMacHidden(const char *nativePath) { OSErr err; @@ -142,7 +142,7 @@ QFileSystemEntry QFileSystemEngine::getLinkTarget(const QFileSystemEntry &link, ret.chop(1); return QFileSystemEntry(ret); } -#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES) +#if defined(Q_OS_MAC) && !defined(Q_OS_IOS) { FSRef fref; if (FSPathMakeRef((const UInt8 *)QFile::encodeName(QDir::cleanPath(link.filePath())).data(), &fref, 0) == noErr) { @@ -174,7 +174,7 @@ QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry, return QFileSystemEntry(slowCanonicalized(absoluteName(entry).filePath())); #else char *ret = 0; -# if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES) +# if defined(Q_OS_MAC) && !defined(Q_OS_IOS) // Mac OS X 10.5.x doesn't support the realpath(X,0) extension we use here. if (QSysInfo::MacintoshVersion >= QSysInfo::MV_10_6) { ret = realpath(entry.nativeFilePath().constData(), (char*)0); @@ -308,7 +308,7 @@ QString QFileSystemEngine::resolveGroupName(uint groupId) return QString(); } -#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES) +#if defined(Q_OS_MAC) && !defined(Q_OS_IOS) //static QString QFileSystemEngine::bundleName(const QFileSystemEntry &entry) { @@ -328,7 +328,7 @@ QString QFileSystemEngine::bundleName(const QFileSystemEntry &entry) bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemMetaData &data, QFileSystemMetaData::MetaDataFlags what) { -#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES) +#if defined(Q_OS_MAC) && !defined(Q_OS_IOS) if (what & QFileSystemMetaData::BundleType) { if (!data.hasFlags(QFileSystemMetaData::DirectoryType)) what |= QFileSystemMetaData::DirectoryType; @@ -339,7 +339,7 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM what |= QFileSystemMetaData::PosixStatFlags; } # endif // MAC_OS_X_VERSION_MAX_ALLOWED... -#endif // defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES) +#endif // defined(Q_OS_MAC) && !defined(Q_OS_IOS) if (what & QFileSystemMetaData::PosixStatFlags) what |= QFileSystemMetaData::PosixStatFlags; @@ -400,7 +400,7 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM | QFileSystemMetaData::ExistsAttribute; } -#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES) +#if defined(Q_OS_MAC) && !defined(Q_OS_IOS) if (what & QFileSystemMetaData::AliasType) { if (entryExists) { @@ -446,7 +446,7 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM data.knownFlagsMask |= QFileSystemMetaData::HiddenAttribute; } -#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES) +#if defined(Q_OS_MAC) && !defined(Q_OS_IOS) if (what & QFileSystemMetaData::BundleType) { if (entryExists && data.isDirectory()) { QCFType path = CFStringCreateWithBytes(0, diff --git a/src/corelib/io/qfilesystemmetadata_p.h b/src/corelib/io/qfilesystemmetadata_p.h index 6053b16752..3a53eb56e9 100644 --- a/src/corelib/io/qfilesystemmetadata_p.h +++ b/src/corelib/io/qfilesystemmetadata_p.h @@ -100,7 +100,7 @@ public: LinkType = 0x00010000, FileType = 0x00020000, DirectoryType = 0x00040000, -#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES) +#if defined(Q_OS_MAC) && !defined(Q_OS_IOS) BundleType = 0x00080000, AliasType = 0x08000000, #else @@ -248,7 +248,7 @@ private: Q_DECLARE_OPERATORS_FOR_FLAGS(QFileSystemMetaData::MetaDataFlags) -#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES) +#if defined(Q_OS_MAC) && !defined(Q_OS_IOS) inline bool QFileSystemMetaData::isBundle() const { return (entryFlags & BundleType); } inline bool QFileSystemMetaData::isAlias() const { return (entryFlags & AliasType); } #else diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index 640704ec86..f3680decc7 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -2218,10 +2218,10 @@ bool QProcess::startDetached(const QString &program) } QT_BEGIN_INCLUDE_NAMESPACE -#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES) +#if defined(Q_OS_MAC) && !defined(Q_OS_IOS) # include # define environ (*_NSGetEnviron()) -#elif defined(Q_OS_WINCE) || (defined(Q_OS_MAC) && defined(QT_NO_CORESERVICES)) +#elif defined(Q_OS_WINCE) || defined(Q_OS_IOS) static char *qt_empty_environ[] = { 0 }; #define environ qt_empty_environ #elif !defined(Q_OS_WIN) diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp index bfa132f353..fe13a9e06e 100644 --- a/src/corelib/io/qprocess_unix.cpp +++ b/src/corelib/io/qprocess_unix.cpp @@ -476,7 +476,7 @@ bool QProcessPrivate::createChannel(Channel &channel) } QT_BEGIN_INCLUDE_NAMESPACE -#if defined(Q_OS_MAC) && !defined(QT_NO_CORESERVICES) +#if defined(Q_OS_MAC) && !defined(Q_OS_IOS) # include # define environ (*_NSGetEnviron()) #else @@ -487,7 +487,7 @@ QT_END_INCLUDE_NAMESPACE QProcessEnvironment QProcessEnvironment::systemEnvironment() { QProcessEnvironment env; -#if !defined(Q_OS_MAC) || !defined(QT_NO_CORESERVICES) +#if !defined(Q_OS_IOS) const char *entry; for (int count = 0; (entry = environ[count]); ++count) { const char *equal = strchr(entry, '='); -- cgit v1.2.3