summaryrefslogtreecommitdiffstats
path: root/tests/manual/bearerex/bearerex.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual/bearerex/bearerex.cpp')
-rw-r--r--tests/manual/bearerex/bearerex.cpp53
1 files changed, 25 insertions, 28 deletions
diff --git a/tests/manual/bearerex/bearerex.cpp b/tests/manual/bearerex/bearerex.cpp
index fe96c55636..d9b916907b 100644
--- a/tests/manual/bearerex/bearerex.cpp
+++ b/tests/manual/bearerex/bearerex.cpp
@@ -1,31 +1,26 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the test suite of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -147,7 +142,7 @@ void BearerEx::on_createSessionButton_clicked()
QNetworkConfiguration networkConfiguration = qvariant_cast<QNetworkConfiguration>(item->data(Qt::UserRole));
int newTabIndex = mainTabWidget->count();
SessionTab* newTab = new SessionTab(&networkConfiguration,&m_NetworkConfigurationManager,eventListWidget,newTabIndex-1);
- QString label = QString("S")+QString::number(newTabIndex-1);
+ QString label = QLatin1Char('S') + QString::number(newTabIndex-1);
mainTabWidget->insertTab(newTabIndex,newTab,label);
mainTabWidget->setCurrentIndex(newTabIndex);
}
@@ -271,9 +266,11 @@ SessionTab::SessionTab(QNetworkConfiguration* apNetworkConfiguration,
snapLabel->hide();
snapLineEdit->hide();
alrButton->hide();
- iapLineEdit->setText(apNetworkConfiguration->name()+" ("+apNetworkConfiguration->identifier()+")");
+ iapLineEdit->setText(apNetworkConfiguration->name()+ " (" + apNetworkConfiguration->identifier()
+ + QLatin1Char(')'));
} else if (apNetworkConfiguration->type() == QNetworkConfiguration::ServiceNetwork) {
- snapLineEdit->setText(apNetworkConfiguration->name()+" ("+apNetworkConfiguration->identifier()+")");
+ snapLineEdit->setText(apNetworkConfiguration->name()+ " (" + apNetworkConfiguration->identifier()
+ + QLatin1Char(')'));
}
bearerLineEdit->setText(apNetworkConfiguration->bearerTypeName());
sentRecDataLineEdit->setText(QString::number(m_NetworkSession->bytesWritten())+
@@ -380,7 +377,7 @@ void SessionTab::newConfigurationActivated()
msgBox.setDefaultButton(QMessageBox::Yes);
if (msgBox.exec() == QMessageBox::Yes) {
m_NetworkSession->accept();
- iapLineEdit->setText(m_config.name()+" ("+m_config.identifier()+")");
+ iapLineEdit->setText(m_config.name() + " (" + m_config.identifier() + QLatin1Char(')'));
} else {
m_NetworkSession->reject();
}
@@ -391,7 +388,7 @@ void SessionTab::preferredConfigurationChanged(const QNetworkConfiguration& conf
m_config = config;
QMessageBox msgBox;
msgBox.setText("Roaming to new configuration.");
- msgBox.setInformativeText("Do you want to migrate to "+config.name()+"?");
+ msgBox.setInformativeText("Do you want to migrate to " + config.name() + QLatin1Char('?'));
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msgBox.setDefaultButton(QMessageBox::Yes);
if (msgBox.exec() == QMessageBox::Yes) {
@@ -407,7 +404,7 @@ void SessionTab::opened()
QFont font = listItem->font();
font.setBold(true);
listItem->setFont(font);
- listItem->setText(QString("S")+QString::number(m_index)+QString(" - ")+QString("Opened"));
+ listItem->setText(QLatin1Char('S') + QString::number(m_index) + QLatin1String(" - Opened"));
m_eventListWidget->addItem(listItem);
QVariant identifier = m_NetworkSession->sessionProperty("ActiveConfiguration");
@@ -415,7 +412,7 @@ void SessionTab::opened()
QString configId = identifier.toString();
QNetworkConfiguration config = m_ConfigManager->configurationFromIdentifier(configId);
if (config.isValid()) {
- iapLineEdit->setText(config.name()+" ("+config.identifier()+")");
+ iapLineEdit->setText(config.name() + " (" + config.identifier() + QLatin1Char(')'));
}
}
newState(m_NetworkSession->state()); // Update the "(open)"
@@ -438,7 +435,7 @@ void SessionTab::closed()
QFont font = listItem->font();
font.setBold(true);
listItem->setFont(font);
- listItem->setText(QString("S")+QString::number(m_index)+QString(" - ")+QString("Closed"));
+ listItem->setText(QLatin1Char('S') + QString::number(m_index) + QLatin1String(" - Closed"));
m_eventListWidget->addItem(listItem);
}
@@ -489,7 +486,7 @@ void SessionTab::stateChanged(QNetworkSession::State state)
newState(state);
QListWidgetItem* listItem = new QListWidgetItem();
- listItem->setText(QString("S")+QString::number(m_index)+QString(" - ")+stateString(state));
+ listItem->setText(QLatin1Char('S') + QString::number(m_index) + QLatin1String(" - ") + stateString(state));
m_eventListWidget->addItem(listItem);
}
@@ -500,7 +497,7 @@ void SessionTab::newState(QNetworkSession::State state)
QString configId = identifier.toString();
QNetworkConfiguration config = m_ConfigManager->configurationFromIdentifier(configId);
if (config.isValid()) {
- iapLineEdit->setText(config.name()+" ("+config.identifier()+")");
+ iapLineEdit->setText(config.name() + " (" + config.identifier() + QLatin1Char(')'));
bearerLineEdit->setText(config.bearerTypeName());
}
} else {
@@ -539,7 +536,7 @@ void SessionTab::error(QNetworkSession::SessionError error)
errorString = "InvalidConfigurationError";
break;
}
- listItem->setText(QString("S")+QString::number(m_index)+QString(" - ")+errorString);
+ listItem->setText(QLatin1Char('S') + QString::number(m_index) + QString(" - ") + errorString);
m_eventListWidget->addItem(listItem);
msgBox.setText(errorString);