Commit Graph

483 Commits (r14.1.x)
 

Author SHA1 Message Date
Michele Calgaro 894037c3e6
Amend to previous 'replace TRUE/FALSE' commit
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(manually cherry-picked from commit 649c4c61a1)
2 months ago
Michele Calgaro 6e4a70d41a
Replace TRUE/FALSE with boolean values true/false - part 3
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked and manually edited from commit 6dd781c483)
2 months ago
Michele Calgaro 81ade12909 Replace TRUE/FALSE with boolean values true/false - part 2
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit c03a480087)
3 months ago
Michele Calgaro 35ced32e33 Replace TRUE/FALSE with boolean values true/false - part 1
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit a7f1e6e255)
3 months ago
Michele Calgaro 7dd4848d61
Fix handling of socket notifier events in gmainloop functions.
This resolves issue #231.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 2584dba8aa)
3 months ago
Michele Calgaro d4981524d7 Improve X11 'ProcessEvents()' with some code from the equivalent glib version
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 9735ca1c13)
4 months ago
Michele Calgaro d7d6cb2151
Explicitly add 'ExcludeTimers' to 'ProcessEvent' enum
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 5e8114b6f0)
4 months ago
Michele Calgaro 5e1b310560
Do not check for expired TQt timers in 'gsourcePrepare' and 'gsourceCheck'
since timers are only activated by the main GUI thread in 'gsourceDispatch'.
This solves issue TDE/tdebase#635.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 6da60fd237)
4 months ago
Michele Calgaro 331b0cabe6
Update readme to reflect the change from TQt3 to TQt
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 1ae98bbe4d)
4 months ago
Slávek Banko 68744b0c87
Add missing templates for translations.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 893de4302d)
5 months ago
Slávek Banko 308e9a463b
Merge translation files from master branch.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
6 months ago
Michele Calgaro cc42c3a8ea
Fix usage of condition variable in TQThread which could lead to a thread being run multiple times in parallel.
Although highly unlikely, the following situation was possible:
- a thread is restarted while still running. The call to the second 'start()' blocks because the thread is still running
- the OS decides to randomly wake up the thread that called 'start()'
- a second thread is started and runs in parallel to the first thread, with obvious undefined behavior

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 3143d2d40a)
6 months ago
Michele Calgaro 67cb0f6762
Fix editing of text containing surrogate characters.
This relates to issue #162.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 9c648bea9b)
8 months ago
Michele Calgaro fd79f0c8b0
Extend work on supporting surrogate characters done in commit e0a38072
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 486aa07930)
8 months ago
Michele Calgaro 7f62b55432 Drop support for discontinued DGUX
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 46f42bcd5a)
8 months ago
Michele Calgaro b645372503
Add support for surrogate pairs to TQChar API.
This relates to issue #162.
The new code is partially taken from Qt4 but with some local rework.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit c5cda03125)
8 months ago
Michele Calgaro c919740e87
Fix FTBFS with gcc 15. This resolves issue #214
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit d517cda6bd)
8 months ago
Michele Calgaro b559abe722 Add support for Unicode surrogate characters and planes above zero.
If the selected font supports the required characters, the text will be displayed correctly.
If the selected font does not support such characters, empty boxes will be displayed in place of the expected text.

Part of the code changes comes from Qt4 code.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit e0a38072cf)
9 months ago
Michele Calgaro 1c9111b379 Drop code for obsolete FreeType 1
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit ccd304b2a6)
9 months ago
Michele Calgaro c147c9001b
Remove support for Tru64, OSF and SCO v3.2
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 2b0ea37581)
9 months ago
Michele Calgaro 10cded644d Remove support for discontinued Reliant/Sinix unix
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 792e93f6e9)
9 months ago
Michele Calgaro 840945161b Remove support for Metrowerks compiler
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 37293565c3)
9 months ago
Michele Calgaro b3f74bb12a Drop Borland compiler specific code
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 69e1261df6)
9 months ago
Michele Calgaro 64d2e7533f
Rename Q_EXPORT to TQ_EXPORT
Manually cherry picked from commit 01d46198

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
9 months ago
Michele Calgaro 094cadcfcb
Remove unnecessary files
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 7eccd2d016)
9 months ago
Slávek Banko 0752cff40b
Merge translation files from master branch.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
12 months ago
Michele Calgaro c9932b7c1a
Make sure to release thread resources back to the OS once the thread completes.
Threads created with pthread are created in detach mode. Threads created using glib thread functions are instead created as joinable. The fix makes glib-created threads detached, so that the thread resources are released when the thread completes.

This resolves TDE/amarok#30 and will benefit any place where a TQThread is used.

Manually cherry-picked from commit 81288cfc.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
1 year ago
Michele Calgaro 24032974c6
Fix fallover case for TQEvent::MetaCall
Manually cherry-picked from commit 24b42848.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
1 year ago
Michele Calgaro b6eef6a49e
Fix possible SEGV if the sender object list was null and thread support enabled
Commit manually cherry-picked from 8e653076.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
1 year ago
Michele Calgaro 08ac5cce69
Improve handling of the global post event list in order to minimize possible crashes on exit.
Key points:
1. a TQPostEventList can now have an associated mutex, which is used in case of the global post event list (GPEL)
2. the lifetime of the GPEL is no longer associated to the lifetime of the TQApplication object, but rather extended to the lifetime of the main thread. The GPEL is a static local initialized on first access and destroyed when the global static object destructor is invoked
3. access to the GPEL after the TQApplication object has been destroyed has been minimized by protecting calls in ~TQObject() and ~TQWidget().
4. special care was taken not to affect performances or unnecessarily create tons of unused TQMutexes

This replaces PR #182. Technically it is still possibly unsafe due to the order of destruction of the globat static objects not being guaranteed across multiple compilation units, but the aforementioned changes should minimize (possible to zero) the chances of a SEGV happening.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit ddce1c91f8)
1 year ago
ormorph 09d080c07c
Added check for tqApp pointer in TQWidget destructor
Necessary for the application to shut down properly

Signed-off-by: ormorph <roma251078@mail.ru>
(cherry picked from commit c55ef27a2c)
1 year ago
Michele Calgaro e06dfea32c
Fix OpenType language definition tags and array access. This resolves issue #171
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 14c414378d)
1 year ago
OBATA Akio b634a4f66f
Fix a missing `if` clause guard
It was mismatched with indents and sibling `if` clause cases.

Signed-off-by: OBATA Akio <obache@wizdas.com>
(cherry picked from commit 729c01ffb2)
1 year ago
OBATA Akio cd45e22a58
Fix to compare thread_id with `pthread_equal()`
`pthread_t` is an opaque type, should not be compared with `==`.

Signed-off-by: OBATA Akio <obache@wizdas.com>
(cherry picked from commit 9ae164eb83)
1 year ago
Nik Reist 03ef2cdd33
Remove commercial site content and documentation
trolltech domain is no longer valid.

Signed-off-by: Nik Reist <nik.reist@murena.io>
(cherry picked from commit 168dd9b0c5)
1 year ago
Michele Calgaro 8141b881e3
Correctly release glib mainloop and gsource, to avoid memory leaks
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 08a71c8f8d)
1 year ago
Slávek Banko 73c9765982
Merge translation files from master branch.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
1 year ago
Michele Calgaro 57465e08e9
Prevent creation of text codecs when the application is shutting down. This resolves issue #142
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 7563c4825f)
2 years ago
Alexander Golubev b44105403d
TQTextEdit: remove one of two readOnly flags
There were two flags for read-only with different capitalization:
readonly and readOnly. This was probably a mistake.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit 9c5ea5617a)
2 years ago
Alexander Golubev bca1fe4e8f
TQTextEdit: add missing mightStartDrag initialization
mightStartDrag might have been used uninitialized when moving mouse with
pressed mouse button into window.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit 2b1c78cb53)
2 years ago
Alexander Golubev a097a55f62
Improve TQFont-related cleanup
Improve TQFont cleanup making sure that all instances of TQFont are
destroyed before TQApplication (or specifically before disconnect from
X11). This gets reed of several valgrind complains about leaks deep
inside fontconfig.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit 1b951e5229)
2 years ago
Alexander Golubev f2504a8f49
Improve TQFont-related cleanup
Improve TQFont cleanup making sure that all instances of TQFont are
destroyed before TQApplication (or specifically before disconnect from
X11). This gets reed of several valgrind complains about leaks deep
inside fontconfig.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit ffbaaf0e1c)
2 years ago
Alexander Golubev b000ed6ad6
TQFileDialog: cleanup pixmaps before destroying TQApplication
Otherwise it results in small memmory leakage on exit of Xlib data.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit fb0d62eec8)
2 years ago
Alexander Golubev 32f9784928
examples/canvas: fix some memory leaks
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit ee63474739)
2 years ago
Alexander Golubev 4ab92f6b79
TQPrintDialog: cleanup data requested from libcups
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit c2c385eef2)
2 years ago
Alexander Golubev 41c8fa0f9d
inputmethods/xim: fix incorrect fontset ref counting
- rename fontsetRefCount -> fontsetCacheRefCount
- move fontsetCacheRefCount to constructor as setHolderWidget() could be
  called more than once

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit e1bb179fde)
2 years ago
Alexander Golubev bb6797db1f
TQPrinterPrivate: add virtual destructor.
As derivative from it e.g. TQPrinterUnixPrivate are getting deleted (e.g
in unix TQPrinter implementation) by a reference to base class.

Also added missing include to the header.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit 5920542e9e)
2 years ago
Alexander Golubev ba56610030
Zero unused data fields in XClientMessageEvent struct
valgrind was complaining about access to uninitialized data because
unused elements in client_message.data.l array weren't set o any value.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit 8a13d9aef4)
2 years ago
Alexander Golubev 323382b189
Fix TQThreadStorage destruction in the main thread
Before that the allocations of TQThreadStorage objects from the main
thread were never destroyed and memory associated with them were never
freed. The second one isn't a huge problem as at that point program is
terminating anyway (but it still makes valgrind complain). The first one
is the bigger issue as destructors might contain some essential external
cleanups like removing temporary files.

Also make `TQApplication::guiThread()` return `0` when the thread is
destroyed (may happen on the program exiting during destruction of
statics).

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit b1e6f38464)
2 years ago
Alexander Golubev 336e61b230
Fix TQString::sprintf() not calling va_end() in case of bad cformat
Also rearrange code a bit so it would be obvious that the function
doesn't return a dangling reference.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
(cherry picked from commit bcda401191)
2 years ago