diff --git a/src/audio/base/DspHost.cpp b/src/audio/base/DspHost.cpp index 2f6449c7..af78ae75 100755 --- a/src/audio/base/DspHost.cpp +++ b/src/audio/base/DspHost.cpp @@ -340,7 +340,7 @@ void DspHost::updateConvolver(DspConfig *config) else { ConvolverInfoEventArgs eventArgs; - eventArgs.data = std::list(impulse, impulse + impInfo[1] * sizeof(float)); + // eventArgs.data = std::list(impulse, impulse + impInfo[1] * sizeof(float)); eventArgs.channels = impInfo[0]; eventArgs.frames = impInfo[1]; dispatch(ConvolverInfoChanged, eventArgs); diff --git a/src/interface/dialog/CrashReportDialog.cpp b/src/interface/dialog/CrashReportDialog.cpp new file mode 100644 index 00000000..116881d4 --- /dev/null +++ b/src/interface/dialog/CrashReportDialog.cpp @@ -0,0 +1,19 @@ +#include "CrashReportDialog.h" +#include "ui_CrashReportDialog.h" + +#include +#include + +CrashReportDialog::CrashReportDialog(QWidget *parent) : + QDialog(parent), + ui(new Ui::CrashReportDialog) +{ + ui->setupUi(this); + ui->description->setMinimumHeight(ui->description->fontMetrics().boundingRect( + this->rect(), Qt::TextWordWrap, ui->description->text()).height()); +} + +CrashReportDialog::~CrashReportDialog() +{ + delete ui; +} diff --git a/src/interface/dialog/CrashReportDialog.h b/src/interface/dialog/CrashReportDialog.h new file mode 100644 index 00000000..e36cfe33 --- /dev/null +++ b/src/interface/dialog/CrashReportDialog.h @@ -0,0 +1,22 @@ +#ifndef CRASHREPORTDIALOG_H +#define CRASHREPORTDIALOG_H + +#include + +namespace Ui { +class CrashReportDialog; +} + +class CrashReportDialog : public QDialog +{ + Q_OBJECT + +public: + explicit CrashReportDialog(QWidget *parent = nullptr); + ~CrashReportDialog(); + +private: + Ui::CrashReportDialog *ui; +}; + +#endif // CRASHREPORTDIALOG_H diff --git a/src/interface/dialog/CrashReportDialog.ui b/src/interface/dialog/CrashReportDialog.ui new file mode 100644 index 00000000..75777911 --- /dev/null +++ b/src/interface/dialog/CrashReportDialog.ui @@ -0,0 +1,192 @@ + + + CrashReportDialog + + + Qt::ApplicationModal + + + + 0 + 0 + 400 + 424 + + + + + 0 + 0 + + + + + 400 + 0 + + + + Crash report + + + true + + + + 9 + + + QLayout::SetDefaultConstraint + + + + + + 10 + 75 + true + + + + JamesDSP didn't shutdown properly + + + + + + + + 0 + 0 + + + + + 382 + 68 + + + + <html><head/><body><p>This application ran into an unexpected issue and crashed during the last run.<br>Choose whether you want to continue normally or review troubleshooting options first.</p></body></html> + + + true + + + + + + + + 0 + 0 + + + + + 0 + 50 + + + + false + + + selection-color: rgb(171, 255, 126); +selection-background-color: rgb(185, 255, 139); +background-color: rgb(198, 255, 162); + + + Continue + + + false + + + true + + + Launch audio service and user interface + + + + + + + QFrame::Plain + + + Qt::Horizontal + + + + + + + Submit crash report + + + Send anonymous crash report to the developer + + + + + + + + 0 + 50 + + + + View crash report + + + Open stacktrace and application log + + + + + + + + 0 + 50 + + + + Reset application configuration + + + Presets and similar user data will be preserved + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 0 + + + + + + + + Do not inform about future crashes at startup + + + + + + + + diff --git a/src/main.cpp b/src/main.cpp index 5b3254df..8576d103 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -22,6 +22,8 @@ #include #include +#include + static bool SPIN_ON_CRASH = false; static const char* EXEC_NAME = "jamesdsp"; @@ -46,6 +48,8 @@ void crash_handled(int fd) #endif +#include + using namespace std; int main(int argc, char *argv[]) @@ -78,6 +82,12 @@ int main(int argc, parser.addOption(spinlck); parser.process(a); + + qApp->setStyle(QStyleFactory::create("Fusion")); + qApp->setPalette(qApp->style()->standardPalette()); + CrashReportDialog* dlg = new CrashReportDialog(); + dlg->show(); + SPIN_ON_CRASH = parser.isSet(spinlck); QLocale::setDefault(QLocale::c()); @@ -109,11 +119,12 @@ int main(int argc, { /* Session manager: Prevent system from launching this app maximized on session restore (= system startup). * Affects DEs with enabled session restore feature; is independent from the built-in autostart feature */ + if(!qApp->isSessionRestored()) { w.show(); } - } + } QApplication::setQuitOnLastWindowClosed(true); return QApplication::exec(); diff --git a/src/src.pro b/src/src.pro index 8f57e0c6..ae554370 100644 --- a/src/src.pro +++ b/src/src.pro @@ -52,6 +52,7 @@ SOURCES += \ interface/LiveprogSelectionWidget.cpp \ interface/TrayIcon.cpp \ interface/dialog/AutoEqSelector.cpp \ + interface/dialog/CrashReportDialog.cpp \ interface/dialog/PaletteEditor.cpp \ interface/LiquidEqualizerWidget.cpp \ interface/fragment/AppManagerFragment.cpp \ @@ -81,6 +82,7 @@ FORMS += \ interface/FileSelectionWidget.ui \ interface/LiveprogSelectionWidget.ui \ interface/dialog/AutoEqSelector.ui \ + interface/dialog/CrashReportDialog.ui \ interface/dialog/PaletteEditor.ui \ interface/fragment/AppManagerFragment.ui \ interface/fragment/FirstLaunchWizard.ui \ @@ -116,6 +118,7 @@ HEADERS += \ interface/QMessageOverlay.h \ interface/TrayIcon.h \ interface/dialog/AutoEqSelector.h \ + interface/dialog/CrashReportDialog.h \ interface/dialog/PaletteEditor.h \ interface/event/EventFilter.h \ interface/event/ScrollFilter.h \