Skip to content

Commit

Permalink
* osgeo4w: build pdbs for releases
Browse files Browse the repository at this point in the history
* disable copying of reports without feedback
  • Loading branch information
jef-n committed Aug 18, 2018
1 parent 5d5d909 commit 1192f94
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 10 deletions.
10 changes: 9 additions & 1 deletion ms-windows/osgeo4w/package.cmd
Expand Up @@ -150,7 +150,10 @@ cmake -G "%CMAKEGEN%" ^
-D WITH_GLOBE=FALSE ^
-D WITH_ORACLE=TRUE ^
-D WITH_CUSTOM_WIDGETS=TRUE ^
-D CMAKE_CXX_FLAGS_RELEASE="/MD /MP /O2 /Ob2 /D NDEBUG" ^
-D CMAKE_CXX_FLAGS_RELEASE="/MD /Zi /MP /O2 /Ob2 /D NDEBUG" ^
-D CMAKE_SHARED_LINKER_FLAGS_RELEASE="/INCREMENTAL:NO /DEBUG /OPT:REF /OPT:ICF" ^
-D CMAKE_MODULE_LINKER_FLAGS_RELEASE="/INCREMENTAL:NO /DEBUG /OPT:REF /OPT:ICF" ^
-D CMAKE_PDB_OUTPUT_DIRECTORY_RELEASE=%BUILDDIR%\apps\%PACKAGENAME%\pdb ^
-D CMAKE_BUILD_TYPE=%BUILDCONF% ^
-D CMAKE_CONFIGURATION_TYPES=%BUILDCONF% ^
-D GEOS_LIBRARY=%O4W_ROOT%/lib/geos_c.lib ^
Expand Down Expand Up @@ -407,6 +410,11 @@ if not exist %ARCH%\release\qgis\%PACKAGENAME% mkdir %ARCH%\release\qgis\%PACKAG
"etc/preremove/%PACKAGENAME%.bat"
if errorlevel 1 (echo tar desktop failed & goto error)

if not exist %ARCH%\release\qgis\%PACKAGENAME%-pdb mkdir %ARCH%\release\qgis\%PACKAGENAME%-pdb
%TAR% -C %BUILDDIR% -cjf %ARCH%/release/qgis/%PACKAGENAME%-pdb/%PACKAGENAME%-pdb-%VERSION%-%PACKAGE%.tar.bz2 ^
apps/%PACKAGENAME%/pdb
if errorlevel 1 (echo tar failed & goto error)

%TAR% -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%-grass-plugin-common/%PACKAGENAME%-grass-plugin-common-%VERSION%-%PACKAGE%.tar.bz2 ^
--exclude-from exclude ^
--exclude "*.pyc" ^
Expand Down
16 changes: 7 additions & 9 deletions src/app/qgisapp.cpp
Expand Up @@ -12950,9 +12950,6 @@ void QgisApp::keyReleaseEvent( QKeyEvent *event )

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

Expand All @@ -12961,12 +12958,6 @@ void QgisApp::keyPressEvent( QKeyEvent *e )
{
stopRendering();
}
#if defined(_MSC_VER) && defined(QGISDEBUG)
else if ( e->key() == Qt::Key_Backslash && e->modifiers() & Qt::ControlModifier )
{
abort();
}
#endif
else
{
e->ignore();
Expand Down Expand Up @@ -14154,3 +14145,10 @@ void QgisApp::populateProjectStorageMenu( QMenu *menu, bool saving )
}
}
}

void QgisApp::triggerCrashHandler()
{
#ifdef Q_OS_WIN
RaiseException( 0x12345678, 0, 0, nullptr );
#endif
}
6 changes: 6 additions & 0 deletions src/app/qgisapp.h
Expand Up @@ -998,6 +998,12 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow

void setMapTipsDelay( int timerInterval );

/**
* Abort application triggering the crash handler
* \since QGIS 3.4
*/
void triggerCrashHandler();

protected:

//! Handle state changes (WindowTitleChange)
Expand Down
6 changes: 6 additions & 0 deletions src/crashhandler/qgscrashdialog.cpp
Expand Up @@ -30,6 +30,7 @@ QgsCrashDialog::QgsCrashDialog( QWidget *parent )
mCrashMessage->setText( tr( "Sorry. It looks something unexpected happened that we didn't handle and QGIS crashed." ) );
connect( mReloadQGISButton, &QPushButton::clicked, this, &QgsCrashDialog::reloadQGIS );
connect( mCopyReportButton, &QPushButton::clicked, this, &QgsCrashDialog::createBugReport );
mCopyReportButton->setEnabled( false );

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

void QgsCrashDialog::on_mUserFeedbackText_textChanged()
{
mCopyReportButton->setEnabled( !mUserFeedbackText->toPlainText().isEmpty() );
}

void QgsCrashDialog::createBugReport()
{
QClipboard *clipboard = QApplication::clipboard();
Expand Down
1 change: 1 addition & 0 deletions src/crashhandler/qgscrashdialog.h
Expand Up @@ -46,6 +46,7 @@ class QgsCrashDialog : public QDialog, private Ui::QgsCrashDialog
void showReportWidget();
void createBugReport();
void reloadQGIS();
void on_mUserFeedbackText_textChanged();

private:
QString mReportData;
Expand Down

0 comments on commit 1192f94

Please sign in to comment.