diff options
author | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2019-08-07 14:51:12 +0300 |
---|---|---|
committer | Arttu Tarkiainen <arttu.tarkiainen@qt.io> | 2019-08-16 08:35:19 +0000 |
commit | c7066c9dc25bc4cafdd7bd8057ce34457a86ee65 (patch) | |
tree | 03a2f790af380528cd54415b5bf29bb495df972c /src | |
parent | 54f1de217b774322f383df446844c3ec3422dee2 (diff) |
Update usage of Apple-related terminology
Replace deprecated Q_OS_OSX macro used in several places with the newer
Q_OS_MACOS. Old style reference of Apple's desktop operating system name
as "OS X" in documentation and files are also replaced with "macOS"
where applicable.
Task-number: QTIFW-1406
Change-Id: I0561d5e0d964917ac4fca0702d58a06b85d30e57
Reviewed-by: Katja Marttila <katja.marttila@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/libs/installer/fileutils.cpp | 4 | ||||
-rw-r--r-- | src/libs/installer/messageboxhandler.cpp | 2 | ||||
-rw-r--r-- | src/libs/installer/packagemanagercore.cpp | 2 | ||||
-rw-r--r-- | src/libs/installer/packagemanagercore_p.cpp | 20 | ||||
-rw-r--r-- | src/libs/installer/packagemanagercoredata.cpp | 4 | ||||
-rw-r--r-- | src/libs/installer/packagemanagergui.cpp | 10 | ||||
-rw-r--r-- | src/libs/installer/remoteserver.cpp | 2 | ||||
-rw-r--r-- | src/libs/installer/settings.cpp | 2 | ||||
-rw-r--r-- | src/libs/installer/systeminfo.cpp | 4 | ||||
-rw-r--r-- | src/libs/kdtools/updateoperation.cpp | 2 | ||||
-rw-r--r-- | src/sdk/commandlineparser.cpp | 2 | ||||
-rw-r--r-- | src/sdk/main.cpp | 8 | ||||
-rw-r--r-- | src/sdk/sdkapp.h | 10 |
13 files changed, 36 insertions, 36 deletions
diff --git a/src/libs/installer/fileutils.cpp b/src/libs/installer/fileutils.cpp index 4347c67da..18c5f90fd 100644 --- a/src/libs/installer/fileutils.cpp +++ b/src/libs/installer/fileutils.cpp @@ -286,7 +286,7 @@ void QInstaller::removeSystemGeneratedFiles(const QString &path) { if (path.isEmpty()) return; -#if defined Q_OS_OSX +#if defined Q_OS_MACOS QFile::remove(path + QLatin1String("/.DS_Store")); #elif defined Q_OS_WIN QFile::remove(path + QLatin1String("/Thumbs.db")); @@ -572,7 +572,7 @@ quint64 QInstaller::fileSize(const QFileInfo &info) bool QInstaller::isInBundle(const QString &path, QString *bundlePath) { -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS QFileInfo fi = QFileInfo(path).absoluteFilePath(); while (!fi.isRoot()) { if (fi.isBundle()) { diff --git a/src/libs/installer/messageboxhandler.cpp b/src/libs/installer/messageboxhandler.cpp index 286009e21..28e09df44 100644 --- a/src/libs/installer/messageboxhandler.cpp +++ b/src/libs/installer/messageboxhandler.cpp @@ -381,7 +381,7 @@ static QMessageBox::StandardButton showNewMessageBox(QWidget *parent, QMessageBo msgBox.setDefaultButton(button); } } -#if defined(Q_OS_OSX) +#if defined(Q_OS_MACOS) msgBox.setWindowModality(Qt::WindowModal); #endif if (msgBox.exec() == -1) diff --git a/src/libs/installer/packagemanagercore.cpp b/src/libs/installer/packagemanagercore.cpp index 028a5b4b2..c154edf76 100644 --- a/src/libs/installer/packagemanagercore.cpp +++ b/src/libs/installer/packagemanagercore.cpp @@ -2201,7 +2201,7 @@ QString PackageManagerCore::findLibrary(const QString &name, const QStringList & #if defined(Q_OS_WIN) return findPath(QString::fromLatin1("%1.lib").arg(name), findPaths); #else -#if defined(Q_OS_OSX) +#if defined(Q_OS_MACOS) if (findPaths.isEmpty()) { findPaths.push_back(QLatin1String("/lib")); findPaths.push_back(QLatin1String("/usr/lib")); diff --git a/src/libs/installer/packagemanagercore_p.cpp b/src/libs/installer/packagemanagercore_p.cpp index 1526d8bd0..653869898 100644 --- a/src/libs/installer/packagemanagercore_p.cpp +++ b/src/libs/installer/packagemanagercore_p.cpp @@ -590,7 +590,7 @@ void PackageManagerCorePrivate::initialize(const QHash<QString, QString> ¶ms #endif if (!m_core->isInstaller()) { -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS readMaintenanceConfigFiles(QCoreApplication::applicationDirPath() + QLatin1String("/../../..")); #else readMaintenanceConfigFiles(QCoreApplication::applicationDirPath()); @@ -718,7 +718,7 @@ Operation *PackageManagerCorePrivate::takeOwnedOperation(Operation *operation) QString PackageManagerCorePrivate::maintenanceToolName() const { QString filename = m_data.settings().maintenanceToolName(); -#if defined(Q_OS_OSX) +#if defined(Q_OS_MACOS) if (QInstaller::isInBundle(QCoreApplication::applicationDirPath())) filename += QLatin1String(".app/Contents/MacOS/") + filename; #elif defined(Q_OS_WIN) @@ -1044,7 +1044,7 @@ void PackageManagerCorePrivate::writeMaintenanceToolBinary(QFile *const input, q if (writeBinaryLayout) { QDir resourcePath(QFileInfo(maintenanceToolRenamedName).dir()); -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS if (!resourcePath.path().endsWith(QLatin1String("Contents/MacOS"))) throw Error(tr("Maintenance tool is not a bundle")); resourcePath.cdUp(); @@ -1172,7 +1172,7 @@ void PackageManagerCorePrivate::writeMaintenanceTool(OperationList performedOper const QString targetAppDirPath = QFileInfo(maintenanceToolName()).path(); if (!QDir().exists(targetAppDirPath)) { - // create the directory containing the maintenance tool (like a bundle structure on OS X...) + // create the directory containing the maintenance tool (like a bundle structure on macOS...) Operation *op = createOwnedOperation(QLatin1String("Mkdir")); op->setArguments(QStringList() << targetAppDirPath); performOperationThreaded(op, Backup); @@ -1180,7 +1180,7 @@ void PackageManagerCorePrivate::writeMaintenanceTool(OperationList performedOper performedOperations.append(takeOwnedOperation(op)); } -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS // if it is a bundle, we need some stuff in it... const QString sourceAppDirPath = QCoreApplication::applicationDirPath(); if (isInstaller() && QInstaller::isInBundle(sourceAppDirPath)) { @@ -1340,7 +1340,7 @@ void PackageManagerCorePrivate::writeMaintenanceTool(OperationList performedOper // On Mac data is always in a separate file so that the binary can be signed. // On other platforms data is in separate file only after install so that the // maintenancetool sign does not break. -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS QDir dataPath(QFileInfo(binaryName).dir()); dataPath.cdUp(); dataPath.cd(QLatin1String("Resources")); @@ -1355,7 +1355,7 @@ void PackageManagerCorePrivate::writeMaintenanceTool(OperationList performedOper newBinaryWritten = true; QFile tmp(binaryName); QInstaller::openForRead(&tmp); -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS writeMaintenanceToolBinary(&tmp, tmp.size(), true); #else writeMaintenanceToolBinary(&tmp, layout.endOfBinaryContent - layout.binaryContentSize, true); @@ -1554,8 +1554,8 @@ bool PackageManagerCorePrivate::runInstaller() Operation *createRepo = createOwnedOperation(QLatin1String("CreateLocalRepository")); if (createRepo) { QString binaryFile = QCoreApplication::applicationFilePath(); -#ifdef Q_OS_OSX - // The installer binary on OSX does not contain the binary content, it's put into +#ifdef Q_OS_MACOS + // The installer binary on macOS does not contain the binary content, it's put into // the resources folder as separate file. Adjust the actual binary path. No error // checking here since we will fail later while reading the binary content. QDir resourcePath(QFileInfo(binaryFile).dir()); @@ -2028,7 +2028,7 @@ void PackageManagerCorePrivate::deleteMaintenanceTool() // every other platform has no problem if we just delete ourselves now QFile maintenanceTool(QFileInfo(installerBinaryPath()).absoluteFilePath()); maintenanceTool.remove(); -# ifdef Q_OS_OSX +# ifdef Q_OS_MACOS if (QInstaller::isInBundle(installerBinaryPath())) { const QLatin1String cdUp("/../../.."); removeDirectoryThreaded(QFileInfo(installerBinaryPath() + cdUp).absoluteFilePath()); diff --git a/src/libs/installer/packagemanagercoredata.cpp b/src/libs/installer/packagemanagercoredata.cpp index ebacbf938..e9af30d17 100644 --- a/src/libs/installer/packagemanagercoredata.cpp +++ b/src/libs/installer/packagemanagercoredata.cpp @@ -57,7 +57,7 @@ PackageManagerCoreData::PackageManagerCoreData(const QHash<QString, QString> &va #ifdef Q_OS_WIN m_variables.insert(QLatin1String("os"), QLatin1String("win")); -#elif defined(Q_OS_OSX) +#elif defined(Q_OS_MACOS) m_variables.insert(QLatin1String("os"), QLatin1String("mac")); #elif defined(Q_OS_LINUX) m_variables.insert(QLatin1String("os"), QLatin1String("x11")); @@ -110,7 +110,7 @@ void PackageManagerCoreData::setDynamicPredefinedVariables() TCHAR buffer[MAX_PATH + 1] = { 0 }; SHGetFolderPath(nullptr, CSIDL_PROGRAM_FILES, nullptr, 0, buffer); dir = QString::fromWCharArray(buffer); -#elif defined (Q_OS_OSX) +#elif defined (Q_OS_MACOS) dir = QStandardPaths::standardLocations(QStandardPaths::ApplicationsLocation).value(0); #endif m_variables.insert(QLatin1String("ApplicationsDir"), dir); diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp index c3591d446..934570ae1 100644 --- a/src/libs/installer/packagemanagergui.cpp +++ b/src/libs/installer/packagemanagergui.cpp @@ -305,7 +305,7 @@ PackageManagerGui::PackageManagerGui(PackageManagerCore *core, QWidget *parent) setWindowTitle(tr("Maintain %1").arg(m_core->value(scTitle))); setWindowFlags(windowFlags() &~ Qt::WindowContextHelpButtonHint); -#ifndef Q_OS_OSX +#ifndef Q_OS_MACOS setWindowIcon(QIcon(m_core->settings().installerWindowIcon())); #else setPixmap(QWizard::BackgroundPixmap, m_core->settings().background()); @@ -408,7 +408,7 @@ PackageManagerGui::~PackageManagerGui() \list \li \c Classic - Classic UI style for Windows 7 and earlier. \li \c Modern - Modern UI style for Windows 8. - \li \c Mac - UI style for OS X. + \li \c Mac - UI style for macOS. \li \c Aero - Aero Peek for Windows 7. \endlist */ @@ -2178,7 +2178,7 @@ bool TargetDirectoryPage::validatePage() const QFileInfo fi(targetDir); if (fi.isDir()) { QString fileName = packageManagerCore()->settings().maintenanceToolName(); -#if defined(Q_OS_OSX) +#if defined(Q_OS_MACOS) if (QInstaller::isInBundle(QCoreApplication::applicationDirPath())) fileName += QLatin1String(".app/Contents/MacOS/") + fileName; #elif defined(Q_OS_WIN) @@ -2849,7 +2849,7 @@ void FinishedPage::entering() } if (packageManagerCore()->isMaintainer()) { -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS gui()->setOption(QWizard::NoCancelButton, false); #endif if (QAbstractButton *cancel = gui()->button(QWizard::CancelButton)) { @@ -2913,7 +2913,7 @@ void FinishedPage::entering() */ void FinishedPage::leaving() { -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS gui()->setOption(QWizard::NoCancelButton, true); #endif diff --git a/src/libs/installer/remoteserver.cpp b/src/libs/installer/remoteserver.cpp index 9d178ca06..ddf4d6ecf 100644 --- a/src/libs/installer/remoteserver.cpp +++ b/src/libs/installer/remoteserver.cpp @@ -65,7 +65,7 @@ void RemoteServer::start() if (d->m_localServer) return; -#if defined(Q_OS_UNIX) && !defined(Q_OS_OSX) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) // avoid writing to stderr: // the parent process has redirected stderr to a pipe to work with sudo, // but is not reading anymore -> writing to stderr will block after a while. diff --git a/src/libs/installer/settings.cpp b/src/libs/installer/settings.cpp index 0963f2208..3aa0baf18 100644 --- a/src/libs/installer/settings.cpp +++ b/src/libs/installer/settings.cpp @@ -472,7 +472,7 @@ QString Settings::installerWindowIcon() const QString Settings::systemIconSuffix() const { -#if defined(Q_OS_OSX) +#if defined(Q_OS_MACOS) return QLatin1String(".icns"); #elif defined(Q_OS_WIN) return QLatin1String(".ico"); diff --git a/src/libs/installer/systeminfo.cpp b/src/libs/installer/systeminfo.cpp index eb4e9cde9..6a1976c4a 100644 --- a/src/libs/installer/systeminfo.cpp +++ b/src/libs/installer/systeminfo.cpp @@ -76,7 +76,7 @@ QString SystemInfo::currentCpuArchitecture() const kernel the installer is running on, unless the host operating system is running a form of compatibility or virtualization layer. - For Windows, Linux, and OS X this will return: + For Windows, Linux, and macOS this will return: \list \li "winnt" \li "linux" @@ -96,7 +96,7 @@ QString SystemInfo::kernelType() const \property SystemInfo::kernelVersion The release version of the operating system kernel. On Windows, it returns the version of the - NT or CE kernel. On Unix systems, including OS X, it returns the same as the \c {uname -r} + NT or CE kernel. On Unix systems, including macOS, it returns the same as the \c {uname -r} command would return. Example values are: diff --git a/src/libs/kdtools/updateoperation.cpp b/src/libs/kdtools/updateoperation.cpp index dc40b0e1b..1dcb0014b 100644 --- a/src/libs/kdtools/updateoperation.cpp +++ b/src/libs/kdtools/updateoperation.cpp @@ -455,7 +455,7 @@ QDomDocument UpdateOperation::toXml() const bool UpdateOperation::fromXml(const QDomDocument &doc) { QString target = QCoreApplication::applicationDirPath(); - // Does not change target on non OSX platforms. + // Does not change target on non macOS platforms. if (QInstaller::isInBundle(target, &target)) target = QDir::cleanPath(target + QLatin1String("/..")); diff --git a/src/sdk/commandlineparser.cpp b/src/sdk/commandlineparser.cpp index 80aa0afa8..3d0d2412a 100644 --- a/src/sdk/commandlineparser.cpp +++ b/src/sdk/commandlineparser.cpp @@ -51,7 +51,7 @@ CommandLineParser::CommandLineParser() QLatin1String("Verbose mode. Prints out more information."))); m_parser.addOption(QCommandLineOption(QLatin1String(CommandLineOptions::Proxy), - QLatin1String("Use system proxy on Windows and Linux. This option has no effect on OS X."))); + QLatin1String("Use system proxy on Windows and Linux. This option has no effect on macOS."))); m_parser.addOption(QCommandLineOption(QLatin1String(CommandLineOptions::NoProxy), QLatin1String("Do not use system proxy."))); diff --git a/src/sdk/main.cpp b/src/sdk/main.cpp index 819d512c2..336ff51b0 100644 --- a/src/sdk/main.cpp +++ b/src/sdk/main.cpp @@ -44,7 +44,7 @@ #include <iostream> -#if defined(Q_OS_OSX) or defined(Q_OS_UNIX) +#if defined(Q_OS_MACOS) or defined(Q_OS_UNIX) # include <unistd.h> # include <sys/types.h> #endif @@ -66,7 +66,7 @@ int main(int argc, char *argv[]) } #endif // increase maximum numbers of file descriptors -#if defined (Q_OS_OSX) +#if defined (Q_OS_MACOS) QCoreApplication::setSetuidAllowed(true); struct rlimit rl; getrlimit(RLIMIT_NOFILE, &rl); @@ -141,7 +141,7 @@ int main(int argc, char *argv[]) Qt::CaseInsensitive) == 0); if (production) { argumentsValid = (!key.isEmpty()) && (!socketName.isEmpty()); -#if defined(Q_OS_UNIX) && !defined(Q_OS_OSX) +#if defined(Q_OS_UNIX) && !defined(Q_OS_MACOS) /* In production mode detach child so that sudo waiting on us will terminate. */ pid_t child = fork(); if (child <= -1) { @@ -166,7 +166,7 @@ int main(int argc, char *argv[]) return EXIT_FAILURE; } -#if defined(Q_OS_OSX) +#if defined(Q_OS_MACOS) // make sure effective == real user id. uid_t realUserId = getuid(); uid_t effectiveUserId = geteuid(); diff --git a/src/sdk/sdkapp.h b/src/sdk/sdkapp.h index 17d0ac5e3..68d7a2434 100644 --- a/src/sdk/sdkapp.h +++ b/src/sdk/sdkapp.h @@ -73,21 +73,21 @@ public: as the binary layout cannot be appended to the actual maintenance tool binary itself because of signing. - On OS X: This function will return always the .dat file + On macOS: This function will return always the .dat file .dat file is located inside the resource folder in the application - bundle in OS X. + bundle in macOS. */ QString binaryFile() const { QString binaryFile = QCoreApplication::applicationFilePath(); - // The installer binary on OSX and Windows does not contain the binary + // The installer binary on macOS and Windows does not contain the binary // content, it's put into the resources folder as separate file. // Adjust the actual binary path. No error checking here since we // will fail later while reading the binary content. QDir resourcePath(QFileInfo(binaryFile).dir()); -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS resourcePath.cdUp(); resourcePath.cd(QLatin1String("Resources")); #endif @@ -116,7 +116,7 @@ public: QString bundlePath; if (QInstaller::isInBundle(fi.absoluteFilePath(), &bundlePath)) fi.setFile(bundlePath); -#ifdef Q_OS_OSX +#ifdef Q_OS_MACOS return fi.absoluteDir().filePath(fi.baseName() + QLatin1String(".dat")); #else return fi.absoluteDir().filePath(qApp->applicationName() + QLatin1String(".dat")); |