QUrl for serverURL + renames

This commit is contained in:
Anubhav Choudhary 2021-02-10 14:38:26 +05:30
parent b4078f3634
commit 7057081bdf
4 changed files with 12 additions and 11 deletions

View File

@ -23,6 +23,7 @@
#include <QPixmap>
#include <QSize>
#include <QStringList>
#include <QUrl>
namespace YAML
{
@ -219,7 +220,7 @@ public:
//Paste functionality related
QString uploadServerType() { return m_uploadServerType; };
QString uploadServerURL() { return m_uploadServerURL; };
QUrl uploadServerURL() { return m_uploadServerURL; };
int uploadServerPort() { return m_uploadServerPort; };
public slots:
@ -270,7 +271,7 @@ private:
bool m_welcomeExpandingLogo;
QString m_uploadServerType;
QString m_uploadServerURL;
QUrl m_uploadServerURL;
int m_uploadServerPort;
WindowExpansion m_windowExpansion;

View File

@ -141,8 +141,8 @@ ViewManager::insertViewStep( int before, ViewStep* step )
void
ViewManager::onInstallationFailed( const QString& message, const QString& details )
{
QString UploadServerType = Calamares::Branding::instance()->uploadServerType();
bool shouldOfferWebPaste = CalamaresUtils::UploadServersList.contains( UploadServerType );
QString serverType = Calamares::Branding::instance()->uploadServerType();
bool shouldOfferWebPaste = CalamaresUtils::UploadServersList.contains( serverType );
cError() << "Installation failed:";
cDebug() << "- message:" << message;
@ -186,10 +186,10 @@ ViewManager::onInstallationFailed( const QString& message, const QString& detail
if ( msgBox->buttonRole( button ) == QMessageBox::ButtonRole::YesRole )
{
QString pasteUrlMsg;
QString UploadServerType = Calamares::Branding::instance()->uploadServerType();
if ( UploadServerType == "fiche" )
QString serverType = Calamares::Branding::instance()->uploadServerType();
if ( serverType == "fiche" )
{
pasteUrlMsg = CalamaresUtils::sendLogToPastebin( msgBox );
pasteUrlMsg = CalamaresUtils::ficheLogUpload( msgBox );
}
else
{
@ -545,7 +545,7 @@ ViewManager::updateBackAndNextVisibility( bool visible )
UPDATE_BUTTON_PROPERTY( backAndNextVisible, visible )
}
QVariant
QVariant
ViewManager::data( const QModelIndex& index, int role ) const
{
if ( !index.isValid() )

View File

@ -30,10 +30,10 @@ QStringList UploadServersList = {
};
QString
sendLogToPastebin( QObject* parent )
ficheLogUpload( QObject* parent )
{
const QString& ficheHost = Calamares::Branding::instance()->uploadServerURL();
const QString& ficheHost = Calamares::Branding::instance()->uploadServerURL().toString();
quint16 fichePort = Calamares::Branding::instance()->uploadServerPort();
QString pasteUrlFmt = parent->tr( "Install log posted to\n\n%1\n\nLink copied to clipboard" );

View File

@ -22,7 +22,7 @@ namespace CalamaresUtils
*
* Returns the (string) URL that the pastebin gives us.
*/
QString sendLogToPastebin( QObject* parent );
QString ficheLogUpload( QObject* parent );
extern QStringList UploadServersList;