Win7 fix
Connection import fix
This commit is contained in:
parent
65acdc8c09
commit
02f966bc67
2 changed files with 26 additions and 7 deletions
|
@ -44,13 +44,22 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
ui->stackedWidget_main->setSpeed(200);
|
||||
ui->stackedWidget_main->setAnimation(QEasingCurve::Linear);
|
||||
|
||||
bool needToHideCustomTitlebar = false;
|
||||
if (QOperatingSystemVersion::current() <= QOperatingSystemVersion::Windows7) {
|
||||
needToHideCustomTitlebar = true;
|
||||
}
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
ui->widget_tittlebar->hide();
|
||||
resize(width(), height() - ui->stackedWidget_main->y());
|
||||
ui->stackedWidget_main->move(0,0);
|
||||
fixWidget(this);
|
||||
needToHideCustomTitlebar = true;
|
||||
#endif
|
||||
|
||||
if (needToHideCustomTitlebar) {
|
||||
ui->widget_tittlebar->hide();
|
||||
resize(width(), height() - ui->stackedWidget_main->y());
|
||||
ui->stackedWidget_main->move(0,0);
|
||||
}
|
||||
|
||||
// Post initialization
|
||||
|
||||
if (m_settings.haveAuthData()) {
|
||||
|
@ -270,7 +279,7 @@ void MainWindow::onPushButtonNewServerConnectWithExistingCode(bool)
|
|||
{
|
||||
QString s = ui->lineEdit_start_existing_code->text();
|
||||
s.replace("vpn://", "");
|
||||
QJsonObject o = QJsonDocument::fromJson(QByteArray::fromBase64(s.toUtf8())).object();
|
||||
QJsonObject o = QJsonDocument::fromJson(QByteArray::fromBase64(s.toUtf8(), QByteArray::Base64UrlEncoding | QByteArray::OmitTrailingEquals)).object();
|
||||
|
||||
ServerCredentials credentials;
|
||||
credentials.hostName = o.value("h").toString();
|
||||
|
@ -285,6 +294,8 @@ void MainWindow::onPushButtonNewServerConnectWithExistingCode(bool)
|
|||
arg(credentials.hostName).
|
||||
arg(credentials.port).
|
||||
arg(credentials.userName);
|
||||
|
||||
//qDebug() << QString("Password") << credentials.password;
|
||||
}
|
||||
|
||||
bool MainWindow::installServer(ServerCredentials credentials,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue