Merge branch 'development' into 3.2.x-stable

This commit is contained in:
Philip Müller 2019-09-05 07:00:56 -04:00
commit fae488b998
6 changed files with 21 additions and 11 deletions

View File

@ -197,7 +197,8 @@ GeoIPTests::testSplitTZ()
#define CHECK_GET( t, selector, url ) \
{ \
auto tz = GeoIP##t( selector ).processReply( CalamaresUtils::Network::Manager::instance().synchronousGet( QUrl( url ) ) ); \
auto tz = GeoIP##t( selector ) \
.processReply( CalamaresUtils::Network::Manager::instance().synchronousGet( QUrl( url ) ) ); \
qDebug() << tz; \
QCOMPARE( default_tz, tz ); \
auto tz2 = CalamaresUtils::GeoIP::Handler( "" #t, url, selector ).get(); \
@ -216,7 +217,8 @@ GeoIPTests::testGet()
GeoIPJSON default_handler;
// Call the KDE service the definitive source.
auto default_tz = default_handler.processReply( CalamaresUtils::Network::Manager::instance().synchronousGet( QUrl( "https://geoip.kde.org/v1/calamares" ) ) );
auto default_tz = default_handler.processReply(
CalamaresUtils::Network::Manager::instance().synchronousGet( QUrl( "https://geoip.kde.org/v1/calamares" ) ) );
// This is bogus, because the test isn't always run by me
// QCOMPARE( default_tz.first, QStringLiteral("Europe") );

View File

@ -73,10 +73,12 @@ QString
GeoIPXML::rawReply( const QByteArray& data )
{
for ( const auto& e : getElementTexts( data, m_element ) )
{
if ( !e.isEmpty() )
{
return e;
}
}
return QString();
}

View File

@ -20,6 +20,7 @@
#include "ui_page_package.h"
#include "utils/CalamaresUtilsGui.h"
#include "utils/Logger.h"
#include "utils/Retranslator.h"
@ -50,6 +51,9 @@ PackageChooserPage::PackageChooserPage( PackageChooserMode mode, QWidget* parent
case PackageChooserMode::RequiredMultiple:
ui->products->setSelectionMode( QAbstractItemView::ExtendedSelection );
}
ui->products->setMinimumWidth( 10 * CalamaresUtils::defaultFontHeight() );
}
/** @brief size the given @p pixmap to @p size
@ -168,4 +172,5 @@ PackageChooserPage::setIntroduction( const PackageItem& item )
{
m_introduction.name = item.name;
m_introduction.description = item.description;
m_introduction.screenshot = item.screenshot;
}

View File

@ -21,11 +21,11 @@
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,2">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,4">
<item>
<widget class="QListView" name="products">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<sizepolicy hsizetype="Minimum" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>1</verstretch>
</sizepolicy>

View File

@ -148,7 +148,8 @@ WelcomeViewStep::setConfigurationMap( const QVariantMap& configurationMap )
jobOrBrandingSetting( Branding::KnownIssuesUrl, configurationMap, "showKnownIssuesUrl" ) );
m_widget->setupButton( WelcomePage::Button::ReleaseNotes,
jobOrBrandingSetting( Branding::ReleaseNotesUrl, configurationMap, "showReleaseNotesUrl" ) );
m_widget->setupButton( WelcomePage::Button::Donate, CalamaresUtils::getString( configurationMap, "showDonateUrl" ) );
m_widget->setupButton( WelcomePage::Button::Donate,
CalamaresUtils::getString( configurationMap, "showDonateUrl" ) );
if ( configurationMap.contains( "requirements" )
&& configurationMap.value( "requirements" ).type() == QVariant::Map )

View File

@ -34,11 +34,11 @@ class GeneralRequirements;
namespace CalamaresUtils
{
namespace GeoIP
{
class Handler;
}
} // namespace
namespace GeoIP
{
class Handler;
}
} // namespace CalamaresUtils
class PLUGINDLLEXPORT WelcomeViewStep : public Calamares::ViewStep
{