forked from qt-creator/qt-creator
SilverSearcher: Fix widget construction if not available
Setting a layout on a widget only works after the old layout has been destroyed. Otherwise it just refuses and prints out a warning on the cmdline which in turn results in not displaying the failure inside the UI and keeping the line edit for the optional search options. Change-Id: Id4ff4679d67b625a7248569f6debf1912dc5bcf0 Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
This commit is contained in:
@@ -176,8 +176,6 @@ FindInFilesSilverSearcher::FindInFilesSilverSearcher(QObject *parent)
|
||||
|
||||
setEnabled(isSilverSearcherAvailable());
|
||||
if (!isEnabled()) {
|
||||
auto layout = new QHBoxLayout(m_widget);
|
||||
layout->setMargin(0);
|
||||
QLabel *label = new QLabel(tr("Silver Searcher is not available on the system."));
|
||||
label->setStyleSheet("QLabel { color : red; }");
|
||||
layout->addWidget(label);
|
||||
|
Reference in New Issue
Block a user