diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2011-01-10 10:54:39 +0100 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@nokia.com> | 2011-01-10 10:54:39 +0100 |
commit | e844400ca8468b3a2b25dab7687bab795d2fe54f (patch) | |
tree | da4593d387b275e760f564a3675e1180f47c70e7 | |
parent | 4d8d03f4f1012fc8d20822e83902816afc28106f (diff) |
HelperFunctions.RemoveDuplicates killed
This function destroyed include paths with spaces for the moc step.
Down with the string splitting magic!
Task-number: QTVSADDINBUG-41
-rw-r--r-- | Qt4VS2003/QtProjectLib/HelperFunctions.cs | 22 | ||||
-rw-r--r-- | Qt4VS2003/QtProjectLib/QtProject.cs | 1 |
2 files changed, 0 insertions, 23 deletions
diff --git a/Qt4VS2003/QtProjectLib/HelperFunctions.cs b/Qt4VS2003/QtProjectLib/HelperFunctions.cs index d0ed23d7..91857969 100644 --- a/Qt4VS2003/QtProjectLib/HelperFunctions.cs +++ b/Qt4VS2003/QtProjectLib/HelperFunctions.cs @@ -869,28 +869,6 @@ namespace Nokia.QtProjectLib } /// <summary> - /// Function can be used to remove duplicates from a string containing a list - /// of entries. - /// </summary> - /// <param name="entries">string containing the list of entries</param> - /// <param name="splitChars">defines the character(s) used between the - /// different entries</param> - /// <returns>The string without duplicated entries</returns> - public static string RemoveDuplicates(string entries, params char[] splitChars) - { - string[] entryArray = entries.Split(splitChars); - string returnString = ""; - Array.Sort(entryArray); - for (int i = 0; i < entryArray.Length - 1; i++) - { - if (!string.IsNullOrEmpty(entryArray[i]) && entryArray[i] != entryArray[i + 1]) - returnString += entryArray[i] + " "; - } - returnString += entryArray[entryArray.Length - 1]; - return returnString; - } - - /// <summary> /// Creates a temporary qt project template file. It creates the filters /// in the order specified by the array. /// </summary> diff --git a/Qt4VS2003/QtProjectLib/QtProject.cs b/Qt4VS2003/QtProjectLib/QtProject.cs index e69866c7..943fd1ba 100644 --- a/Qt4VS2003/QtProjectLib/QtProject.cs +++ b/Qt4VS2003/QtProjectLib/QtProject.cs @@ -1131,7 +1131,6 @@ namespace Nokia.QtProjectLib defineIncludeConfig = config; strDefinesIncludes += GetDefines(defineIncludeConfig); strDefinesIncludes += GetIncludes(defineIncludeConfig); - strDefinesIncludes = HelperFunctions.RemoveDuplicates(strDefinesIncludes, ' '); int cmdLineLength = newCmdLine.Length + strDefinesIncludes.Length + 1; if (cmdLineLength > HelperFunctions.GetMaximumCommandLineLength() && mocSupportsIncludes) { |