mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-03-30 18:08:16 -04:00
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:
parent
e8ec45ef97
commit
5cf50d9fae
@ -123,6 +123,7 @@ BulkFileWatcher::BulkFileWatcher(QObject* parent)
|
|||||||
connect(&m_fileWatchUnblockTimer, SIGNAL(timeout()), this, SLOT(observeFileChanges()));
|
connect(&m_fileWatchUnblockTimer, SIGNAL(timeout()), this, SLOT(observeFileChanges()));
|
||||||
connect(&m_pendingSignalsTimer, SIGNAL(timeout()), this, SLOT(emitSignals()));
|
connect(&m_pendingSignalsTimer, SIGNAL(timeout()), this, SLOT(emitSignals()));
|
||||||
m_fileWatchUnblockTimer.setSingleShot(true);
|
m_fileWatchUnblockTimer.setSingleShot(true);
|
||||||
|
m_pendingSignalsTimer.setSingleShot(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BulkFileWatcher::clear()
|
void BulkFileWatcher::clear()
|
||||||
|
@ -59,6 +59,7 @@ void EditWidget::addPage(const QString& labelText, const QIcon& icon, QWidget* w
|
|||||||
*/
|
*/
|
||||||
auto* scrollArea = new QScrollArea(m_ui->stackedWidget);
|
auto* scrollArea = new QScrollArea(m_ui->stackedWidget);
|
||||||
scrollArea->setFrameShape(QFrame::NoFrame);
|
scrollArea->setFrameShape(QFrame::NoFrame);
|
||||||
|
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
scrollArea->setWidget(widget);
|
scrollArea->setWidget(widget);
|
||||||
scrollArea->setWidgetResizable(true);
|
scrollArea->setWidgetResizable(true);
|
||||||
m_ui->stackedWidget->addWidget(scrollArea);
|
m_ui->stackedWidget->addWidget(scrollArea);
|
||||||
|
@ -65,7 +65,6 @@ EditWidgetIcons::EditWidgetIcons(QWidget* parent)
|
|||||||
connect(m_ui->deleteButton, SIGNAL(clicked()), SLOT(removeCustomIcon()));
|
connect(m_ui->deleteButton, SIGNAL(clicked()), SLOT(removeCustomIcon()));
|
||||||
connect(m_ui->faviconButton, SIGNAL(clicked()), SLOT(downloadFavicon()));
|
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->defaultIconsRadio, SIGNAL(toggled(bool)), this, SIGNAL(widgetUpdated()));
|
||||||
connect(m_ui->defaultIconsView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
|
connect(m_ui->defaultIconsView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
|
||||||
this, SIGNAL(widgetUpdated()));
|
this, SIGNAL(widgetUpdated()));
|
||||||
|
@ -142,6 +142,7 @@ void EditEntryWidget::setupMain()
|
|||||||
connect(m_mainUi->togglePasswordGeneratorButton, SIGNAL(toggled(bool)), SLOT(togglePasswordGeneratorButton(bool)));
|
connect(m_mainUi->togglePasswordGeneratorButton, SIGNAL(toggled(bool)), SLOT(togglePasswordGeneratorButton(bool)));
|
||||||
#ifdef WITH_XC_NETWORKING
|
#ifdef WITH_XC_NETWORKING
|
||||||
connect(m_mainUi->fetchFaviconButton, SIGNAL(clicked()), m_iconsWidget, SLOT(downloadFavicon()));
|
connect(m_mainUi->fetchFaviconButton, SIGNAL(clicked()), m_iconsWidget, SLOT(downloadFavicon()));
|
||||||
|
connect(m_mainUi->urlEdit, SIGNAL(textChanged(QString)), m_iconsWidget, SLOT(setUrl(QString)));
|
||||||
#endif
|
#endif
|
||||||
connect(m_mainUi->expireCheck, SIGNAL(toggled(bool)), m_mainUi->expireDatePicker, SLOT(setEnabled(bool)));
|
connect(m_mainUi->expireCheck, SIGNAL(toggled(bool)), m_mainUi->expireDatePicker, SLOT(setEnabled(bool)));
|
||||||
connect(m_mainUi->notesEnabled, SIGNAL(toggled(bool)), this, SLOT(toggleHideNotes(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.uuid = entry->iconUuid();
|
||||||
iconStruct.number = entry->iconNumber();
|
iconStruct.number = entry->iconNumber();
|
||||||
m_iconsWidget->load(entry->uuid(), m_db, iconStruct, entry->webUrl());
|
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());
|
m_autoTypeUi->enableButton->setChecked(entry->autoTypeEnabled());
|
||||||
if (entry->defaultAutoTypeSequence().isEmpty()) {
|
if (entry->defaultAutoTypeSequence().isEmpty()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user