kio: move KUrlPropsPluginPrivate::URLStr member to the scope it is used in

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-06-19 06:00:02 +03:00
parent f933086926
commit e259bfaba9
2 changed files with 14 additions and 14 deletions

View file

@ -14,8 +14,9 @@ public:
QStringList supportedMimeTypes; QStringList supportedMimeTypes;
}; };
KPreviewWidgetBase::KPreviewWidgetBase( QWidget *parent ) KPreviewWidgetBase::KPreviewWidgetBase(QWidget *parent)
: QWidget(parent), d(new KPreviewWidgetBasePrivate) : QWidget(parent),
d(new KPreviewWidgetBasePrivate())
{ {
} }
@ -24,7 +25,7 @@ KPreviewWidgetBase::~KPreviewWidgetBase()
delete d; delete d;
} }
void KPreviewWidgetBase::setSupportedMimeTypes( const QStringList& mimeTypes ) void KPreviewWidgetBase::setSupportedMimeTypes(const QStringList &mimeTypes)
{ {
d->supportedMimeTypes = mimeTypes; d->supportedMimeTypes = mimeTypes;
} }

View file

@ -630,6 +630,7 @@ public:
: dirSizeJob(nullptr), : dirSizeJob(nullptr),
dirSizeUpdateTimer(nullptr), dirSizeUpdateTimer(nullptr),
m_frame(nullptr), m_frame(nullptr),
bIconChanged(false),
m_capacityBar(nullptr), m_capacityBar(nullptr),
m_lined(nullptr), m_lined(nullptr),
m_linkTargetLineEdit(nullptr) m_linkTargetLineEdit(nullptr)
@ -676,7 +677,6 @@ KFilePropsPlugin::KFilePropsPlugin(KPropertiesDialog *props)
d(new KFilePropsPluginPrivate()) d(new KFilePropsPluginPrivate())
{ {
d->bMultiple = (properties->items().count() > 1); d->bMultiple = (properties->items().count() > 1);
d->bIconChanged = false;
d->bDesktopFile = KDesktopPropsPlugin::supports(properties->items()); d->bDesktopFile = KDesktopPropsPlugin::supports(properties->items());
kDebug(250) << "KFilePropsPlugin::KFilePropsPlugin bMultiple=" << d->bMultiple; kDebug(250) << "KFilePropsPlugin::KFilePropsPlugin bMultiple=" << d->bMultiple;
@ -882,7 +882,7 @@ KFilePropsPlugin::KFilePropsPlugin(KPropertiesDialog *props)
d->m_lined->setFocus(); d->m_lined->setFocus();
//if we don't have permissions to rename, we need to make "m_lined" read only. //if we don't have permissions to rename, we need to make "m_lined" read only.
KFileItemListProperties itemList(KFileItemList()<< item); KFileItemListProperties itemList(KFileItemList() << item);
setFileNameReadOnly(!itemList.supportsMoving()); setFileNameReadOnly(!itemList.supportsMoving());
// Enhanced rename: Don't highlight the file extension. // Enhanced rename: Don't highlight the file extension.
@ -1159,10 +1159,11 @@ void KFilePropsPlugin::slotDirSizeUpdate()
KIO::filesize_t totalSubdirs = d->dirSizeJob->totalSubdirs(); KIO::filesize_t totalSubdirs = d->dirSizeJob->totalSubdirs();
d->m_sizeLabel->setText( d->m_sizeLabel->setText(
i18n("Calculating... %1 (%2)\n%3, %4", i18n("Calculating... %1 (%2)\n%3, %4",
KIO::convertSize(totalSize), KIO::convertSize(totalSize),
totalSize, totalSize,
i18np("1 file", "%1 files", totalFiles), i18np("1 file", "%1 files", totalFiles),
i18np("1 sub-folder", "%1 sub-folders", totalSubdirs)) i18np("1 sub-folder", "%1 sub-folders", totalSubdirs)
)
); );
} }
@ -2597,7 +2598,6 @@ public:
QFrame *m_frame; QFrame *m_frame;
KUrlRequester *URLEdit; KUrlRequester *URLEdit;
QString URLStr;
}; };
KUrlPropsPlugin::KUrlPropsPlugin(KPropertiesDialog *props) KUrlPropsPlugin::KUrlPropsPlugin(KPropertiesDialog *props)
@ -2630,10 +2630,9 @@ KUrlPropsPlugin::KUrlPropsPlugin(KPropertiesDialog *props)
KDesktopFile config(path); KDesktopFile config(path);
const KConfigGroup dg = config.desktopGroup(); const KConfigGroup dg = config.desktopGroup();
d->URLStr = dg.readPathEntry("URL", QString()); QString URLStr = dg.readPathEntry("URL", QString());
if (!URLStr.isEmpty()) {
if (!d->URLStr.isEmpty()) { d->URLEdit->setUrl(KUrl(URLStr));
d->URLEdit->setUrl(KUrl(d->URLStr));
} }
} }