Commit Graph

316 Commits (feat/delete-screen-intersect)

Author SHA1 Message Date
Alexander Golubev 1fd5897bf1 Remove dubious screen intersection check
On a non-xinerama (user-side) configuration it is straight up wrong, as
in such case each screen's coordinates start at 0:0. Which makes the
apps on the smaller screen assume incorrect screen size.

And on a xinerama config it is incorrect as well as it results in access
past allocated data in rects and screen arrays.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
2 years ago
Alexander Golubev fb0d62eec8 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>
2 years ago
Alexander Golubev c2c385eef2 TQPrintDialog: cleanup data requested from libcups
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
2 years ago
Alexander Golubev 5920542e9e 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>
2 years ago
Alexander Golubev 8a13d9aef4 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>
2 years ago
Alexander Golubev 1938504ea0 Zero padding bytes in DndReceiverProp struct.
This removes valgrind's complains about accessing uninitialized memory.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
2 years ago
Alexander Golubev b1e6f38464 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>
2 years ago
Alexander Golubev bcda401191 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>
2 years ago
Alexander Golubev 87129eac9a Add explicit declaration TQChar&TQCharRef default constructor/destructor
This suppresses -Wdeprecated-copy warning.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
2 years ago
Alexander Golubev b930cec601 Resort includes in ntqt.h
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
2 years ago
Alexander Golubev 4100c9e29f Fix compilation with -no-thread
Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
2 years ago
Alexander Golubev fad4acbe08 Fix compilation with -disable-inputmethod and -no-inputmethod
As for now here are two sets of inputmethod options:
- -enable-inputmethod/disable-inputmethod - which seems to supposed to
  control whether build the 'inputmethod' module or not
- -inputmethod/-no-inputmethod - which seems to supposed to
  enable/disable inputmethod support without changing the ABI.

Before the patch both -disable-inputmethod and -no-inputmethod were just
breaking the build: -no-inputmethod were disabling some code with
support for the module, but didn't disabled the module build itself nor
build of plugins. -disable-inputmethod were disabling build of plugins
and module, but didn't disabled code depending upon it.

It seems the inputmethod support were still WIP when the last release of
Qt3 came to be, hence the mess.

This patch fixes the build if both -disable-inputmethod AND
-no-inputmethod are supplied. Disabling only one is not enough due to
tqmake/configure have problems handling two different options of the
same name.  Later the -inputmethod/-no-inputmethod should be probably
removed entirely.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
2 years ago
Alexander Golubev beb37238fa Fix FTBFS with -no-xkb
The analogue of XkbKeycodeToKeysym() used to be XKeycodeToKeysym(), but
it was deprecated in favour of XGetKeyboardMapping() method.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
2 years ago
Alexander Golubev 2f15a471f9 Fix FTBFS with -no-stl
On modern compilers placement new requires inclusion of <new>

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
2 years ago
Alexander Golubev 34587584ab avoid translating the /qt/XIMInputStyle options when saving into config
Also use "On The Spot" as the default when the setting in the config is
incorrect.

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
2 years ago
Alexander Golubev 3cba79c7f5 Fix FTBFS with -qt-sql-sqlite3
Fix FTBFS when sqlite3 sql driver is being built into the library

Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
2 years ago
Michele Calgaro 77697cb46c
Remove original Q_WS_* defines
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
2 years ago
Michele Calgaro 1d318a47b0
Replace QT_STATIC_CONST_* with actual definitions
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
2 years ago
Michele Calgaro 67bff2edca
Replace Q_WS_* defines with TQ_WS_* equivalents
This is the first part of the replacement process.
Usage of Q_WS_* has been replaced with the equivalent TQ_WS_*.
Definition of Q_WS_* has been mirrored into TQ_WS_* defines, to allow
TDE code to continue building till replacement is carried over to all
other modules.
Once that is completed, the original Q_WS_* defines will
be removed.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
2 years ago
Michele Calgaro fb401a891f
Rename METHOD, SIGNAL, SLOT to TQ_METHOD, TQ_SIGNAL, TQ_SLOT
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
2 years ago
Slávek Banko a9d178f100
Fix potential buffer overflow in debug functions.
This resolves issue #70.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
2 years ago
Mavridis Philippe aec0061106
Add support for HistoryBackButton and HistoryForwardButton
This resolves TDE/tdebase#421.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
2 years ago
Michele Calgaro b35e0845dc
Replace QObject, QWidget, QImage, QPair, QRgb, QColor, QChar, QString, QIODevice with TQ* version
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
2 years ago
Michele Calgaro 1ba13366a7
Replace Q_EXPORT_*/Q_EXTERN defines with TQ_EXPORT_*/TQ_EXTERN
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
2 years ago
Michele Calgaro 926102a455
Replace various Q_* and QT_* defines with TQ_* and TQT_*
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
2 years ago
Michele Calgaro f2b3ea52ef
Drop compatibility code for TQSignal
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
2 years ago
Michele Calgaro fb6884ead2
Drop compatibility code for TQPalette
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
2 years ago
Michele Calgaro c3bb88817b
Drop compatibility code for TQButton
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
2 years ago
Michele Calgaro 9492e618a7
Drop compatibility code for TQThread
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
2 years ago
Michele Calgaro 979f5621d7
Drop compatibility code for TQLineEdit
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
2 years ago
Michele Calgaro 83991febd2
Remove Qt4 related stuff
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
2 years ago
Michele Calgaro 48ea22d00b
Drop compatibility code for TQToolButton
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
2 years ago
Michele Calgaro b1bfbe79f3
Drop compat headers
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
2 years ago
Michele Calgaro 7c116f3bf7
Drop attic Qt2 classes (TQtMultiLineEdit and TQtTableView)
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
2 years ago
Michele Calgaro bfd62a0bbf
Drop Qt2's TQSemiModal and TQSortedList classes
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
2 years ago
Denis Kozadaev 47f034c129 SunOS res_ninit() requires a clean structure
Signed-off-by: Denis Kozadaev <denis@dilos.org>

init structure without condition

Signed-off-by: Denis Kozadaev <denis@dilos.org>
2 years ago
Michele Calgaro fb1f3d6445
Revert "Add single TQObject root parent for all guarded pointers."
Commit b167d09c was functionally incorrect and is causing issues on
selected distributions.
This reverts commit b167d09c43.
This resolves issue TDE/tde#128.
2 years ago
Michele Calgaro a75445b4c3
Drop Qt2 obsolete classes
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
2 years ago
Bobby Bingham 0b3c8dfbc9
Enable use of pthread's recursive mutexes
Signed-off-by: Bobby Bingham <koorogi@koorogi.info>
2 years ago
Bobby Bingham 999cebcb5d
Fix level when using pthreads recursive mutex
When using the pthreads recursive mutex, the level method was only able
to return either zero or one, but a recursive mutex can be locked more
than once.

Additionally, the way this detected if the mutex was already locked was
to test whether it can be locked again. If testing from the thread that
is currently holding the lock, this locking attempt always succeeds, and
therefore determines that the lock is _not_ held at all. This is
especially bad, as this operation only makes sense to perform from the
thread that holds the lock -- if any thread not holding the lock queries
the number of times the lock is held, that answer can change before the
thread can used it.

Signed-off-by: Bobby Bingham <koorogi@koorogi.info>
2 years ago
Michele Calgaro b167d09c43
Add single TQObject root parent for all guarded pointers.
This helps keeping the object root list shorter, speeding up operations
which require lot of TQObject trees. This relates to TDE/tdebase#309.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
3 years ago
Michele Calgaro ec04b50a44
Rename ENABLE_QSTYLECONTROLELEMENTDATA_SLOW_COPY in ENABLE_TQSTYLECONTROLELEMENTDATA_SLOW_COPY
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
3 years ago
Mavridis Philippe 12c9e70bad SGI style: enable complex widget rendering
Was commented out for no obvious reason

This resolves issue #64.

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
3 years ago
Slávek Banko aec367ef28
Use empty d->cString for TQString::shared_null instead of null string.
This restores consistency for the behavior of methods TQString::utf8()
and TQString::local8Bit() with null TQStrings.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
4 years ago
Slávek Banko e919ffc1ec
Avoid changes of d->cString for TQString::shared_null to make the value reliable.
This precedes unnecessary allocations, potential use after free and crashes.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
4 years ago
Michele Calgaro cde9d7e942
Removed QT_NON_COMMERCIAL check and related code.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
4 years ago
OBATA Akio 7e4fc64d69 tools: fix to use `pthread_t` for Thread ID
Thread ID is opaque type pthread_t, it may not be compatible with integer,
and may integer with valid id `0`.
Change to store mutex owner thread ID as `pthread_t` type with valid flag
and compare with `pthread_equal()`,

and don't try to print it.

Signed-off-by: OBATA Akio <obache@wizdas.com>
4 years ago
gregory guy 43d7bc96c7
Remove deprecated glib2 function calls g_thread_get_initialized(), g_thread_init() and g_thread_create().
Signed-off-by: gregory guy <gregory-tde@laposte.net>
4 years ago
Ray-V 2fbf9ffbc6
Add unicode points so that upper() and lower() functions work for:
- latin letter sharp s
 - latin letter glottal stop
 - greek lunate sigma symbol
 - greek letter san

Signed-off-by: Ray-V <ray-v@inbox.lv>
5 years ago
Slávek Banko ce03d78623
Return TQT_NO_WORKSPACE setting, according to TQT_MODULE_WORKSPACE,
unwantedly removed in commit a41a034902.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
5 years ago