src/eric7/Project/Project.py

branch
eric7
changeset 11006
a671918232f3
parent 10969
705b71b3fde6
child 11019
27cd57e98461
child 11024
b9048ec9b87f
diff -r b918c6c2736b -r a671918232f3 src/eric7/Project/Project.py
--- a/src/eric7/Project/Project.py	Fri Oct 25 09:47:48 2024 +0200
+++ b/src/eric7/Project/Project.py	Fri Oct 25 17:58:59 2024 +0200
@@ -1646,7 +1646,9 @@
         from .DebuggerPropertiesDialog import DebuggerPropertiesDialog
 
         dlg = DebuggerPropertiesDialog(
-            self, isRemote=FileSystemUtilities.isRemoteFileName(self.ppath)
+            self,
+            isRemote=FileSystemUtilities.isRemoteFileName(self.ppath),
+            parent=self.ui,
         )
         if dlg.exec() == QDialog.DialogCode.Accepted:
             dlg.storeData()
@@ -1776,7 +1778,7 @@
             )
             return
 
-        dlg = AddLanguageDialog(self.parent())
+        dlg = AddLanguageDialog(parent=self.parent())
         if dlg.exec() == QDialog.DialogCode.Accepted:
             lang = dlg.getSelectedLanguage()
             if self.__pdata["PROJECTTYPE"] in [
@@ -2039,7 +2041,9 @@
         if not startdir:
             startdir = self.ppath
 
-        dlg = AddFileDialog(self, self.parent(), fileTypeFilter, startdir=startdir)
+        dlg = AddFileDialog(
+            self, parent=self.parent(), fileTypeFilter=fileTypeFilter, startdir=startdir
+        )
         if dlg.exec() == QDialog.DialogCode.Accepted:
             fnames, target, isSource = dlg.getData()
             if target != "":
@@ -2279,7 +2283,9 @@
         if not startdir:
             startdir = self.ppath
 
-        dlg = AddDirectoryDialog(self, fileTypeFilter, self.parent(), startdir=startdir)
+        dlg = AddDirectoryDialog(
+            self, fileTypeFilter, parent=self.parent(), startdir=startdir
+        )
         if dlg.exec() == QDialog.DialogCode.Accepted:
             filetype, source, target, recursive = dlg.getData()
             if target == "":
@@ -2753,7 +2759,7 @@
 
         isRemote = self.__remoteServer.isServerConnected()
 
-        dlg = PropertiesDialog(self, new=True, isRemote=isRemote)
+        dlg = PropertiesDialog(self, new=True, isRemote=isRemote, parent=self.ui)
         if dlg.exec() == QDialog.DialogCode.Accepted:
             self.closeProject()
 
@@ -3093,7 +3099,9 @@
                                 else:
                                     vcores = False
                                 if vcores:
-                                    codlg = VcsCommandOptionsDialog(self.vcs)
+                                    codlg = VcsCommandOptionsDialog(
+                                        self.vcs, parent=self.ui
+                                    )
                                     if codlg.exec() == QDialog.DialogCode.Accepted:
                                         self.vcs.vcsSetOptions(codlg.getOptions())
                                 # add project file to repository
@@ -3149,7 +3157,7 @@
                     self.__pdata["VCS"] = "None"
                 self.vcs = self.initVCS()
                 if self.vcs is not None:
-                    vcsdlg = self.vcs.vcsOptionsDialog(self, self.name)
+                    vcsdlg = self.vcs.vcsOptionsDialog(self, self.name, parent=self.ui)
                     if vcsdlg.exec() == QDialog.DialogCode.Accepted:
                         vcsDataDict = vcsdlg.getData()
                     else:
@@ -3170,7 +3178,7 @@
                     else:
                         vcores = False
                     if vcores:
-                        codlg = VcsCommandOptionsDialog(self.vcs)
+                        codlg = VcsCommandOptionsDialog(self.vcs, parent=self.ui)
                         if codlg.exec() == QDialog.DialogCode.Accepted:
                             self.vcs.vcsSetOptions(codlg.getOptions())
 
@@ -3400,7 +3408,7 @@
         from .PropertiesDialog import PropertiesDialog
 
         isRemote = FileSystemUtilities.isRemoteFileName(self.ppath)
-        dlg = PropertiesDialog(self, new=False, isRemote=isRemote)
+        dlg = PropertiesDialog(self, new=False, isRemote=isRemote, parent=self.ui)
         if dlg.exec() == QDialog.DialogCode.Accepted:
             fileTypesDict = copy.copy(self.__pdata["FILETYPES"])
             dlg.storeData()
@@ -3519,7 +3527,7 @@
         vcsSystem = self.__pdata["VCS"] or None
         vcsSystemOverride = self.pudata["VCSOVERRIDE"] or None
 
-        dlg = UserPropertiesDialog(self)
+        dlg = UserPropertiesDialog(self, parent=self.ui)
         if dlg.exec() == QDialog.DialogCode.Accepted:
             dlg.storeData()
 
@@ -3557,7 +3565,9 @@
         """
         from .FiletypeAssociationDialog import FiletypeAssociationDialog
 
-        dlg = FiletypeAssociationDialog(self, self.getProjectData(dataKey="FILETYPES"))
+        dlg = FiletypeAssociationDialog(
+            self, self.getProjectData(dataKey="FILETYPES"), parent=self.ui
+        )
         if dlg.exec() == QDialog.DialogCode.Accepted:
             fileTypes = dlg.getData()
             self.setProjectData(fileTypes, dataKey="FILETYPES")
@@ -3587,7 +3597,7 @@
         """
         from .LexerAssociationDialog import LexerAssociationDialog
 
-        dlg = LexerAssociationDialog(self)
+        dlg = LexerAssociationDialog(self, parent=self.ui)
         if dlg.exec() == QDialog.DialogCode.Accepted:
             dlg.transferData()
             self.setDirty(True)
@@ -7037,6 +7047,7 @@
                 title=self.tr("Create Plugin Archive"),
                 message=self.tr("Select package lists:"),
                 checkBoxSelection=True,
+                parent=self.ui,
             )
             if dlg.exec() == QDialog.DialogCode.Accepted:
                 selectedLists = [
@@ -7627,7 +7638,7 @@
         """
         from eric7 import CycloneDXInterface
 
-        CycloneDXInterface.createCycloneDXFile("<project>")
+        CycloneDXInterface.createCycloneDXFile("<project>", parent=self.ui)
 
     #########################################################################
     ## Below are methods implementing the 'Code Formatting' support
@@ -7661,7 +7672,7 @@
         from eric7.CodeFormatting.BlackFormattingDialog import BlackFormattingDialog
 
         if ericApp().getObject("ViewManager").checkAllDirty():
-            dlg = BlackConfigurationDialog(withProject=True)
+            dlg = BlackConfigurationDialog(withProject=True, parent=self.ui)
             if dlg.exec() == QDialog.DialogCode.Accepted:
                 config = dlg.getConfiguration(saveToProject=True)
 
@@ -7670,6 +7681,7 @@
                     self.getProjectFiles("SOURCES", normalized=True),
                     project=self,
                     action=action,
+                    parent=self.ui,
                 )
                 formattingDialog.exec()
 
@@ -7683,7 +7695,9 @@
             BlackConfigurationDialog,
         )
 
-        dlg = BlackConfigurationDialog(withProject=True, onlyProject=True)
+        dlg = BlackConfigurationDialog(
+            withProject=True, onlyProject=True, parent=self.ui
+        )
         if dlg.exec() == QDialog.DialogCode.Accepted:
             dlg.getConfiguration(saveToProject=True)
             # The data is saved to the project as a side effect.
@@ -7711,7 +7725,7 @@
         from eric7.CodeFormatting.IsortFormattingDialog import IsortFormattingDialog
 
         if ericApp().getObject("ViewManager").checkAllDirty():
-            dlg = IsortConfigurationDialog(withProject=True)
+            dlg = IsortConfigurationDialog(withProject=True, parent=self.ui)
             if dlg.exec() == QDialog.DialogCode.Accepted:
                 config = dlg.getConfiguration(saveToProject=True)
 
@@ -7720,6 +7734,7 @@
                     self.getProjectFiles("SOURCES", normalized=True),
                     project=self,
                     action=action,
+                    parent=self.ui,
                 )
                 isortDialog.exec()
 
@@ -7733,7 +7748,9 @@
             IsortConfigurationDialog,
         )
 
-        dlg = IsortConfigurationDialog(withProject=True, onlyProject=True)
+        dlg = IsortConfigurationDialog(
+            withProject=True, onlyProject=True, parent=self.ui
+        )
         if dlg.exec() == QDialog.DialogCode.Accepted:
             dlg.getConfiguration(saveToProject=True)
             # The data is saved to the project as a side effect.
@@ -7822,7 +7839,8 @@
         environmentPath = self.__findEmbeddedEnvironment()
         if force or upgrade or not environmentPath:
             dlg = ProjectVenvCreationParametersDialog(
-                withSystemSitePackages=self.__venvConfiguration["system_site_packages"]
+                withSystemSitePackages=self.__venvConfiguration["system_site_packages"],
+                parent=self.ui,
             )
             if dlg.exec() != QDialog.DialogCode.Accepted:
                 # user canceled the environment creation
@@ -7849,7 +7867,7 @@
             if withSystemSitePackages:
                 args.append("--system-site-packages")
             args.append(configuration["targetDirectory"])
-            dia = VirtualenvExecDialog(configuration, None)
+            dia = VirtualenvExecDialog(configuration, None, parent=self.ui)
             dia.show()
             dia.start(args)
             dia.exec()
@@ -7894,6 +7912,7 @@
             environmentPath,
             self.__venvConfiguration["interpreter"],
             self.__venvConfiguration["exec_path"],
+            parent=self.ui,
         )
         if dlg.exec() == QDialog.DialogCode.Accepted:
             (

eric ide

mercurial