Skip to content

Commit 1192f94

Browse files
committed
* osgeo4w: build pdbs for releases
* disable copying of reports without feedback
1 parent 5d5d909 commit 1192f94

File tree

5 files changed

+29
-10
lines changed

5 files changed

+29
-10
lines changed

ms-windows/osgeo4w/package.cmd

+9-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,10 @@ cmake -G "%CMAKEGEN%" ^
150150
-D WITH_GLOBE=FALSE ^
151151
-D WITH_ORACLE=TRUE ^
152152
-D WITH_CUSTOM_WIDGETS=TRUE ^
153-
-D CMAKE_CXX_FLAGS_RELEASE="/MD /MP /O2 /Ob2 /D NDEBUG" ^
153+
-D CMAKE_CXX_FLAGS_RELEASE="/MD /Zi /MP /O2 /Ob2 /D NDEBUG" ^
154+
-D CMAKE_SHARED_LINKER_FLAGS_RELEASE="/INCREMENTAL:NO /DEBUG /OPT:REF /OPT:ICF" ^
155+
-D CMAKE_MODULE_LINKER_FLAGS_RELEASE="/INCREMENTAL:NO /DEBUG /OPT:REF /OPT:ICF" ^
156+
-D CMAKE_PDB_OUTPUT_DIRECTORY_RELEASE=%BUILDDIR%\apps\%PACKAGENAME%\pdb ^
154157
-D CMAKE_BUILD_TYPE=%BUILDCONF% ^
155158
-D CMAKE_CONFIGURATION_TYPES=%BUILDCONF% ^
156159
-D GEOS_LIBRARY=%O4W_ROOT%/lib/geos_c.lib ^
@@ -407,6 +410,11 @@ if not exist %ARCH%\release\qgis\%PACKAGENAME% mkdir %ARCH%\release\qgis\%PACKAG
407410
"etc/preremove/%PACKAGENAME%.bat"
408411
if errorlevel 1 (echo tar desktop failed & goto error)
409412

413+
if not exist %ARCH%\release\qgis\%PACKAGENAME%-pdb mkdir %ARCH%\release\qgis\%PACKAGENAME%-pdb
414+
%TAR% -C %BUILDDIR% -cjf %ARCH%/release/qgis/%PACKAGENAME%-pdb/%PACKAGENAME%-pdb-%VERSION%-%PACKAGE%.tar.bz2 ^
415+
apps/%PACKAGENAME%/pdb
416+
if errorlevel 1 (echo tar failed & goto error)
417+
410418
%TAR% -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%-grass-plugin-common/%PACKAGENAME%-grass-plugin-common-%VERSION%-%PACKAGE%.tar.bz2 ^
411419
--exclude-from exclude ^
412420
--exclude "*.pyc" ^

src/app/qgisapp.cpp

+7-9
Original file line numberDiff line numberDiff line change
@@ -12950,9 +12950,6 @@ void QgisApp::keyReleaseEvent( QKeyEvent *event )
1295012950

1295112951
void QgisApp::keyPressEvent( QKeyEvent *e )
1295212952
{
12953-
// The following statement causes a crash on WIN32 and should be
12954-
// enclosed in an #ifdef QGISDEBUG if its really necessary. Its
12955-
// commented out for now. [gsherman]
1295612953
// QgsDebugMsg( QString( "%1 (keypress received)" ).arg( e->text() ) );
1295712954
emit keyPressed( e );
1295812955

@@ -12961,12 +12958,6 @@ void QgisApp::keyPressEvent( QKeyEvent *e )
1296112958
{
1296212959
stopRendering();
1296312960
}
12964-
#if defined(_MSC_VER) && defined(QGISDEBUG)
12965-
else if ( e->key() == Qt::Key_Backslash && e->modifiers() & Qt::ControlModifier )
12966-
{
12967-
abort();
12968-
}
12969-
#endif
1297012961
else
1297112962
{
1297212963
e->ignore();
@@ -14154,3 +14145,10 @@ void QgisApp::populateProjectStorageMenu( QMenu *menu, bool saving )
1415414145
}
1415514146
}
1415614147
}
14148+
14149+
void QgisApp::triggerCrashHandler()
14150+
{
14151+
#ifdef Q_OS_WIN
14152+
RaiseException( 0x12345678, 0, 0, nullptr );
14153+
#endif
14154+
}

src/app/qgisapp.h

+6
Original file line numberDiff line numberDiff line change
@@ -998,6 +998,12 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
998998

999999
void setMapTipsDelay( int timerInterval );
10001000

1001+
/**
1002+
* Abort application triggering the crash handler
1003+
* \since QGIS 3.4
1004+
*/
1005+
void triggerCrashHandler();
1006+
10011007
protected:
10021008

10031009
//! Handle state changes (WindowTitleChange)

src/crashhandler/qgscrashdialog.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ QgsCrashDialog::QgsCrashDialog( QWidget *parent )
3030
mCrashMessage->setText( tr( "Sorry. It looks something unexpected happened that we didn't handle and QGIS crashed." ) );
3131
connect( mReloadQGISButton, &QPushButton::clicked, this, &QgsCrashDialog::reloadQGIS );
3232
connect( mCopyReportButton, &QPushButton::clicked, this, &QgsCrashDialog::createBugReport );
33+
mCopyReportButton->setEnabled( false );
3334

3435
mHelpLabel->setText( tr( "Keen to help us fix bugs? "
3536
"<a href=\"http://qgis.org/en/site/getinvolved/development/bugreporting.html#bugs-features-and-issues\">Follow the steps to help our developers.</a>"
@@ -56,6 +57,11 @@ void QgsCrashDialog::showReportWidget()
5657
{
5758
}
5859

60+
void QgsCrashDialog::on_mUserFeedbackText_textChanged()
61+
{
62+
mCopyReportButton->setEnabled( !mUserFeedbackText->toPlainText().isEmpty() );
63+
}
64+
5965
void QgsCrashDialog::createBugReport()
6066
{
6167
QClipboard *clipboard = QApplication::clipboard();

src/crashhandler/qgscrashdialog.h

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class QgsCrashDialog : public QDialog, private Ui::QgsCrashDialog
4646
void showReportWidget();
4747
void createBugReport();
4848
void reloadQGIS();
49+
void on_mUserFeedbackText_textChanged();
4950

5051
private:
5152
QString mReportData;

0 commit comments

Comments
 (0)