mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 09:25:36 -04:00
libcalamaresui: rename and document pastebin method
This commit is contained in:
parent
2aae30f517
commit
566be48f16
3 changed files with 11 additions and 4 deletions
|
@ -245,7 +245,7 @@ ViewManager::onInstallationFailed( const QString& message, const QString& detail
|
||||||
if ( msgBox->buttonRole( button ) == QMessageBox::ButtonRole::YesRole )
|
if ( msgBox->buttonRole( button ) == QMessageBox::ButtonRole::YesRole )
|
||||||
{
|
{
|
||||||
// TODO: host and port should be configurable
|
// TODO: host and port should be configurable
|
||||||
QString pasteUrlMsg = CalamaresUtils::pastebin( msgBox, QStringLiteral( "termbin.com" ), 9999 );
|
QString pasteUrlMsg = CalamaresUtils::sendLogToPastebin( msgBox, QStringLiteral( "termbin.com" ), 9999 );
|
||||||
|
|
||||||
QString pasteUrlTitle = tr( "Install Log Paste URL" );
|
QString pasteUrlTitle = tr( "Install Log Paste URL" );
|
||||||
if ( pasteUrlMsg.isEmpty() )
|
if ( pasteUrlMsg.isEmpty() )
|
||||||
|
@ -253,6 +253,7 @@ ViewManager::onInstallationFailed( const QString& message, const QString& detail
|
||||||
pasteUrlMsg = tr( "The upload was unsuccessful. No web-paste was done." );
|
pasteUrlMsg = tr( "The upload was unsuccessful. No web-paste was done." );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: make the URL clickable, or copy it to the clipboard automatically
|
||||||
QMessageBox::critical(nullptr,
|
QMessageBox::critical(nullptr,
|
||||||
pasteUrlTitle,
|
pasteUrlTitle,
|
||||||
pasteUrlMsg);
|
pasteUrlMsg);
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace CalamaresUtils
|
||||||
{
|
{
|
||||||
|
|
||||||
QString
|
QString
|
||||||
pastebin( QObject* parent, const QString& ficheHost, int fichePort )
|
sendLogToPastebin( QObject* parent, const QString& ficheHost, int fichePort )
|
||||||
{
|
{
|
||||||
QString pasteUrlFmt = parent->tr( "Install log posted to:\n%1" );
|
QString pasteUrlFmt = parent->tr( "Install log posted to:\n%1" );
|
||||||
QFile pasteSourceFile( Logger::logFile() );
|
QFile pasteSourceFile( Logger::logFile() );
|
||||||
|
|
|
@ -24,7 +24,13 @@ class QString;
|
||||||
|
|
||||||
namespace CalamaresUtils
|
namespace CalamaresUtils
|
||||||
{
|
{
|
||||||
QString pastebin( QObject* parent, const QString& ficheHost, int fichePort );
|
|
||||||
}
|
/** @brief Send the current log file to a pastebin
|
||||||
|
*
|
||||||
|
* Returns the (string) URL that the pastebin gives us.
|
||||||
|
*/
|
||||||
|
QString sendLogToPastebin( QObject* parent, const QString& ficheHost, int fichePort );
|
||||||
|
|
||||||
|
} // namespace CalamaresUtils
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue