Skip to content

Commit ea61aca

Browse files
committed
clazy-incorrect-emit
- emitting inside constructor probably has no effect - signal was not connected and therefore removed - add missing emit keyword
1 parent 0d15804 commit ea61aca

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

src/core/UBPersistenceManager.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ UBPersistenceManager::UBPersistenceManager(QObject *pParent)
103103
mDocumentTreeStructureModel = new UBDocumentTreeModel(this);
104104
createDocumentProxiesStructure();
105105

106-
emit proxyListChanged();
107-
108106
mThread = new QThread;
109107
mWorker = new UBPersistenceWorker();
110108
mWorker->moveToThread(mThread);
@@ -632,9 +630,7 @@ std::shared_ptr<UBDocumentProxy> UBPersistenceManager::createDocument(const QStr
632630
} else if (processInteractiveReplacementDialog(doc) == QDialog::Accepted) {
633631
addDoc = true;
634632
}
635-
if (addDoc) {
636-
emit proxyListChanged();
637-
} else {
633+
if (!addDoc) {
638634
deleteDocument(doc);
639635
doc = 0;
640636
}
@@ -710,7 +706,6 @@ std::shared_ptr<UBDocumentProxy> UBPersistenceManager::createDocumentFromDir(con
710706
}
711707
if (addDoc) {
712708
UBMetadataDcSubsetAdaptor::persist(doc);
713-
emit proxyListChanged();
714709
emit documentCreated(doc);
715710
} else {
716711
deleteDocument(doc);
@@ -762,8 +757,6 @@ std::shared_ptr<UBDocumentProxy> UBPersistenceManager::duplicateDocument(std::sh
762757

763758
copy->setPageCount(sceneCount(copy));
764759

765-
emit proxyListChanged();
766-
767760
emit documentCreated(copy);
768761

769762
return copy;

src/core/UBPersistenceManager.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,6 @@ class UBPersistenceManager : public QObject
158158
bool isSceneInCached(std::shared_ptr<UBDocumentProxy>proxy, int index) const;
159159

160160
signals:
161-
162-
void proxyListChanged();
163-
164161
void documentCreated(std::shared_ptr<UBDocumentProxy> pDocumentProxy);
165162
void documentMetadataChanged(std::shared_ptr<UBDocumentProxy> pDocumentProxy);
166163

src/web/simplebrowser/WBHistory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ void WBHistoryManager::clear()
274274
m_fullSave = true;
275275
m_saveTimer->changeOccurred();
276276
m_saveTimer->saveIfNeccessary();
277-
historyReset();
277+
emit historyReset();
278278
}
279279

280280
void WBHistoryManager::loadSettings()

0 commit comments

Comments
 (0)