Vladimir Golovnev (Glassez)
399d3ad85a
Replace QStringRef with QStringView
4 years ago
Chocobo1
70d1cb86fd
Disable move constructor where it is sensible
4 years ago
Vladimir Golovnev (Glassez)
97c7f3bc67
Raise minimum Qt version to 5.14
4 years ago
Chocobo1
498da509db
Use Qt provided forward declaration header
4 years ago
Vladimir Golovnev (Glassez)
c41df9ffbd
Improve coding style
4 years ago
Chocobo1
7de8a4d6e0
Construct QString more efficiently
5 years ago
Chocobo1
2157e500ef
Use helper functions to construct smart pointers
5 years ago
Chocobo1
baa13c044a
Drop python2 support
...
Closes #11811 .
5 years ago
NotTsunami
6748e8d787
Remove redundant null checks
...
Attempting to delete a null pointer is a noop in C++.
Closes #2864 .
[1] https://isocpp.org/wiki/faq/freestore-mgmt#delete-handles-null
5 years ago
Chocobo1
c896982efb
Fix incorrect translation displayed after language change
...
It is expected in WebUI that the language change applies immediately
(without a program restart) and this static caching prevents that.
5 years ago
Chocobo1
6fd678195c
Replace deprecated Qt functions
...
QSet::toList() is replaced by QSet::values()
5 years ago
Chocobo1
b5b678c58f
Replace QString::split() by faster alternatives
5 years ago
Chocobo1
e90a2c00a5
Replace QList by QVector
5 years ago
Chocobo1
e6c448aa4f
Replace obsoleted QProcess::finished(int)
...
It is replaced by QProcess::finished(int, QProcess::ExitStatus).
6 years ago
Vladimir Golovnev (Glassez)
8e65317d61
Rename "fromNativePath" to "toUniformPath"
...
Unlike "toNativePath" which name clearly reflects the function result
"fromNativePath" has no such clear meaning.
Since this function converts path into uniform format "toUniformPath"
is better name.
6 years ago
thalieht
70f8882f87
Group Qt forward declarations separately from the others
6 years ago
thalieht
9995967fbf
Remove some unused #include
6 years ago
Chocobo1
e288de7ec1
Forward declare as much as possible
6 years ago
Chocobo1
ff707ea5af
Change splitToViews() return type to QVector
6 years ago
Vladimir Golovnev (Glassez)
746916a963
Use DownloadHandler behind the scenes
6 years ago
Vladimir Golovnev (Glassez)
6cb15706f5
Reduce number of DownloadManager signals
6 years ago
sledgehammer999
5c63ad3b95
Raise minimum Qt version to 5.9.0
6 years ago
thalieht
ce437817de
Make various minor changes
6 years ago
thalieht
70f1537d9f
Add const to almost all remaining vars and arguments that qualify
6 years ago
thalieht
445adb0ab4
Convert pass-by-value arguments to const refs where applicable
6 years ago
Chocobo1
2b903fc3d1
Move Utils::Misc::isUrl() function
...
All usage of this function gets to call Net::DownloadManager eventually.
6 years ago
thalieht
1f36b8b89f
Combine qAsConst() with copyAsConst() to asConst()
6 years ago
thalieht
6b1d26d555
Convert all foreach() to range-based for()
6 years ago
Thomas Piccirello
4885fe6b4c
Only instantiate SearchPluginManager as needed
6 years ago
Chocobo1
c1c28ce195
Improve parser for search engine versions.txt
...
The parse could fail when there is an extra empty line at the end of
file, this patch fixes it.
6 years ago
Chocobo1
ee030cc4eb
Fix wrong type passed to arg()
6 years ago
Thomas Piccirello
0b6ae68801
Add WebUI search API controller
...
Closes #2495 .
6 years ago
Chocobo1
b8d87f641f
Avoid variable shadowing
6 years ago
Chocobo1
254782def6
Avoid copy-construct QString in for loop
6 years ago
Chocobo1
0217d5b4c0
Replace single-character string with character literal
...
Also remove unnecessary dynamic allocation.
7 years ago
Chocobo1
8c32302377
Clear python cache conditionally
...
Clear the cache artifacts on plugin install and plugin uninstall events.
7 years ago
Vladimir Golovnev (Glassez)
112a9bcfa2
Use new DownloadManager interface
7 years ago
Chocobo1
77b71e392e
Refactor function
...
In SearchPluginManager::updateNova(), omit removing __pycache__ folder and pyc
files, those files will be recreated anyway.
Add const to variables
7 years ago
Chocobo1
f951bf678d
Rename function
7 years ago
Chocobo1
5c50c5b24d
Cache SearchPluginManager::engineLocation() result
...
Also the folder is only created on first usage.
7 years ago
Chocobo1
361afb401b
Replace less-efficient QProcess::setEnvironment
...
Also small refactor
7 years ago
Chocobo1
ad5c88be3d
Simplify function
7 years ago
Chocobo1
3e6c8a05dd
Reduce queries to python version
...
Instead of doing at least 2 queries for python infos, now requires only
1 query (in ideal condition), and the result is cached.
7 years ago
Chocobo1
51e82762c5
Move related functions to Utils::Python
7 years ago
hannsen
a162550d7f
Properly normalize version string before parsing it
...
This allows python scripts to be formatted in PEP 8 style.
7 years ago
thalieht
20ca90800d
Fix coding style
7 years ago
thalieht
6b4455e13d
Use qt5 connect() syntax
7 years ago
Chocobo1
d20f40184f
Fix translation strings not found
...
The translation context doesn't exist, so the translations were not found, fixed
now.
Closes #8829 .
7 years ago
Chocobo1
68c2d81072
Fix memory leak
7 years ago
Luís Pereira
ac42ccb5e4
Don't create temporary containers just to iterate over them
...
Stops temporary containers being created needlessly due to API misuse.
For example, it’s common for developers to assume QHash::values() and
QHash::keys() are free and abuse them, failing to realize their
implementation internally actually iterates the whole container, allocates
memory, and fills a new QList.
Added a removeIf generic algorithm, similar to std ones. We can't use std
algorithms with Qt dictionaries because Qt iterators have different
behavior from the std ones.
Found using clazy.
7 years ago