Skip to content

Commit f8d8395

Browse files
committedNov 23, 2017
Fix indentation
1 parent 07e4c57 commit f8d8395

File tree

6 files changed

+191
-190
lines changed

6 files changed

+191
-190
lines changed
 

‎src/app/qgscrashhandler.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class APP_EXPORT QgsCrashHandler
3131
{
3232

3333
public:
34+
3435
/**
3536
* This class doesn't need to be created by anyone as is only used to handle
3637
* crashes in the application.

‎src/app/qgsdxfexportdialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,12 +609,12 @@ bool QgsDxfExportDialog::layerTitleAsName() const
609609

610610
bool QgsDxfExportDialog::force2d() const
611611
{
612-
return mForce2d->isChecked();
612+
return mForce2d->isChecked();
613613
}
614614

615615
bool QgsDxfExportDialog::useMText() const
616616
{
617-
return mMTextCheckBox->isChecked();
617+
return mMTextCheckBox->isChecked();
618618
}
619619

620620
void QgsDxfExportDialog::saveSettings()

‎src/app/qgsdxfexportdialog.h

100755100644
File mode changed.

‎src/crashhandler/CMakeLists.txt

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
INCLUDE_DIRECTORIES(SYSTEM
2-
${CMAKE_CURRENT_BINARY_DIR}
3-
)
4-
5-
QT5_WRAP_UI(CRASH_UIS_H qgscrashdialog.ui)
6-
QT5_WRAP_CPP(CRASH_HDR_MOC qgscrashdialog.h)
7-
8-
SET(IMAGE_RCCS ../../images/images.qrc)
9-
QT5_ADD_RESOURCES(IMAGE_RCC_SRCS ${IMAGE_RCCS})
10-
11-
# -wd4091 Avoid 'typedef' ignored on left of '' when no variable is declared warning in DbgHelp.h
12-
SET_SOURCE_FILES_PROPERTIES(qgsstacktrace.cpp PROPERTIES COMPILE_FLAGS -wd4091)
13-
14-
ADD_EXECUTABLE(qgiscrashhandler WIN32
15-
main.cpp
16-
${CRASH_UIS_H}
17-
${CRASH_HDR_MOC}
18-
${IMAGE_RCC_SRCS}
19-
qgscrashdialog.cpp
20-
qgsstacktrace.cpp
21-
qgscrashreport.cpp
22-
${CMAKE_CURRENT_SOURCE_DIR}/../app/qgis_win32.rc
23-
)
24-
25-
TARGET_LINK_LIBRARIES(qgiscrashhandler
26-
${QT_QTCORE_LIBRARY}
27-
${QT_QTGUI_LIBRARY}
28-
DbgHelp
29-
)
30-
31-
INSTALL(CODE "MESSAGE(\"Installing crashhandler ...\")")
32-
INSTALL(TARGETS qgiscrashhandler RUNTIME DESTINATION ${QGIS_LIBEXEC_DIR})
1+
INCLUDE_DIRECTORIES(SYSTEM
2+
${CMAKE_CURRENT_BINARY_DIR}
3+
)
4+
5+
QT5_WRAP_UI(CRASH_UIS_H qgscrashdialog.ui)
6+
QT5_WRAP_CPP(CRASH_HDR_MOC qgscrashdialog.h)
7+
8+
SET(IMAGE_RCCS ../../images/images.qrc)
9+
QT5_ADD_RESOURCES(IMAGE_RCC_SRCS ${IMAGE_RCCS})
10+
11+
# -wd4091 Avoid 'typedef' ignored on left of '' when no variable is declared warning in DbgHelp.h
12+
SET_SOURCE_FILES_PROPERTIES(qgsstacktrace.cpp PROPERTIES COMPILE_FLAGS -wd4091)
13+
14+
ADD_EXECUTABLE(qgiscrashhandler WIN32
15+
main.cpp
16+
${CRASH_UIS_H}
17+
${CRASH_HDR_MOC}
18+
${IMAGE_RCC_SRCS}
19+
qgscrashdialog.cpp
20+
qgsstacktrace.cpp
21+
qgscrashreport.cpp
22+
${CMAKE_CURRENT_SOURCE_DIR}/../app/qgis_win32.rc
23+
)
24+
25+
TARGET_LINK_LIBRARIES(qgiscrashhandler
26+
${QT_QTCORE_LIBRARY}
27+
${QT_QTGUI_LIBRARY}
28+
DbgHelp
29+
)
30+
31+
INSTALL(CODE "MESSAGE(\"Installing crashhandler ...\")")
32+
INSTALL(TARGETS qgiscrashhandler RUNTIME DESTINATION ${QGIS_LIBEXEC_DIR})

‎src/crashhandler/qgscrashdialog.h

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
1-
/***************************************************************************
2-
qgscrashdialog.h - QgsCrashDialog
3-
4-
---------------------
5-
begin : 11.4.2017
6-
copyright : (C) 2017 by Nathan Woodrow
7-
email : woodrow.nathan@gmail.com
8-
***************************************************************************
9-
* *
10-
* This program is free software; you can redistribute it and/or modify *
11-
* it under the terms of the GNU General Public License as published by *
12-
* the Free Software Foundation; either version 2 of the License, or *
13-
* (at your option) any later version. *
14-
* *
15-
***************************************************************************/
16-
17-
#ifndef QGSCRASHDIALOG_H
18-
#define QGSCRASHDIALOG_H
19-
20-
#include <QDialog>
21-
#include <QFormLayout>
22-
#include <QPlainTextEdit>
23-
#include <QPushButton>
24-
25-
#include "ui_qgscrashdialog.h"
26-
27-
/**
28-
* A dialog to show a nicer crash dialog to the user.
29-
*/
30-
class QgsCrashDialog : public QDialog, private Ui::QgsCrashDialog
31-
{
32-
Q_OBJECT
33-
public:
34-
35-
/**
36-
* A dialog to show a nicer crash dialog to the user.
37-
*/
38-
QgsCrashDialog( QWidget *parent = nullptr );
39-
40-
void setBugReport( const QString &reportData );
41-
void setReloadArgs( const QString &reloadArgs );
42-
43-
static QString htmlToMarkdown( const QString &html );
44-
45-
private slots:
46-
void showReportWidget();
47-
void createBugReport();
48-
void reloadQGIS();
49-
50-
private:
51-
QString mReportData;
52-
QString mReloadArgs;
53-
};
54-
55-
#endif // QGSCRASHDIALOG_H
1+
/***************************************************************************
2+
qgscrashdialog.h - QgsCrashDialog
3+
4+
---------------------
5+
begin : 11.4.2017
6+
copyright : (C) 2017 by Nathan Woodrow
7+
email : woodrow.nathan@gmail.com
8+
***************************************************************************
9+
* *
10+
* This program is free software; you can redistribute it and/or modify *
11+
* it under the terms of the GNU General Public License as published by *
12+
* the Free Software Foundation; either version 2 of the License, or *
13+
* (at your option) any later version. *
14+
* *
15+
***************************************************************************/
16+
17+
#ifndef QGSCRASHDIALOG_H
18+
#define QGSCRASHDIALOG_H
19+
20+
#include <QDialog>
21+
#include <QFormLayout>
22+
#include <QPlainTextEdit>
23+
#include <QPushButton>
24+
25+
#include "ui_qgscrashdialog.h"
26+
27+
/**
28+
* A dialog to show a nicer crash dialog to the user.
29+
*/
30+
class QgsCrashDialog : public QDialog, private Ui::QgsCrashDialog
31+
{
32+
Q_OBJECT
33+
public:
34+
35+
/**
36+
* A dialog to show a nicer crash dialog to the user.
37+
*/
38+
QgsCrashDialog( QWidget *parent = nullptr );
39+
40+
void setBugReport( const QString &reportData );
41+
void setReloadArgs( const QString &reloadArgs );
42+
43+
static QString htmlToMarkdown( const QString &html );
44+
45+
private slots:
46+
void showReportWidget();
47+
void createBugReport();
48+
void reloadQGIS();
49+
50+
private:
51+
QString mReportData;
52+
QString mReloadArgs;
53+
};
54+
55+
#endif // QGSCRASHDIALOG_H

‎src/crashhandler/qgscrashreport.h

Lines changed: 101 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,101 @@
1-
/***************************************************************************
2-
qgscrashreport.h - QgsCrashReport
3-
4-
---------------------
5-
begin : 16.4.2017
6-
copyright : (C) 2017 by Nathan Woodrow
7-
email : woodrow.nathan@gmail.com
8-
***************************************************************************
9-
* *
10-
* This program is free software; you can redistribute it and/or modify *
11-
* it under the terms of the GNU General Public License as published by *
12-
* the Free Software Foundation; either version 2 of the License, or *
13-
* (at your option) any later version. *
14-
* *
15-
***************************************************************************/
16-
#ifndef QGSCRASHREPORT_H
17-
#define QGSCRASHREPORT_H
18-
19-
#include "qgsstacktrace.h"
20-
21-
#include <QObject>
22-
#include <QVector>
23-
24-
25-
/**
26-
* Include information to generate user friendly crash report for QGIS.
27-
*/
28-
class QgsCrashReport
29-
{
30-
public:
31-
32-
/**
33-
* Include information to generate user friendly crash report for QGIS.
34-
*/
35-
QgsCrashReport();
36-
37-
public:
38-
enum Flag
39-
{
40-
Stack = 1 << 0,
41-
Plugins = 1 << 1,
42-
ProjectDetails = 1 << 2,
43-
SystemInfo = 1 << 3,
44-
QgisInfo = 1 << 4,
45-
All = Stack | Plugins | ProjectDetails | SystemInfo | QgisInfo
46-
};
47-
Q_DECLARE_FLAGS( Flags, Flag )
48-
49-
/**
50-
* Sets the stack trace for the crash report.
51-
* \param value A string list for each line in the stack trace.
52-
*/
53-
void setStackTrace( QgsStackTrace *value ) { mStackTrace = value; }
54-
55-
/**
56-
* Returns the stack trace for this report.
57-
* \return A string list for each line in the stack trace.
58-
*/
59-
QgsStackTrace *StackTrace() const { return mStackTrace; }
60-
61-
/**
62-
* Set the flags to mark which features are included in this crash report.
63-
* \param flags The flag for each feature.
64-
*/
65-
void setFlags( QgsCrashReport::Flags flags );
66-
67-
/**
68-
* Returns the include flags that have been set for this report.
69-
* \return The flags marking what details are included in this report.
70-
*/
71-
Flags flags() const { return mFlags; }
72-
73-
const QString toMarkdown();
74-
75-
/**
76-
* Generate a string version of the report.
77-
* \return A formatted string including all the information from the report.
78-
*/
79-
const QString toHtml() const;
80-
81-
/**
82-
* Generates a crash ID for the crash report.
83-
* \return
84-
*/
85-
const QString crashID() const;
86-
87-
void exportToCrashFolder();
88-
89-
QString crashReportFolder();
90-
91-
void setVersionInfo( const QStringList &versionInfo ) { mVersionInfo = versionInfo; }
92-
93-
private:
94-
Flags mFlags;
95-
QgsStackTrace *mStackTrace;
96-
QStringList mVersionInfo;
97-
};
98-
99-
Q_DECLARE_OPERATORS_FOR_FLAGS( QgsCrashReport::Flags )
100-
101-
#endif // QGSCRASHREPORT_H
1+
/***************************************************************************
2+
qgscrashreport.h - QgsCrashReport
3+
4+
---------------------
5+
begin : 16.4.2017
6+
copyright : (C) 2017 by Nathan Woodrow
7+
email : woodrow.nathan@gmail.com
8+
***************************************************************************
9+
* *
10+
* This program is free software; you can redistribute it and/or modify *
11+
* it under the terms of the GNU General Public License as published by *
12+
* the Free Software Foundation; either version 2 of the License, or *
13+
* (at your option) any later version. *
14+
* *
15+
***************************************************************************/
16+
#ifndef QGSCRASHREPORT_H
17+
#define QGSCRASHREPORT_H
18+
19+
#include "qgsstacktrace.h"
20+
21+
#include <QObject>
22+
#include <QVector>
23+
24+
25+
/**
26+
* Include information to generate user friendly crash report for QGIS.
27+
*/
28+
class QgsCrashReport
29+
{
30+
public:
31+
32+
/**
33+
* Include information to generate user friendly crash report for QGIS.
34+
*/
35+
QgsCrashReport();
36+
37+
public:
38+
enum Flag
39+
{
40+
Stack = 1 << 0,
41+
Plugins = 1 << 1,
42+
ProjectDetails = 1 << 2,
43+
SystemInfo = 1 << 3,
44+
QgisInfo = 1 << 4,
45+
All = Stack | Plugins | ProjectDetails | SystemInfo | QgisInfo
46+
};
47+
Q_DECLARE_FLAGS( Flags, Flag )
48+
49+
/**
50+
* Sets the stack trace for the crash report.
51+
* \param value A string list for each line in the stack trace.
52+
*/
53+
void setStackTrace( QgsStackTrace *value ) { mStackTrace = value; }
54+
55+
/**
56+
* Returns the stack trace for this report.
57+
* \return A string list for each line in the stack trace.
58+
*/
59+
QgsStackTrace *StackTrace() const { return mStackTrace; }
60+
61+
/**
62+
* Set the flags to mark which features are included in this crash report.
63+
* \param flags The flag for each feature.
64+
*/
65+
void setFlags( QgsCrashReport::Flags flags );
66+
67+
/**
68+
* Returns the include flags that have been set for this report.
69+
* \return The flags marking what details are included in this report.
70+
*/
71+
Flags flags() const { return mFlags; }
72+
73+
const QString toMarkdown();
74+
75+
/**
76+
* Generate a string version of the report.
77+
* \return A formatted string including all the information from the report.
78+
*/
79+
const QString toHtml() const;
80+
81+
/**
82+
* Generates a crash ID for the crash report.
83+
* \return
84+
*/
85+
const QString crashID() const;
86+
87+
void exportToCrashFolder();
88+
89+
QString crashReportFolder();
90+
91+
void setVersionInfo( const QStringList &versionInfo ) { mVersionInfo = versionInfo; }
92+
93+
private:
94+
Flags mFlags;
95+
QgsStackTrace *mStackTrace;
96+
QStringList mVersionInfo;
97+
};
98+
99+
Q_DECLARE_OPERATORS_FOR_FLAGS( QgsCrashReport::Flags )
100+
101+
#endif // QGSCRASHREPORT_H

0 commit comments

Comments
 (0)
Please sign in to comment.