Multiple code improvements

* Fixed unending timer in BulkFileWatcher causing high CPU usage after first save
* Fix multiple SIGNAL connections found with GammaRay
* Remove horizontal scrollbar from EditWidget due to ghosting (maybe Qt bug)
This commit is contained in:
Jonathan White 2019-02-22 15:46:01 -05:00
parent e8ec45ef97
commit 5cf50d9fae
4 changed files with 3 additions and 2 deletions

View File

@ -123,6 +123,7 @@ BulkFileWatcher::BulkFileWatcher(QObject* parent)
connect(&m_fileWatchUnblockTimer, SIGNAL(timeout()), this, SLOT(observeFileChanges()));
connect(&m_pendingSignalsTimer, SIGNAL(timeout()), this, SLOT(emitSignals()));
m_fileWatchUnblockTimer.setSingleShot(true);
m_pendingSignalsTimer.setSingleShot(true);
}
void BulkFileWatcher::clear()

View File

@ -59,6 +59,7 @@ void EditWidget::addPage(const QString& labelText, const QIcon& icon, QWidget* w
*/
auto* scrollArea = new QScrollArea(m_ui->stackedWidget);
scrollArea->setFrameShape(QFrame::NoFrame);
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
scrollArea->setWidget(widget);
scrollArea->setWidgetResizable(true);
m_ui->stackedWidget->addWidget(scrollArea);

View File

@ -65,7 +65,6 @@ EditWidgetIcons::EditWidgetIcons(QWidget* parent)
connect(m_ui->deleteButton, SIGNAL(clicked()), SLOT(removeCustomIcon()));
connect(m_ui->faviconButton, SIGNAL(clicked()), SLOT(downloadFavicon()));
connect(m_ui->defaultIconsRadio, SIGNAL(toggled(bool)), this, SIGNAL(widgetUpdated()));
connect(m_ui->defaultIconsRadio, SIGNAL(toggled(bool)), this, SIGNAL(widgetUpdated()));
connect(m_ui->defaultIconsView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
this, SIGNAL(widgetUpdated()));

View File

@ -142,6 +142,7 @@ void EditEntryWidget::setupMain()
connect(m_mainUi->togglePasswordGeneratorButton, SIGNAL(toggled(bool)), SLOT(togglePasswordGeneratorButton(bool)));
#ifdef WITH_XC_NETWORKING
connect(m_mainUi->fetchFaviconButton, SIGNAL(clicked()), m_iconsWidget, SLOT(downloadFavicon()));
connect(m_mainUi->urlEdit, SIGNAL(textChanged(QString)), m_iconsWidget, SLOT(setUrl(QString)));
#endif
connect(m_mainUi->expireCheck, SIGNAL(toggled(bool)), m_mainUi->expireDatePicker, SLOT(setEnabled(bool)));
connect(m_mainUi->notesEnabled, SIGNAL(toggled(bool)), this, SLOT(toggleHideNotes(bool)));
@ -764,7 +765,6 @@ void EditEntryWidget::setForms(Entry* entry, bool restore)
iconStruct.uuid = entry->iconUuid();
iconStruct.number = entry->iconNumber();
m_iconsWidget->load(entry->uuid(), m_db, iconStruct, entry->webUrl());
connect(m_mainUi->urlEdit, SIGNAL(textChanged(QString)), m_iconsWidget, SLOT(setUrl(QString)));
m_autoTypeUi->enableButton->setChecked(entry->autoTypeEnabled());
if (entry->defaultAutoTypeSequence().isEmpty()) {