Commit graph

1519 commits

Author SHA1 Message Date
Ivailo Monev
34ef1069b0 mark some environment queries as static and const
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-03-30 08:09:53 +00:00
Ivailo Monev
85077cc320 make qt_error_string() argument non-optional
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-03-30 07:38:10 +00:00
Ivailo Monev
a53986b0c2 remove unused and internal QFilePrivate::setError() overload
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-03-30 07:37:41 +00:00
Ivailo Monev
d00f2bee3d remove unused and internal qt_set_current_thread_to_main_thread()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-03-30 00:00:30 +00:00
Ivailo Monev
2d01c6c949 unexport/remove unused internal external references
plenty of those, I've grep-ed only for Q_GUI_EXPORT and qt_ prefix

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-03-25 22:23:15 +00:00
Ivailo Monev
705d36506a correct warning message in QThread::terminate()
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-03-25 17:19:18 +00:00
Ivailo Monev
bb4d38283c inline qdlerror() function
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-03-25 17:12:07 +00:00
Ivailo Monev
eaa788b8f0 replace qBinaryFindHelper() with its body
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-03-25 17:03:12 +00:00
Ivailo Monev
1f7b577857 mark qt_readEscapedFormatString() and qt_repeatCount() as static
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-03-25 16:28:34 +00:00
Ivailo Monev
bde2494377 do not compare member to zero in QAbstractEventDispatcherPrivate::init()
part of the Q_NULLPTR-ization effort

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-03-25 01:23:56 +00:00
Ivailo Monev
9f63d77bf0 mark results from sysconf() queries as static
that way queries are done once per thread

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-03-21 16:34:28 +00:00
Ivailo Monev
91019ff8de validate stack size in QThread::setStackSize()
that way threads will not fail if it is less than the minimum, the warning
from QThread::start() is basically invisible to GUI users unless
application is started from terminal which is far from ideal. one has
to install own message handler via qInstallMsgHandler() to make such
warnings noticable to GUI users, possible via QErrorMessage, which should
be errors in fact and printed via qCritical() but making such changes is
beyond the scope of this commit

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-03-21 16:13:18 +00:00
Ivailo Monev
16d1d9c97a update tables data to CLDR v36.1
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-03-19 21:40:19 +00:00
Ivailo Monev
ab1464f104 update unicode data tables to v13.0
combining types which harfbuzz does not support are no longer added to the
tables too, this should make obtaining properties of text faster.

special language table used to probe fonts for scripts support should be
reviewed once new CLDR version is released to add proper language entries
if present in likelySubtags.xml

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-03-12 21:42:56 +00:00
Ivailo Monev
07bf092710 always use full paths for installation
now that CPack is no longer supported relative paths are no longer
required. this change also fixes the headers optimizations upon
installation since it requires full paths to work

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-03-09 00:36:36 +00:00
Ivailo Monev
31b97f69d7 remove LPR support leftovers
removes the NSL and NIS optional dependencies and effectively speeds up
the initialization of printing dialog and obtaining of information about
prineters. this change leaves CUPS as the only option to support
printing

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
2020-03-07 22:20:22 +00:00
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