mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-09-27 12:34:14 +02:00
Compare commits
10 Commits
3394c1246c
...
83fb525e27
| Author | SHA1 | Date | |
|---|---|---|---|
| 83fb525e27 | |||
| d1808c7a89 | |||
| 4e4f029d2d | |||
| 242f134e0f | |||
| 2dc88df29c | |||
| fd8135264f | |||
| 827cd2a91e | |||
| cdd25189b5 | |||
| f1313f5895 | |||
| 75fafd5acc |
+3
-1
@@ -113,7 +113,9 @@ if(Backtrace_FOUND)
|
||||
include_directories(${Backtrace_INCLUDE_DIRS})
|
||||
add_compile_definitions(QET_CRASH_BACKTRACE)
|
||||
else()
|
||||
message(STATUS "backtrace() not available: crash dumps will carry the log ring without a backtrace")
|
||||
message(STATUS
|
||||
"backtrace() not available: crash dumps will carry the log ring "
|
||||
"without a backtrace")
|
||||
endif()
|
||||
|
||||
find_package(SQLite3 REQUIRED)
|
||||
|
||||
+16
@@ -271,6 +271,22 @@ mkdir build && cd build
|
||||
cmake .. -G Ninja -DBUILD_WITH_KF=OFF -DCMAKE_BUILD_TYPE=Release
|
||||
cmake --build .
|
||||
```
|
||||
|
||||
If `libbacktrace` is installed in your MSYS2 environment, pass the following
|
||||
cached CMake variables when configuring. They are only necessary in that
|
||||
case, because `FindBacktrace` needs them to locate the library:
|
||||
|
||||
```sh
|
||||
cmake .. -G Ninja -DBUILD_WITH_KF=OFF -DCMAKE_BUILD_TYPE=Release \
|
||||
-DBacktrace_INCLUDE_DIR=/c/msys64/clang64/include \
|
||||
-DBacktrace_LIBRARY=/c/msys64/clang64/lib/libbacktrace.a
|
||||
```
|
||||
|
||||
`Backtrace_INCLUDE_DIR` must point to the directory containing `backtrace.h`,
|
||||
and `Backtrace_LIBRARY` to the `libbacktrace.a` file. The paths above are the
|
||||
usual locations for the MSYS2 `clang64` environment; adjust them if your
|
||||
installation uses a different prefix.
|
||||
|
||||
(KF6 isn't packaged in MSYS2 either, hence `-DBUILD_WITH_KF=OFF` again.)
|
||||
|
||||
Using the Qt Online Installer's bundled MinGW kit instead: point
|
||||
|
||||
@@ -31,12 +31,14 @@ PaletteGraphicsView::PaletteGraphicsView(QWidget *parent) :
|
||||
QGraphicsView(parent)
|
||||
{
|
||||
qApp->installEventFilter(this);
|
||||
setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
|
||||
}
|
||||
|
||||
PaletteGraphicsView::PaletteGraphicsView(QGraphicsScene *scene, QWidget *parent) :
|
||||
QGraphicsView(scene, parent)
|
||||
{
|
||||
qApp->installEventFilter(this);
|
||||
setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
|
||||
listenToScene(scene);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,6 +39,18 @@ class QPainter;
|
||||
listens to changed() on every scene it is given, which makes the scene
|
||||
clear the flag before it emits. Set the scene through this class, not
|
||||
through a QGraphicsView pointer.
|
||||
|
||||
The constructor also forces QGraphicsView::FullViewportUpdate in place
|
||||
of the default MinimalViewportUpdate. #954 shipped with the default
|
||||
kept, and moving an item then left conductor-shaped ghosts behind on
|
||||
both a light and a dark palette, so the cause is shared code, not
|
||||
paintInverted(): most likely listening to changed() at all, above,
|
||||
changes which of QGraphicsScene's two update paths a view is on, and
|
||||
MinimalViewportUpdate's job of turning the scene's reported dirty
|
||||
rects into the smallest correct viewport region is where that would
|
||||
show up first. FullViewportUpdate removes the need to get that region
|
||||
right by repainting the whole viewport on every update; the class's
|
||||
own benchmark already shows that cost is small next to a frame budget.
|
||||
*/
|
||||
class PaletteGraphicsView : public QGraphicsView
|
||||
{
|
||||
|
||||
@@ -157,7 +157,12 @@ add_test(NAME tst_crashhandler COMMAND tst_crashhandler)
|
||||
target_include_directories(tst_crashhandler PRIVATE ${QET_DIR}/sources)
|
||||
# Qt::Xml because crashhandler.cpp includes qetversion.h for the header it
|
||||
# builds at install() time, and that pulls in QDomElement.
|
||||
target_link_libraries(tst_crashhandler PRIVATE Qt::Test Qt::Xml ${Backtrace_LIBRARIES})
|
||||
if(Backtrace_FOUND)
|
||||
target_link_libraries(tst_crashhandler PRIVATE
|
||||
Qt::Test Qt::Xml ${Backtrace_LIBRARIES})
|
||||
else()
|
||||
target_link_libraries(tst_crashhandler PRIVATE Qt::Test Qt::Xml)
|
||||
endif()
|
||||
|
||||
# The crash-dump bookkeeping from #905: which dumps get listed, offered and
|
||||
# deleted, and what redact() masks. qetlogger.cpp needs exactly one symbol
|
||||
@@ -176,7 +181,12 @@ target_include_directories(tst_crashdumps PRIVATE
|
||||
${QET_DIR}/sources
|
||||
${QET_DIR}/sources/NameList
|
||||
${QET_DIR}/pugixml/src)
|
||||
target_link_libraries(tst_crashdumps PRIVATE Qt::Test Qt::Widgets Qt::Xml ${Backtrace_LIBRARIES})
|
||||
if(Backtrace_FOUND)
|
||||
target_link_libraries(tst_crashdumps PRIVATE
|
||||
Qt::Test Qt::Widgets Qt::Xml ${Backtrace_LIBRARIES})
|
||||
else()
|
||||
target_link_libraries(tst_crashdumps PRIVATE Qt::Test Qt::Widgets Qt::Xml)
|
||||
endif()
|
||||
|
||||
add_executable(
|
||||
tst_menubarkeyboard
|
||||
|
||||
@@ -100,7 +100,9 @@ void tst_CrashHandler::formatsTheHandledSignals()
|
||||
{
|
||||
QCOMPARE(format(SIGSEGV), QByteArray::number(SIGSEGV));
|
||||
QCOMPARE(format(SIGABRT), QByteArray::number(SIGABRT));
|
||||
#if defined(SIGBUS)
|
||||
QCOMPARE(format(SIGBUS), QByteArray::number(SIGBUS));
|
||||
#endif
|
||||
QCOMPARE(format(SIGFPE), QByteArray::number(SIGFPE));
|
||||
QCOMPARE(format(SIGILL), QByteArray::number(SIGILL));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user