@@ -3267,7 +3267,6 @@ ProxySettingPage::ProxySettingPage(PackageManagerCore *core)
3267
3267
, m_systemProxy(nullptr )
3268
3268
, m_manualProxy(nullptr )
3269
3269
, m_httpBox(nullptr )
3270
- , m_ftpBox(nullptr )
3271
3270
, m_labelHttpHostName(nullptr )
3272
3271
, m_labelHttpPort(nullptr )
3273
3272
, m_ifHttpAuthenticate(nullptr )
@@ -3277,15 +3276,6 @@ ProxySettingPage::ProxySettingPage(PackageManagerCore *core)
3277
3276
, m_lineHttpPort(nullptr )
3278
3277
, m_lineHttpUserName(nullptr )
3279
3278
, m_lineHttpPassword(nullptr )
3280
- , m_labelFtpHostName(nullptr )
3281
- , m_labelFtpPort(nullptr )
3282
- , m_ifFtpAuthenticate(nullptr )
3283
- , m_labelFtpUserName(nullptr )
3284
- , m_labelFtpPassword(nullptr )
3285
- , m_lineFtpHostName(nullptr )
3286
- , m_lineFtpPort(nullptr )
3287
- , m_lineFtpUserName(nullptr )
3288
- , m_lineFtpPassword(nullptr )
3289
3279
{
3290
3280
setPixmap (QWizard::WatermarkPixmap, QPixmap ());
3291
3281
setObjectName (QLatin1String (" ProxySettingPage" ));
@@ -3316,7 +3306,6 @@ ProxySettingPage::ProxySettingPage(PackageManagerCore *core)
3316
3306
3317
3307
QHBoxLayout *groupBoxLayout = new QHBoxLayout;
3318
3308
QGridLayout *httpBoxLayout = new QGridLayout;
3319
- QGridLayout *ftpBoxLayout = new QGridLayout;
3320
3309
3321
3310
// http para groupbox
3322
3311
m_labelHttpHostName = new QLabel (this );
@@ -3367,77 +3356,23 @@ ProxySettingPage::ProxySettingPage(PackageManagerCore *core)
3367
3356
m_httpBox->setTitle (QLatin1String (" Http" ));
3368
3357
m_httpBox->setLayout (httpBoxLayout);
3369
3358
3370
- // ftp para groupbox
3371
- m_labelFtpHostName = new QLabel (this );
3372
- m_labelFtpHostName->setWordWrap (true );
3373
- m_labelFtpHostName->setObjectName (QLatin1String (" FtpHostname" ));
3374
- m_labelFtpHostName->setText (tr (" Hostname" ));
3375
-
3376
- m_labelFtpPort = new QLabel (this );
3377
- m_labelFtpPort->setWordWrap (true );
3378
- m_labelFtpPort->setObjectName (QLatin1String (" FtpPort" ));
3379
- m_labelFtpPort->setText (tr (" Port" ));
3380
-
3381
- m_lineFtpHostName = new QLineEdit (this );
3382
- m_lineFtpHostName->setObjectName (QLatin1String (" FtpHostNameLineEdit" ));
3383
- m_lineFtpPort = new QLineEdit (this );
3384
- m_lineFtpPort->setObjectName (QLatin1String (" FtpPortLineEdit" ));
3385
-
3386
- ftpBoxLayout->addWidget (m_labelFtpHostName,0 ,0 ,1 ,1 );
3387
- ftpBoxLayout->addWidget (m_lineFtpHostName,0 ,1 ,1 ,3 );
3388
- ftpBoxLayout->addWidget (m_labelFtpPort,1 ,0 ,1 ,1 );
3389
- ftpBoxLayout->addWidget (m_lineFtpPort,1 ,1 ,1 ,3 );
3390
-
3391
- m_ifFtpAuthenticate = new QRadioButton (tr (" &Use authentication" ), this );
3392
- m_ifFtpAuthenticate->setObjectName (QLatin1String (" ifHttpAuthenticationRadioButton" ));
3393
-
3394
- m_labelFtpUserName = new QLabel (this );
3395
- m_labelFtpUserName->setWordWrap (true );
3396
- m_labelFtpUserName->setObjectName (QLatin1String (" FtpUsername" ));
3397
- m_labelFtpUserName->setText (tr (" Username" ));
3398
-
3399
- m_labelFtpPassword = new QLabel (this );
3400
- m_labelFtpPassword->setWordWrap (true );
3401
- m_labelFtpPassword->setObjectName (QLatin1String (" FtpPassword" ));
3402
- m_labelFtpPassword->setText (tr (" Password" ));
3403
-
3404
- m_lineFtpUserName = new QLineEdit (this );
3405
- m_lineFtpUserName->setObjectName (QLatin1String (" FtpUserNameLineEdit" ));
3406
- m_lineFtpPassword = new QLineEdit (this );
3407
- m_lineFtpPassword->setObjectName (QLatin1String (" FtpPasswordLineEdit" ));
3408
-
3409
- ftpBoxLayout->addWidget (m_ifFtpAuthenticate,2 ,1 ,1 ,3 );
3410
- ftpBoxLayout->addWidget (m_labelFtpUserName,3 ,0 ,1 ,1 );
3411
- ftpBoxLayout->addWidget (m_lineFtpUserName,3 ,1 ,1 ,3 );
3412
- ftpBoxLayout->addWidget (m_labelFtpPassword,4 ,0 ,1 ,1 );
3413
- ftpBoxLayout->addWidget (m_lineFtpPassword,4 ,1 ,1 ,3 );
3414
-
3415
- m_ftpBox = new QGroupBox (this );
3416
- m_ftpBox->setTitle (QLatin1String (" Ftp" ));
3417
- m_ftpBox->setLayout (ftpBoxLayout);
3418
-
3419
3359
// groupbox layout
3420
3360
groupBoxLayout->addWidget (m_httpBox);
3421
- groupBoxLayout->addWidget (m_ftpBox);
3422
3361
3423
3362
layout->addLayout (groupBoxLayout);
3424
3363
layout->addWidget (m_systemProxy);
3425
3364
3426
3365
setNetworkGroupboxVisible (false );
3427
3366
setHttpAuthenEnabled (false );
3428
- setFtpAuthenEnabled (false );
3429
3367
connect (m_manualProxy, &QAbstractButton::toggled,
3430
3368
this , &ProxySettingPage::setNetworkGroupboxVisible);
3431
3369
connect (m_ifHttpAuthenticate, &QAbstractButton::toggled,
3432
3370
this , &ProxySettingPage::setHttpAuthenEnabled);
3433
- connect (m_ifFtpAuthenticate, &QAbstractButton::toggled,
3434
- this , &ProxySettingPage::setFtpAuthenEnabled);
3435
3371
}
3436
3372
3437
3373
void ProxySettingPage::setNetworkGroupboxVisible (bool value)
3438
3374
{
3439
3375
m_httpBox->setVisible (value);
3440
- m_ftpBox->setVisible (value);
3441
3376
}
3442
3377
3443
3378
void ProxySettingPage::setHttpAuthenEnabled (bool value)
@@ -3446,12 +3381,6 @@ void ProxySettingPage::setHttpAuthenEnabled(bool value)
3446
3381
m_lineHttpPassword->setEnabled (value);
3447
3382
}
3448
3383
3449
- void ProxySettingPage::setFtpAuthenEnabled (bool value)
3450
- {
3451
- m_lineFtpUserName->setEnabled (value);
3452
- m_lineFtpPassword->setEnabled (value);
3453
- }
3454
-
3455
3384
void ProxySettingPage::entering ()
3456
3385
{
3457
3386
PackageManagerCore *core = packageManagerCore ();
@@ -3470,12 +3399,6 @@ void ProxySettingPage::entering()
3470
3399
m_noProxy->setChecked (true );
3471
3400
Q_ASSERT_X (false , Q_FUNC_INFO, " Unknown proxy type given!" );
3472
3401
}
3473
- const QNetworkProxy &ftpProxy = settings.ftpProxy ();
3474
- m_lineFtpHostName->setText (ftpProxy.hostName ());
3475
- m_lineFtpPort->setText (QString::number (ftpProxy.port ()));
3476
- m_ifFtpAuthenticate->setChecked ((!ftpProxy.user ().isEmpty ()) && (!ftpProxy.password ().isEmpty ()));
3477
- m_lineFtpUserName->setText (ftpProxy.user ());
3478
- m_lineFtpPassword->setText (ftpProxy.password ());
3479
3402
3480
3403
const QNetworkProxy &httpProxy = settings.httpProxy ();
3481
3404
m_lineHttpHostName->setText (httpProxy.hostName ());
@@ -3499,21 +3422,6 @@ void ProxySettingPage::leaving()
3499
3422
settings.setProxyType (Settings::UserDefinedProxy);
3500
3423
3501
3424
if (settings.proxyType () == Settings::UserDefinedProxy) {
3502
- // update ftp proxy settings
3503
- if ((!m_lineFtpHostName->text ().isEmpty ()) && (!m_lineFtpPort->text ().isEmpty ()))
3504
- {
3505
- if (m_ifFtpAuthenticate->isChecked ())
3506
- {
3507
- settings.setFtpProxy (QNetworkProxy (QNetworkProxy::HttpProxy, m_lineFtpHostName->text (),
3508
- m_lineFtpPort->text ().toInt (),m_lineFtpUserName->text (),m_lineFtpPassword->text ()));
3509
- }
3510
- else
3511
- {
3512
- settings.setFtpProxy (QNetworkProxy (QNetworkProxy::HttpProxy, m_lineFtpHostName->text (),
3513
- m_lineFtpPort->text ().toInt ()));
3514
- }
3515
- }
3516
- // update http proxy settings
3517
3425
if ((!m_lineHttpHostName->text ().isEmpty ()) && (!m_lineHttpPort->text ().isEmpty ()))
3518
3426
{
3519
3427
if (m_ifHttpAuthenticate->isChecked ())
0 commit comments