Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Qt >= 6.5.1 crasher, re-enable disk cache #4463

Merged
merged 2 commits into from
Jul 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,6 @@ int main( int argc, char **argv )
return 0;
}

#if QT_VERSION >= QT_VERSION_CHECK( 6, 5, 1 )
// Avoids systematic crash after first launch, a regression in Qt >= 6.5.1
qputenv( "QML_DISABLE_DISK_CACHE", "1" );
#endif

initGraphics();

// Read settings, use a dummy app to get access to QSettings
Expand Down
2 changes: 2 additions & 0 deletions src/core/projectinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ ProjectInfo::ProjectInfo( QObject *parent )
: QObject( parent )
{
mSaveExtentTimer.setSingleShot( true );
mSaveRotationTimer.setSingleShot( true );
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@m-kuhn , found this issue while dissecting why Qt6 builds were showing some brief pauses every ~1sec when dragging the canvas. Turns out we were running these timers at infinity once triggered. That's... terrible! 😱

mSaveTemporalStateTimer.setSingleShot( true );
connect( &mSaveExtentTimer, &QTimer::timeout, this, &ProjectInfo::saveExtent );
connect( &mSaveRotationTimer, &QTimer::timeout, this, &ProjectInfo::saveRotation );
connect( &mSaveTemporalStateTimer, &QTimer::timeout, this, &ProjectInfo::saveTemporalState );
Expand Down
3 changes: 1 addition & 2 deletions src/qml/OverlayFeatureFormDrawer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import org.qfield 1.0
Drawer {
id: overlayFeatureFormDrawer

property alias featureModel: overlayFeatureForm.featureModel
property alias featureModel: attributeFormModel.featureModel
property alias state: overlayFeatureForm.state
property alias featureForm: overlayFeatureForm
property alias digitizingToolbar: overlayFeatureForm.digitizingToolbar
Expand Down Expand Up @@ -77,7 +77,6 @@ Drawer {
topMargin: overlayFeatureFormDrawer.y == 0 ? mainWindow.sceneTopMargin : 0.0
bottomMargin: mainWindow.sceneBottomMargin

property alias featureModel: attributeFormModel.featureModel
property bool isSaved: false

digitizingToolbar: overlayFeatureFormDrawer.digitizingToolbar
Expand Down
Loading