Commit Graph

53 Commits

Author SHA1 Message Date
Chris Hennes
5f623390fb Merge pull request #20142 from bofdahof/ranges
Apply C++20 std::ranges (mainly to std::find)
2025-03-17 03:08:27 -05:00
bofdahof
e5b06ae736 Gui: apply std::ranges 2025-03-16 17:15:14 -05:00
Andrea
da66720d3a REMOVE old QT<= 5.14 code
Ubuntu 22.04  use qt 1.15.3.
In the code is still used qt code <5.10.
A cleanup was done by removing qT code version used in ubuntu 18.04.
2025-03-05 09:32:06 +01:00
Benjamin Bræstrup Sayoc
f647d4a1eb Gui: Use QStringLiteral 2025-02-10 18:34:57 +01:00
tritao
8aa50c4380 Gui: Reorganize the dialog files into a top Dialogs folder. 2025-01-24 16:28:02 -06:00
Snow Faerie
8bc062b6e8 Fix and add menu accelerators (#15532)
* Fix and add menu accelerators: menus common to all workbenches

I use menu accelerators fairly often, so I find it very frustrating when
they are missing, or worse, they don't work due to the same letter being
assigned to several commands.

This patch adds accelerators to lots of menu entries missing them and
fixes broken accelerators.

Wherever possible, standard accelerator keys are used:
https://doc.qt.io/qt-5/accelerators.html

This commit covers accelerator fixes that are common to all workbenches.
Accelerator fixes for specific workbenches will be done in separate
commits.

* Add missing accelerators: Spreadsheet workbench
2024-12-13 10:39:30 -06:00
wmayer
4c6de459dc Core: Write a log message instead of warning when locking a file fails 2024-11-01 16:10:51 +01:00
wmayer
c6f083b3e7 Core: Add wrapper function Application::applicationPid() 2024-11-01 15:48:01 +01:00
wmayer
7820ca7f73 Core: Don't freeze application if lock file already exists 2024-11-01 15:02:22 +01:00
Johannes Wüller
0e24e121eb Fix backwards-compatible Qt6 warnings 2024-05-13 11:39:24 -05:00
wmayer
c016f1c1fb Gui: modernize C++: use equals default 2023-08-20 18:12:43 +02:00
wmayer
d150fa7164 modernize C++: avoid bind
In many cases std::bind() is kept because the code is much simpler
2023-08-08 21:10:16 +02:00
wmayer
457fac38dd Gui: fix -Wclazy-connect-by-name 2023-04-05 00:44:13 +02:00
wmayer
9b29c3a683 Gui: replace slots with member function pointers 2023-02-03 00:21:38 +01:00
wmayer
ec553a9292 Qt6 port:
* Explicitly include some missing headers
* Use 'static const char*' for XPM icon
* Skip template parameters for qMakePair
* Constructor of QFileInfo is marked as 'explicit' now
* QString::fromLatin1() also accepts a QByteArray
* QDateTime::fromTime_t() is deprecated in Qt5 and has been removed in Qt6. Use QDateTime::fromSecsSinceEpoch()
* QDateTime::toTime_t() is deprecated in Qt5 and has been removed in Qt6. Use QDateTime::toSecsSinceEpoch()
* QApplication::globalStrut() is deprecated. Don't use it any more.
* QWidget::isTopLevel() is deprecated, use QWidget::isWindow()
2022-11-02 15:16:41 +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
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
wmayer
ba8d5ab055 Gui: modernize C++: replace 'typedef' with 'using' 2022-08-29 14:09:18 +02:00
wmayer
6ee2c7f865 Fix several clazy issues:
* C++11 range-loop might detach Qt container [-Wclazy-range-loop-detach]
2022-07-24 23:48:37 +02:00
wmayer
c7c43fcf4b Core: fix minor issues:
+ fix issues found by clang's clazy tool
+ fix cppcoreguidelines-pro-type-member-init
  * Make sure that all class members are initialized in the constructor
2022-06-30 16:31:16 +02:00
wmayer
28c269cc5f Gui: improve German translation 2022-06-09 12:15:29 +02:00
Uwe
c4f5628899 [Gui] So headers: remove unused includes
- also sort out some headers to be used in precompiled headers
- also move a boost header to precompiled headers
2022-03-16 02:01:32 +01:00
wmayer
1ca7429705 Gui: Optimize includes to reduce compile time 2022-03-07 20:29:18 +01:00
Uwe
5f9020b09a [Gui] Document and Download: remove unused includes 2022-03-04 04:37:36 +01:00
Uwe
1e314b0165 [Gui] improvements for PCH builds 2022-02-19 06:38:45 +01:00
0penBrain
8d2bd97588 [Gui] Decrease click number on recovery transient deletion
If 'cleanup' is choosen, recovery dialog is automatically close after deletion

 User can "Don't show again" on the 'operation finished' message box
2022-02-03 08:05:48 +01:00
wmayer
a178cc15f2 Gui: boost 1.76 provides an overloaded version of file_lock that accepts a wchar_t string 2021-12-19 21:24:17 +01:00
Mark O'Donovan
770c7f6330 Replace deprecated qt functions toList() & toSet() (#5213)
* Replace deprecated qt functions toList() & toSet()

QSet<QString>::toList() and QStringList::toSet() are both
deprecated.

* Add back support for qt < 5.14
2021-12-01 04:31:34 +01:00
wmayer
ed03e8ded5 Gui: allow to configure the checks of the cache directory 2021-11-16 15:37:04 +01:00
wmayer
973642285e Gui: periodically check cache directory and offer a way to clean it up if it exceeds the limit 2021-11-15 22:53:41 +01:00
wmayer
d5726bd7af App: standard path handling
* distinguish between temp and cache location
* document's transident directory is created in the cache location
* add functions to access temp and cache location via Python
2021-11-15 16:26:25 +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
wmayer
a5411da5b9 Gui: code-refactoring of document recovery handling to reduce code duplication 2021-10-21 21:45:52 +02:00
Chris Hennes
50c7ee36bf [GUI] Remove code for Qt < 5.9 2021-04-02 10:10:37 +02:00
wmayer
ef0fd3ca67 Qt5: 'endl' manipulator is deprecated with 5.15. Replace it with newlines. 2020-10-15 15:22:28 +02:00
wmayer
77dc31d9a0 Gui: [skip ci] fix warning when opening recovery dialog in debug mode 2020-08-13 14:21:55 +02:00
wmayer
d26aafa833 Coverity: Argument cannot be negative (actually a bug by using the wrong index variable) 2020-07-20 17:34:24 +02:00
luz.paz
76a77e4f88 [skip ci] Fix typos
Found via 
```
codespell -q 3 -L aci,ake,aline,alle,alledges,alocation,als,ang,anid,ba,beginn,behaviour,bloaded,byteorder,calculater,cancelled,cancelling,cas,cascade,centimetre,childs,colour,colours,commen,connexion,currenty,dof,doubleclick,dum,eiter,elemente,ende,feld,finde,findf,freez,hist,iff,indicies,initialisation,initialise,initialised,initialises,initialisiert,ist,kilometre,lod,mantatory,methode,metres,millimetre,modell,nd,noe,normale,normaly,nto,numer,oder,orgin,orginx,orginy,ot,pard,pres,programm,que,recurrance,rougly,seperator,serie,sinc,strack,substraction,te,thist,thru,tread,uint,unter,vertexes,wallthickness,whitespaces -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller,./src/Doc/FreeCAD.uml
```
2020-03-24 11:14:24 +01:00
wmayer
436153807f fixes #0004281: Close Documant Recovery [skip ci] 2020-03-12 12:12:52 +01:00
wmayer
412590848b Gui: [skip ci] improve whitespaces 2020-03-12 11:59:58 +01:00
wmayer
b50b21576e core system
force strict ISO C++ (-Wpedantic)
TODO: still a lot of variadic macros are not valid ISO C++
2019-09-18 01:01:14 +02:00
Zheng, Lei
ce30645b39 Fix typos pathes -> paths 2019-08-17 15:32:49 +02:00
Zheng, Lei
8227103ceb Gui: AutoSaver and recovery changes
* Fix AutoSaver inconsistent BinaryBrep setting

* Use temperary name when auto saving, so that it won't overwrite the
  original file, which may cause corruption when crashing in the middel
  of auto saving, especially if auto saving in a separate thread.

* Support auto recovery document containing external links

* Do not mark success after auto recover, in case the program crash
  again before the user remember to save the just recovered file. Only
  mark when user saves the document.
2019-08-17 14:52:11 +02:00
Mateusz Skowroński
082647b2d1 Remove unused non-trivial variables. [-Wclazy-unused-non-trivial-variable] Thanks Clazy! 2019-02-11 15:39:15 +01:00
luz.paz
e1446a0b99 [WIP] Crowdin: fixes pre-0.18 release
Includes some whitespace fixes as well
2019-01-30 11:08:03 -02:00
wmayer
57e71e5d55 port C++ code to Qt5 2016-12-13 14:22:59 +01:00
wmayer
afa37847b5 remove Application::runPythonCode 2016-09-15 23:14:31 +02:00
wmayer
a69ee20f0c + fix warning of unused variable
+ when clearing scene graph then also empty internal lists
+ whitespace changes
2016-03-22 19:25:38 +01:00
wmayer
5393196c0e + add clean-up function to recovery dialog 2016-03-21 17:56:18 +01:00
wmayer
848f9c4d46 + implement file based auto-save & recovery mechanism 2015-09-19 01:13:33 +02:00