Commit graph

744 commits

Author SHA1 Message Date
Ivailo Monev
fa51ecdfaf kdecore: remove unused KAboutData methods and redundant constructor arguments
the homepage and the bugs email address shall always be defined in
kglobalsettings header for official Katana applications, libraries, etc.
the option to override them is still a thing

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-10 17:41:54 +03:00
Ivailo Monev
bd063c8b56 generic: remove dead and irrelevant links references
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-10 14:26:19 +03:00
Ivailo Monev
be9d8967f7 kdeui: remove redundant KGlobalSettings::desktopGeometry() methods
QDesktopWidget is Xinerama aware and it can be disabled because I
implemented option for that, see the following commit in the Katie repo:
b7e4bae65f0cae7f3029b98980f638c077ecfc22

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-09 03:58:14 +03:00
Ivailo Monev
a2101eec56 kdeui: remove invalid KIconLoader resource directory
considered - nothing installs icons in such directory

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-09 03:08:36 +03:00
Ivailo Monev
5c61e288e5 kdeui: remove unused kiamgeframe source and header files
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-08 18:32:25 +03:00
Ivailo Monev
65bedeae01 kdeui: return a single format type from KImageIO::typeForMime() and add mode argument for it
because it returns only one (definitive) format type using QStringList as
return type makes no sense, also a mode argument is very much required to
return correct result - not all image format plugins support writing

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-08 17:57:18 +03:00
Ivailo Monev
0c2a65b0e9 kdeui: focus the first KNewPasswordDialog password widget on initialization
much like KPasswordDialog which does a lot of focus tricks depending on
its flags and which widgets are to be shown

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-08 16:11:09 +03:00
Ivailo Monev
1da5e17b82 kdeui: replace tab with spaces in KXMLGUIFactoryPrivate::saveDefaultActionProperties()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-06 06:16:53 +03:00
Ivailo Monev
a31aa23230 kdeui: rename variable for consistency
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-04 13:04:48 +03:00
Ivailo Monev
fc7f5206d2 kdeui: minor KCrash documentation review
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-04 11:54:44 +03:00
Ivailo Monev
0f7d9f8ea3 kdecore: setup KCrash to log to the system log, update its documentation
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-04 11:51:35 +03:00
Ivailo Monev
6bf6169caf kdecore: return QByteArray from kBacktrace()
to avoid conversion from QString to QByteArray when possible, the trace is
handled as array of latin1-encoded strings anyway

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-04 08:14:53 +03:00
Ivailo Monev
2647be1ab2 kdeui: KCrash rewrite
a crashed program trying to restart itself is very unreliable,
especially program that uses KUniqueApplication instance. so, instead
all the information about the crash shall be written to a file on the
disk (in the temporary directory) and read by external kcrash KDED
module that will report the crash (possibily even upload the crash
details somewhere) and restart the program as necessarry.

this also opens up possibility for per-application configuration for
things such as the automatic restart feature but that shall be done by the
kcrash KDED module instead (parsing a config from a crashed program is
not a good idea)

KCrash::NoRestart will be unused but kept for future expansion

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-03 11:21:41 +03:00
Ivailo Monev
358840b6a1 kdeui: remove unused QSessionManager header inclusion
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-03 07:30:35 +03:00
Ivailo Monev
9642bc3d81 kdeui: handle zero time as special case in KTimeEdit and better min/max
the plasma frame applet for example uses zero time (QTime(0, 0, 0), not
invalid time) as a special for case for "never" (i.e. don't update) so
having this feature will make KTimeEdit even more suitable for timers (that
ofcourse has to be handled by the application or library, zero time timers
are a thing)

also min/max now allows to set lower seconds (for example) when the minute
is not zero instead of just restricting the seconds value to a hard-minumum
altough that makes me think a step feature may be needed (e.g. to now allow
intervals less than two seconds with minimum of one second)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-03 05:58:23 +03:00
Ivailo Monev
643efdc576 kdeui: remove forward-declaration of non-existing KDoubleLine class
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-02 23:11:20 +03:00
Ivailo Monev
4de3537a82 kdeui: new KTimeEdit widget
inspired by QTimeEdit but ment for timers

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-02 13:14:24 +03:00
Ivailo Monev
b323e4a95d kdeui: remove forward-declaration of now non-existing KCalendarWidgetPrivate class
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-08-02 12:19:10 +03:00
Ivailo Monev
7d088288c2 kdeui: remove redundant X11 atoms creation from KApplicationPrivate::init()
XdndDrop is already created by QApplication for internal purposes,
KDE_DESKTOP_WINDOW is a bogus one

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-31 08:32:37 +00:00
Ivailo Monev
899f789b07 kdecore: move KToolInvocation to kdeui
to get rid of the KApplication signal which is a hack really

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-31 08:09:02 +00:00
Ivailo Monev
925c7571ce kdeui: remove duplicate qevent header inclusion in khistorycombobox source file
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-30 06:52:52 +03:00
Ivailo Monev
601193748c kdeui: show only a label from KSwitchLanguageDialog when translations are not installed
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-30 06:47:58 +03:00
Ivailo Monev
00b7fdfe54 kdeui: remove unused INCLUDE_MENUITEM_DEF definition
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-30 06:28:52 +03:00
Ivailo Monev
a9e778cc6d kdeui: update note in KCalendarWidget::changeEvent()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-29 08:10:04 +03:00
Ivailo Monev
eebedd4c76 kdeui: send locale and language change events from KGlobalSettings
the signals come from the locale KCM however applications, libraries and
widgets handling of such changes is mixed - some do it on
QEvent::LocaleChange, some on QEvent::LanguageChange, some when the
KGlobalSettings signal is send so sending the events will make sure that
locale changes take effect immediatly (when and wherethe event is watched
for ofcourse, KCalendarWidget does it for one)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-29 07:55:01 +03:00
Ivailo Monev
8da6fa7558 kdeui: preserve the translations order in KSwitchLanguageDialog
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-28 11:53:06 +03:00
Ivailo Monev
b8c4f73865 kdeui: implement KSwitchLanguageDialog
note that it does not change the locale language (yet), nor does is affect
it. it changes the translation language(s) - two different things!

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-28 11:16:27 +03:00
Ivailo Monev
b7e54f8e21 kdeui: stub KSwitchLanguageDialog
to be rewritten. date, time, days, etc. translation and conversion work
like a charm tho (when translated and supported by the locale classes
ofcourse):
https://ibb.co/hcW0dL3

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-28 00:40:39 +03:00
Ivailo Monev
1a45508306 kdecore: reimplement KLocale
by using QLocale in KLocale and separating the date, time and numbers
conversion from translation KLocale actually gets extended locale
support from QLocale (which uses CLDR data v43 currently). translation
remains unaffected. for comparison here is the result of two function
calls the result of which should explain the whole change:
KLocale::allLanguagesList().size() = 669
KLocale::installedLanguages().size() = 68

the first number is locales Katie supports, the second being the
number of languages Katana is translated into

KSwitchLanguageDialog needs a rewrite but that is on the TODO

also copyrighting KCatalog to me because I rewrote it, for reference:
881b47b8ea

KCalendarSystem gets the middle finger - batteries not included for date
and time. extra calendar systems can, but are unlikely to be, supported
in the future

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-26 23:50:18 +03:00
Ivailo Monev
6d3811054d kdeui: adapt KCalendarWidget to locale and language changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-23 12:02:13 +03:00
Ivailo Monev
3c697cf8ce kdeui: implement setter and getter for KCalendarWidget to use a specifiec KCalendarSystem
maybe temporary tho but for now the minimum and maximum date will be that
of the KCalendarSystem

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-23 11:29:06 +03:00
Ivailo Monev
8f8865db62 kdeui: do not warn from setupCalendarWidget() if the system locale name is "C"
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-23 08:21:55 +03:00
Ivailo Monev
6c2c0efda8 kdeui: remove unused klocale header inclusion in kcalendarwidget header
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-23 06:20:32 +03:00
Ivailo Monev
061a11fd43 kdeui: replace KDatePicker/KDateTable with new KCalendarWidget class
interestingly QLocale is not used for many things but that is about to
change, Katie uses it a lot internally (e.g. for QDateTime formatting
and such) so instead of bolting a calendar system on top of KLocale
perhaps a QLocale wrapped around in KLocale will fit the general idea
of using QLocale in widgets when necessary (as does QCalendarWidget).

that however means no way to specify a calendar system (in general,
other than changing the widgets locale itself) but the QDateTime and
related classes are tied to gregorian calendar already - the system
time itself carries no information about the calendar and any
conversions from one calendar to another are basically made up stuff
(there is the time zone thing ofcourse but that is not a calendar)

another interesting thing to note is that KLocale was written such that
it is read-write - changing the date formats for example is possible
because there are public KLocale methods for that.

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-23 06:16:56 +03:00
Ivailo Monev
e84a04fa67 kdeui: remove forward-declaration of now non-existing KTimeZones class
replaced with KTimeZoneList

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-23 02:50:53 +03:00
Ivailo Monev
000c8af989 kdeui: remove unused date and time related widget classes
some of the classes date back to 2001 and 2002, still unused

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-23 02:48:22 +03:00
Ivailo Monev
f2f37377e3 kdecore: reimplement KTimeZone
simpler, cleaner and most importantly - thread-safe (more than the
previous implementation anyway).

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-22 03:53:20 +03:00
Ivailo Monev
f452e2e50b kdecore: reimplement KDateTime via QDateTime
KDateTime shall be used only for storing date and time while KLocale
shall be used to display such, not even going to test what KDateTime
does because it is basically a few methods on top of QDateTime now.

and because QDateTime knows not much about calendar systems while
KLocale supports several it makes sense for KDateTime to not be used for
displaying date and time thus the TODOs for KLocale are simply removed

note that KLocale still uses its own parser and formatter which means
that the change affects only KDateTime and its uses, not KLocale

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-21 07:51:13 +03:00
Ivailo Monev
b5844bda01 kdeui: KColorDialog::KColorDialogPrivate::setHtmlEdit() optimization
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-17 05:45:54 +03:00
Ivailo Monev
a7654dc3db kdeui: remove redundant _KDE_NET_WM_FRAME_STRUT atom and checks for it
see the following commit in kde-workspace:
0417ee37990d43a20d1c1ce05aeb213d2c1866f6

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-16 21:18:18 +03:00
Ivailo Monev
7c2e6741b6 kdeui: remove redundant Q_WS_X11 guard
KStartupInfo is not declared only when Q_WS_X11 is defined, altough it
works only on X11

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-13 19:14:02 +03:00
Ivailo Monev
abbf3f3930 kdeui: call KUniqueApplication::newInstance() on the interface when already running
so it was not called when "nofork" option was passed? hmm..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-13 19:10:45 +03:00
Ivailo Monev
1bd5eb7d08 kdeui: remove duplicate header inclusion
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-13 18:18:35 +03:00
Ivailo Monev
e583beafbf kdeui: format and indent
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-13 18:10:23 +03:00
Ivailo Monev
cd8ab8d93e kdeui: do not fork from KUniqueApplication
simplifies startup notification for example, external applications that
pass the "nofork" argument may fail (not uncommon to be passed to
konsole)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-13 17:32:37 +03:00
Ivailo Monev
0e56bc6115 kdeui: remove unused KApplicationPrivate member
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-13 16:48:12 +03:00
Ivailo Monev
982f2446bb kdeui: remove unused clipboard synchronizer
disabled by default, the KGlobaSettings signal is not emitted by
anything either

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-13 06:44:40 +03:00
Ivailo Monev
4b134fbb77 kdeui: remove krichtexteditor application
manual test..

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-13 06:32:20 +03:00
Ivailo Monev
94199903d9 kdeui: remove unused KBreadcrumbSelectionModel, KCheckableProxyModel and KIdentityProxyModel classes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-13 06:11:22 +03:00
Ivailo Monev
4ed10bdd76 kdeui: do not change the KDialog size on details widget visibility change
because the details widget may be shown, the dialog manually resized and
when the details widget is hidden the manually set size gets overriden -
the dialog size should remain the same after manual resize!

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
2023-07-12 20:47:47 +03:00