Commit Graph

96 Commits

Author SHA1 Message Date
wmayer
8457037f17 clang: fix -Wdeprecated-declarations 2023-03-12 15:05:21 +01:00
Abdullah Tahiri
c604d1741d Console/ILogger: Refactor and extension
=======================================

Refactor:
 - Substitute the use of variadic templates with parameter packs.
 - Use recently incorporated external library "fmt" to handle printf like formating.
 - Extensive cleaning of pragmas and unnecessary forward declarations.
 - Parameter packs and libfmt provide a much stronger type checking now, so
   conversions that are by standard implicit as bool to int need an explicit static_cast
   to avoid compilation warnings.

Extension:
 - Include a notifier field, so that the originator of the message can be provided. E.g. Document#DocumentObject
 - Include a new type of message called CriticalMessage, this message is intended to have
   special behaviour in the future. Namely, it will be used to notify forward compatilibity issues.
   It will be used to substitute the current signal/slot mechanism.
 - Include two new types of messages for user notifications (Notification and TranslatedNotification). This messages
   will be use to convey UI notifications intended for the user (such as non-intrusive message about the usage of a tool). There
   are two versions to mark whether the string provided as a message is already translated or not. When using the console system for
   notifications, these notifications may originate from the App or the Gui. In the former, it is generally the case that the strings
   of messages are not (yet) translated (but they can be marked with QT_TRANSLATE_NOOP). In the latter, often the messages to be provided
   are already translated.

Python support for CriticalMessage, Notification and TranslatedNofification, including shortcuts:

    Crt = FreeCAD.Console.PrintCritical
    Ntf = FreeCAD.Console.PrintNotification
    Tnf = FreeCAD.Console.PrintTranslatedNotification
2023-03-07 16:13:23 +01:00
Uwe
9869a2c3d7 [Build] output point release version
- to Splashscreen, About, MainWindow and Console
2022-12-05 00:26:43 +01:00
berniev
d2e5a12190 change ALL_UPPER_CASE constexpr definitions to camelCase 2022-11-19 16:00:36 +01:00
Chris Hennes
7d4bb806ad GUI: Remove references to MS Shell DLG2 font 2022-11-08 17:54:59 +01:00
wmayer
5c02a7c0e8 Gui: use braced-init-list to create LibraryInfo objects 2022-11-06 21:11:15 +01:00
wmayer
0c7c427b7e + fix build failure if SMESH support is disabled 2022-11-06 20:23:13 +01:00
wmayer
06922ae093 Gui: [skip ci] fix several warnings reported by GH Actions 2022-11-06 13:07:34 +01:00
Uwe
d20d97d6c5 [Gui] SplashScreen: modernize Qt connection
- was reported as warning by our CI
2022-11-06 12:50:23 +01:00
Uwe
f3c0cfbd59 output SMESH version number in about dialog
- in order to get this info when user reports bugs
2022-11-05 17:46:34 +01:00
wmayer
d4f53c2412 Qt: replace deprecated methods of QMessageBox 2022-11-03 09:54:00 +01:00
wmayer
af0a014cf2 Qt6 port:
* QApplication::setFallbackSessionManagementEnabled has been removed
* QString::medRef() has been removed. Use QString::mid() again.
* QTextStream::setCodec has been removed
* Use operator QVariant of the QFont class to make code Qt5 and Qt6 compatible
* Signature of QTreeWidget::mimeData() has changed in Qt6. Remove TreeWidget::mimeData() because it doesn't change the implementation
* QLayout::setMargin() is deprecated in Qt5 and has been removed in Qt6. Use QLayout::setContentsMargins()
* QDateTime::toTime_t() is deprecated in Qt5 and has been removed in Qt6. Use QDateTime::toSecsSinceEpoch()
* QDesktopWidget is deprecated in Qt5 and has been removed in Qt6. Use QScreen
2022-11-01 16:55:40 +01:00
wmayer
807fa281a8 Core: replace QRegExp with QRegularExpression 2022-10-06 13:54:20 +02:00
berniev
75acacd1b7 Gui: Use auto and range-based for (#7481)
* On lines where the variable type is obvious from inspection, avoid repeating the type using auto. 
* When possible use a ranged for loop instead of begin() and end() iterators
2022-09-14 13:25:13 -05:00
berniev
0c70d45c83 Gui: Use override etc 2 2022-08-09 12:43:23 +02:00
wmayer
36a6f9e2fc Fix several clazy issue:
* Use multi-arg instead [-Wclazy-qstring-arg]
* Use an empty QLatin1String instead of an empty QStringLiteral [-Wclazy-empty-qstringliteral]
* getter Gui::ProgressBar::canAbort possibly mismarked as a slot [-Wclazy-const-signal-or-slot]
* Missing emit keyword on signal call [-Wclazy-incorrect-emit]
2022-07-24 20:07:04 +02:00
Chris Hennes
47bb1408da GUI: Add Vtk info to copied About data 2022-06-07 12:51:51 -05:00
Chris Hennes
307cb3cda8 Gui: Check for Snap and add details to About 2022-05-30 13:19:02 -05:00
Chris Hennes
4f9eb9ebce Gui: Compile CONTRIBUTORS into Qt resources 2022-04-27 10:25:53 -05:00
Uwe
690e3240eb [Gui] remove misleading button from About Dialog
- the help button in the title bar had no function but I remember people asked in the forum what it does. Since we don't use it, remove it
2022-03-31 04:15:28 +02:00
0penBrain
6eafd18030 Gui: Add dual info about FC + OS locale in full information
+ clean some horrible old code
2022-03-29 10:26:49 +02:00
wmayer
96adb98f46 Gui: modernize C++11
* use nullptr
2022-03-23 18:41:21 +01:00
Uwe
95eadf6c09 [Doc] update weblinks
- link Freetype license
2022-03-21 17:59:49 +01:00
Uwe
21a31c0984 [Gui] Splashscreen: remove unused includes 2022-03-17 00:23:20 +01:00
wmayer
7a68a950e5 Gui: [skip ci] remove text 2022-03-08 12:54:46 +01:00
Chris Hennes
974bb02c4d GUI: Clean up copy of addon list 2022-02-28 15:26:01 -06:00
Uwe
1e314b0165 [Gui] improvements for PCH builds 2022-02-19 06:38:45 +01:00
Chris Hennes
8f1c5ae76d Gui: Add Mod info to copied About string 2022-02-16 12:08:17 +01:00
wmayer
09da245af9 App: harmonize API of App::Application
* make getHomePath() static and return a std::string
* make getExecutableName() static and return a std::string
2021-11-04 10:50:09 +01:00
donovaly
67ebeeaad0 [Doc] update weblink to Coin3D
* Coin3D is no loner available via bitbucket, therefore update the new dead links
* change a weblink so that it is the same in all our code
2021-10-09 19:24:15 +02:00
wmayer
5b755c20b5 Gui: set UTF-8 encoding when reading file with contributors 2021-04-04 11:04:23 +02:00
Chris Hennes
c039217af1 Allow different splash and about image 2021-04-03 22:36:28 +02:00
Chris Hennes
50c7ee36bf [GUI] Remove code for Qt < 5.9 2021-04-02 10:10:37 +02:00
Chris Hennes
1f62d46661 Minor refactoring and cleanup of the About window
Removes old Qt code, restores the conditional inclusion of the
3Dconnexion license information, shortens the displayed hash, and links
the hash to its repo.
2021-03-28 16:12:27 +02:00
wmayer
300ab23600 Gui: [skip ci] show or hide splash image depending on screen size 2021-03-08 19:03:59 +01:00
wmayer
b14394c7e7 Gui: [skip ci] do not allow image size in About dialog to occupy more than 25% of the screen size 2021-03-08 12:55:45 +01:00
Chris Hennes
4610e26110 [GUI] Tweak wording and translatability of Credits 2021-03-03 17:18:56 +01:00
Chris Hennes
f5cc3027f4 [GUI] Refactor About to list credits from a file
The Credits tab is now generated from a CONTRIBUTORS file. The file is
expected to list one contributor per line, with individuals first,
followed by a line with the word "Firms" on it, followed by firms (again
one per line). The formatting is currently a simple <ul> for each set of
names. No sorting, etc. is performed.
2021-03-03 11:03:43 +01:00
Chris Hennes
d8e523978c [GUI] Add window decorations to About 2021-03-03 10:56:11 +01:00
Chris Hennes
c9366cd96b Switch to removeTab() to support older Qt versions 2021-03-02 18:49:13 +01:00
Chris Hennes
73f4b9b4db [GUI] Implement license tab that obeys stylesheet
The original License tab used a hard-coded HTML element created in Qt
Designer, which adds style tags to all HTML elements. This commit
replaces that tab with a dynamically-created tab which loads an included
LICENSE.html file at runtime. That file contains no style information,
so obeys the style information provided by the current stylesheet. If
that resource file is not available at runtime, the old license tab is
retained and displayed.
2021-03-02 18:49:13 +01:00
wmayer
083f57116d Gui: [skip ci] for the author label use the same font configuration as with the rich text as otherwise the text appears very tiny 2021-03-02 17:23:41 +01:00
Chris Hennes
6be901557e Add library versions to LibraryVersions.h 2021-02-28 20:45:34 -06:00
luz paz
298c677873 Gui: Fix header uniformity, whitespace, and doxygen fixes 2020-11-26 10:14:56 +01:00
wmayer
2057e151d8 Qt5: fix deprecation warnings for Qt 5.15
+ QByteArray::append is deprecated
+ QPixmap* QLabel::pixmap() is deprecated
+ overloaded version of QString::split is deprecated
+ QSysInfo::windowsVersion()/QSysInfo::MacVersion() is deprecated
2020-10-18 14:45:31 +02:00
wmayer
ef0fd3ca67 Qt5: 'endl' manipulator is deprecated with 5.15. Replace it with newlines. 2020-10-15 15:22:28 +02:00
vejmarie
81af54e410 Big update to remove deprecation warning from Qt 5.15.0
That is need on MacOS build as travis log is bigger than 50k lines
which breaks travis rules
And by the way deprecations are real
All file contains the same modification replace 0 to Qt::WindowFlags() when needed
as the class needs to be instantiated

Signed-off-by: vejmarie <jmverdun3@gmail.com>
2020-09-24 12:56:43 +02:00
wmayer
eced0cb568 Qt5: QDesktopWidget is deprecated use QScreen [-Wdeprecated-declarations] 2020-06-12 17:51:33 +02:00
triplus
b368c14a0d Add collection tab to About FreeCAD 2020-03-09 20:45:10 +01:00
wmayer
867f22d3c8 fix regressions in SplashObserver::SendLog and ReportOutput::SendLog 2019-10-20 13:41:10 +02:00