[libcalamares] Move the crash() function to the one place it's used
This commit is contained in:
parent
66c4445077
commit
eaba696173
@ -120,12 +120,4 @@ obscure( const QString& string )
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
crash()
|
||||
{
|
||||
volatile int* a = nullptr;
|
||||
*a = 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -51,11 +51,6 @@ namespace CalamaresUtils
|
||||
* @return the obfuscated string.
|
||||
*/
|
||||
DLLEXPORT QString obscure( const QString& string );
|
||||
|
||||
/**
|
||||
* @brief crash makes Calamares crash immediately.
|
||||
*/
|
||||
DLLEXPORT void crash();
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
|
@ -37,6 +37,17 @@
|
||||
#include <QStringListModel>
|
||||
#include <QTreeView>
|
||||
|
||||
/**
|
||||
* @brief crash makes Calamares crash immediately.
|
||||
*/
|
||||
static void
|
||||
crash()
|
||||
{
|
||||
volatile int* a = nullptr;
|
||||
*a = 1;
|
||||
}
|
||||
|
||||
|
||||
namespace Calamares {
|
||||
|
||||
DebugWindow::DebugWindow()
|
||||
@ -172,10 +183,7 @@ DebugWindow::DebugWindow()
|
||||
}
|
||||
} );
|
||||
|
||||
connect( crashButton, &QPushButton::clicked,
|
||||
this, [] {
|
||||
CalamaresUtils::crash();
|
||||
} );
|
||||
connect( crashButton, &QPushButton::clicked, this, [] { ::crash(); } );
|
||||
|
||||
CALAMARES_RETRANSLATE(
|
||||
retranslateUi( this );
|
||||
|
Loading…
Reference in New Issue
Block a user