Commit f62897fa authored by Laurent Montel's avatar Laurent Montel
Browse files

Store lineedit place holder => when we create a new tab we have correct

text
parent a471bd16
Pipeline #272596 passed with stage
in 12 minutes and 5 seconds
......@@ -82,6 +82,7 @@ public:
QAction *mActivatePreviousTabAction = nullptr;
QAction *mMoveTabLeftAction = nullptr;
QAction *mMoveTabRightAction = nullptr;
QString mQuickSearchPlaceHolderMessage;
bool mPreferEmptyTab = false;
int mMaxTabCreated = 0;
};
......@@ -479,10 +480,11 @@ void Pane::focusQuickSearch(const QString &selectedText)
void Pane::setQuickSearchClickMessage(const QString &msg)
{
d->mQuickSearchPlaceHolderMessage = msg;
for (int i = 0; i < count(); ++i) {
auto w = qobject_cast<Widget *>(widget(i));
if (w) {
w->setQuickSearchClickMessage(msg);
w->setQuickSearchClickMessage(d->mQuickSearchPlaceHolderMessage);
}
}
}
......@@ -797,7 +799,9 @@ QItemSelectionModel *Pane::createNewTab()
w->setXmlGuiClient(d->mXmlGuiClient);
addTab(w, i18nc("@title:tab Empty messagelist", "Empty"));
if (!d->mQuickSearchPlaceHolderMessage.isEmpty()) {
w->setQuickSearchClickMessage(d->mQuickSearchPlaceHolderMessage);
}
if (d->mXmlGuiClient && count() < 10) {
if (d->mMaxTabCreated < count()) {
d->mMaxTabCreated = count();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment