X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/fa988586bc923b33497cbc97aaac07fc93a4ca83..d48b733:/src/panels/places/placesitemeditdialog.cpp diff --git a/src/panels/places/placesitemeditdialog.cpp b/src/panels/places/placesitemeditdialog.cpp index 59085e474..7d365310f 100644 --- a/src/panels/places/placesitemeditdialog.cpp +++ b/src/panels/places/placesitemeditdialog.cpp @@ -23,22 +23,20 @@ #include "placesitemeditdialog.h" -#include -#include +#include +#include "dolphindebug.h" #include -#include #include -#include #include #include #include -#include #include #include #include #include #include #include +#include PlacesItemEditDialog::PlacesItemEditDialog(QWidget* parent) : QDialog(parent), @@ -121,8 +119,8 @@ void PlacesItemEditDialog::initialize() m_okButton = buttonBox->button(QDialogButtonBox::Ok); m_okButton->setDefault(true); m_okButton->setShortcut(Qt::CTRL | Qt::Key_Return); - connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); - connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); + connect(buttonBox, &QDialogButtonBox::accepted, this, &PlacesItemEditDialog::accept); + connect(buttonBox, &QDialogButtonBox::rejected, this, &PlacesItemEditDialog::reject); setModal(true); m_okButton->setDefault(true); @@ -137,17 +135,17 @@ void PlacesItemEditDialog::initialize() QFormLayout* formLayout = new QFormLayout(); vBox->addLayout( formLayout ); - m_textEdit = new KLineEdit(mainWidget); + m_textEdit = new QLineEdit(mainWidget); formLayout->addRow(i18nc("@label", "Label:"), m_textEdit); m_textEdit->setText(m_text); - m_textEdit->setClickMessage(i18n("Enter descriptive label here")); + m_textEdit->setPlaceholderText(i18n("Enter descriptive label here")); m_urlEdit = new KUrlRequester(m_url, mainWidget); m_urlEdit->setMode(KFile::Directory); formLayout->addRow(i18nc("@label", "Location:"), m_urlEdit); // Provide room for at least 40 chars (average char width is half of height) m_urlEdit->setMinimumWidth(m_urlEdit->fontMetrics().height() * (40 / 2)); - connect(m_urlEdit->lineEdit(), &KLineEdit::textChanged, this, &PlacesItemEditDialog::slotUrlChanged); + connect(m_urlEdit, &KUrlRequester::textChanged, this, &PlacesItemEditDialog::slotUrlChanged); m_iconButton = new KIconButton(mainWidget); formLayout->addRow(i18nc("@label", "Choose an icon:"), m_iconButton); @@ -161,13 +159,7 @@ void PlacesItemEditDialog::initialize() } if (m_allowGlobal) { - QString appName; - if (KGlobal::mainComponent().aboutData()) { - appName = KGlobal::mainComponent().aboutData()->programName(); - } - if (appName.isEmpty()) { - appName = KGlobal::mainComponent().componentName(); - } + const QString appName = KAboutData::applicationData().displayName(); m_appLocal = new QCheckBox( i18n("&Only show when using this application (%1)", appName ), mainWidget ); m_appLocal->setChecked(false); vBox->addWidget(m_appLocal);