fixed an issue where reloadThumbnails & treeviewSelectionChanged would be called every time a page is deleted ! Resulting on really poor performances for the deletion operation, even in a crash, if trying with a lot of pages.

preferencesAboutTextFull
Clément Fauconnier 3 years ago
parent ec5f202ef1
commit 60bed975fd
  1. 23
      .qmake.stash
  2. 5
      src/core/UBPersistenceManager.cpp
  3. 1
      src/core/UBPersistenceManager.h
  4. 1
      src/document/UBDocumentController.cpp

@ -0,0 +1,23 @@
QMAKE_CXX.QT_COMPILER_STDCXX = 201402L
QMAKE_CXX.QMAKE_GCC_MAJOR_VERSION = 9
QMAKE_CXX.QMAKE_GCC_MINOR_VERSION = 3
QMAKE_CXX.QMAKE_GCC_PATCH_VERSION = 0
QMAKE_CXX.COMPILER_MACROS = \
QT_COMPILER_STDCXX \
QMAKE_GCC_MAJOR_VERSION \
QMAKE_GCC_MINOR_VERSION \
QMAKE_GCC_PATCH_VERSION
QMAKE_CXX.INCDIRS = \
/usr/include/c++/9 \
/usr/include/x86_64-linux-gnu/c++/9 \
/usr/include/c++/9/backward \
/usr/lib/gcc/x86_64-linux-gnu/9/include \
/usr/local/include \
/usr/include/x86_64-linux-gnu \
/usr/include
QMAKE_CXX.LIBDIRS = \
/usr/lib/gcc/x86_64-linux-gnu/9 \
/usr/lib/x86_64-linux-gnu \
/usr/lib \
/lib/x86_64-linux-gnu \
/lib

@ -622,11 +622,6 @@ void UBPersistenceManager::deleteDocumentScenes(UBDocumentProxy* proxy, const QL
if (compactedIndexes.size() == 0)
return;
foreach(int index, compactedIndexes)
{
emit documentSceneWillBeDeleted(proxy, index);
}
QString sourceName = proxy->metaData(UBSettings::documentName).toString();
UBDocumentProxy *trashDocProxy = createDocument(UBSettings::trashedDocumentGroupNamePrefix/* + sourceGroupName*/, sourceName, false);

@ -166,7 +166,6 @@ class UBPersistenceManager : public QObject
void documentWillBeDeleted(UBDocumentProxy* pDocumentProxy);
void documentSceneCreated(UBDocumentProxy* pDocumentProxy, int pIndex);
void documentSceneWillBeDeleted(UBDocumentProxy* pDocumentProxy, int pIndex);
private:
int sceneCount(const UBDocumentProxy* pDocumentProxy);

@ -2128,7 +2128,6 @@ void UBDocumentController::setupViews()
connect(mDocumentUI->thumbnailWidget->scene(), SIGNAL(selectionChanged()), this, SLOT(pageSelectionChanged()));
connect(UBPersistenceManager::persistenceManager(), SIGNAL(documentSceneCreated(UBDocumentProxy*, int)), this, SLOT(documentSceneChanged(UBDocumentProxy*, int)));
connect(UBPersistenceManager::persistenceManager(), SIGNAL(documentSceneWillBeDeleted(UBDocumentProxy*, int)), this, SLOT(documentSceneChanged(UBDocumentProxy*, int)));
mDocumentUI->thumbnailWidget->setBackgroundBrush(UBSettings::documentViewLightColor);

Loading…
Cancel
Save