[libcalamares] Move the crash() function to the one place it's used

main
Adriaan de Groot 6 years ago
parent 66c4445077
commit eaba696173

@ -120,12 +120,4 @@ obscure( const QString& string )
return result; return result;
} }
void
crash()
{
volatile int* a = nullptr;
*a = 1;
}
} }

@ -51,11 +51,6 @@ namespace CalamaresUtils
* @return the obfuscated string. * @return the obfuscated string.
*/ */
DLLEXPORT QString obscure( const QString& string ); DLLEXPORT QString obscure( const QString& string );
/**
* @brief crash makes Calamares crash immediately.
*/
DLLEXPORT void crash();
} // namespace } // namespace
#endif #endif

@ -37,6 +37,17 @@
#include <QStringListModel> #include <QStringListModel>
#include <QTreeView> #include <QTreeView>
/**
* @brief crash makes Calamares crash immediately.
*/
static void
crash()
{
volatile int* a = nullptr;
*a = 1;
}
namespace Calamares { namespace Calamares {
DebugWindow::DebugWindow() DebugWindow::DebugWindow()
@ -172,10 +183,7 @@ DebugWindow::DebugWindow()
} }
} ); } );
connect( crashButton, &QPushButton::clicked, connect( crashButton, &QPushButton::clicked, this, [] { ::crash(); } );
this, [] {
CalamaresUtils::crash();
} );
CALAMARES_RETRANSLATE( CALAMARES_RETRANSLATE(
retranslateUi( this ); retranslateUi( this );

Loading…
Cancel
Save