Drop the qApp macro

This commit is contained in:
Veronica Berglyd Olsen
2024-04-03 18:36:37 +02:00
parent 2744fb2fd4
commit c8fe5e6620
19 changed files with 152 additions and 153 deletions
+5 -5
View File
@@ -26,12 +26,12 @@ from __future__ import annotations
import logging
from PyQt5.QtGui import QCloseEvent, QFont, QKeyEvent, QKeySequence
from PyQt5.QtCore import Qt, pyqtSignal, pyqtSlot
from PyQt5.QtGui import QCloseEvent, QFont, QKeyEvent, QKeySequence
from PyQt5.QtWidgets import (
QAbstractButton, QCompleter, QDialog, QDialogButtonBox, QFileDialog,
QFontDialog, QHBoxLayout, QLineEdit, QPushButton, QVBoxLayout, QWidget,
qApp
QAbstractButton, QApplication, QCompleter, QDialog, QDialogButtonBox,
QFileDialog, QFontDialog, QHBoxLayout, QLineEdit, QPushButton, QVBoxLayout,
QWidget
)
from novelwriter import CONFIG, SHARED
@@ -742,7 +742,7 @@ class GuiPreferences(QDialog):
logger.debug("Close: GuiPreferences")
self._saveWindowSize()
event.accept()
qApp.processEvents()
QApplication.processEvents()
self.done(nwConst.DLG_FINISHED)
self.deleteLater()
return
+5 -5
View File
@@ -26,12 +26,12 @@ from __future__ import annotations
import logging
from PyQt5.QtGui import QCloseEvent, QColor, QIcon, QPixmap
from PyQt5.QtCore import Qt, pyqtSignal, pyqtSlot
from PyQt5.QtGui import QCloseEvent, QColor, QIcon, QPixmap
from PyQt5.QtWidgets import (
QColorDialog, QDialog, QDialogButtonBox, QHBoxLayout, QLineEdit,
QPushButton, QStackedWidget, QTreeWidget, QTreeWidgetItem, QVBoxLayout,
QWidget, qApp
QApplication, QColorDialog, QDialog, QDialogButtonBox, QHBoxLayout,
QLineEdit, QPushButton, QStackedWidget, QTreeWidget, QTreeWidgetItem,
QVBoxLayout, QWidget
)
from novelwriter import CONFIG, SHARED
@@ -195,7 +195,7 @@ class GuiProjectSettings(QDialog):
project.data.setAutoReplace(newList)
self.newProjectSettingsReady.emit(rebuildTrees)
qApp.processEvents()
QApplication.processEvents()
self.close()
return
+4 -4
View File
@@ -28,11 +28,11 @@ import logging
from typing import TYPE_CHECKING
from pathlib import Path
from PyQt5.QtGui import QCloseEvent
from PyQt5.QtCore import Qt, pyqtSignal, pyqtSlot
from PyQt5.QtGui import QCloseEvent
from PyQt5.QtWidgets import (
QAbstractItemView, QDialog, QDialogButtonBox, QFileDialog, QHBoxLayout,
QLineEdit, QListWidget, QVBoxLayout, qApp
QAbstractItemView, QApplication, QDialog, QDialogButtonBox, QFileDialog,
QHBoxLayout, QLineEdit, QListWidget, QVBoxLayout
)
from novelwriter import CONFIG, SHARED
@@ -177,7 +177,7 @@ class GuiWordList(QDialog):
userDict.add(word)
userDict.save()
self.newWordListReady.emit()
qApp.processEvents()
QApplication.processEvents()
self.close()
return