various cleanups

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2018-10-17 16:49:00 +00:00
parent b69ba78618
commit 9c80cf289d
9 changed files with 15 additions and 82 deletions

View file

@ -112,7 +112,7 @@ set(KATIE_PROFILE_FULL "${KATIE_DATA_FULL}/profile.d" CACHE PATH "Shell profile
set(KATIE_MAN_FULL "${CMAKE_INSTALL_FULL_MANDIR}" CACHE PATH "Manual pages path (UNIX)")
set(KATIE_APPLICATIONS_FULL "${KATIE_DATA_FULL}/applications" CACHE PATH "Desktop applications register path (UNIX)")
set(KATIE_PIXMAPS_FULL "${KATIE_DATA_FULL}/pixmaps" CACHE PATH "Desktop applications icon path (UNIX)")
set(KATIE_PKGCONFIG_FULL "${KATIE_DATA_FULL}/pkgconfig" CACHE PATH "Desktop applications icon path (UNIX)")
set(KATIE_PKGCONFIG_FULL "${KATIE_DATA_FULL}/pkgconfig" CACHE PATH "pkg-config path (UNIX)")
set(KATIE_PYTHON_FULL "${KATIE_LIBRARIES_FULL}/python" CACHE PATH "Python packages path")
set(KATIE_TOOLS_SUFFIX "" CACHE STRING "Tools (moc, uic, rcc, etc.) suffix")
katie_setup_paths()

View file

@ -487,14 +487,10 @@ QString QFileSystemEngine::rootPath()
QString QFileSystemEngine::tempPath()
{
#ifdef QT_UNIX_TEMP_PATH_OVERRIDE
return QLatin1String(QT_UNIX_TEMP_PATH_OVERRIDE);
#else
QString temp = QFile::decodeName(qgetenv("TMPDIR"));
if (temp.isEmpty())
temp = QLatin1String("/tmp/");
return QDir::cleanPath(temp);
#endif
}
bool QFileSystemEngine::setCurrentPath(const QFileSystemEntry &path)

View file

@ -78,7 +78,7 @@ QInotifyFileSystemWatcherEngine *QInotifyFileSystemWatcherEngine::create()
QInotifyFileSystemWatcherEngine::QInotifyFileSystemWatcherEngine(int fd)
: inotifyFd(fd)
{
fcntl(inotifyFd, F_SETFD, FD_CLOEXEC);
::fcntl(inotifyFd, F_SETFD, FD_CLOEXEC);
moveToThread(this);
}
@ -110,15 +110,13 @@ QStringList QInotifyFileSystemWatcherEngine::addPaths(const QStringList &paths,
QString path = it.next();
QFileInfo fi(path);
bool isDir = fi.isDir();
if (isDir) {
if (directories->contains(path))
continue;
} else {
if (files->contains(path))
continue;
if (isDir && directories->contains(path)) {
continue;
} else if (files->contains(path)) {
continue;
}
int wd = inotify_add_watch(inotifyFd,
int wd = ::inotify_add_watch(inotifyFd,
QFile::encodeName(path).constData(),
(isDir
? (0
@ -175,7 +173,7 @@ QStringList QInotifyFileSystemWatcherEngine::removePaths(const QStringList &path
int wd = id < 0 ? -id : id;
// qDebug() << "removing watch for path" << path << "wd" << wd;
inotify_rm_watch(inotifyFd, wd);
::inotify_rm_watch(inotifyFd, wd);
it.remove();
if (id < 0) {
@ -240,7 +238,7 @@ void QInotifyFileSystemWatcherEngine::readFromInotify()
if ((event.mask & (IN_DELETE_SELF | IN_MOVE_SELF | IN_UNMOUNT)) != 0) {
pathToID.remove(path);
idToPath.remove(id);
inotify_rm_watch(inotifyFd, event.wd);
::inotify_rm_watch(inotifyFd, event.wd);
if (id < 0)
emit directoryChanged(path, true);

View file

@ -564,25 +564,6 @@ void QProcessPrivate::Channel::clear()
\snippet doc/src/snippets/process/process.cpp 0
\section1 Notes for Windows Users
Some Windows commands (for example, \c dir) are not provided by
separate applications, but by the command interpreter itself.
If you attempt to use QProcess to execute these commands directly,
it won't work. One possible solution is to execute the command
interpreter itself (\c{cmd.exe} on some Windows systems), and ask
the interpreter to execute the desired command.
\section1 Symbian Platform Security Requirements
On Symbian, processes which use the functions kill() or terminate()
must have the \c PowerMgmt platform security capability. If the client
process lacks this capability, these functions will fail.
Platform security capabilities are added via the
\l{qmake-variable-reference.html#target-capability}{TARGET.CAPABILITY}
qmake variable.
\sa QBuffer, QFile, QTcpSocket
*/
@ -2003,8 +1984,6 @@ QProcess::ExitStatus QProcess::exitStatus() const
The environment and working directory are inherited from the calling
process.
On Windows, arguments that contain spaces are wrapped in quotes.
If the process cannot be started, -2 is returned. If the process
crashes, -1 is returned. Otherwise, the process' exit code is
returned.

View file

@ -263,30 +263,6 @@ bool _q_uuidFromHex(const Char *&src, uint &d1, ushort &d2, ushort &d3, uchar (&
and null UUIDs return true from isNull().
*/
/*!
\fn QUuid::QUuid(const GUID &guid)
Casts a Windows \a guid to a Qt QUuid.
\warning This function is only for Windows platforms.
*/
/*!
\fn QUuid &QUuid::operator=(const GUID &guid)
Assigns a Windows \a guid to a Qt QUuid.
\warning This function is only for Windows platforms.
*/
/*!
\fn QUuid::operator GUID() const
Returns a Windows GUID from a QUuid.
\warning This function is only for Windows platforms.
*/
/*!
\fn QUuid::QUuid()
@ -787,6 +763,7 @@ bool QUuid::operator>(const QUuid &other) const
}
return false;
}
#undef ISMORE
/*!
\fn QUuid QUuid::createUuid()

View file

@ -77,7 +77,6 @@ static const char *stringPropertySpecC = "stringpropertyspecification";
static const char *stringPropertyNameAttrC = "name";
static const char *stringPropertyTypeAttrC = "type";
static const char *stringPropertyNoTrAttrC = "notr";
static const char *jambiLanguageC = "jambi";
enum { debugPluginManager = 0 };
@ -135,8 +134,6 @@ QStringList QDesignerPluginManager::defaultPluginPaths()
static inline QString getDesignerLanguage(QDesignerFormEditorInterface *core)
{
if (QDesignerLanguageExtension *lang = qt_extension<QDesignerLanguageExtension *>(core->extensionManager(), core)) {
if (lang->uiExtension() == QLatin1String("jui"))
return QLatin1String(jambiLanguageC);
return QLatin1String("unknown");
}
return QLatin1String("c++");

View file

@ -1490,7 +1490,7 @@ QByteArray QImageReader::imageFormat(QIODevice *device)
*/
QList<QByteArray> QImageReader::supportedImageFormats()
{
QSet<QByteArray> formats;
QList<QByteArray> formats;
for (int i = 0; i < _qt_NumFormats; ++i)
formats << _qt_BuiltInFormats[i].extension;
@ -1505,12 +1505,8 @@ QList<QByteArray> QImageReader::supportedImageFormats()
}
#endif // QT_NO_LIBRARY
QList<QByteArray> sortedFormats;
for (QSet<QByteArray>::ConstIterator it = formats.constBegin(); it != formats.constEnd(); ++it)
sortedFormats << *it;
qSort(sortedFormats);
return sortedFormats;
qSort(formats);
return formats;
}
QT_END_NAMESPACE

View file

@ -173,16 +173,6 @@ static void ensureInitialized()
API as provided by QtMobility. Applications have to migrate to the Qt version
of Bearer Management.
\section1 Symbian Platform Security Requirements
On Symbian, processes which use this class must have the
\c NetworkServices platform security capability. If the client
process lacks this capability, operations will result in a panic.
Platform security capabilities are added via the
\l{qmake-variable-reference.html#target-capability}{TARGET.CAPABILITY}
qmake variable.
\sa QNetworkRequest, QNetworkReply, QNetworkProxy
*/

View file

@ -18,11 +18,11 @@ include_directories(
set(testlocales_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/localemodel.cpp
${CMAKE_CURRENT_SOURCE_DIR}/localewidget.cpp
${CMAKE_CURRENT_SOURCE_DIR}/localewidget.cpp
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
)
add_executable(testlocales ${testlocales_SOURCES})
target_link_libraries(testlocales ${KATIE_GUI_LIBRARIES})
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)