Commit graph

7090 commits

Author SHA1 Message Date
Ivailo Monev
95c899efc6 fill hardware address of QNetworkInterface when QT_HAVE_GETIFADDRS is defined
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-05 06:29:54 +02:00
Ivailo Monev
d6bb73a786 QNetworkInterfacePrivate::makeHwAddress() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-05 06:26:52 +02:00
Ivailo Monev
1b3c209010 build fix for the case when compiler mode is C++17 or newer
documented at https://en.cppreference.com/w/cpp/regex/basic_regex, good
thing JSC regex are not used for anything relevant, Kate uses some in its
indendation scripts and that's about it

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-04 23:32:40 +02:00
Ivailo Monev
be6bde63ea QWorkspace class dismissed
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-04 19:36:29 +02:00
Ivailo Monev
351b6f320c large and transparent image samples for QImageReader benchmark
Katie image format is 6x faster than png on transparent images, note
the size of the images. benchmark result:
********* Start testing of tst_QImageReader *********
Config: Using QTest library 4.12.0, Katie 4.12.0
PASS  : tst_QImageReader::initTestCase()
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.kat":
     0.450 msecs per iteration (total: 225, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.kat":
     5.148 msecs per iteration (total: 2,574, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.kat":
     2.176 msecs per iteration (total: 1,088, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.png":
     1.82 msecs per iteration (total: 911, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.png":
     19.46 msecs per iteration (total: 9,733, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.png":
     12.34 msecs per iteration (total: 6,171, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.ppm":
     0.586 msecs per iteration (total: 293, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.ppm":
     2.728 msecs per iteration (total: 1,364, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.ppm":
     2.418 msecs per iteration (total: 1,209, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.svg":
     10.79 msecs per iteration (total: 5,399, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.xpm":
     8.084 msecs per iteration (total: 4,042, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.xpm":
     75.654 msecs per iteration (total: 37,827, iterations: 500)
RESULT   : tst_QImageReader::readImage():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.xpm":
     63.850 msecs per iteration (total: 31,925, iterations: 500)
PASS  : tst_QImageReader::readImage()
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.kat":
     1.94 msecs per iteration (total: 974, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.kat":
     6.598 msecs per iteration (total: 3,299, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.kat":
     3.594 msecs per iteration (total: 1,797, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.png":
     3.332 msecs per iteration (total: 1,666, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.png":
     20.360 msecs per iteration (total: 10,180, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.png":
     13.29 msecs per iteration (total: 6,645, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.ppm":
     1.44 msecs per iteration (total: 720, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.ppm":
     3.668 msecs per iteration (total: 1,834, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.ppm":
     3.364 msecs per iteration (total: 1,682, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.svg":
     9.324 msecs per iteration (total: 4,662, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench.xpm":
     9.622 msecs per iteration (total: 4,811, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-large.xpm":
     77.180 msecs per iteration (total: 38,590, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"/home/smil3y/katie/tests/benchmarks/gui/image/qimagereader//images/bench-transparent.xpm":
     65.346 msecs per iteration (total: 32,673, iterations: 500)
PASS  : tst_QImageReader::setScaledSize()
PASS  : tst_QImageReader::cleanupTestCase()
Totals: 4 passed, 0 failed, 0 skipped
********* Finished testing of tst_QImageReader *********

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-04 18:37:47 +02:00
Ivailo Monev
c8b66a0e4b implement quality option for Katie image format and document how it works
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-04 16:59:08 +02:00
Ivailo Monev
5e0f6e6c39 correct definition for conditional QTabWidget feature
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-03 20:47:02 +02:00
Ivailo Monev
ba0858bee2 fix possible crash when session manager property is empty list
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-03 20:03:11 +02:00
Ivailo Monev
5f175986d8 do not detach ID variable in QSessionManager constructor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-03 19:20:59 +02:00
Ivailo Monev
a902fc21f2 translations update [ci skip]
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-03 16:54:49 +02:00
Ivailo Monev
43ecafb11c reduce the size of private QImageReader and QImageWriter data pointers by not storing the error string
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-03 16:24:46 +02:00
Ivailo Monev
8038460673 filter duplicate MIME types from plugins with multiple keys in QImageReader::supportedMimeTypes() and QImageWriter::supportedMimeTypes()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-03 14:35:27 +02:00
Ivailo Monev
418c46fa84 do not compute hash after QCryptographicHash::reset() unless data is added
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-03 04:48:53 +02:00
Ivailo Monev
f114257be6 new QImageReader::formatForMimeType() and QImageWriter::formatForMimeType() methods
fixes pasting of images from clipboard for some image formats

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-03 04:18:14 +02:00
Ivailo Monev
d6327b9615 add note in which version QImageReader::supportedMimeTypes(), QImageWriter::defaultImageFormat() and QImageWriter::supportedMimeTypes() appeared
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-03 03:12:26 +02:00
Ivailo Monev
f702899bf1 new required virtual method to get MIME types for image plugins
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-03 02:47:28 +02:00
Ivailo Monev
52e2f86666 incremental hashing optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-02 18:44:30 +02:00
Ivailo Monev
f5a2844467 brief Katie image format documentation
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-02 16:01:16 +02:00
Ivailo Monev
853d13fb3a oops, copy-pasta
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-01 23:51:23 +02:00
Ivailo Monev
ac19025007 move variable closer to the scope it is used in QPdfBaseEnginePrivate::openPrintDevice()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-01 23:13:35 +02:00
Ivailo Monev
05316f51d1 QT_NO_CUPS option does not require QT_NO_PRINTER
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-01 23:13:16 +02:00
Ivailo Monev
215eed0c88 enable QPrintDialog print button only if printer is available
fixes crash in case no printer is available and print button is clicked

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-01 22:56:54 +02:00
Ivailo Monev
c266f6d1e9 drop support for printing to file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-01 21:05:04 +02:00
Ivailo Monev
391503c8be do not return current PPD from QCUPSSupport::setCurrentPrinter()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-01 13:53:09 +02:00
Ivailo Monev
5f61f29f3c use QImage::Format_ARGB32_Premultiplied image format for raster pixmaps unless pixel type is bitmap
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-01 13:02:03 +02:00
Ivailo Monev
73619d7898 do not build the Katie image format handler if QT_NO_IMAGEFORMAT_KAT is defined
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-01 02:40:55 +02:00
Ivailo Monev
dbb384c991 typo
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-01 01:12:26 +02:00
Ivailo Monev
f81903f64d Katie image format optimization
from 2x faster to 3x compared to png, benchmark results bellow:
********* Start testing of tst_QImageReader *********
Config: Using QTest library 4.12.0, Katie 4.12.0
PASS  : tst_QImageReader::initTestCase()
RESULT   : tst_QImageReader::readImage():"bench.kat":
     0.452 msecs per iteration (total: 226, iterations: 500)
RESULT   : tst_QImageReader::readImage():"bench.pbm":
     0.026 msecs per iteration (total: 13, iterations: 500)
RESULT   : tst_QImageReader::readImage():"bench.png":
     1.82 msecs per iteration (total: 912, iterations: 500)
RESULT   : tst_QImageReader::readImage():"bench.ppm":
     0.588 msecs per iteration (total: 294, iterations: 500)
RESULT   : tst_QImageReader::readImage():"bench.svg":
     10.80 msecs per iteration (total: 5,400, iterations: 500)
RESULT   : tst_QImageReader::readImage():"bench.xpm":
     8.172 msecs per iteration (total: 4,086, iterations: 500)
PASS  : tst_QImageReader::readImage()
RESULT   : tst_QImageReader::setScaledSize():"bench.kat":
     1.95 msecs per iteration (total: 977, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"bench.pbm":
     1.34 msecs per iteration (total: 671, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"bench.png":
     3.328 msecs per iteration (total: 1,664, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"bench.ppm":
     1.44 msecs per iteration (total: 720, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"bench.svg":
     9.304 msecs per iteration (total: 4,652, iterations: 500)
RESULT   : tst_QImageReader::setScaledSize():"bench.xpm":
     9.730 msecs per iteration (total: 4,865, iterations: 500)
PASS  : tst_QImageReader::setScaledSize()
PASS  : tst_QImageReader::cleanupTestCase()
Totals: 4 passed, 0 failed, 0 skipped
********* Finished testing of tst_QImageReader *********

********* Start testing of tst_QImageWriter *********
Config: Using QTest library 4.12.0, Katie 4.12.0
PASS  : tst_QImageWriter::initTestCase()
RESULT   : tst_QImageWriter::writeImage():"kat":
     2.428 msecs per iteration (total: 1,214, iterations: 500)
RESULT   : tst_QImageWriter::writeImage():"png":
     7.798 msecs per iteration (total: 3,899, iterations: 500)
RESULT   : tst_QImageWriter::writeImage():"ppm":
     6.954 msecs per iteration (total: 3,477, iterations: 500)
PASS  : tst_QImageWriter::writeImage()
PASS  : tst_QImageWriter::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
********* Finished testing of tst_QImageWriter *********

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-03-01 01:11:30 +02:00
Ivailo Monev
3337c33a86 simplify raster pixmap creation from image
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 21:43:02 +02:00
Ivailo Monev
d36bee65a4 unroll qt_memfill<T,T>() to 8 operations per-loop when possible
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 21:41:30 +02:00
Ivailo Monev
1cda165044 png header peeking optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 20:28:38 +02:00
Ivailo Monev
0caa1fd321 use proper QString constructor in QCUPSSupport::unicodeString()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 19:26:57 +02:00
Ivailo Monev
91a74c0b49 replace resolveCups() function with its body
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 19:26:23 +02:00
Ivailo Monev
e363dd6fee pre-compute QWIDGETSIZE_MAX definition value
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 19:10:18 +02:00
Ivailo Monev
497c910fdd remove mac and win leftovers
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 19:06:01 +02:00
Ivailo Monev
ae1de361c9 remove unused QSystemTrayIconSys::background member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 19:02:26 +02:00
Ivailo Monev
c113d0edd7 indent qx11info_x11 source file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 19:00:01 +02:00
Ivailo Monev
7c45435bf5 check if compositor is active on the application display, not the default
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 18:56:16 +02:00
Ivailo Monev
cb129b5889 add QSystemTrayIcon test
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 18:36:12 +02:00
Ivailo Monev
778b226d9e indent QBalloonTip constructor
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 18:35:48 +02:00
Ivailo Monev
5a51e6ec4f optimize QSystemTrayIconSys::locateSystemTray() method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 18:24:00 +02:00
Ivailo Monev
d544f49526 remove unused QAbstractSocketPrivate methods and members
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 17:55:24 +02:00
Ivailo Monev
25893dd3e6 explicit socketError() return value check in addressFromSockaddr() function
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 17:44:01 +02:00
Ivailo Monev
937b8c02ce QVariant test build fix
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 17:13:39 +02:00
Ivailo Monev
c4100aae81 drop unused QSharedMemory and QSystemSemaphore classes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 17:06:54 +02:00
Ivailo Monev
1f1143c75f remove unused QStyle::StandardPixmap::SP_VistaShield enum
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 16:46:19 +02:00
Ivailo Monev
58ad321c89 drop unused QQuaternion class [ci reset]
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 16:20:02 +02:00
Ivailo Monev
4efc6f7c66 use uninitialized buffers instead of resizing in QPdfEnginePrivate::addImage()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 16:00:58 +02:00
Ivailo Monev
e7753a88fe remove redundant cups header inclusions
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 14:34:33 +02:00
Ivailo Monev
19c7089395 reimplement javascriptcore regexp via std::regex
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2022-02-28 05:08:23 +02:00