From c66d486a0e5e797d9c4b54b7e596113559de3425 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Thu, 15 Jun 2023 23:18:46 +0300 Subject: [PATCH] kio: set the placeholder text of the device widget from KDevicePropsPlugin constructor instead of using the label as hint what to enter in case there are no devices detected Signed-off-by: Ivailo Monev --- kio/kfile/kpropertiesdialog.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/kio/kfile/kpropertiesdialog.cpp b/kio/kfile/kpropertiesdialog.cpp index c24fe373..5e070e36 100644 --- a/kio/kfile/kpropertiesdialog.cpp +++ b/kio/kfile/kpropertiesdialog.cpp @@ -2672,15 +2672,14 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropertie layout->setColumnStretch(1, 1); QLabel* label = new QLabel( d->m_frame ); - label->setText( devices.count() == 0 ? - i18n("Device (/dev/fd0):") : // old style - i18n("Device:") ); // new style (combobox) + label->setText( i18n("Device:") ); layout->addWidget(label, 0, 0, Qt::AlignRight); d->device = new KComboBox( d->m_frame ); d->device->setObjectName( QLatin1String( "ComboBox_device" ) ); d->device->setEditable( true ); d->device->addItems( devices ); + d->device->lineEdit()->setPlaceholderText( i18n("Enter device...") ); layout->addWidget(d->device, 0, 1); connect( d->device, SIGNAL(activated(int)), this, SLOT(slotActivated(int)) ); @@ -2691,9 +2690,7 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropertie layout->addWidget(d->readonly, 1, 1); label = new QLabel( d->m_frame ); - label->setText( devices.count()==0 ? - i18n("Mount point (/mnt/floppy):") : // old style - i18n("Mount point:")); // new style (combobox) + label->setText( i18n("Mount point:") ); layout->addWidget(label, 2, 0, Qt::AlignRight); d->mountpoint = new QLabel( d->m_frame );