mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00
various cleanups
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
b69ba78618
commit
9c80cf289d
9 changed files with 15 additions and 82 deletions
|
@ -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_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_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_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_PYTHON_FULL "${KATIE_LIBRARIES_FULL}/python" CACHE PATH "Python packages path")
|
||||||
set(KATIE_TOOLS_SUFFIX "" CACHE STRING "Tools (moc, uic, rcc, etc.) suffix")
|
set(KATIE_TOOLS_SUFFIX "" CACHE STRING "Tools (moc, uic, rcc, etc.) suffix")
|
||||||
katie_setup_paths()
|
katie_setup_paths()
|
||||||
|
|
|
@ -487,14 +487,10 @@ QString QFileSystemEngine::rootPath()
|
||||||
|
|
||||||
QString QFileSystemEngine::tempPath()
|
QString QFileSystemEngine::tempPath()
|
||||||
{
|
{
|
||||||
#ifdef QT_UNIX_TEMP_PATH_OVERRIDE
|
|
||||||
return QLatin1String(QT_UNIX_TEMP_PATH_OVERRIDE);
|
|
||||||
#else
|
|
||||||
QString temp = QFile::decodeName(qgetenv("TMPDIR"));
|
QString temp = QFile::decodeName(qgetenv("TMPDIR"));
|
||||||
if (temp.isEmpty())
|
if (temp.isEmpty())
|
||||||
temp = QLatin1String("/tmp/");
|
temp = QLatin1String("/tmp/");
|
||||||
return QDir::cleanPath(temp);
|
return QDir::cleanPath(temp);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QFileSystemEngine::setCurrentPath(const QFileSystemEntry &path)
|
bool QFileSystemEngine::setCurrentPath(const QFileSystemEntry &path)
|
||||||
|
|
|
@ -78,7 +78,7 @@ QInotifyFileSystemWatcherEngine *QInotifyFileSystemWatcherEngine::create()
|
||||||
QInotifyFileSystemWatcherEngine::QInotifyFileSystemWatcherEngine(int fd)
|
QInotifyFileSystemWatcherEngine::QInotifyFileSystemWatcherEngine(int fd)
|
||||||
: inotifyFd(fd)
|
: inotifyFd(fd)
|
||||||
{
|
{
|
||||||
fcntl(inotifyFd, F_SETFD, FD_CLOEXEC);
|
::fcntl(inotifyFd, F_SETFD, FD_CLOEXEC);
|
||||||
|
|
||||||
moveToThread(this);
|
moveToThread(this);
|
||||||
}
|
}
|
||||||
|
@ -110,15 +110,13 @@ QStringList QInotifyFileSystemWatcherEngine::addPaths(const QStringList &paths,
|
||||||
QString path = it.next();
|
QString path = it.next();
|
||||||
QFileInfo fi(path);
|
QFileInfo fi(path);
|
||||||
bool isDir = fi.isDir();
|
bool isDir = fi.isDir();
|
||||||
if (isDir) {
|
if (isDir && directories->contains(path)) {
|
||||||
if (directories->contains(path))
|
continue;
|
||||||
continue;
|
} else if (files->contains(path)) {
|
||||||
} else {
|
continue;
|
||||||
if (files->contains(path))
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int wd = inotify_add_watch(inotifyFd,
|
int wd = ::inotify_add_watch(inotifyFd,
|
||||||
QFile::encodeName(path).constData(),
|
QFile::encodeName(path).constData(),
|
||||||
(isDir
|
(isDir
|
||||||
? (0
|
? (0
|
||||||
|
@ -175,7 +173,7 @@ QStringList QInotifyFileSystemWatcherEngine::removePaths(const QStringList &path
|
||||||
|
|
||||||
int wd = id < 0 ? -id : id;
|
int wd = id < 0 ? -id : id;
|
||||||
// qDebug() << "removing watch for path" << path << "wd" << wd;
|
// qDebug() << "removing watch for path" << path << "wd" << wd;
|
||||||
inotify_rm_watch(inotifyFd, wd);
|
::inotify_rm_watch(inotifyFd, wd);
|
||||||
|
|
||||||
it.remove();
|
it.remove();
|
||||||
if (id < 0) {
|
if (id < 0) {
|
||||||
|
@ -240,7 +238,7 @@ void QInotifyFileSystemWatcherEngine::readFromInotify()
|
||||||
if ((event.mask & (IN_DELETE_SELF | IN_MOVE_SELF | IN_UNMOUNT)) != 0) {
|
if ((event.mask & (IN_DELETE_SELF | IN_MOVE_SELF | IN_UNMOUNT)) != 0) {
|
||||||
pathToID.remove(path);
|
pathToID.remove(path);
|
||||||
idToPath.remove(id);
|
idToPath.remove(id);
|
||||||
inotify_rm_watch(inotifyFd, event.wd);
|
::inotify_rm_watch(inotifyFd, event.wd);
|
||||||
|
|
||||||
if (id < 0)
|
if (id < 0)
|
||||||
emit directoryChanged(path, true);
|
emit directoryChanged(path, true);
|
||||||
|
|
|
@ -564,25 +564,6 @@ void QProcessPrivate::Channel::clear()
|
||||||
|
|
||||||
\snippet doc/src/snippets/process/process.cpp 0
|
\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
|
\sa QBuffer, QFile, QTcpSocket
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -2003,8 +1984,6 @@ QProcess::ExitStatus QProcess::exitStatus() const
|
||||||
The environment and working directory are inherited from the calling
|
The environment and working directory are inherited from the calling
|
||||||
process.
|
process.
|
||||||
|
|
||||||
On Windows, arguments that contain spaces are wrapped in quotes.
|
|
||||||
|
|
||||||
If the process cannot be started, -2 is returned. If the process
|
If the process cannot be started, -2 is returned. If the process
|
||||||
crashes, -1 is returned. Otherwise, the process' exit code is
|
crashes, -1 is returned. Otherwise, the process' exit code is
|
||||||
returned.
|
returned.
|
||||||
|
|
|
@ -263,30 +263,6 @@ bool _q_uuidFromHex(const Char *&src, uint &d1, ushort &d2, ushort &d3, uchar (&
|
||||||
and null UUIDs return true from isNull().
|
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()
|
\fn QUuid::QUuid()
|
||||||
|
|
||||||
|
@ -787,6 +763,7 @@ bool QUuid::operator>(const QUuid &other) const
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#undef ISMORE
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\fn QUuid QUuid::createUuid()
|
\fn QUuid QUuid::createUuid()
|
||||||
|
|
|
@ -77,7 +77,6 @@ static const char *stringPropertySpecC = "stringpropertyspecification";
|
||||||
static const char *stringPropertyNameAttrC = "name";
|
static const char *stringPropertyNameAttrC = "name";
|
||||||
static const char *stringPropertyTypeAttrC = "type";
|
static const char *stringPropertyTypeAttrC = "type";
|
||||||
static const char *stringPropertyNoTrAttrC = "notr";
|
static const char *stringPropertyNoTrAttrC = "notr";
|
||||||
static const char *jambiLanguageC = "jambi";
|
|
||||||
|
|
||||||
enum { debugPluginManager = 0 };
|
enum { debugPluginManager = 0 };
|
||||||
|
|
||||||
|
@ -135,8 +134,6 @@ QStringList QDesignerPluginManager::defaultPluginPaths()
|
||||||
static inline QString getDesignerLanguage(QDesignerFormEditorInterface *core)
|
static inline QString getDesignerLanguage(QDesignerFormEditorInterface *core)
|
||||||
{
|
{
|
||||||
if (QDesignerLanguageExtension *lang = qt_extension<QDesignerLanguageExtension *>(core->extensionManager(), core)) {
|
if (QDesignerLanguageExtension *lang = qt_extension<QDesignerLanguageExtension *>(core->extensionManager(), core)) {
|
||||||
if (lang->uiExtension() == QLatin1String("jui"))
|
|
||||||
return QLatin1String(jambiLanguageC);
|
|
||||||
return QLatin1String("unknown");
|
return QLatin1String("unknown");
|
||||||
}
|
}
|
||||||
return QLatin1String("c++");
|
return QLatin1String("c++");
|
||||||
|
|
|
@ -1490,7 +1490,7 @@ QByteArray QImageReader::imageFormat(QIODevice *device)
|
||||||
*/
|
*/
|
||||||
QList<QByteArray> QImageReader::supportedImageFormats()
|
QList<QByteArray> QImageReader::supportedImageFormats()
|
||||||
{
|
{
|
||||||
QSet<QByteArray> formats;
|
QList<QByteArray> formats;
|
||||||
for (int i = 0; i < _qt_NumFormats; ++i)
|
for (int i = 0; i < _qt_NumFormats; ++i)
|
||||||
formats << _qt_BuiltInFormats[i].extension;
|
formats << _qt_BuiltInFormats[i].extension;
|
||||||
|
|
||||||
|
@ -1505,12 +1505,8 @@ QList<QByteArray> QImageReader::supportedImageFormats()
|
||||||
}
|
}
|
||||||
#endif // QT_NO_LIBRARY
|
#endif // QT_NO_LIBRARY
|
||||||
|
|
||||||
QList<QByteArray> sortedFormats;
|
qSort(formats);
|
||||||
for (QSet<QByteArray>::ConstIterator it = formats.constBegin(); it != formats.constEnd(); ++it)
|
return formats;
|
||||||
sortedFormats << *it;
|
|
||||||
|
|
||||||
qSort(sortedFormats);
|
|
||||||
return sortedFormats;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
|
@ -173,16 +173,6 @@ static void ensureInitialized()
|
||||||
API as provided by QtMobility. Applications have to migrate to the Qt version
|
API as provided by QtMobility. Applications have to migrate to the Qt version
|
||||||
of Bearer Management.
|
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
|
\sa QNetworkRequest, QNetworkReply, QNetworkProxy
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -18,11 +18,11 @@ include_directories(
|
||||||
|
|
||||||
set(testlocales_SOURCES
|
set(testlocales_SOURCES
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/localemodel.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/localemodel.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/localewidget.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/localewidget.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(testlocales ${testlocales_SOURCES})
|
add_executable(testlocales ${testlocales_SOURCES})
|
||||||
target_link_libraries(testlocales ${KATIE_GUI_LIBRARIES})
|
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)
|
Loading…
Add table
Reference in a new issue