Commit graph

1353 commits

Author SHA1 Message Date
Ivailo Monev
1d253f1c24 remove unused qplatformdefs header definitions
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-25 22:43:54 +00:00
Ivailo Monev
36aaf16f82 remove deprecated Qt::DateFormat enums
indent and replace default with enum case while at it. automated
adjustments can be done with the following command:

find -type f -exec sed \
    -e 's|Qt::SystemLocaleDate|Qt::SystemLocaleShortDate|g' \
    -e 's|Qt::LocalDate|Qt::SystemLocaleShortDate|g' \
    -e 's|Qt::LocaleDate|Qt::DefaultLocaleShortDate|g' -i {} +

if you are doing it to git repository, move it out of the way as the
command may corrupt it.

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-24 21:46:21 +00:00
Ivailo Monev
68c84e8f70 avoid relocations in QString::arg() QChar/char overloads
QString's += operator reallocates data and the temporary shared null will
not be used

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-24 17:14:26 +00:00
Ivailo Monev
6391c52b86 fix blank characters check in QChar::isSpace()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-24 17:09:43 +00:00
Ivailo Monev
4083396e1e update list of supported operating systems in qglobal header
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-24 16:31:18 +00:00
Ivailo Monev
3e4d4bed67 move plugin verification pattern to qt_find_pattern()
making it and the its length static aswell as removing redundant check if
pattern is null while at it

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-23 22:59:46 +00:00
Ivailo Monev
f6def547df remove unused checks for debug-build plugins
QT_NO_DEBUG_PLUGIN_CHECK is defined for any UNIX-like operating system,
which is the only type Katie supports. this change will reduce the size of
plugins slightly and loading plugins will be faster.

Q_PLUGIN_INSTANCE() plugins macro is private so it was merged into
Q_EXPORT_PLUGIN2() and rebrand QFactoryLoader cache key while at it.

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-23 22:18:04 +00:00
Ivailo Monev
bdaedf3e86 remove compat leftovers
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-23 16:57:30 +00:00
Ivailo Monev
d19b0a6ce4 drop support for static plugins
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-23 16:05:40 +00:00
Ivailo Monev
03e46bb6d4 fix loading of plugins with a relative file name
the libraries path was missing from the list returned by
QCoreApplication::libraryPaths() which as stated in its documentation
is used when dynamically loading libraries so that's also fixed with this
change and is required for the libraries lookup.

obviously, QLibraryPrivate::findOrCreate() was not looking for libraries at
all despite the function name so code for that had to be moved from
QLibraryPrivate::load_sys() which makes it possible to load not only plugins
but also library with relative file name.

support for QLibrary::LoadHint::LoadArchiveMemberHint was dropped in the
process, QLibrary::LoadHint::ImprovedSearchHeuristics is not used thus
removed.

in the future QCoreApplication::pluginPaths() may be added to separate the
library/plugin paths but for now compatibility with projects expecting it
to return plugin paths will be kept. when that is done
QCoreApplication::libraryPaths() will check LD_LIBRARY_PATH instead of
QT_PLUGIN_PATH environment variable.

upstream commit:
418890e074

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-22 20:06:09 +00:00
Ivailo Monev
fe4a02e38c remove redundant condition in QFileInfoPrivate::getFileName()
if the string is null, setting it to empty is will only change its
reference to shared empty

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-22 18:44:17 +00:00
Ivailo Monev
cdfd13e6dc inline qstrcmp() function for performance reasons
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-20 02:37:28 +00:00
Ivailo Monev
89d52f7abb do not append application path to library paths
this was used for dll/bundles support most likely, on UNIX however adding
it to the library paths is incorrect. The runtime path (RPATH) hardcoded
into libraries/binaries should be searched instead however that is not
supported and removed by most distributions on purpose.

with this change application startup time is reduced by a lot since the
binary paths (/bin, /sbin, etc.) do not have to be listed which usually
contain large number of binaries and even symbolic/hard links

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-17 18:11:35 +00:00
Ivailo Monev
2622c69097 create leading directories of settings filepath
for compatibility with code expecting it to be created

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-16 15:46:11 +00:00
Ivailo Monev
db53ab28e4 prefix standard function calls in qt_print_backtrace()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-15 19:43:05 +00:00
Ivailo Monev
7dff007bd2 replace 0 with Q_NULLPTR where applicable
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-13 20:05:09 +00:00
Ivailo Monev
331fc2f864 use foreach() for iteration in QThread::exit()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-13 19:46:49 +00:00
Ivailo Monev
9d7518db6b remove abstract file handler support leftovers
no longer supported since e02ce5c0e0

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-13 16:44:43 +00:00
Ivailo Monev
7604ec7bf6 remove WITH_PNG AND WITH_SQLITE options, build SQLite driver into KtSql module
both are not really optional, that is why internal copies of the PNG and
SQLite projects sources are bundled.

by making the SQLite SQL driver built-in the plasma-desktop process
memory usage was reduced by roughly 4MB.

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-12 16:09:13 +00:00
Ivailo Monev
392ba35497 replace 0 with Q_NULLPTR where applicable
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-12 15:34:06 +00:00
Ivailo Monev
ddb58cc088 use CLOCK_MONOTONIC_COARSE if available in do_gettime()
used by jemalloc for an example, as for the exact precision lose it is not
clear what it is from the clock_gettime() manual page. it is not clear from
the patch posted at https://lwn.net/Articles/347811/ nor from the commit
message at https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/linux/time.h?h=v5.6-rc1&id=da15cfdae03351c689736f8d142618592e3cebc3
either.

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux_for_real_time/7/html/tuning_guide/using_coarse_posix_clocks_for_application_timestamping
claims that it is 1ms which seems like a good trade-off to me

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-11 19:18:30 +00:00
Ivailo Monev
e19b75a9fb update QSettings group methods documentation
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-11 01:02:13 +00:00
Ivailo Monev
ab15bbf194 remove compatibility Qt::Modifier::UNICODE_ACCEL enum
upstream commit:
bc6ad75d18

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-10 22:13:39 +00:00
Ivailo Monev
8fb3224ff8 replace 0 with Q_NULLPTR in QSharedDataPointer and QExplicitlySharedDataPointer
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-10 17:38:56 +00:00
Ivailo Monev
c34d02d4a9 optimize QString::multiArg()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-10 14:55:45 +00:00
Ivailo Monev
5688c9a1a5 Revert "set invalid characters count of state even on success from QIcuCodec::convertFromUnicode() and QIcuCodec::convertToUnicode()"
This reverts commit 92a7dfc214.
2020-02-08 00:29:26 +00:00
Ivailo Monev
92a7dfc214 set invalid characters count of state even on success from QIcuCodec::convertFromUnicode() and QIcuCodec::convertToUnicode()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-07 21:31:45 +00:00
Ivailo Monev
015f5ee0bd remove unused QTextCodec::ConverterState::remainingChars member
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-07 21:30:18 +00:00
Ivailo Monev
0a63b765da use constructor instead of cast in QChar::fromAscii()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-07 22:28:55 +02:00
Ivailo Monev
4801a0ce1d remove virtual specifiers from QEventDispatcherUNIXPrivate::initThreadWakeUp() and QEventDispatcherUNIXPrivate::processThreadWakeUp()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-03 13:38:24 +00:00
Ivailo Monev
df5043ec53 mark QTextBoundaryFinderPrivate break iterator member as mutable
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-03 01:04:43 +00:00
Ivailo Monev
022fe16432 format QTextBoundaryFinder for consistency
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-03 00:48:26 +00:00
Ivailo Monev
c456ede063 reimplement QSettings groups support
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-01 17:40:25 +00:00
Ivailo Monev
60f6ac44e2 update URL TLDs table
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-02-01 02:06:50 +00:00
Ivailo Monev
696e5b4b44 inherit QEvent from QSpontaneKeyEvent
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-01-30 23:06:36 +00:00
Ivailo Monev
b42eb34e6d mark QCoreApplication warning cases as unlikely
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-01-30 22:04:46 +00:00
Ivailo Monev
bed075f5c4 replace 0 with Q_NULLPTR where applicable
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-01-27 19:30:08 +00:00
Ivailo Monev
fd20b82de1 use result of ucnv_countAvailable() directly in the loop in QIcuCodec::allCodecs()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-01-27 19:07:41 +00:00
Ivailo Monev
7fee4509c8 reuse range object in QRegExpCharClass::in()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-01-27 18:46:36 +00:00
Ivailo Monev
dba8b2d52e inline isConfigFunction() function
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-01-27 18:41:23 +00:00
Ivailo Monev
74dc93c4b6 move custom types access closer to the scope it is used in in QMetaType
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-01-26 13:16:08 +00:00
Ivailo Monev
a573c906ec correct directory existence check in QCoreApplicationPrivate::appendApplicationPathToLibraryPaths()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-01-26 11:25:36 +00:00
Ivailo Monev
e524d6e663 replace 0 with Q_NULLPTR where applicable
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-01-26 10:49:52 +00:00
Ivailo Monev
6cf517267f avoid copy in foreach() loop in QDirIteratorPrivate::matchesFilters() 2020-01-26 09:17:22 +00:00
Ivailo Monev
996edf7e69 avoid temporary and remove always true case in QDir::cleanPath()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-01-25 23:58:06 +00:00
Ivailo Monev
62da531ca4 fix pending QSettings changes writing
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-01-25 19:14:11 +00:00
Ivailo Monev
e59d52fc71 remove unused and internal QAbstractFileEngineIterator::entryInfo()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-01-25 15:44:21 +00:00
Ivailo Monev
621e71e510 remove unused QTextStreamPrivate::stringOpenMode member
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-01-25 14:37:32 +00:00
Ivailo Monev
079cc389b4 use correct type for argument and return value in qt_timeout_value()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-01-25 01:28:55 +00:00
Ivailo Monev
8a7c9e784c replace setCloseOnExec() with its body and reuse file descriptor in QFSFileEnginePrivate::nativeOpen() 2020-01-24 23:01:58 +00:00