-rw-r--r-- | noncore/unsupported/oipkg/installdialog.cpp | 13 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/installdialog.h | 1 | ||||
-rw-r--r-- | noncore/unsupported/oipkg/pmipkg.cpp | 2 |
3 files changed, 14 insertions, 2 deletions
diff --git a/noncore/unsupported/oipkg/installdialog.cpp b/noncore/unsupported/oipkg/installdialog.cpp index c676e84..fd93ad3 100644 --- a/noncore/unsupported/oipkg/installdialog.cpp +++ b/noncore/unsupported/oipkg/installdialog.cpp @@ -43,8 +43,8 @@ InstallDialog::InstallDialog( PackageManagerSettings* s, QWidget* parent, const GroupBoxOptions->layout()->setMargin( 0 ); GroupBoxOptionsLayout = new QGridLayout( GroupBoxOptions->layout() ); GroupBoxOptionsLayout->setAlignment( Qt::AlignTop ); - GroupBoxOptionsLayout->setSpacing( 2 ); - GroupBoxOptionsLayout->setMargin( 2 ); + GroupBoxOptionsLayout->setSpacing( 0 ); + GroupBoxOptionsLayout->setMargin( 0 ); _force_depends = new QCheckBox( GroupBoxOptions, "_force_depends" ); QFont _force_depends_font( _force_depends->font() ); @@ -71,6 +71,14 @@ InstallDialog::InstallDialog( PackageManagerSettings* s, QWidget* parent, const GroupBoxOptionsLayout->addWidget( _force_remove, 2, 0 ); + _force_overwrite = new QCheckBox( GroupBoxOptions, "_force_overwrite" ); + QFont _force_overwrite_font( _force_overwrite->font() ); + _force_overwrite_font.setPointSize( 8 ); + _force_overwrite->setFont( _force_overwrite_font ); + _force_overwrite->setText( tr( "-force-overwrite" ) ); + + GroupBoxOptionsLayout->addWidget(_force_overwrite, 3, 0 ); + InstallDialogLayout->addWidget( GroupBoxOptions, 1, 0 ); toRemoveItem = new QCheckListItem( ListViewPackages, tr("To remove") ); toInstallItem = new QCheckListItem( ListViewPackages, tr("To install") ); @@ -100,6 +108,7 @@ bool InstallDialog::event( QEvent* ev ) _force_reinstall_font.setPointSize( 8 ); _force_reinstall->setFont( _force_reinstall_font ); QFont _force_remove_font( _force_remove->font() ); + QFont _force_overwrite_font( _force_overwrite->font() ); _force_remove_font.setPointSize( 8 ); _force_remove->setFont( _force_remove_font ); } diff --git a/noncore/unsupported/oipkg/installdialog.h b/noncore/unsupported/oipkg/installdialog.h index 828c8df..d3510ff 100644 --- a/noncore/unsupported/oipkg/installdialog.h +++ b/noncore/unsupported/oipkg/installdialog.h @@ -35,6 +35,7 @@ public: InstallDialog( PackageManagerSettings* s, QWidget* parent = 0, const QGroupBox* GroupBoxOptions; QCheckBox* _force_depends; QCheckBox* _force_reinstall; + QCheckBox* _force_overwrite; QCheckBox* _force_remove; QCheckListItem *toRemoveItem; QCheckListItem *toInstallItem; diff --git a/noncore/unsupported/oipkg/pmipkg.cpp b/noncore/unsupported/oipkg/pmipkg.cpp index 84de67b..2ed313c 100644 --- a/noncore/unsupported/oipkg/pmipkg.cpp +++ b/noncore/unsupported/oipkg/pmipkg.cpp @@ -75,6 +75,8 @@ bool PmIpkg::runIpkg(const QString& args, const QString& dest ) cmd += " -force-reinstall "; if (installDialog->_force_remove->isChecked()) cmd += " -force-removal-of-essential-packages "; + if (installDialog->_force_overwrite->isChecked()) + cmd += " -force-overwrite "; } } //!args.contains("update") |