Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include "utils.h"
#include <QtCore/QString>
#include <QtCore/QDebug>
#include <QtCore/QDir>
#include <QtCore/QFile>
#include <QtCore/QFileInfo>
#include <QtCore/QTemporaryFile>
#include <QtCore/QScopedPointer>
#include <QtCore/QScopedArrayPointer>
#include <QtCore/QStandardPaths>
#include <sys/wait.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
Go to the source code of this file.
Variables | |
int | optVerboseLevel = 1 |
const char * | qmakeInfixKey = "QT_INFIX" |
Definition at line 64 of file utils.cpp.
References arg, dir, directory, errorMessage(), QString::fromLatin1(), optVerboseLevel, and QDir::toNativeSeparators().
Referenced by deploy(), deployWebEngineCore(), and main().
bool createSymbolicLink | ( | const QFileInfo & | source, |
const QString & | target, | ||
QString * | errorMessage ) |
Definition at line 45 of file utils.cpp.
References QDir::currentPath(), errorMessage(), QIODevice::errorString(), file, QString::fromLatin1(), QFile::link(), QStringLiteral, QDir::setCurrent(), and QDir::toNativeSeparators().
Referenced by updateFile().
|
inlinestatic |
Definition at line 274 of file utils.cpp.
References QByteArray::constData(), encoded, QFile::encodeName(), and QByteArray::size().
Referenced by runProcess(), and tempFilePattern().
QStringList findDxc | ( | Platform | platform, |
const QString & | qtBinDir, | ||
unsigned | wordSize ) |
Definition at line 405 of file utils.cpp.
References QDir::cleanPath(), file, QStandardPaths::findExecutable(), QString::fromWCharArray(), MAX_PATH, and QFile::size().
QStringList findSharedLibraries | ( | const QDir & | directory, |
Platform | platform, | ||
DebugMatchMode | debugMatchMode, | ||
const QString & | prefix ) |
Definition at line 88 of file utils.cpp.
References directory, errorMessage(), QDir::Files, QString::isEmpty(), MatchDebug, MatchDebugOrRelease, matches(), platform(), platformHasDebugSuffix(), readPeExecutable(), sharedLibrarySuffix(), QDir::toNativeSeparators(), WindowsBased, and WindowsDesktopMinGW.
Referenced by findFFmpegLibs(), findFileRecursion(), findOpenSslLibraries(), findQtPlugins(), DllDirectoryFileEntryFunction::operator()(), and parseArguments().
Definition at line 37 of file utils.cpp.
References ClangMsvc, Msvc, and platform().
Referenced by findQmlDirectory(), and qmlDirectoryRecursion().
Definition at line 950 of file utils.cpp.
References QFileDevice::close(), errorMessage(), QIODevice::errorString(), file, QFileInfo::fileName(), QString::fromLatin1(), QByteArray::indexOf(), QFile::open(), optVerboseLevel, QByteArray(), QIODevice::readAll(), QIODeviceBase::ReadOnly, QByteArray::replace(), QByteArray::size(), QDir::toNativeSeparators(), QIODevice::write(), and QIODeviceBase::WriteOnly.
Referenced by deploy().
Definition at line 423 of file utils.cpp.
References errorMessage(), QString::fromLocal8Bit(), QString::fromUtf8(), QString::indexOf(), QString::isEmpty(), line, QString::number(), output, pos, qmakeInfixKey, QStringLiteral, QIODeviceBase::ReadOnly, QString::right(), runProcess(), QString::size(), QString::startsWith(), QIODeviceBase::Text, QDir::toNativeSeparators(), and QString::trimmed().
Referenced by main().
|
inlinestatic |
Definition at line 291 of file utils.cpp.
References read().
Referenced by runProcess().
bool readPeExecutable | ( | const QString & | peExecutableFileName, |
QString * | errorMessage, | ||
QStringList * | dependentLibraries, | ||
unsigned * | wordSize, | ||
bool * | isDebug, | ||
bool | isMinGW, | ||
unsigned short * | machineArch ) |
Definition at line 930 of file utils.cpp.
References errorMessage(), and QStringLiteral.
Referenced by findDependentLibraries(), findDependentQtLibraries(), findPluginNames(), and findSharedLibraries().
bool runProcess | ( | const QString & | binary, |
const QStringList & | args, | ||
const QString & | workingDirectory, | ||
unsigned long * | exitCode, | ||
QByteArray * | stdOut, | ||
QByteArray * | stdErr, | ||
QString * | errorMessage ) |
Definition at line 311 of file utils.cpp.
References args, encodeFileName(), errorMessage(), QString::fromLocal8Bit(), QStringLiteral, readOutRedirectFile(), QDir::setCurrent(), QList< T >::size(), and tempFilePattern().
Referenced by deployTranslations(), queryQtPaths(), and runQmlImportScanner().
|
inlinestatic |
Definition at line 282 of file utils.cpp.
References encodeFileName(), QStringLiteral, and QDir::tempPath().
Referenced by createTemporaryItemCopy(), and runProcess().
bool updateFile | ( | const QString & | sourceFileName, |
const QStringList & | nameFilters, | ||
const QString & | targetDirectory, | ||
unsigned | flags, | ||
JsonOutput * | json, | ||
QString * | errorMessage ) |
Definition at line 479 of file utils.cpp.
References JsonOutput::addFile(), QFile::copy(), d, dir, QDir::Dirs, errorMessage(), QIODevice::errorString(), file, QDir::Files, ForceUpdateFile, QString::fromLatin1(), QDir::NoDotAndDotDot, optVerboseLevel, QFile::remove(), SkipUpdateFile, QDir::toNativeSeparators(), and updateFile().
Referenced by updateFile(), updateFile(), and updateFile().
int optVerboseLevel = 1 |
Definition at line 35 of file utils.cpp.
Referenced by createDirectory(), deploy(), deployPlugin(), deployTranslations(), deployWebEngineCore(), findQtPlugins(), main(), parseArguments(), parseEarlyArguments(), patchQtCore(), updateFile(), and updateFile().
const char* qmakeInfixKey = "QT_INFIX" |
Definition at line 421 of file utils.cpp.
Referenced by deploy(), PluginInformation::generateAvailablePlugins(), and queryQtPaths().