OSDN Git Service

kde/Katie.git
20 months agodrop support for storing types that are not QString-convertable via QSettings
Ivailo Monev [Sun, 13 Nov 2022 17:27:13 +0000 (19:27 +0200)]
drop support for storing types that are not QString-convertable via QSettings

I am not interested in custom types feature at all - QMainWindow for
example saves its state via QDataStream. ofcourse it involves conversion
but that is the case with QVariant aswell. there is also the qreal type
thing - it may be float, it may double. streaming QRectF has to be done
in such a way to account for both cases but here is the catch - if
conversion fails there has to be fallback which QSettings::value() kinda
covers for types that are not composed of several more types.

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoQDebug documentation update
Ivailo Monev [Sun, 13 Nov 2022 16:49:13 +0000 (18:49 +0200)]
QDebug documentation update

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoQDebug rewrite to use QByteArray as internal buffer
Ivailo Monev [Sun, 13 Nov 2022 13:39:19 +0000 (15:39 +0200)]
QDebug rewrite to use QByteArray as internal buffer

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoQDeclarativeInfo rewrite to not use QDebug
Ivailo Monev [Sun, 13 Nov 2022 12:47:47 +0000 (14:47 +0200)]
QDeclarativeInfo rewrite to not use QDebug

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agolog the error string, not the QDeclarativeError pointer in QDeclarativeScriptActionPr...
Ivailo Monev [Sun, 13 Nov 2022 12:44:26 +0000 (14:44 +0200)]
log the error string, not the QDeclarativeError pointer in QDeclarativeScriptActionPrivate::execute()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agorevert f92053f38142c9b4a589f5623e3055958d145a01
Ivailo Monev [Sat, 12 Nov 2022 13:50:44 +0000 (15:50 +0200)]
revert f92053f38142c9b4a589f5623e3055958d145a01

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoMerge branch 'master' of https://scm.osdn.net/gitroot/kde/Katie
Ivailo Monev [Sat, 12 Nov 2022 13:43:29 +0000 (15:43 +0200)]
Merge branch 'master' of https://scm.osdn.net/gitroot/kde/Katie

20 months agoremove unused AVG16() macro
Ivailo Monev [Sat, 12 Nov 2022 11:18:03 +0000 (13:18 +0200)]
remove unused AVG16() macro

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agonamefsck script update
Ivailo Monev [Sat, 12 Nov 2022 03:37:25 +0000 (05:37 +0200)]
namefsck script update

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agodrop compile-time options to disable debug and warning output
Ivailo Monev [Sat, 12 Nov 2022 01:11:56 +0000 (03:11 +0200)]
drop compile-time options to disable debug and warning output

such type of messages can still be filtered by installing message handler

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoQImage documentation update
Ivailo Monev [Fri, 11 Nov 2022 20:58:03 +0000 (22:58 +0200)]
QImage documentation update

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agouse growing buffer (QDataBuffer) in blending functions
Ivailo Monev [Fri, 11 Nov 2022 18:49:22 +0000 (20:49 +0200)]
use growing buffer (QDataBuffer) in blending functions

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agomove variables to the scope they are used in QGradientData::generateGradientColorTable()
Ivailo Monev [Fri, 11 Nov 2022 17:38:57 +0000 (19:38 +0200)]
move variables to the scope they are used in QGradientData::generateGradientColorTable()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoQImage::Format_RGB16 to XImage copying optimization
Ivailo Monev [Fri, 11 Nov 2022 17:06:16 +0000 (19:06 +0200)]
QImage::Format_RGB16 to XImage copying optimization

it is a bit tricky to figure out the compatible cases but the zero-copy
optimizations pay off

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agocreate print preview images with the page rectangle size and fill them with white...
Ivailo Monev [Fri, 11 Nov 2022 03:26:01 +0000 (05:26 +0200)]
create print preview images with the page rectangle size and fill them with white color

fixes possible rendering issues (e.g. random colors at the edges)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agocreate dummy device as fallbak from QPdfPrinter
Ivailo Monev [Fri, 11 Nov 2022 03:18:07 +0000 (05:18 +0200)]
create dummy device as fallbak from QPdfPrinter

fixes possible crash

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agobuild fix for the case when QT_NO_CUPS is defined
Ivailo Monev [Fri, 11 Nov 2022 03:14:43 +0000 (05:14 +0200)]
build fix for the case when QT_NO_CUPS is defined

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoremove unused QPSPrintEnginePrivate member
Ivailo Monev [Fri, 11 Nov 2022 00:43:09 +0000 (02:43 +0200)]
remove unused QPSPrintEnginePrivate member

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agodrop unused epsf feature of QPSPrintEngine
Ivailo Monev [Fri, 11 Nov 2022 00:41:39 +0000 (02:41 +0200)]
drop unused epsf feature of QPSPrintEngine

note that it is hidden behind backdoor function

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoremove now unused QPolygonClipper class
Ivailo Monev [Fri, 11 Nov 2022 00:29:42 +0000 (02:29 +0200)]
remove now unused QPolygonClipper class

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoassume fetch and store operators are valid in drawing functions
Ivailo Monev [Thu, 10 Nov 2022 23:09:16 +0000 (01:09 +0200)]
assume fetch and store operators are valid in drawing functions

any attempt to paint on QImage (and in turn QPixmap) the format of which is
QImage::Format_Invalid (with no private data pointer) will fail due to
paint engine check in QPainter::begin(), in addition the operators should
be (and currently are) implemented for all QImage formats

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agobenchmark painting on and of mono image formats
Ivailo Monev [Thu, 10 Nov 2022 23:05:18 +0000 (01:05 +0200)]
benchmark painting on and of mono image formats

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agocompiler warnings fixes
Ivailo Monev [Thu, 10 Nov 2022 23:04:43 +0000 (01:04 +0200)]
compiler warnings fixes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoremove now unused constants
Ivailo Monev [Thu, 10 Nov 2022 22:17:24 +0000 (00:17 +0200)]
remove now unused constants

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agofix copying of QImage to XImage when the QImage format is QImage::Format_RGB16
Ivailo Monev [Thu, 10 Nov 2022 21:35:06 +0000 (23:35 +0200)]
fix copying of QImage to XImage when the QImage format is QImage::Format_RGB16

even transparency is a thing on 16-bit depth X display but it is very slow

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoreplace QPixmapData::createCompatiblePixmapData() with its body
Ivailo Monev [Thu, 10 Nov 2022 20:10:52 +0000 (22:10 +0200)]
replace QPixmapData::createCompatiblePixmapData() with its body

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoremove now unused QPixmapData::resize() method
Ivailo Monev [Thu, 10 Nov 2022 20:08:26 +0000 (22:08 +0200)]
remove now unused QPixmapData::resize() method

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoallocate the ARGB visuals and colormaps only if XRender is to be used
Ivailo Monev [Thu, 10 Nov 2022 19:54:32 +0000 (21:54 +0200)]
allocate the ARGB visuals and colormaps only if XRender is to be used

they are null-checked in qt_cleanup() and used only when qt_x11Data->use_xrender
equals true

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoensure the image is not constructed with zero width or height in QX11PaintEngine...
Ivailo Monev [Thu, 10 Nov 2022 18:50:05 +0000 (20:50 +0200)]
ensure the image is not constructed with zero width or height in QX11PaintEngine::drawPath()

must be rounding to zero somewhere

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoremove check for non-existing internal property
Ivailo Monev [Thu, 10 Nov 2022 17:29:38 +0000 (19:29 +0200)]
remove check for non-existing internal property

it was used by the designer tool to override the DPI

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoconvert QPixmapData::create() method to specialized constructor
Ivailo Monev [Thu, 10 Nov 2022 16:14:06 +0000 (18:14 +0200)]
convert QPixmapData::create() method to specialized constructor

now QPixmap::load() and QPixmap::loadFromData() will be slightly faster

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agopass the pixel type to makeBitmapCompliantIfNeeded() function
Ivailo Monev [Thu, 10 Nov 2022 16:00:31 +0000 (18:00 +0200)]
pass the pixel type to makeBitmapCompliantIfNeeded() function

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoremove redundant QPixmapData members
Ivailo Monev [Thu, 10 Nov 2022 15:50:36 +0000 (17:50 +0200)]
remove redundant QPixmapData members

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoreplace qt_mask_image() function with its body
Ivailo Monev [Thu, 10 Nov 2022 15:40:17 +0000 (17:40 +0200)]
replace qt_mask_image() function with its body

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoremove unused lowest_bit() function
Ivailo Monev [Thu, 10 Nov 2022 15:23:46 +0000 (17:23 +0200)]
remove unused lowest_bit() function

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoimplement the missing QImage converter functions
Ivailo Monev [Thu, 10 Nov 2022 14:37:14 +0000 (16:37 +0200)]
implement the missing QImage converter functions

that includes QImage::Format_ARGB32_Premultiplied to QImage::Format_RGB16,
QImage::Format_RGB16 to QImage::Format_Mono and QImage::Format_MonoLSB

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoinline QWidgetBackingStore::surface() method
Ivailo Monev [Thu, 10 Nov 2022 04:14:28 +0000 (06:14 +0200)]
inline QWidgetBackingStore::surface() method

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoremove noop QWidgetBackingStore::updateList()
Ivailo Monev [Thu, 10 Nov 2022 04:08:18 +0000 (06:08 +0200)]
remove noop QWidgetBackingStore::updateList()

does nothing since Qt::WA_StaticContents was dropped

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoQETWidget and QWindowSurface do not have to be friends with QWidgetBackingStore
Ivailo Monev [Thu, 10 Nov 2022 04:00:32 +0000 (06:00 +0200)]
QETWidget and QWindowSurface do not have to be friends with QWidgetBackingStore

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoremove unused QWidgetBackingStore::topLevelOffset() method
Ivailo Monev [Thu, 10 Nov 2022 04:00:05 +0000 (06:00 +0200)]
remove unused QWidgetBackingStore::topLevelOffset() method

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoX server running at 24-bit depth is alpha capable
Ivailo Monev [Thu, 10 Nov 2022 02:17:28 +0000 (04:17 +0200)]
X server running at 24-bit depth is alpha capable

now the optimization from the previous commit applies to the backing store
in more cases

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoQImage::Format_ARGB32_Premultiplied to XImage copying optimization
Ivailo Monev [Thu, 10 Nov 2022 01:27:36 +0000 (03:27 +0200)]
QImage::Format_ARGB32_Premultiplied to XImage copying optimization

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoQWindowSurface::beginPaint() optimization
Ivailo Monev [Thu, 10 Nov 2022 01:29:01 +0000 (03:29 +0200)]
QWindowSurface::beginPaint() optimization

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agooops, fix build
Ivailo Monev [Thu, 10 Nov 2022 00:38:09 +0000 (02:38 +0200)]
oops, fix build

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoadd note when QPixmap::toX11Pixmap() was introduced
Ivailo Monev [Wed, 9 Nov 2022 21:28:05 +0000 (23:28 +0200)]
add note when QPixmap::toX11Pixmap() was introduced

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoQPixmap::grabWindow() optimization
Ivailo Monev [Wed, 9 Nov 2022 21:24:37 +0000 (23:24 +0200)]
QPixmap::grabWindow() optimization

TODO: replace WId with Qt::HANDLE or vice-versa, eventually

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agomerge QRasterPixmapData into QPixmapData
Ivailo Monev [Wed, 9 Nov 2022 21:06:30 +0000 (23:06 +0200)]
merge QRasterPixmapData into QPixmapData

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoremove now unused XRender fills cache
Ivailo Monev [Wed, 9 Nov 2022 20:21:43 +0000 (22:21 +0200)]
remove now unused XRender fills cache

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoQPixmap documentation update
Ivailo Monev [Wed, 9 Nov 2022 22:18:47 +0000 (00:18 +0200)]
QPixmap documentation update

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoQPixmap no longer requires GUI application or to be constructed in the application...
Ivailo Monev [Wed, 9 Nov 2022 22:08:54 +0000 (00:08 +0200)]
QPixmap no longer requires GUI application or to be constructed in the application thread

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoremove unused and internal QTessellator class
Ivailo Monev [Wed, 9 Nov 2022 22:02:31 +0000 (00:02 +0200)]
remove unused and internal QTessellator class

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoQPixmap documentation update
Ivailo Monev [Wed, 9 Nov 2022 22:01:44 +0000 (00:01 +0200)]
QPixmap documentation update

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agodrop internal X11 pixmap
Ivailo Monev [Wed, 9 Nov 2022 02:23:07 +0000 (04:23 +0200)]
drop internal X11 pixmap

TODO: merge QRasterPixmapData into QPixmapData

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoaccount for undefined types in QScriptEnginePrivate::create() assert
Ivailo Monev [Tue, 8 Nov 2022 15:39:13 +0000 (17:39 +0200)]
account for undefined types in QScriptEnginePrivate::create() assert

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoimplement blend modes for X11 paint engine
Ivailo Monev [Mon, 7 Nov 2022 08:42:23 +0000 (10:42 +0200)]
implement blend modes for X11 paint engine

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoQX11PaintEngine::drawPixmap() optimization
Ivailo Monev [Mon, 7 Nov 2022 08:06:25 +0000 (10:06 +0200)]
QX11PaintEngine::drawPixmap() optimization

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoremove redundant forward declarations of QMatrix and QTransform in qimage header
Ivailo Monev [Mon, 7 Nov 2022 07:50:57 +0000 (09:50 +0200)]
remove redundant forward declarations of QMatrix and QTransform in qimage header

qtransform header is included from qimage header

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoremove QImage friend declaration for now non-existing QX11AlphaDetector class
Ivailo Monev [Mon, 7 Nov 2022 07:49:41 +0000 (09:49 +0200)]
remove QImage friend declaration for now non-existing QX11AlphaDetector class

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoexplicitly create X11 pixmap data in QX11PixmapData::mask_to_bitmap()
Ivailo Monev [Mon, 7 Nov 2022 06:33:50 +0000 (08:33 +0200)]
explicitly create X11 pixmap data in QX11PixmapData::mask_to_bitmap()

QPixmap is raster by default which in turn means QBitmap also is

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoQX11PixmapData::mask() optimization
Ivailo Monev [Mon, 7 Nov 2022 06:30:01 +0000 (08:30 +0200)]
QX11PixmapData::mask() optimization

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoplug memory leak in QX11PixmapData::toImage()
Ivailo Monev [Mon, 7 Nov 2022 06:00:07 +0000 (08:00 +0200)]
plug memory leak in QX11PixmapData::toImage()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agosimplify alpha checking in QX11PixmapData::fromImage()
Ivailo Monev [Mon, 7 Nov 2022 04:39:32 +0000 (06:39 +0200)]
simplify alpha checking in QX11PixmapData::fromImage()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agotemporary fix for QPixmap::grabWindow()
Ivailo Monev [Sun, 6 Nov 2022 15:54:21 +0000 (17:54 +0200)]
temporary fix for QPixmap::grabWindow()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoeffectively revert 3b2f36749730a11d1f058e0e6889a8280b2209f1 and cd5217cdbcf47683f1b63...
Ivailo Monev [Sun, 6 Nov 2022 12:12:40 +0000 (14:12 +0200)]
effectively revert 3b2f36749730a11d1f058e0e6889a8280b2209f1 and cd5217cdbcf47683f1b63fd42b63d354ea014bda

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoremove unused QString object in QTextStreamPrivate::putString()
Ivailo Monev [Fri, 4 Nov 2022 14:20:44 +0000 (16:20 +0200)]
remove unused QString object in QTextStreamPrivate::putString()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agofix regression since fabde51fe3b4690ea027b208556a6e80c81c6131
Ivailo Monev [Fri, 4 Nov 2022 13:35:05 +0000 (15:35 +0200)]
fix regression since fabde51fe3b4690ea027b208556a6e80c81c6131

the important thing is to clean the fileName argument which may or may not
be clean

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agobuild fix QDataStream test case
Ivailo Monev [Thu, 3 Nov 2022 15:05:10 +0000 (17:05 +0200)]
build fix QDataStream test case

only that test case and QVariant::save() were using the char* operators
of QDataStream

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoensure the type name is streamed as QByteArray in QVariant::save()
Ivailo Monev [Thu, 3 Nov 2022 14:36:28 +0000 (16:36 +0200)]
ensure the type name is streamed as QByteArray in QVariant::save()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agofetch the owner and group from the QFile file descriptor in QFileInof tests
Ivailo Monev [Thu, 3 Nov 2022 13:22:23 +0000 (15:22 +0200)]
fetch the owner and group from the QFile file descriptor in QFileInof tests

much more reliable comparison

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoverify that the group name is not empty in tst_QFileInfo::group()
Ivailo Monev [Thu, 3 Nov 2022 13:10:35 +0000 (15:10 +0200)]
verify that the group name is not empty in tst_QFileInfo::group()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoset the QDataStream byte order to big endian in tst_QVariant::loadBrokenUserType()
Ivailo Monev [Thu, 3 Nov 2022 13:02:56 +0000 (15:02 +0200)]
set the QDataStream byte order to big endian in tst_QVariant::loadBrokenUserType()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agominor comment correction
Ivailo Monev [Wed, 2 Nov 2022 20:55:09 +0000 (22:55 +0200)]
minor comment correction

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoremove unused QTranslatorPrivate member
Ivailo Monev [Wed, 2 Nov 2022 11:05:10 +0000 (13:05 +0200)]
remove unused QTranslatorPrivate member

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agocache translations on load
Ivailo Monev [Wed, 2 Nov 2022 11:02:44 +0000 (13:02 +0200)]
cache translations on load

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoremove unused QTextCodec header inclusion in trcmain source file
Ivailo Monev [Wed, 2 Nov 2022 09:12:05 +0000 (11:12 +0200)]
remove unused QTextCodec header inclusion in trcmain source file

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agodo not attempt to translate when the data is empty
Ivailo Monev [Wed, 2 Nov 2022 09:11:40 +0000 (11:11 +0200)]
do not attempt to translate when the data is empty

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agofaster translations lookup
Ivailo Monev [Wed, 2 Nov 2022 06:18:35 +0000 (08:18 +0200)]
faster translations lookup

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agocall setlocale() to set the characters classification before attempting to open X11...
Ivailo Monev [Wed, 2 Nov 2022 05:49:54 +0000 (07:49 +0200)]
call setlocale() to set the characters classification before attempting to open X11 input method

due to the recent change in KCatalog I found out setlocale() is not called
by many programs unless there are specific requirements and X11 apparently
requires it to function properly

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agofallback to system locale for keyboard input locale and codec
Ivailo Monev [Wed, 2 Nov 2022 05:17:06 +0000 (07:17 +0200)]
fallback to system locale for keyboard input locale and codec

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agodo not install empty (invalid) translators
Ivailo Monev [Wed, 2 Nov 2022 03:59:48 +0000 (05:59 +0200)]
do not install empty (invalid) translators

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agolock when installing and removing translators
Ivailo Monev [Wed, 2 Nov 2022 03:51:00 +0000 (05:51 +0200)]
lock when installing and removing translators

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agouse custom format for translations
Ivailo Monev [Wed, 2 Nov 2022 02:26:43 +0000 (04:26 +0200)]
use custom format for translations

the code for translating strings in kdelibs (see
kdelibs/kdecore/localization/kcatalog.cpp) has finally made me roll my
own - locking global mutex, saving and restoring environment variables
on every string translation is not very good, is it?

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoMerge branch 'master' of https://scm.osdn.net/gitroot/kde/Katie
Ivailo Monev [Tue, 1 Nov 2022 20:45:01 +0000 (22:45 +0200)]
Merge branch 'master' of https://scm.osdn.net/gitroot/kde/Katie

20 months agoremove unused QFileInfoPrivate::FileName enums
Ivailo Monev [Tue, 1 Nov 2022 20:44:49 +0000 (22:44 +0200)]
remove unused QFileInfoPrivate::FileName enums

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoFreeBSD package footprint file update
Ivailo Monev [Tue, 1 Nov 2022 20:27:36 +0000 (22:27 +0200)]
FreeBSD package footprint file update

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoalways read data without intermediate buffer from QIODevice::read()
Ivailo Monev [Tue, 1 Nov 2022 19:34:16 +0000 (21:34 +0200)]
always read data without intermediate buffer from QIODevice::read()

the main user of QIODevice is QFile and it uses O_DSYNC/O_SYNC for
unbuffered I/O meaning the QIODevice buffer does not benefit it because the
filesystem cache already does that

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agocorrect function name passed to macro in QIODevice::ungetChar()
Ivailo Monev [Tue, 1 Nov 2022 21:39:33 +0000 (23:39 +0200)]
correct function name passed to macro in QIODevice::ungetChar()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agouse qt_safe_read() instead of calling the virtual QFile::readData() in QFile::readLin...
Ivailo Monev [Tue, 1 Nov 2022 17:24:50 +0000 (19:24 +0200)]
use qt_safe_read() instead of calling the virtual QFile::readData() in QFile::readLineData()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agodrop support for mapping QFile via mmap()
Ivailo Monev [Tue, 1 Nov 2022 17:13:33 +0000 (19:13 +0200)]
drop support for mapping QFile via mmap()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agodo only basic ELF checks from qt_unix_query()
Ivailo Monev [Tue, 1 Nov 2022 17:11:15 +0000 (19:11 +0200)]
do only basic ELF checks from qt_unix_query()

QLibraryPrivate::loadPlugin() resolves the symbol, it is not assumed to be
present in the plugin which means a basic ELF check is more than enough
(the important thing is to _not_ load .debug files as those may cause a
crash)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agocorrect the buffer size in qRandomUuid() function
Ivailo Monev [Tue, 1 Nov 2022 07:39:49 +0000 (09:39 +0200)]
correct the buffer size in qRandomUuid() function

the initial implementation was not passing the buffer size to the
QByteArray constructor so the additional bit was for qstrlen()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agodo not remove the file from the EXDEV error codepath in QFileSystemEngine::renameFile()
Ivailo Monev [Tue, 1 Nov 2022 05:34:54 +0000 (07:34 +0200)]
do not remove the file from the EXDEV error codepath in QFileSystemEngine::renameFile()

QFileSystemEngine::renameFile() is supposed to fail if the file exists

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agodeep-copy the charset name in QTextCodec::codecForText()
Ivailo Monev [Tue, 1 Nov 2022 03:36:48 +0000 (05:36 +0200)]
deep-copy the charset name in QTextCodec::codecForText()

it is documented to remain valid as long as UCharsetMatch is

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agofix QDir::absoluteFilePath() regression
Ivailo Monev [Tue, 1 Nov 2022 02:14:37 +0000 (04:14 +0200)]
fix QDir::absoluteFilePath() regression

somewhere in the abstraction engine it was returned clean

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agodo not use QTextCodec::codecForLocale() for converting QString to decoded locale...
Ivailo Monev [Mon, 31 Oct 2022 22:24:06 +0000 (00:24 +0200)]
do not use QTextCodec::codecForLocale() for converting QString to decoded locale-encoded string

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoinline toLocal8Bit_helper() function and use it in QString::toLocal8Bit()
Ivailo Monev [Mon, 31 Oct 2022 22:12:59 +0000 (00:12 +0200)]
inline toLocal8Bit_helper() function and use it in QString::toLocal8Bit()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoset localecodec variable from QTextCodecPrivate::localeCodec()
Ivailo Monev [Mon, 31 Oct 2022 22:12:26 +0000 (00:12 +0200)]
set localecodec variable from QTextCodecPrivate::localeCodec()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agokeep reference to the native filepath in QFile::resize()
Ivailo Monev [Mon, 31 Oct 2022 23:59:55 +0000 (01:59 +0200)]
keep reference to the native filepath in QFile::resize()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agodo not use QTextCodec::codecForLocale() for converting QString to locale-encoded...
Ivailo Monev [Mon, 31 Oct 2022 19:48:55 +0000 (21:48 +0200)]
do not use QTextCodec::codecForLocale() for converting QString to locale-encoded string

if QString::toLocal8Bit() is called from global static destructor it may
be too late to cache a QTextCodec, in fact it may cause a crash.
QTextCodec::codecForLocale() also has to lock a global mutex

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
20 months agoQDataStream documentation update
Ivailo Monev [Mon, 31 Oct 2022 19:12:58 +0000 (21:12 +0200)]
QDataStream documentation update

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>