示例#1
0
 public ProjectQtSettings(EnvDTE.Project proj)
 {
     versionManager      = QtVersionManager.The();
     project             = proj;
     newMocDir           = oldMocDir = QtVSIPSettings.GetMocDirectory(project);
     newMocOptions       = oldMocOptions = QtVSIPSettings.GetMocOptions(project);
     newRccDir           = oldRccDir = QtVSIPSettings.GetRccDirectory(project);
     newUicDir           = oldUicDir = QtVSIPSettings.GetUicDirectory(project);
     newLUpdateOnBuild   = oldLUpdateOnBuild = QtVSIPSettings.GetLUpdateOnBuild(project);
     newLUpdateOptions   = oldLUpdateOptions = QtVSIPSettings.GetLUpdateOptions(project);
     newLReleaseOptions  = oldLReleaseOptions = QtVSIPSettings.GetLReleaseOptions(project);
     newDesignerOptions  = oldDesignerOptions = QtVSIPSettings.GetDesignerOptions(project);
     newLinguistOptions  = oldLinguistOptions = QtVSIPSettings.GetLinguistOptions(project);
     newAssistantOptions = oldAssistantOptions = QtVSIPSettings.GetAssistantOptions(project);
     newQtVersion        = oldQtVersion = versionManager.GetProjectQtVersion(project);
 }
示例#2
0
 public VSQtSettings()
 {
     newMocDir                    = QtVSIPSettings.GetMocDirectory();
     newMocOptions                = QtVSIPSettings.GetMocOptions();
     newRccDir                    = QtVSIPSettings.GetRccDirectory();
     newUicDir                    = QtVSIPSettings.GetUicDirectory();
     newLUpdateOnBuild            = QtVSIPSettings.GetLUpdateOnBuild();
     newLUpdateOptions            = QtVSIPSettings.GetLUpdateOptions();
     newLReleaseOptions           = QtVSIPSettings.GetLReleaseOptions();
     newDesignerOptions           = QtVSIPSettings.GetDesignerOptions();
     newLinguistOptions           = QtVSIPSettings.GetLinguistOptions();
     newAssistantOptions          = QtVSIPSettings.GetAssistantOptions();
     newAskBeforeCheckoutFile     = QtVSIPSettings.GetAskBeforeCheckoutFile();
     newDisableCheckoutFiles      = QtVSIPSettings.GetDisableCheckoutFiles();
     newDisableAutoMOCStepsUpdate = QtVSIPSettings.GetDisableAutoMocStepsUpdate();
 }
示例#3
0
        public static void loadLinguist(string fileName)
        {
            string qtVersion = null;

            QtVersionManager vm = QtVersionManager.The(HelperFunctions.GetSolutionPlaformName(Connect._applicationObject.Solution));

            Project prj = HelperFunctions.GetSelectedQtProject(Connect._applicationObject);

            if (prj != null)
            {
                vm.SetPlatform(prj.ConfigurationManager.ActiveConfiguration.PlatformName);
                qtVersion = vm.GetProjectQtVersion(prj);
                if (qtVersion == null)
                {
                    qtVersion = vm.GetSolutionQtVersion(Connect._applicationObject.Solution);
                }
            }
            else
            {
                prj = HelperFunctions.GetSelectedProject(Connect._applicationObject);
                if (prj != null && HelperFunctions.IsQMakeProject(prj))
                {
                    string qmakeQtDir = HelperFunctions.GetQtDirFromQMakeProject(prj);
                    qtVersion = vm.GetQtVersionFromInstallDir(qmakeQtDir);
                }
                if (qtVersion == null)
                {
                    qtVersion = vm.GetSolutionQtVersion(Connect._applicationObject.Solution);
                }
            }

            string qtDir = HelperFunctions.FindQtDirWithTools("linguist", qtVersion);

            if (qtDir == null || qtDir.Length == 0)
            {
                MessageBox.Show(SR.GetString("NoDefaultQtVersionError"),
                                Resources.msgBoxCaption);
                return;
            }

            try
            {
                string workingDir = null;
                string arguments  = null;
                if (fileName != null)
                {
                    workingDir = Path.GetDirectoryName(fileName);
                    arguments  = fileName;
                    if (!arguments.StartsWith("\""))
                    {
                        arguments = "\"" + arguments;
                    }
                    if (!arguments.EndsWith("\""))
                    {
                        arguments += "\"";
                    }
                }
                string options = QtVSIPSettings.GetLinguistOptions(prj);
                if (options != null && options != "")
                {
                    arguments = options + " " + arguments;
                }
                System.Diagnostics.Process tmp = getQtApplicationProcess("linguist", arguments, workingDir, qtDir);
                tmp.Start();
            }
            catch
            {
                MessageBox.Show(SR.GetString("QtAppNotFoundErrorMessage", "Qt Linguist"),
                                SR.GetString("QtAppNotFoundErrorTitle", "Linguist"));
            }
        }