#include "dolphin_generalsettings.h"
-#include <KDialog>
-#include <KFileDialog>
#include <KLocalizedString>
#include <QLineEdit>
#include <KMessageBox>
#include <QLabel>
#include <QPushButton>
#include <QHBoxLayout>
-#include <QVBoxLayout>
+#include <QFileDialog>
#include "views/dolphinview.h"
m_showFullPath(0),
m_filterBar(0)
{
- const int spacing = KDialog::spacingHint();
-
QVBoxLayout* topLayout = new QVBoxLayout(this);
QWidget* vBox = new QWidget(this);
QVBoxLayout *vBoxLayout = new QVBoxLayout(vBox);
vBoxLayout->setMargin(0);
- vBoxLayout->setSpacing(spacing);
vBoxLayout->setAlignment(Qt::AlignTop);
// create 'Home URL' editor
QWidget* homeUrlBox = new QWidget(homeBox);
QHBoxLayout *homeUrlBoxLayout = new QHBoxLayout(homeUrlBox);
homeUrlBoxLayout->setMargin(0);
- homeUrlBoxLayout->setSpacing(spacing);
QLabel* homeUrlLabel = new QLabel(i18nc("@label:textbox", "Location:"), homeUrlBox);
homeUrlBoxLayout->addWidget(homeUrlLabel);
QWidget* buttonBox = new QWidget(homeBox);
QHBoxLayout *buttonBoxLayout = new QHBoxLayout(buttonBox);
buttonBoxLayout->setMargin(0);
- buttonBoxLayout->setSpacing(spacing);
QPushButton* useCurrentButton = new QPushButton(i18nc("@action:button", "Use Current Location"), buttonBox);
buttonBoxLayout->addWidget(useCurrentButton);
void StartupSettingsPage::selectHomeUrl()
{
const QString homeUrl = m_homeUrl->text();
- QUrl url = KFileDialog::getExistingDirectoryUrl(QUrl::fromLocalFile(homeUrl), this);
+ QUrl url = QFileDialog::getExistingDirectoryUrl(this, QString(), QUrl::fromLocalFile(homeUrl));
if (!url.isEmpty()) {
m_homeUrl->setText(url.toDisplayString(QUrl::PreferLocalFile));
slotSettingsChanged();