From c0193701e967511c9e3344b01144fe83b463bd07 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Mon, 29 Aug 2016 17:42:28 +0200 Subject: [PATCH 01/72] Update German translations Change-Id: I33dcbb0e98a961b1f2c75cd4a461e65daa93dd4a Reviewed-by: Christian Stenger --- share/qtcreator/translations/qtcreator_de.ts | 4223 +++++++++++------- 1 file changed, 2633 insertions(+), 1590 deletions(-) diff --git a/share/qtcreator/translations/qtcreator_de.ts b/share/qtcreator/translations/qtcreator_de.ts index bce47b775cc..4151e09800e 100644 --- a/share/qtcreator/translations/qtcreator_de.ts +++ b/share/qtcreator/translations/qtcreator_de.ts @@ -229,6 +229,26 @@ Build directory: Build-Verzeichnis: + + &Add + Hinzu&fügen + + + &Boolean + &Boolesche Variable + + + &String + &Zeichenkette + + + &Directory + &Verzeichnis + + + &File + &Datei + &Edit B&earbeiten @@ -245,6 +265,10 @@ Apply Configuration Changes Konfigurationsänderungen anwenden + + <UNSET> + <Nicht gesetzt> + CMake CMake @@ -1349,121 +1373,6 @@ Trotzdem fortfahren? Obj-C++11 - - CppTools::Internal::CompletionSettingsPage - - Completion - Ergänzung - - - Behavior - Verhalten - - - &Case-sensitivity: - &Groß/Kleinschreibung: - - - Full - Vollständig - - - None - Keine - - - First Letter - Erster Buchstabe - - - Activate completion: - Code-Vervollständigung aktivieren: - - - Manually - Manuell - - - When Triggered - Auf Anforderung - - - Always - Immer - - - Autocomplete common &prefix - Gemeinsamen &Präfix ergänzen - - - &Automatically insert matching characters - &Passende Zeichen automatisch einfügen - - - Surround &text selections - Ausgewählten Text &einschließen - - - Insert &space after function name - Leerzeichen nach &Funktionsname einfügen - - - Documentation Comments - Kommentare für Dokumentation - - - Enable Doxygen blocks - Doxygen-Blöcke aktivieren - - - Generate brief description - Kurzbeschreibung erstellen - - - Add leading asterisks - Vorangehenden Asterisk einfügen - - - Inserts the common prefix of available completion items. - Fügt den gemeinsamen Präfix aller verfügbaren Vervollständigungen ein. - - - Automatically inserts semicolons and closing brackets, parentheses, curly braces, and quotes when appropriate. - Fügt sofern angebracht automatisch Semikola und schließende eckige Klammern, schließende runde Klammern, schließende geschweifte Klammern und schließende Anführungszeichen ein. - - - When typing a matching character and there is a text selection, instead of removing the selection, surrounds it with the corresponding characters. - Wenn eine Textauswahl existiert und man ein passendes Zeichen eingibt, wird die Auswahl in die entsprechenden Zeichen eingeschlossen, anstatt sie zu löschen. - - - Generates a <i>brief</i> command with an initial description for the corresponding declaration. - Erstellt ein <i>brief</i>-Kommando mit einer anfänglichen Beschreibung für die entsprechende Deklaration. - - - Automatically creates a Doxygen comment upon pressing enter after a '/**', '/*!', '//!' or '///'. - Erstellt automatisch einen Doxygen-Kommentar, wenn man nach '/**', '/*!', '//!' oder '///' die Enter-Taste betätigt. - - - Adds leading asterisks when continuing C/C++ "/*", Qt "/*!" and Java "/**" style comments on new lines. - Fügt voranstehende Asterisk-Zeichen ein, wenn Kommentare im C/C++-Stil "/*", Qt-Stil "/*!" oder Java-Stil "/**" auf neuen Zeilen fortgesetzt werden. - - - Automatically split strings - Zeichenketten automatisch teilen - - - Splits a string into two lines by adding an end quote at the cursor position when you press Enter and a start quote to the next line, before the rest of the string. - -In addition, Shift+Enter inserts an escape character at the cursor position and moves the rest of the string to the next line. - Fügt Anführungszeichen an der aktuellen Position und am Beginn der nächsten Zeile vor der restlichen Zeichenkette ein, um eine Zeichenkette zu teilen, wenn Sie die Eingabetaste drücken. - -Drücken Sie zusätzlich die Umschalttaste, wird ein Escape-Zeichen an der aktuellen Position eingefügt und der Rest der Zeichenkette in die nächste Zeile verschoben. - - - Timeout in ms: - Zeitüberschreitung nach (ms): - - CppTools::Internal::CppCurrentDocumentFilter @@ -2493,10 +2402,6 @@ Versuchen Sie: %2 Cannot create snapshot file. Es konnte keine Snapshot-Datei erstellt werden. - - Finished retrieving data - Alle Daten erhalten - Cannot read widget data: %1 Die Widget-Daten konnten nicht gelesen werden: %1 @@ -3037,6 +2942,10 @@ markers in the source code editor. <invalid> <ungültig> + + <out of scope> + <nicht im Scope> + <not accessible> <unzugänglich> @@ -3138,6 +3047,14 @@ markers in the source code editor. Latin1 String in Separate Window Latin1-Zeichenkette in eigenem Fenster + + Normal + Normal + + + Separate Window + Separates Fenster + UTF-8 String in Separate Window UTF8-Zeichenkette in eigenem Fenster @@ -3729,9 +3646,12 @@ Grund: %3 Git::Internal::BranchDialog - - Include branches and tags that have not been active for %1 days. - Branches und Tags einschließen, die seit %1 Tagen nicht benutzt wurden. + + Include branches and tags that have not been active for %n days. + + Branches und Tags einschließen, die seit einem Tag nicht benutzt wurden. + Branches und Tags einschließen, die seit %n Tagen nicht benutzt wurden. + Checkout @@ -3939,10 +3859,6 @@ Grund: %3 Description: Beschreibung: - - Cannot run "%1 %2" in "%2": %3 - Das Kommando "%1 %2" konnte im Verzeichnis "%2" nicht ausgeführt werden: %3 - Git Diff Project Git Diff für Projekt @@ -4061,6 +3977,10 @@ Jetzt Commit durchführen? Git Diff Files Git Diff von Dateien + + Cannot run "%1" in "%2": %3 + Das Kommando "%1" konnte im Verzeichnis "%2" nicht ausgeführt werden: %3 + Git Diff "%1" Git Diff "%1" @@ -5300,6 +5220,14 @@ Add, modify, and remove document filters, which determine the documentation set GLSL/ES Geometry Shader file GLSL/ES Geometrie Shader-Datei + + Nim project file + Nim-Projektdatei + + + Nim source file + Nim-Quelldatei + Linguist translated messages (machine-readable) Linguist-Übersetzungen (maschinenlesbar) @@ -5373,6 +5301,10 @@ Add, modify, and remove document filters, which determine the documentation set Qt Project feature file Qt-Projekt-Feature-Datei + + Scxml State Chart + Scxml-Zustandsdiagramm + Qt Resource file Qt-Ressourcendatei @@ -5455,6 +5387,10 @@ Add, modify, and remove document filters, which determine the documentation set Model Editor Model-Editor + + Nim Editor + Nim-Editor + Perforce::Internal::ChangeNumberDialog @@ -5949,29 +5885,6 @@ Add, modify, and remove document filters, which determine the documentation set Nutzer: - - PluginDialog - - Details - Beschreibung - - - Error Details - Fehlermeldungen - - - Installed Plugins - Installierte Plugins - - - Plugin Details of %1 - Beschreibung zu %1 - - - Plugin Errors of %1 - Fehlermeldungen von %1 - - PluginManager @@ -6160,6 +6073,10 @@ Add, modify, and remove document filters, which determine the documentation set Error while building/deploying project %1 (kit: %2) Fehler beim Erstellen/Deployment des Projekts %1 (Kit: %2) + + The kit %1 has configuration issues which might be the root cause for this problem. + Das Kit %1 enthält Konfigurationsprobleme, die die Ursache für dieses Problem sein könnten. + Running steps for project %1... Führe Schritte für Projekt %1 aus... @@ -6573,6 +6490,10 @@ Add, modify, and remove document filters, which determine the documentation set <i>jom</i> is a drop-in replacement for <i>nmake</i> which distributes the compilation process to multiple CPU cores. The latest binary is available at <a href="http://download.qt.io/official_releases/jom/">http://download.qt.io/official_releases/jom/</a>. Disable it if you experience problems with your builds. <i>jom</i> ist ein Ersatz für <i>nmake</i>, der den Kompilationsprozess auf mehrere Prozessorkerne verteilt. Eine aktuelle Version erhalten Sie unter <a href="http://download.qt.io/official_releases/jom/">http://download.qt.io/official_releases/jom/</a>. Deaktivieren Sie es, wenn Probleme beim Build auftreten. + + Same Build Directory + Gleiches Build-Verzeichnis + ProjectExplorer::Internal::ProjectFileFactory @@ -7113,6 +7034,10 @@ Möchten Sie sie ignorieren? New Subproject... Neues Teilprojekt... + + Duplicate File... + Datei duplizieren... + Ctrl+T Ctrl+T @@ -7219,6 +7144,22 @@ Möchten Sie sie ignorieren? Could not add following files to project %1: Die folgenden Dateien konnten nicht zum Projekt "%1" hinzugefügt werden: + + _copy + _kopie + + + _copy%1 + _kopie%1 + + + Duplicating File Failed + Datei konnte nicht dupliziert werden + + + Could not duplicate the file %1. + Die Datei %1 konnte nicht dupliziert werden. + Delete File Datei löschen @@ -7527,6 +7468,14 @@ Rename %2 to %3 anyway? Classes for displaying the contents of SVG files Klassen zur Anzeige des Inhalts von SVG-Dateien + + Classes for displaying and editing Web content using Chromium backend + Klassen zum Anzeigen und Bearbeiten von Web-Inhalten mithilfe des Chromium-Backends + + + WebEngine and QWidget-based classes using Chromium backend + Auf WebEngine und QWidget basierende Klassen, die das Chromium-Backend verwenden + Classes for displaying and editing Web content Klassen zum Anzeigen und Bearbeiten von Web-Inhalten @@ -8198,480 +8147,6 @@ Rename %2 to %3 anyway? Zeile im aktuellen Dokument - - TextEditor::TextEditorSettings - - Text - Text - - - Link - Verweis - - - Links that follow symbol under cursor. - Verweise, die dem Symbol unter der Einfügemarke folgen. - - - Selection - Auswahl - - - Selected text. - Ausgewählter Text. - - - Line Number - Zeilennummer - - - Line numbers located on the left side of the editor. - Zeilennummern an der linken Seite des Editors. - - - Search Result - Suchergebnisse - - - Highlighted search results inside the editor. - Hervorgehobene Suchergebnisse im Editor. - - - Search Scope - Suchbereich - - - Section where the pattern is searched in. - Bereich, in dem das Muster gesucht wird. - - - Parentheses - Klammern - - - Mismatched Parentheses - Unpaarige Klammern - - - Displayed when mismatched parentheses, square brackets, or curly brackets are found. - Wird angezeigt, wenn runde, eckige oder geschweifte Klammern nicht paarweise vorkommen. - - - Current Line - Aktuelle Zeile - - - Line where the cursor is placed in. - Zeile, in der sich die Einfügemarke befindet. - - - Current Line Number - Zeilennummer - - - Line number located on the left side of the editor where the cursor is placed in. - Nummer der Zeile, in der sich die Einfügemarke befindet, an der linken Seite des Editors. - - - Occurrences - Vorkommen - - - Unused Occurrence - Nicht verwendet - - - Renaming Occurrence - Umbenennung - - - Number - Zahl - - - Number literal. - Zahlenliteral. - - - String - Zeichenkette - - - Character and string literals. - Zeichen- und Zeichenkettenliterale. - - - Primitive Type - Einfacher Typ - - - Name of a primitive data type. - Name eines einfachen Datentyps. - - - Type - Typ - - - Name of a type. - Typname. - - - Local - Lokale Variable - - - Local variables. - Lokale Variablen. - - - Field - Feld - - - Class' data members. - Mitgliedsvariablen von Klassen. - - - Enumeration - Aufzählung - - - Applied to enumeration items. - Wird auf Aufzählungen angewandt. - - - Virtual Function - Virtuelle Funktion - - - Name of function declared as virtual. - Name einer als virtuell deklarierten Funktion. - - - QML item id within a QML file. - QML-Element-ID in einer QML-Datei. - - - QML property of a parent item. - QML-Eigenschaft eines externen QML-Objektes. - - - Property of the same QML item. - Eigenschaft desselben QML-Objektes. - - - Function - Funktion - - - Name of a function. - Funktionsname. - - - QML Binding - QML-Binding - - - QML item property, that allows a binding to another property. - QML-Eigenschaft, die ein Binding zu einer anderen Eigenschaft ermöglicht. - - - QML Local Id - Lokale QML-Id - - - Displayed when matching parentheses, square brackets or curly brackets are found. - Wird angezeigt, wenn passende Klammern, eckige oder geschweifte Klammern gefunden werden. - - - Occurrences of the symbol under the cursor. -(Only the background will be applied.) - Vorkommen des unter der Einfügemarke befindlichen Symbols. -(Nur der Hintergrund wird benutzt.) - - - Generic text. -Applied to text, if no other rules matching. - Generischer Text. -Wird auf Text angewandt, sofern keine andere Regel zutrifft. - - - Occurrences of unused variables. - Vorkommen unbenutzter Variablen. - - - Occurrences of a symbol that will be renamed. - Vorkommen eines umzubenennenden Symbols. - - - QML State Name - Name eines States in QML - - - Name of a QML state. - Name eines States in QML. - - - QML Type Name - Name eines QML-Typs - - - Name of a QML type. - Name eines QML-Typs. - - - QML External Id - Externe QML-Id - - - QML id defined in another QML file. - In einer anderen QML-Datei definierte QML-Element-Id. - - - QML External Object Property - Eigenschaft eines externen QML-Objektes - - - QML property defined in another QML file. - In einer anderen QML-Datei definierte QML-Eigenschaft. - - - JavaScript Scope Var - JavaScript-Variable im Bereich - - - - Variables defined inside the JavaScript file. - In einer JavaScript-Datei definierte Variable. - - - JavaScript Import - JavaScript-Import - - - Name of a JavaScript import inside a QML file. - Name eines JavaScript-Imports in einer QML-Datei. - - - JavaScript Global Variable - Globale JavaScript-Variable - - - Variables defined outside the script. - Außerhalb des Skripts definierte Variablen. - - - Keyword - Schlüsselwort - - - Operator - Operator - - - Operators (for example operator++ or operator-=). - Operatoren (zum Beispiel operator++ operator-=). - - - Preprocessor - Präprozessor - - - Preprocessor directives. - Präprozessor-Anweisungen. - - - Label - Sprungmarke - - - Comment - Kommentar - - - All style of comments except Doxygen comments. - Nicht-Doxygen-Kommentare. - - - Doxygen Comment - Doxygen-Kommentar - - - Doxygen comments. - Doxygen-Kommentare. - - - Doxygen Tag - Doxygen-Schlüsselwort - - - Visual Whitespace - Leerzeichen darstellen - - - Applied to added lines in differences (in diff editor). - Wird auf hinzugefügte Zeilen angewandt (in Diff-Editor). - - - Applied to removed lines in differences (in diff editor). - Wird auf entfernte Zeilen angewandt (in Diff-Editor). - - - Disabled Code - Deaktivierter Code - - - QML Root Object Property - Eigenschaft des QML-Wurzelelements - - - QML Scope Object Property - Objekteigenschaft im Gültigkeitsbereich von QML - - - Reserved keywords of the programming language except keywords denoting primitive types. - Reservierte Schlüsselworte der Programmiersprache außer Schlüsselworte, die einfache Typen bezeichnen. - - - Labels for goto statements. - Sprungmarken für goto-Befehle. - - - Doxygen tags. - Doxygen-Schlüsselworte. - - - Whitespace. -Will not be applied to whitespace in comments and strings. - Leerzeichen. -Außer Leerzeichen innerhalb von Kommentaren und Zeichenketten. - - - Code disabled by preprocessor directives. - Durch Präprozessor-Anweisungen deaktivierter Code. - - - Added Line - Hinzugefügte Zeile - - - Removed Line - Entfernte Zeile - - - Diff File - Diff-Dateiangabe - - - Compared files (in diff editor). - Verglichene Dateien (in Diff-Editor). - - - Diff Location - Diff-Zeilenangabe - - - Location in the files where the difference is (in diff editor). - Stelle, an der sich der Unterschied befindet (in Diff-Editor). - - - Diff File Line - Diff-Dateizeile - - - Applied to lines with file information in differences (in side-by-side diff editor). - Wird auf Zeilen mit Dateiinformationen in den Unterschieden angewandt (bei Anzeige mit Gegenüberstellung der Unterschiede). - - - Diff Context Line - Diff-Kontextzeile - - - Applied to lines describing hidden context in differences (in side-by-side diff editor). - Wird auf Zeilen angewandt, die verborgenen Kontext in den Unterschieden beschreiben (bei Anzeige mit Gegenüberstellung der Unterschiede). - - - Diff Source Line - Diff-Zeile aus Quelldatei - - - Applied to source lines with changes in differences (in side-by-side diff editor). - Wird auf geänderte Zeilen der Quelldatei in den Unterschieden angewandt (bei Anzeige mit Gegenüberstellung der Unterschiede). - - - Diff Source Character - Diff-Zeichen aus Quelldatei - - - Applied to removed characters in differences (in side-by-side diff editor). - Wird auf gelöschte Zeichen in den Unterschieden angewandt (bei Anzeige mit Gegenüberstellung der Unterschiede). - - - Diff Destination Line - Diff-Zeile aus Zieldatei - - - Applied to destination lines with changes in differences (in side-by-side diff editor). - Wird auf geänderte Zeilen der Zieldatei in den Unterschieden angewandt (bei Anzeige mit Gegenüberstellung der Unterschiede). - - - Diff Destination Character - Diff-Zeichen aus Zieldatei - - - Applied to added characters in differences (in side-by-side diff editor). - Wird auf hinzugefügte Zeichen in den Unterschieden angewandt (bei Anzeige mit Gegenüberstellung der Unterschiede). - - - Log Change Line - Zeile in Änderungslogs - - - Applied to lines describing changes in VCS log. - Wird auf Zeilen angewendet, die Änderungen in einem Versionskontroll-Log beschreiben. - - - Error - Fehler - - - Underline color of error diagnostics. - Unterstreichung von Fehlern. - - - Error Context - Fehlerkontext - - - Underline color of the contexts of error diagnostics. - Unterstreichung der Kontexte von Fehlern. - - - Warning - Warnung - - - Underline color of warning diagnostics. - Unterstreichung von Warnungen. - - - Warning Context - Warnungskontext - - - Underline color of the contexts of warning diagnostics. - Unterstreichung der Kontexte von Warnungen. - - - Behavior - Verhalten - - - Display - Anzeige - - TopicChooser @@ -9157,64 +8632,88 @@ Außer Leerzeichen innerhalb von Kommentaren und Zeichenketten. QmlParser - Unclosed string at end of line - Zeichenkette am Zeilenende nicht geschlossen + Illegal syntax for exponential number. + Ungültige Syntax des Exponenten der Zahl. - Illegal unicode escape sequence - Ungültige Unicode-Escape-Sequenz + Stray newline in string literal. + Nicht zugehöriges Zeilenende-Zeichen in Zeichenkettenliteral. - Illegal syntax for exponential number - Ungültige Syntax des Exponenten der Zahl + Illegal unicode escape sequence. + Ungültige Unicode-Escape-Sequenz. - Stray newline in string literal - Nicht zugehöriges Zeilenende-Zeichen in Zeichenkettenliteral + Illegal hexadecimal escape sequence. + Ungültige hexadezimale Escape-Sequenz. - Illegal hexadecimal escape sequence - Ungültige hexadezimale Escape-Sequenz + Octal escape sequences are not allowed. + Oktale Escape-Sequenzen sind nicht zulässig. - Octal escape sequences are not allowed - Oktale Escape-Sequenzen sind nicht zulässig + Unclosed string at end of line. + Zeichenkette am Zeilenende nicht geschlossen. - Decimal numbers can't start with '0' - Dezimalzahlen dürfen nicht mit '0' beginnen + Decimal numbers cannot start with "0". + Dezimalzahlen dürfen nicht mit "0" beginnen. - At least one hexadecimal digit is required after '0%1' - Auf '0%1' muss mindestens eine Hexadezimalziffer folgen + At least one hexadecimal digit is required after "0%1". + Auf "0%1" muss mindestens eine Hexadezimalziffer folgen. - Unterminated regular expression literal - Regulärer Ausdruck nicht abgeschlossen + Invalid regular expression flag "%0". + Ungültiger Modifikator für regulären Ausdruck "%0". - Invalid regular expression flag '%0' - Ungültiger Modifikator für regulären Ausdruck '%0' + Unterminated regular expression backslash sequence. + Der reguläre Ausdruck endet mit einer nicht abgeschlossenen Backslash-Sequenz. - Unterminated regular expression backslash sequence - Der reguläre Ausdruck endet mit einer nicht abgeschlossenen Backslash-Sequenz + Unterminated regular expression class. + Nicht abgeschlossene Zeichenklassenangabe innerhalb des regulären Ausdrucks. - Unterminated regular expression class - Nicht abgeschlossene Zeichenklassenangabe innerhalb des regulären Ausdrucks + Unterminated regular expression literal. + Regulärer Ausdruck nicht abgeschlossen. - Syntax error - Syntaxfehler + Syntax error. + Syntaxfehler. - Unexpected token `%1' - Unerwartetes Token '%1' + Imported file must be a script. + Importierte Datei muss ein Skript sein. - Expected token `%1' - Es wird das Token '%1' erwartet + Invalid module URI. + Ungültiger Modul-URI. + + + Module import requires a version. + Modul-Import benötigt eine Version. + + + File import requires a qualifier. + Datei-Import benötigt einen Qualifier. + + + Module import requires a qualifier. + Modul-Import benötigt einen Qualifier. + + + Invalid import qualifier. + Ungültiger Import-Qualifier. + + + Unexpected token "%1". + Unerwartetes Token "%1". + + + Expected token "%1". + Es wird das Token "%1" erwartet. @@ -9467,10 +8966,6 @@ Sie können die Änderungen in einem Stash ablegen oder zurücksetzen. ProjectExplorer::Internal::TargetSettingsWidget - - TargetSettingsWidget - TargetSettingsWidget - Add Kit Kit hinzufügen @@ -9642,6 +9137,30 @@ Sie können die Änderungen in einem Stash ablegen oder zurücksetzen.Debug QML emulation layer: Debug-QML-Emulationsschicht: + + Controls 2 style + Controls-2-Stil + + + Default + Default + + + Material + Material + + + Universal + Universal + + + Qt Quick Designer will propose to open .ui.qml files instead of opening a .qml file. + Qt Quick Designer wird vorschlagen, .ui.qml-Dateien statt einer .qml-Datei zu öffnen. + + + Warn about using .qml files instead of .ui.qml files + Bei der Benutzung von .qml-Dateien statt .ui.qml-Dateien warnen + Utils::UnixTools @@ -10350,6 +9869,10 @@ Sie können die Änderungen in einem Stash ablegen oder zurücksetzen.Name of current build Name der gegenwärtigen Build-Konfiguration + + Main file of current project + Hauptdatei des aktuellen Projekts + Name of current project Name des aktuellen Projekts @@ -10491,14 +10014,6 @@ Dies ist unabhängig vom Wert der Eigenschaft "visible" in QML. WidgetPluginManager - - Failed to create instance. - Es konnte keine Instanz erzeugt werden. - - - Not a QmlDesigner plugin. - Kein QmlDesigner-Plugin. - Failed to create instance of file '%1': %2 Es konnte keine Instanz der Datei '%1' erzeugt werden: %2 @@ -10520,54 +10035,39 @@ Dies ist unabhängig vom Wert der Eigenschaft "visible" in QML.Status - - QmlDesigner::RewriterView - - Error parsing - Fehler beim Parsen - - - Internal error - Interner Fehler - - - "%1" - "%1" - - - line %1 - Zeile %1 - - - column %1 - Spalte %1 - - QmlDesigner::Internal::DocumentWarningWidget - Placeholder - Platzhalter + Cannot open this QML document because of an error in the QML file: + Dieses QML-Dokument kann wegen eines Fehlers in der QML-Datei nicht geöffnet werden: - <a href="goToError">Go to error</a> - <a href="goToError">Gehe zu Fehler</a> + OK + OK - %3 (%1:%2) - %3 (%1:%2) + This QML file contains features which are not supported by Qt Quick Designer at: + Diese QML-Datei enthält Features, die von Qt Quick Designer nicht unterstützt werden: - Internal error (%1) - Interner Fehler (%1) + Ignore + Ignorieren - Cannot open this QML document because of an error in the QML file: - - - Dieses QML-Dokument kann wegen eines Fehlers in der QML-Datei nicht geöffnet werden: - - + Previous + Vorige Meldung + + + Next + Nächste Meldung + + + Go to error + Zu Fehler gehen + + + Go to warning + Zu Warnung gehen @@ -10895,13 +10395,6 @@ Dies ist unabhängig vom Wert der Eigenschaft "visible" in QML.Erstellung und Ausführung - - QmlDesigner::PluginManager - - About Plugins - Über Plugins - - Core::DesignMode @@ -11227,7 +10720,9 @@ Import paths: For qmake projects, use the QML_IMPORT_PATH variable to add import paths. For Qbs projects, declare and set a qmlImportPaths property in your product to add import paths. -For qmlproject projects, use the importPaths property to add import paths. +For qmlproject projects, use the importPaths property to add import paths. +For CMake projects, make sure QML_IMPORT_PATH variable is in CMakeCache.txt. + QML-Modul nicht gefunden. Importpfade: @@ -11235,7 +10730,9 @@ Importpfade: Für qmake-Projekte benutzen Sie die Variable QML_IMPORT_PATH, um Importpfade hinzuzufügen. Für Qbs-Projekte geben Sie eine qmlImportPaths-Eigenschaft in Ihrem Produkt an, um Importpfade hinzuzufügen. -Für qmlproject-Projekte benutzen Sie die Eigenschaft importPaths, um Importpfade hinzuzufügen. +Für qmlproject-Projekte benutzen Sie die Eigenschaft importPaths, um Importpfade hinzuzufügen. +Für CMake-Projekte stellen Sie sicher, dass die Variable QML_IMPORT_PATH in CMakeCache.txt steht. + QML module contains C++ plugins, currently reading type information... @@ -11363,46 +10860,6 @@ Für qmlproject-Projekte benutzen Sie die Eigenschaft importPaths, um Importpfad Qt Creator Plugin Qt Creator-Plugin - - Creates a new project including auto test skeleton. - Erzeugt ein neues Projekt mit Autotestgerüst. - - - Auto Test - Autotest - - - Project and Test Information - Projekt- und Testinformation - - - GUI Application - GUI-Anwendung - - - Test Case Name: - Testfallname: - - - Requires QApplication - Benötigt QApplication - - - Generate initialization and cleanup code - Code für Initialisierung und Bereinigung erzeugen - - - Build auto tests - Erstelle Autotests - - - always - immer - - - debug only - Nur Debug - Creates a qmake-based test project for which a code snippet can be entered. Erstellt ein qmake-basiertes Testprojekt, für welches ein Code-Ausschnitt angegeben werden kann. @@ -12451,14 +11908,6 @@ Flags: %3 Failed to Start the Debugger Der Debugger konnte nicht gestartet werden - - Normal - Normal - - - Separate Window - Separates Fenster - There is no CDB executable specified. Es wurde keine ausführbare Datei für CDB angegeben. @@ -13172,6 +12621,16 @@ wenn es außerhalb von git bash aufgerufen wird. Command: Befehl: + + NOTE: This log contains possibly confidential information about your machine, environment variables, in-memory data of the processes you are debugging, and more. It is never transferred over the internet by Qt Creator, and only stored to disk if you manually use the respective option from the context menu, or through mechanisms that are not under Qt Creator's control, for instance in swap files. +You may be asked to share the contents of this log when reporting bugs related to debugger operation. In this case, make sure your submission does not contain data you do not want to or you are not allowed to share. + + + Hinweis: Dieses Log enhält möglicherweise vertrauliche Informationen über Ihren Computer, Umgebungsvariablen, Speicherinhalte der untersuchten Prozesse und weiteres. Es wird von Qt Creator nie über das Internet übertragen und nur auf der Festplatte gespeichert, wenn Sie die entsprechende Option aus dem Kontextmenü aufrufen, oder durch Abläufe, die Qt Creator nicht beeinflussen kann, bespielsweise Auslagerungsdateien. +Sie werden möglicherweise gebeten, den Inhalt dieses Logs mitzuteilen, wenn Sie Fehlfunktionen des Debugger berichten. In diesem Fall achten Sie darauf, dass Ihre Einsendung nur Daten enthält, die Sie weitergeben wollen und dürfen. + + + User commands are not accepted in the current state. Die Eingabe von Nutzerkommandos ist in diesem Zustand nicht möglich. @@ -13184,8 +12643,8 @@ wenn es außerhalb von git bash aufgerufen wird. QmlJSEditor::Internal::ComponentNameDialog - Choose a path - Pfad auswählen + Property assignments for %1: + Eigenschaftszuweisungen für %1: Invalid component name @@ -13207,6 +12666,14 @@ wenn es außerhalb von git bash aufgerufen wird. Move Component into Separate File Verschiebe Komponente in separate Datei + + Property assignments for + Eigenschaftszuweisungen für + + + Component Name + Komponentenname + ProjectExplorer::BuildableHelperLibrary @@ -13268,19 +12735,6 @@ wenn es außerhalb von git bash aufgerufen wird. Suche nach Referenzen - - ProjectExplorer::QmlDumpTool - - qmldump could not be built in any of the directories: -- %1 - -Reason: %2 - qmldump konnte in keinem der folgenden Ordner erstellt werden: -- %1 - -Fehler: %2 - - CppEditor::InsertDefOperation @@ -13395,6 +12849,14 @@ Fehler: %2 Major version different from 1 not supported. Andere Hauptversionen als 1 werden nicht unterstützt. + + Expected dependency definitions + Abhängigkeitsdefinitionen erwartet + + + Cannot read dependency: skipping. + Abhängigkeiten können nicht gelesen werden: Werden übersprungen. + Expected only Property, Method, Signal and Enum object definitions, not "%1". Es sollten nur Eigenschafts-, Methoden-, Signal- oder Aufzählungsobjektdefinitionen vorhanden sein, nicht jedoch "%1". @@ -14157,6 +13619,10 @@ Soll es noch einmal versucht werden? QML debugging port not set: Unable to convert %1 to unsigned int. Kein Port für QML-Debuggen gesetzt: %1 kann nicht in eine vorzeichenlose Ganzzahl gewandelt werden. + + Waiting for JavaScript engine to interrupt on next statement. + Warte, dass die JavaScript-Engine am nächsten Ausdruck unterbricht. + Run to line %1 (%2) requested... Ausführung bis Zeile %1 (%2) angefordert... @@ -14682,6 +14148,14 @@ Lokale Pull-Operationen werden nicht auf den Master-Branch angewandt.Add Category Kategorie hinzufügen + + PATH=C:\dev\bin;${PATH} + PATH=C:\dev\bin;${PATH} + + + PATH=/opt/bin:${PATH} + PATH=/opt/bin:${PATH} + Show in Pane In Panel anzeigen @@ -15748,6 +15222,14 @@ Gibt an, wie sich die Rücktaste bezüglich Einrückung verhält. Function declarations Funktionsdeklarationen + + Getter and Setter + Getter und Setter + + + Prefer getter names without "get" + Getter-Namen ohne "get" bevorzugen + Git::Internal::RemoteAdditionDialog @@ -16845,8 +16327,8 @@ Bei vollständiger Cache-Simulation werden weitere Ereigniszähler aktiviert: Vergangen: %1 - QML traces (*%1) - QML-Traces (*%1) + QML traces (*%1 *%2) + QML-Traces (*%1 *%2) You are about to discard the profiling data, including unsaved notes. Do you want to continue? @@ -17944,18 +17426,6 @@ Zusätzlich wird die Verbindung zum Gerät getestet. Could not delete file %1. Die Datei %1 konnte nicht gelöscht werden. - - Click and type the new key sequence. - Hier klicken, um die neue Tastenkombination einzutippen. - - - Stop Recording - Aufnahme beenden - - - Record - Aufnehmen - BaseFileWizard @@ -18890,6 +18360,14 @@ Diese Präfixe werden zusätzlich zum Dateinamen beim Wechseln zwischen Header- Configuration unchanged, skipping qmake step. Unveränderte Konfiguration, qmake-Schritt wird übersprungen. + + <no Qt version> + <keine Qt-Version> + + + <no Make step found> + <kein Make-Schritt gefunden> + QtSupport::Internal::ShowBuildLog @@ -19856,13 +19334,6 @@ should a repository require SSH-authentication (see documentation on SSH and the Zeigt Graph als Text an. - - ProjectExplorer::EnvironmentItemsDialog - - Edit Environment - Umgebung bearbeiten - - ProjectExplorer::Internal::ProjectListWidget @@ -20821,6 +20292,14 @@ should a repository require SSH-authentication (see documentation on SSH and the QSsh::Internal::SshChannelManager + + Unexpected request success packet. + Unerwartetes Paket über Erfolg einer Anfrage. + + + Unexpected request failure packet. + Unerwartetes Paket über Scheitern einer Anfrage. + Invalid channel id %1 Ungültiger Kanalbezeichner %1 @@ -21026,26 +20505,14 @@ should a repository require SSH-authentication (see documentation on SSH and the Failed to forward C++ debugging ports. Reason: %1. Die C++-Debuggerports konnten nicht übermittelt werden. Grund: %1. - - Failed to forward C++ debugging ports. - C++-Debuggerports konnten nicht übermittelt werden. - Failed to forward ping pong ports. Reason: %1. Die Ping-Pong-Ports konnten nicht übermittelt werden. Grund: %1. - - Failed to forward ping pong ports. - Die Ping-Pong-Ports konnten nicht übermittelt werden. - Failed to forward QML debugging ports. Reason: %1. Die QML-Debuggerports konnten nicht übermittelt werden. Grund: %1. - - Failed to forward QML debugging ports. - QML-Debuggerports konnten nicht übermittelt werden. - Failed to start the activity. Reason: %1. Die Aktivität konnte nicht gestartet werden: Grund: %1. @@ -21246,8 +20713,8 @@ Wählen Sie Einstellungen > Erstellung und Ausführung > Qt Versionen, um Debugger::Internal::GdbAttachEngine - Attached to process %1. - An Prozess %1 angehängt. + Attaching to process %1. + Anhängen an Prozess %1. Attached to running application @@ -21347,6 +20814,22 @@ Wählen Sie Einstellungen > Erstellung und Ausführung > Qt Versionen, um Reading debug information failed: Das Lesen der Debug-Informationen schlug fehl: + + No Remote Executable or Process ID Specified + Keine entfernte ausführbare Datei oder Prozess-ID angegeben + + + No remote executable could be determined from your build system files.<p>In case you use qmake, consider adding<p>&nbsp;&nbsp;&nbsp;&nbsp;target.path = /tmp/your_executable # path on device<br>&nbsp;&nbsp;&nbsp;&nbsp;INSTALLS += target</p>to your .pro file. + Keine entfernte ausführbare Datei konnte anhand der Dateien Ihres Build-Systems bestimmt werden.<p>Falls Sie qmake verwenden, könnten Sie <p>&nbsp;&nbsp;&nbsp;&nbsp;target.path = /tmp/ihre_ausführbare_datei # Pfad auf Gerät<br>&nbsp;&nbsp;&nbsp;&nbsp;INSTALLS += target</p>in Ihre .pro-Datei einfügen. + + + Continue Debugging + Debuggen fortsetzen + + + Stop Debugging + Debuggen beenden + Interrupting not possible Das Unterbrechen ist nicht möglich @@ -21743,6 +21226,14 @@ Einzelschritt in den Modul und das Setzen von Haltepunkten nach Datei und Zeilen Copy View Contents to Clipboard Inhalt der Ansicht in Zwischenablage kopieren + + Copy Current Value to Clipboard + Aktuellen Wert in Zwischenablage kopieren + + + Copy Selected Rows to Clipboard + Ausgewählte Zeilen in Zwischenablage kopieren + Open View Contents in Editor Inhalt der Ansicht in einem Editor öffnen @@ -21879,10 +21370,6 @@ Einzelschritt in den Modul und das Setzen von Haltepunkten nach Datei und Zeilen Open Memory Editor Showing Stack Layout Speicher-Editor an Adresse des Stack-Rahmens öffnen - - Copy Value to Clipboard - Wert in Zwischenablage kopieren - Close Editor Tooltips Editor-Tooltips schließen @@ -22296,30 +21783,34 @@ Soll es noch einmal versucht werden? QmlProfiler::Internal::QmlProfilerStateWidget + + Profiling application: %1 events + Profiling der Anwendung: %1 Ereignisse + Profiling application - Profiliere Anwendung + Profiling der Anwendung No QML events recorded Es wurden keine QML-Ereignisse aufgenommen - Processing data - Verarbeite Daten + Processing data: %1 / %2 + Verarbeite Daten: %1 / %2 - Waiting for more data - Warte auf mehr Daten + Loading buffered data: %1 events + Lade zwischengespeicherte Daten: %1 Ereignisse + + + Loading offline data: %1 events + Lade Offline-Daten: %1 Ereignisse Clearing old trace Lösche alten Trace - - Application stopped before loading all data - Anwendung vor Laden aller Daten gestoppt - Waiting for data Warte auf Daten @@ -22377,27 +21868,6 @@ Soll es noch einmal versucht werden? Deployment auf QNX-Gerät - - Qnx::Internal::QnxDeviceConfigurationFactory - - QNX Device - QNX-Gerät - - - - Qnx::Internal::QnxDeviceConfigurationWizard - - New QNX Device Configuration Setup - Neue QNX-Geräte-Konfiguration - - - - Qnx::Internal::QnxDeviceConfigurationWizardSetupPage - - QNX Device - QNX-Gerät - - Qnx::Internal::QnxRunConfiguration @@ -22412,47 +21882,6 @@ Soll es noch einmal versucht werden? %1 auf QNX-Gerät - - QtSupport::Internal::CustomExecutableConfigurationWidget - - Executable: - Ausführbare Datei: - - - Working directory: - Arbeitsverzeichnis: - - - - QtSupport::CustomExecutableRunConfiguration - - No executable. - Keine ausführbare Datei. - - - The executable -%1 -cannot be found in the path. - Die ausführbare Datei -%1 -konnte nicht im Pfad gefunden werden. - - - Custom Executable - Benutzerdefinierte ausführbare Datei - - - Run %1 - Führe %1 aus - - - - QtSupport::CustomExecutableRunConfigurationFactory - - Custom Executable - Benutzerdefinierte ausführbare Datei - - RemoteLinux::RemoteLinuxCheckForFreeDiskSpaceService @@ -22621,17 +22050,6 @@ Qt Creator know about a likely URI. muss eine Zeichenkette sein, um im QML-Editor verfügbar zu sein - - Qnx::Internal::QnxDeviceConfiguration - - QNX - QNX - - - Deploy Qt libraries... - Deployment der Qt-Bibliotheken... - - Qnx::Internal::QnxQtVersion @@ -22803,6 +22221,14 @@ Qt Creator know about a likely URI. Checking available ports... Prüfe Verfügbarkeit der angegebenen Ports... + + Not enough free ports on device for C++ debugging. + Auf dem Gerät sind nicht genügend freie Ports zum C++-Debuggen vorhanden. + + + Not enough free ports on device for QML debugging. + Auf dem Gerät sind nicht genügend freie Ports zum QML-Debuggen vorhanden. + Debugging failed. Fehler beim Debuggen. @@ -23571,6 +22997,10 @@ Qt Creator know about a likely URI. The debugger location must be given as an absolute path (%1). Der Pfad zum Debugger muss als absoluter Pfad angegeben werden (%1). + + The ABI of the selected debugger does not match the toolchain ABI. + Die ABI des gewählten Debuggers passt nicht zur ABI der Toolchain. + Name of Debugger Name des Debuggers @@ -23672,10 +23102,18 @@ Qt Creator know about a likely URI. ProjectExplorer::SysRootKitInformation + + Sys Root "%1" does not exist in the file system. + Sys Root "%1" gibt es nicht im Dateisystem. + Sys Root "%1" is not a directory. Sys-Root "%1" ist kein Ordner. + + Sys Root "%1" is empty. + Sys Root "%1" ist leer. + Sys Root Sys-Root @@ -23916,8 +23354,16 @@ Qt Creator know about a likely URI. Das Installationsverzeichnis für Demoprojekte der aktuellen Qt-Version. - The current Qt version's default mkspecs. - Die Vorgabe-mkspec der aktuellen Qt-Version. + The current Qt version's default mkspecs (Qt 4). + Die Vorgabe-mkspecs der aktuellen Qt-Version (Qt 4). + + + The current Qt version's default mkspec (Qt 5; host system) + Die Vorgabe-mkspecs der aktuellen Qt-Version (Qt 5; Host-System). + + + The current Qt version's default mkspec (Qt 5; target system). + Die Vorgabe-mkspecs der aktuellen Qt-Version (Qt 5; Zielsystem). The current Qt's qmake version. @@ -23951,13 +23397,6 @@ Qt Creator know about a likely URI. Unbekannter Fehler. - - CustomExecutableDialog - - Could not find the executable, please specify one. - Es konnte keine ausführbare Datei gefunden werden; bitte geben Sie eine an. - - Git::Internal::BranchCheckoutDialog @@ -24327,6 +23766,14 @@ Entfernt: %4 &Deleted &Gelöscht + + Unchanged File + Unveränderte Datei + + + Was the merge successful? + War die Merge-Aktion erfolgreich? + Continue Merging Mergen fortsetzen @@ -24537,6 +23984,14 @@ Entfernt: %4 Go to Implementation Zu Implementierung gehen + + Add New Signal Handler + Neuen Signal-Handler hinzufügen + + + Move to Component + In Komponente verschieben + Reset z Property Z-Wert zurücksetzen @@ -24682,6 +24137,14 @@ Entfernt: %4 QmlDesigner::QmlDesignerPlugin + + Cannot Open Design Mode + Design-Modus kann nicht geöffnet werden + + + The QML file is not currently opened in a QML Editor. + Die QML-Datei ist in keinem QML-Editor geöffnet. + Switch Text/Design Text/Design umschalten @@ -24979,6 +24442,10 @@ Entfernt: %4 Referencing the parent of the root item is not supported in a Qt Quick UI form. Bezüge auf das übergeordnete Element des Wurzelelements werden in einem Qt Quick UI-Formular nicht unterstützt. + + A State cannot have a child item (%1). + Ein State kann kein Kind-Item haben (%1). + Do not use "%1" as a constructor. "%1" darf nicht als Konstruktor verwendet werden. @@ -25183,6 +24650,10 @@ Entfernt: %4 Clean install root Install-Root bereinigen + + Force probes + Probes erzwingen + QbsProjectManager::Internal::QbsCleanStepConfigWidget @@ -25896,6 +25367,10 @@ Teilnamen können verwendet werden, sofern sie eindeutig sind. Adapter start failed. Der Start des Adapters schlug fehl. + + Run in Terminal is not supported with the LLDB backend. + Das LLDB-Backend unterstützt "Im Terminal ausführen" nicht. + LLDB I/O Error LLDB-Ein/Ausgabefehler @@ -26349,19 +25824,24 @@ Teilnamen können verwendet werden, sofern sie eindeutig sind. Titel - - RemoteLinux::AbstractRemoteLinuxRunSupport - - Not enough free ports on device for debugging. - Auf dem Gerät sind nicht genügend freie Ports für das Debuggen vorhanden. - - RemoteLinux::RemoteLinuxAnalyzeSupport Checking available ports... Prüfe Verfügbarkeit von Ports... + + Creating remote socket ... + Erstelle entfernten Socket... + + + Not enough free ports on device for profiling. + Auf dem Gerät sind nicht genügend freie Ports für das Profiling vorhanden. + + + FIFO for profiling data could not be created. + FIFO für Profiler-Daten konnte nicht erstellt werden. + Failure running remote process. Fehler bei Ausführung des Prozesses auf dem Gerät. @@ -26635,21 +26115,6 @@ Teilnamen können verwendet werden, sofern sie eindeutig sind. Ausführbare Datei: - - Core::ICore - - (%1) - (%1) - - - Qt Creator %1%2 - Qt Creator %1%2 - - - Based on Qt %1 (%2, %3 bit) - Based on Qt %1 (%2, %3 bit) - - Debugger::Internal::CdbPathsPageWidget @@ -27084,6 +26549,22 @@ Bitte schließen Sie alle laufenden Instanzen Ihrer Anwendung vor dem Erstellen. Error while parsing trace data file: %1 Fehler beim Auswerten der Trace-Datei: %1 + + Invalid magic: %1 + Ungültige Dateiformatkennzeichnung: %1 + + + Unknown data stream version: %1 + Unbekannte Datenstromversion: %1 + + + Invalid type index %1 + Ungültiger Typindex %1 + + + Corrupt data before position %1. + Unbrauchbare Daten vor Position %1. + QmlProjectManager::QmlProjectFileFormat @@ -27096,11 +26577,11 @@ Bitte schließen Sie alle laufenden Instanzen Ihrer Anwendung vor dem Erstellen. Valgrind::Internal::CallgrindRunControl Profiling - Profiler + Profiling Profiling %1 - Profiliere %1 + Profiling von %1 @@ -27348,14 +26829,18 @@ Bitte schließen Sie alle laufenden Instanzen Ihrer Anwendung vor dem Erstellen. Ignore pre-compiled headers Vorkompilierte Header-Dateien nicht beachten - - <i>Activate the Clang Code Model plugin to enable the options here.</i> - <i>Aktivieren Sie das Clang Code-Modell um auf diese Einstellungen zuzugreifen.</i> - Clang Code Model Warnings Clang Codemodell Warnungen + + <i>The Clang Code Model is enabled because the corresponding plugin is loaded.</i> + <i>Das Clang Codemodell ist aktiv, weil das entsprechende Plugin geladen ist.</i> + + + <i>The Clang Code Model is disabled because the corresponding plugin is not loaded.</i> + <i>Das Clang Codemodell ist inaktiv, weil das entsprechende Plugin nicht geladen ist.</i> + Ios::Internal::IosBuildStep @@ -27537,10 +27022,6 @@ Wollen Sie das bestehende Paket entfernen? Package deploy: Running command "%1 %2". Paket-Deployment: Führe Kommando "%1 %2" aus. - - Packaging error: Could not start command "%1 %2". Reason: %3 - Fehler bei Paketerstellung: Das Kommando "%1 %2" konnte nicht ausgeführt werden. Grund: %3 - Install failed Installation gescheitert @@ -27549,18 +27030,6 @@ Wollen Sie das bestehende Paket entfernen? Pulling files necessary for debugging. Die für das Debuggen erforderlichen Dateien werden installiert. - - Packaging error: Command "%1 %2" failed. - Fehler bei Paketerstellung: Das Kommando "%1 %2" schlug fehl. - - - Reason: %1 - Ursache: %1 - - - Exit code: %1 - Rückgabewert: %1 - Android::Internal::AndroidDeployQtWidget @@ -27617,13 +27086,6 @@ Wollen Sie das bestehende Paket entfernen? Kann nicht debuggen: Für das Gerät ist kein GDB Server Provider konfiguriert. - - CppEditor::Internal::CppIncludeHierarchyWidget - - No include hierarchy available - Keine Include-Hierarchie verfügbar - - CppEditor::Internal::CppIncludeHierarchyFactory @@ -27739,8 +27201,8 @@ Wollen Sie das bestehende Paket entfernen? Deployment schlug fehl: Es wurde kein iOS-Gerät gefunden. - Deployment failed. The settings in the Organizer window of Xcode might be incorrect. - Deployment schlug fehl: Möglicherweise sind die Einstellungen im Fenster "Organizer" von Xcode fehlerhaft. + Deployment failed. The settings in the Devices window of Xcode might be incorrect. + Deployment schlug fehl: Möglicherweise sind die Einstellungen im Fenster "Devices" von Xcode fehlerhaft. Deployment failed. @@ -28925,6 +28387,10 @@ Weder der Pfad zur Bibliothek noch der Pfad zu den Headerdateien wird zur .pro-D mkspec mkspec + + Mkspec configured for qmake by the Kit. + Vom Kit für qmake konfigurierte mkspec. + QmakeProjectManager::Internal::QmakeProjectImporter @@ -28979,10 +28445,6 @@ Weder der Pfad zur Bibliothek noch der Pfad zu den Headerdateien wird zur .pro-D Disables QML debugging. QML profiling will still work. Deaktiviert QML-Debuggen. QML-Profiling funktioniert weiterhin. - - <No Qt version> - <Keine Qt-Version> - QmakeProjectManager::Internal::QMakeStepFactory @@ -29142,38 +28604,11 @@ Wählt eine für Desktop-Entwicklung geeignete Qt-Version aus, sofern sie verfü %1: Path to qmake executable Das qmake-Kommando "%1" konnte nicht gefunden werden, oder die Datei ist nicht ausführbar. - - Qmake does not support build directories below the source directory. - qmake unterstützt keine Build-Vorgänge in Verzeichnissen, die sich unterhalb des Quellverzeichnisses befinden. - The build directory needs to be at the same level as the source directory. Das Build-Verzeichnis muss sich auf der Ebene des Quellverzeichnisses befinden. - - QmakeProjectManager::QmlDumpTool - - Only available for Qt for Desktop. - Nur verfügbar für Qt für Desktop. - - - Only available for Qt 4.7.1 or newer. - Erfordert Qt 4.7.1 oder neuer. - - - Not needed. - Nicht notwendig. - - - Private headers are missing for this Qt version. - Die privaten Header-Dateien fehlen bei dieser Qt-Version. - - - qmldump - qmldump - - CppEditor::Internal::CppPreProcessorDialog @@ -29423,7 +28858,7 @@ Wählt eine für Desktop-Entwicklung geeignete Qt-Version aus, sofern sie verfü State charts - Statusdiagramme + Zustandsdiagramme Resources @@ -29735,6 +29170,10 @@ Zum Beispiel bewirkt die Angabe "Revision: 15" dass der Branch auf Rev Use customized style: Verwende angepassten Stil: + + Restrict to MIME types: + Auf MIME-Typen beschränken: + Beautifier::Internal::ClangFormat::ClangFormatOptionsPage @@ -29774,6 +29213,10 @@ Zum Beispiel bewirkt die Angabe "Revision: 15" dass der Branch auf Rev Format entire file if no text was selected Formatiere die ganze Datei falls kein Text selektiert ist + + Restrict to MIME types: + Auf MIME-Typen beschränken: + Beautifier::Internal::ConfigurationDialog @@ -29864,6 +29307,10 @@ Zum Beispiel bewirkt die Angabe "Revision: 15" dass der Branch auf Rev Format entire file if no text was selected Formatiere die ganze Datei falls kein Text selektiert ist + + Restrict to MIME types: + Auf MIME-Typen beschränken: + Core::Internal::FindDialog @@ -30156,37 +29603,6 @@ Bitte erstellen Sie die Anwendung qmldump auf der Einstellungsseite der Qt-Versi Java-Editor - - AbstractSettings - - Cannot save styles. %1 does not exist. - Die Stile konnten nicht gespeichert werden. %1 existiert nicht. - - - Cannot open file "%1": %2. - Die Datei "%1" kann nicht geöffnet werden: %2. - - - Cannot save file "%1": %2. - Die Datei "%1" kann nicht gespeichert werden: %2. - - - No documentation file specified. - Keine Dokumentationsdatei angegeben. - - - Cannot open documentation file "%1". - Die Dokumentationsdatei "%1" kann nicht geöffnet werden. - - - The file "%1" is not a valid documentation file. - Die Datei "%1" ist keine gültige Dokumentationsdatei. - - - Cannot read documentation file "%1": %2. - Die Dokumentationsdatei "%1" kann nicht gelesen werden: %2. - - Beautifier @@ -30196,6 +29612,26 @@ Bitte erstellen Sie die Anwendung qmldump auf der Einstellungsseite der Qt-Versi Beautifier::Internal::BeautifierPlugin + + Cannot create temporary file "%1": %2. + Die temporäre Datei "%1" konnte nicht erstellt werden: %2. + + + Failed to format: %1. + Konnte nicht formatieren: %1. + + + Cannot read file "%1": %2. + Die Datei "%1" kann nicht gelesen werden: %2. + + + Cannot call %1 or some other error occurred. + %1 konnte nicht aufgerufen werden, oder es trat ein anderer Fehler auf. + + + Cannot call %1 or some other error occurred. Timeout reached while formatting file %2. + %1 konnte nicht aufgerufen werden, oder es trat ein anderer Fehler auf. Zeitüberschreitung während die Datei %2 formatiert wurde. + File was modified. Datei geändert. @@ -30232,36 +29668,6 @@ Bitte erstellen Sie die Anwendung qmldump auf der Einstellungsseite der Qt-Versi Ausführbare Datei für %1 - - ClangFormatSettings - - No description available. - Keine Beschreibung verfügbar. - - - - Core::FindPlugin - - &Find/Replace - &Suchen/Ersetzen - - - Advanced Find - Erweiterte Suche - - - Open Advanced Find... - Erweiterte Suche öffnen... - - - Advanced... - Erweitert... - - - Ctrl+Shift+F - Ctrl+Shift+F - - Core::Internal::FindToolBar @@ -30772,6 +30178,10 @@ Möchten Sie es beenden? Remote: "%1:%2" - Process %3 Entfernt: "%1:%2" - Prozess %3 + + Attaching failed. + Anhängen fehlgeschlagen. + FontSettings_C_OCCURRENCES_UNUSED @@ -30968,6 +30378,30 @@ Möchten Sie es beenden? Target Ziel + + Anchor to the top of the target. + Am oberen Ende des Ziels verankern. + + + Anchor to the left of the target. + An der linken Seite des Ziels verankern. + + + Anchor to the vertical center of the target. + Vertikal in der Mitte des Ziels verankern. + + + Anchor to the horizontal center of the target. + Horizontal in der Mitte des Ziels verankern. + + + Anchor to the bottom of the target. + Am unteren Ende des Ziels verankern. + + + Anchor to the right of the target. + An der rechten Seite des Ziels verankern. + Qnx::Internal::QnxPlugin @@ -31449,17 +30883,6 @@ Bitte installieren Sie ein Android-SDK der API-Version %1 oder neuer. - - Core::DocumentModelPrivate - - <no document> - <kein Dokument> - - - No document is selected. - Es ist kein Dokument ausgewählt. - - Core::PatchTool @@ -32657,8 +32080,8 @@ Lokale Qt-Bibliotheken zu kopieren ist inkompatibel zu Android 5. Dateifehler - The file is too big for the Binary Editor (max. 2GB). - Die Datei ist zu groß für den Binäreditor (höchstens 2GB). + The file is too big for the Binary Editor (max. 32GB). + Die Datei ist zu groß für den Binäreditor (höchstens 32GB). Cannot open %1: %2 @@ -33728,14 +33151,6 @@ Dies betrifft die Haltepunkte %1 Qt Resource File Qt Ressourcen-Datei - - Creates a QML file with boilerplate code, starting with "import QtQuick 1.1". - Erzeugt eine QML-Datei mit allgemeingültigem Quelltext, beginnend mit "import QtQuick 1.1". - - - QML File (Qt Quick 1) - QML-Datei (Qt Quick 1) - Creates a QML file with boilerplate code, starting with "import QtQuick 2.0". Erzeugt eine QML-Datei mit allgemeingültigem Quelltext, beginnend mit "import QtQuick 2.0". @@ -33873,10 +33288,6 @@ Wählt eine für Desktop-Entwicklung geeignete Qt-Version aus, sofern sie verfü Qt Canvas 3D Application Qt Canvas 3D-Anwendung - - Creates a deployable Qt Quick 2 application using Qt Labs Controls. - Erzeugt eine installierbare Qt Quick 2 Anwendung mit Qt Labs Controls. - Qt Labs Controls Application Qt Labs Controls Anwendung @@ -33907,7 +33318,7 @@ Wählt eine für Desktop-Entwicklung geeignete Qt-Version aus, sofern sie verfü Creates a deployable Qt Quick 2 application. - Erzeugt eine zum Deployment geeignete Qt Quick 2-Anwendung. + Erzeugt eine zum Deployment geeignete Qt Quick 2 Anwendung. Qt Quick Application @@ -33919,7 +33330,7 @@ Wählt eine für Desktop-Entwicklung geeignete Qt-Version aus, sofern sie verfü Creates a deployable Qt Quick 2 application using Qt Quick Controls. - Erzeugt eine zum Deployment geeignete Qt Quick 2-Anwendung, die Qt Quick Controls nutzt. + Erzeugt eine zum Deployment geeignete Qt Quick 2 Anwendung, die Qt Quick Controls nutzt. Qt Quick Controls Application @@ -33974,6 +33385,126 @@ Wählt eine für Desktop-Entwicklung geeignete Qt-Version aus, sofern sie verfü "%{JS: Util.toNativeSeparators('%{TargetPath}')}" exists in the filesystem. "%{JS: Util.toNativeSeparators('%{TargetPath}')}" ist im Dateisystem vorhanden. + + This wizard creates a simple Qmake based project with additional auto test skeleton. + Dieser Assistent erzeugt ein einfaches Qmake-basiertes Projekt mit zusätzlichem Autotest-Gerüst. + + + Qt Test + Qt Test + + + Googletest + Googletest + + + Test Framework: + Test Framework: + + + GUI Application + GUI-Anwendung + + + Test Case Name: + Testfallname: + + + Requires QApplication + Erfordert QApplication + + + Generate initialization and cleanup code + Code für Initialisierung und Bereinigung erzeugen + + + Test Set Name: + Testreihenname: + + + Enable C++11 + C++11 aktivieren + + + always + immer + + + debug only + Nur Debug + + + Build auto tests + Erstelle Autotests + + + Googletest repository: + Googletest Repository: + + + Project and Test Information + Projekt- und Testinformationen + + + Creates a new project including auto test skeleton. + Erzeugt ein neues Projekt mit Autotest-Gerüst. + + + Auto Test Project + Autotest-Projekt + + + Creates an empty Nim file using UTF-8 charset. + Erzeugt eine leere Nim-Datei, die den UTF-8 Zeichensatz verwendet. + + + Nim + Nim + + + Nim File + Nim-Datei + + + State Chart name: + Zustandsdiagrammname: + + + State Chart Name and Location + Zustandsdiagrammname und Ort + + + Creates a new, empty, state chart. + Erzeugt ein neues, leeres Zustandsdiagramm. + + + State Chart + Zustandsdiagramm + + + Creates a simple Nim application. + Erzeugt eine einfache Nim-Anwendung. + + + Nim Application + Nim-Anwendung + + + Creates a deployable Qt Quick 2 application using Qt Labs Controls.<br/><br/><b>Note:</b> Qt Labs Controls are only available with Qt 5.6. Choose <em>Qt Quick Controls 2 Application</em> when targeting Qt 5.7 or later. + Erzeugt eine installierbare Qt Quick 2 Anwendung mit Qt Labs Controls.<br/><br/><b>Hinweis:</b> Qt Labs Controls sind nur mit Qt 5.6 verfügbar. Wählen Sie <em>Qt Quick Controls 2 Anwendung</em>, wenn sie Qt 5.7 oder höher verwenden wollen. + + + Qt 5.7 + Qt 5.7 + + + Creates a deployable Qt Quick 2 application using Qt Quick Controls 2.<br/><br/><b>Note:</b> Qt Quick Controls 2 are available with Qt 5.7 and later. Choose <em>Qt Labs Controls Application</em> when targeting Qt 5.6. + Erzeugt eine installierbare Qt Quick 2 Anwendung mit Qt Labs Controls 2.<br/><br/><b>Hinweis:</b> Qt Labs Controls 2 sind nur mit Qt 5.7 oder höher verfügbar. Wählen Sie <em>Qt Quick Controls-Anwendung</em>, wenn sie Qt 5.6 verwenden wollen. + + + Qt Quick Controls 2 Application + Qt Quick Controls 2 Anwendung + Use existing directory Vorhandenes Verzeichnis verwenden @@ -34847,21 +34378,13 @@ konnte dem Projekt "%2" nicht hinzugefügt werden. Umgebung: - Additional environment settings when using this kit. - Zusätzliche Umgebungseinstellungen bei Benutzung dieses Kits. + Additional build environment settings when using this kit. + Zusätzliche Build-Umgebungseinstellungen bei Benutzung dieses Kits. No changes to apply. Keine anzuwendenden Änderungen. - - Enter one variable per line with the variable name separated from the variable value by "=".<br>Environment variables can be referenced with ${OTHER}. - Geben Sie eine Variable pro Zeile ein. Trennen Sie Variablennamen und Wert durch "=".<br>Umgebungsvariablen können mit ${ANDERE} referenziert werden. - - - Edit Environment Changes - Umgebungsänderungen bearbeiten - ProjectExplorer::Project @@ -35124,10 +34647,6 @@ Die Dateien aus dem Quellverzeichnis des Android-Pakets werden in das Verzeichni TextEditor::TextEditorWidget - - CTRL+D - CTRL+D - Print Document Dokument drucken @@ -35140,14 +34659,6 @@ Die Dateien aus dem Quellverzeichnis des Android-Pakets werden in das Verzeichni The text is too large to be displayed (%1 MB). Texte dieser Größe (%1 MB) können nicht angezeigt werden. - - <b>Error:</b> Could not decode "%1" with "%2"-encoding. Editing not possible. - <b>Fehler:</b> Die Datei "%1" kann nicht mit der Zeichenkodierung "%2" dargestellt werden. Sie kann nicht bearbeitet werden. - - - Select Encoding - Zeichenkodierung auswählen - Zoom: %1% Vergrößerung: %1% @@ -35160,14 +34671,6 @@ Die Dateien aus dem Quellverzeichnis des Android-Pakets werden in das Verzeichni Add UTF-8 BOM on Save UTF-8 BOM beim Speichern hinzufügen - - Line: %1, Col: %2 - Zeile: %1, Spalte: %2 - - - Line: 9999, Col: 999 - Zeile: 9999, Spalte: 999 - TextEditor::TextEditorActionHandler @@ -35330,6 +34833,22 @@ Die Dateien aus dem Quellverzeichnis des Android-Pakets werden in das Verzeichni Influences how file names are matched to decide if they are the same. Beeinflusst wie die Gleichheit von Dateinamen geprüft wird. + + Automatically free resources of old documents that are not visible and not modified. They stay visible in the list of open documents. + Ressourcen alter Dokumente, die nicht sichtbar sind oder geändert wurden, automatisch freigeben. In der Liste offener Dokumente bleiben sie sichtbar. + + + Auto-suspend unmodified files + Ressourcen unveränderter Dateien automatisch freigeben + + + Minimum number of open documents that should be kept in memory. Increasing this number will lead to greater resource usage of Qt Creator when not manually closing documents. + Mindestanzahl offener Dokumente, die im Speicher vorgehalten werden sollen. Diese Zahl zu erhöhen führt zu größerem Ressourcenverbrauch durch Qt Creator, wenn Dateien nicht manuell geschlossen werden. + + + Files to keep open: + Vorzuhaltende Dateien: + QbsProjectManager::Internal::CustomQbsPropertiesDialog @@ -35443,21 +34962,6 @@ Die Dateien aus dem Quellverzeichnis des Android-Pakets werden in das Verzeichni Deckkraft - - QmlDesigner::QmlWarningDialog - - Warning - Warnung - - - This QML file contains features which are not supported by Qt Quick Designer - Diese QML-Datei enthält Features, die von Qt Quick Designer nicht unterstützt werden - - - Warn about unsupported features - Zeige eine Warnung bei nicht unterstützten Features an - - QmlDesigner::PuppetBuildProgressDialog @@ -35550,6 +35054,10 @@ und gestoppt werden. To-Do To-do + + <Enter regular expression to exclude> + <Regulären Ausdruck zum Ausschließen eingeben> + LayoutPoperties @@ -35649,131 +35157,6 @@ und gestoppt werden. Spaltenabstand - - QObject - - <Enter regular expression to exclude> - <Regulären Ausdruck zum Ausschließen eingeben> - - - %1 %2 per iteration (total: %3, iterations: %4) - %1 %2 pro Durchlauf (Summe: %3, Durchläufe: %4) - - - Test run canceled by user. - Testlauf durch den Benutzer abgebrochen. - - - Project is null for "%1". Removing from test run. -Check the test environment. - Kein Projekt für "%1". Entferne den Testlauf. -Überprüfen Sie die Testumgebung. - - - Could not find command "%1". (%2) - Kommando "%1" nicht gefunden. (%2) - - - Test case canceled due to timeout. -Maybe raise the timeout? - Testlauf wegen Timeout abgebrochen. -Vielleicht sollten Sie die Zeit erhöhen? - - - (none) - (nichts) - - - <p>Give all test cases a name to ensure correct behavior when running test cases and to be able to select them.</p> - <p>Geben Sie allen Testfällen einen Namen, um die korrekte Durchführung sicherzustellen und sie auswählen zu können.</p> - - - parameterized - parametrisiert - - - typed - typisiert - - - Cannot create temporary file "%1": %2. - Die temporäre Datei "%1" konnte nicht erstellt werden: %2. - - - Cannot call %1 or some other error occurred. Time out reached while formatting file %2. - Entweder konnte %1 nicht aufgerufen werden oder ein anderer Fehler ist aufgetreten. Zeitüberschreitung während die Datei %2 formatiert wurde. - - - Cannot read file "%1": %2. - Die Datei "%1" kann nicht gelesen werden: %2. - - - Cannot call %1 or some other error occurred. - %1 konnte nicht aufgerufen werden, oder es trat ein anderer Fehler auf. - - - Inspect available fixits - Verfügbare "fixits" - - - File "%1" does not exist or is not readable. - Die Datei "%1" fehlt oder ist nicht lesbar. - - - Could not read file "%1": UnexpectedElementError. - Konnte die Datei "%1" nicht lesen: UnexpectedElementError. - - - Could not read file "%1": CustomError. - Konnte die Datei "%1" nicht lesen: CustomError. - - - Could not read file "%1": NotWellFormedError. - Konnte die Datei "%1" nicht lesen: NotWellFormedError. - - - Could not read file "%1": PrematureEndOfDocumentError. - Konnte die Datei "%1" nicht lesen: PrematureEndOfDocumentError. - - - File is not a plist version 1.0 file. - Die Datei ist keine plist mit Version 1.0. - - - Expected a string element. - Erwartete ein Stringelement. - - - Expected an array element. - Erwartete ein Arrayelement. - - - Expected an integer element. - Erwartete ein Integerelement. - - - An error occurred with the Clang Static Analyzer process. - Im Clang Static Analyzer Prozess trat ein Fehler auf. - - - Clang Static Analyzer crashed. - Der Clang Static Analyser ist abgestürzt. - - - Clang Static Analyzer finished with exit code: %1. - Der Clang Static Analyser lieferte den Fehlercode: %1. - - - Command line: "%1" -Process Error: %2 -Output: -%3 - Kommandozeile: "%1" -Prozessfehler: %2 -Ausgabe: -%3 - - qmt::DocumentController @@ -35879,10 +35262,6 @@ Ausgabe: Unknown Unbekannt - - Error: Executable timed out after %1 s. - Fehler: Zeitüberschreitung nach %1 s. - Utils::ShellCommandPage @@ -36204,6 +35583,10 @@ Ausgabe: Unconfigured Nicht konfiguriert + + Path to the cmake executable + Pfad zur ausführbaren Datei von cmake + CMakeProjectManager::CMakeProject @@ -36296,25 +35679,6 @@ Ausgabe: Fehler bei Dateierzeugung - - Core::Internal::EnvironmentChangesDialog - - Edit Environment Changes - Umgebungsänderungen bearbeiten - - - Change system environment by assigning one environment variable per line: - Ändern Sie die Systemumgebung indem Sie eine Umgebungsvariable pro Zeile zuweisen: - - - PATH=C:\dev\bin;${PATH} - PATH=C:\dev\bin;${PATH} - - - PATH=/opt/bin:${PATH} - PATH=/opt/bin:${PATH} - - Core::Internal::ShortcutSettingsWidget @@ -36595,6 +35959,10 @@ Setting breakpoints by file name and line number may fail. Es liegt offenbar kein "Debug"-Build vor. Das Setzen von Haltepunkten anhand von Dateinamen und Zeilennummern könnte fehlschlagen. + + Finished retrieving data + Alle Daten erhalten + Run to Address 0x%1 Ausführung bis Adresse 0x%1 @@ -36984,10 +36352,38 @@ Das Setzen von Haltepunkten anhand von Dateinamen und Zeilennummern könnte fehl Export Diagram... Diagramm exportieren... + + Zoom In + Vergrößern + + + Zoom Out + Verkleinern + + + Reset Zoom + Vergrößerung zurücksetzen + Open Parent Diagram Elterndiagramm öffnen + + Add Package + Paket hinzufügen + + + Add Component + Komponente hinzufügen + + + Add Class + Klasse hinzufügen + + + Add Canvas Diagram + Canvasdiagramm hinzufügen + Edit Element Properties Elementeigenschaften editieren @@ -37414,10 +36810,9 @@ Das Setzen von Haltepunkten anhand von Dateinamen und Zeilennummern könnte fehl Datenbindungen - Dynamic Properties + Properties Title of dynamic properties view - The GUI element is too narrow to display the whole string. - Dyn. Eigenschaften + Eigenschaften Add binding or connection. @@ -37744,6 +37139,10 @@ Das Setzen von Haltepunkten anhand von Dateinamen und Zeilennummern könnte fehl Ctrl+Return Ctrl+Return + + Toggle UTF-8 BOM + UTF-8 BOM umschalten + Indent Einrücken @@ -38334,6 +37733,14 @@ Das Setzen von Haltepunkten anhand von Dateinamen und Zeilennummern könnte fehl Test Settings Testeinstellungen + + Active Test Frameworks + Aktive Test-Frameworks + + + Select the test frameworks to be handled by the AutoTest plugin. + Wählen Sie die Test-Frameworks, die vom AutoTest-Plugin genutzt werden sollen. + ClangCodeModel::Internal::ClangProjectSettingsWidget @@ -38372,6 +37779,26 @@ Das Setzen von Haltepunkten anhand von Dateinamen und Zeilennummern könnte fehl Clang Command Clang Kommando + + Version: %1, supported. + Version: %1, unterstützt. + + + Version: %1, unsupported (supported version is %2). + Version: %1, nicht unterstützt (unterstützte Version ist %2). + + + Version: Could not determine version. + Version: Konnte nicht bestimmt werden. + + + Version: Set valid executable first. + Version: Wählen Sie erst eine gültige ausführbare Datei aus. + + + TextLabel + TextLabel + ClangStaticAnalyzer::Internal::ProjectSettingsWidget @@ -38969,13 +38396,6 @@ Das Setzen von Haltepunkten anhand von Dateinamen und Zeilennummern könnte fehl Beziehung umbiegen - - Autotest::Constants - - <unnamed> - <namenlos> - - Autotest::Internal::AutotestPlugin @@ -39020,10 +38440,26 @@ Das Setzen von Haltepunkten anhand von Dateinamen und Zeilennummern könnte fehl Tests Tests + + No active test frameworks. + Keine aktiven Test-Frameworks. + Run This Test Diesen Test starten + + Run Without Deployment + Ausführung ohne Deployment + + + Debug This Test + Diesen Test debuggen + + + Debug Without Deployment + Debuggen ohne Deployment + Select All Alles auswählen @@ -39070,6 +38506,10 @@ Das Setzen von Haltepunkten anhand von Dateinamen und Zeilennummern könnte fehl Autotest::Internal::QtTestOutputReader + + %1 %2 per iteration (total: %3, iterations: %4) + %1 %2 pro Durchlauf (Summe: %3, Durchläufe: %4) + Executing test case %1 Führe Testfall %1 aus @@ -39258,6 +38698,26 @@ Das Setzen von Haltepunkten anhand von Dateinamen und Zeilennummern könnte fehl Autotest::Internal::TestRunner + + Test run canceled by user. + Testlauf durch den Benutzer abgebrochen. + + + Project is null for "%1". Removing from test run. +Check the test environment. + Kein Projekt für "%1". Entferne den Testlauf. +Überprüfen Sie die Testumgebung. + + + Could not find command "%1". (%2) + Kommando "%1" nicht gefunden. (%2) + + + Test case canceled due to timeout. +Maybe raise the timeout? + Testlauf wegen Timeout abgebrochen. +Vielleicht sollten Sie die Zeit erhöhen? + Project's run configuration was guessed for "%1". This might cause trouble during execution. @@ -39282,26 +38742,21 @@ Nur Desktopkits sind erlaubt. Stellen Sie sicher, dass das aktive Kit ein Deskto Running Tests Laufende Tests + + Failed to get run configuration. + Ausführungskonfiguration konnte nicht bestimmt werden. + + + Failed to create run configuration. +%1 + Ausführungskonfiguration konnte nicht erzeugt werden. +%1 + Build failed. Canceling test run. Erstellung fehlgeschlagen. Testlauf wird abgebrochen. - - Autotest::Internal::TestTreeModel - - Auto Tests - Autotests - - - Qt Quick Tests - Qt-Quick Tests - - - Google Tests - Google Tests - - ClangStaticAnalyzer::Internal::ClangStaticAnalyzerDiagnosticModel @@ -39401,6 +38856,14 @@ Nur Desktopkits sind erlaubt. Stellen Sie sicher, dass das aktive Kit ein Deskto Clang Static Analyzer: Invalid executable "%1", stop. Clang Static Analyzer: Fehlerhafte ausführbare Datei "%1". Ende. + + Clang Static Analyzer: Running with possibly unsupported version, could not determine version from executable "%1". + Clang Static Analyzer: Ausführung mit möglicherweise nicht unterstützter Version, die Version der ausführbaren Datei "%1" konnte nicht bestimmt werden. + + + Clang Static Analyzer: Running with unsupported version %1, supported version is %2. + Clang Static Analyzer: Ausführung mit nicht unterstützter Version %1, die unterstützte Version ist %2. + Clang Static Analyzer: Failed to create temporary dir, stop. Clang Static Analyzer: Konnte Hilfsverzeichnis nicht anlegen. Ende. @@ -39511,8 +38974,8 @@ Bitte wählen Sie eine korrekte ausführbare Clang-Datei. CMakeProjectManager::Internal::BuildDirManager - The build directory is not for %1 - Das Erstellungsverzeichnis gehört nicht zu %1 + The build directory is not for %1 but for %2 + Das Erstellungsverzeichnis gehört nicht zu %1 sondern zu %2 Running "%1 %2" in %3. @@ -39530,6 +38993,22 @@ Bitte wählen Sie eine korrekte ausführbare Clang-Datei. *** cmake process exited with exit code %1. *** cmake Prozess endete mit Fehlercode %1. + + <removed> + <gelöscht> + + + <empty> + <leer> + + + CMake configuration has changed on disk. + CMake-Konfiguration hat sich außerhalb Qt Creators geändert. + + + The CMakeCache.txt file has changed: %1 + Die Datei CMakeCache.txt hat sich geändert: %1 + Failed to open %1 for reading. Die Datei %1 konnte nicht zum Lesen geöffnet werden. @@ -39607,10 +39086,6 @@ Bitte wählen Sie eine korrekte ausführbare Clang-Datei. CMake Configuration CMake-Konfiguration - - <No Changes to Apply> - <Keine Änderungen anzuwenden> - Default configuration passed to CMake when setting up a project. Die Standardkonfiguration wird an CMake beim Anlegen eines Projekts übergeben. @@ -39626,10 +39101,6 @@ Bitte wählen Sie eine korrekte ausführbare Clang-Datei. CMakeProjectManager::CMakeGeneratorKitInformation - - No CMake Tool configured, CMake generator will be ignored. - Es ist kein CMake-Tool konfiguriert. Der CMake-Generator wird ignoriert. - CMake Tool is unconfigured, CMake generator will be ignored. Das CMake-Tool ist nicht konfiguriert. Der CMake-Generator wird ignoriert. @@ -39639,7 +39110,7 @@ Bitte wählen Sie eine korrekte ausführbare Clang-Datei. Das CMake-Tool unterstützt den konfigurierten Generator nicht. - CMake generator does not generate CodeBlocks file. Qt Creator will not be able to parse the CMake project. + CMake generator does not generate a CodeBlocks file. Qt Creator will not be able to parse the CMake project. Der CMake-Generator erzeugt keine CodeBlocks-Datei. Qt Creator wird das CMake Projekt nicht anzeigen können. @@ -39908,7 +39379,7 @@ Bitte wählen Sie eine korrekte ausführbare Clang-Datei. <not in scope> Value of variable in Debugger Locals display for variables out of scope (stopped above initialization). - <nicht im Bereich> + <nicht im Scope> %1 <shadowed %2> @@ -40122,20 +39593,6 @@ Sie werden erhalten. <bytecode> <bytecode> - - (Opt) - (Opt) - - - Binding is evaluated by the optimized engine. - Das Binding wird von der optimierten Engine ausgewertet. - - - Binding not optimized (might have side effects or assignments, -references to elements in other files, loops, and so on.) - Das Binding ist nicht optimiert (d.h., es hat Seiteneffekte oder Zuweisungen, -Referenzen zu Elementen in anderen Dateien, Schleifen, o.ä.) - Source code not available Kein Quellcode verfügbar @@ -40226,274 +39683,6 @@ Referenzen zu Elementen in anderen Dateien, Schleifen, o.ä.) Infonachricht - - QmlProfilerExtension::Internal::DebugMessagesModel - - Unknown Message %1 - Unbekannte Nachricht %1 - - - Timestamp - Zeitstempel - - - Message - Nachricht - - - Location - Ort - - - - QmlProfilerExtension::Internal::FlameGraphModel - - Paint - Paint - - - Compile - Kompilierung - - - Create - Erzeugung - - - Binding - Binding - - - Signal - Signal - - - JavaScript - JavaScript - - - Source code not available - Kein Quellcode verfügbar - - - - QmlProfilerExtension::Internal::FlameGraphView - - Show Full Range - Ganzen Bereich anzeigen - - - - QmlProfilerExtension::Internal::InputEventsModel - - Mouse Events - Mausereignisse - - - Keyboard Events - Tastaturereignisse - - - Timestamp - Zeitstempel - - - Key Press - Tastendruck - - - Key Release - Tastenfreigabe - - - Key - Taste - - - Modifiers - Modifizierer - - - Double Click - Doppelklick - - - Mouse Press - Mausdruck - - - Mouse Release - Mausfreigabe - - - Button - Taste - - - Result - Ergebnis - - - Mouse Move - Mausbewegung - - - X - X - - - Y - Y - - - Mouse Wheel - Mausrad - - - Angle X - X-Winkel - - - Angle Y - Y-Winkel - - - Keyboard Event - Tastaturereignis - - - Mouse Event - Mausereignis - - - - QmlProfilerExtension::Internal::MemoryUsageModel - - Memory Allocation - Speicherallokation - - - Memory Usage - Speicherverbrauch - - - Memory Allocated - Speicher allokiert - - - Memory Freed - Speicher freigegeben - - - Total - Summe - - - Allocated - Allokiert - - - Allocations - Allokationen - - - Deallocated - Freigegeben - - - Deallocations - Freigaben - - - Type - Typ - - - Location - Ort - - - Heap Allocation - Heap-Allokation - - - Large Item Allocation - Allokation großer Elemente - - - Heap Usage - Heap-Verbrauch - - - Unknown - Unbekannt - - - - QmlProfilerExtension::Internal::PixmapCacheModel - - Image Cached - Bild gepuffert - - - Image Loaded - Bild geladen - - - Result - Ergebnis - - - Load Error - Ladefehler - - - Duration - Dauer - - - Cache Size - Puffergröße - - - File - Datei - - - Width - Breite - - - Height - Höhe - - - - QmlProfilerExtension::Internal::QmlProfilerExtensionPlugin - - Action Triggered - Aktion ausgelöst - - - This is an action from QML Profiler Extension. - Dies ist eine Aktion der Qml Profiler Extension. - - - - QmlProfilerExtension::Internal::SceneGraphTimelineModel - - Stage - Phase - - - Duration - Dauer - - - Glyphs - Glyphen - - Valgrind::Internal::CallgrindTool @@ -40542,7 +39731,7 @@ Referenzen zu Elementen in anderen Dateien, Schleifen, o.ä.) Pause event logging. No events are counted which will speed up program execution during profiling. - Pausiert die Ereignissprotokollierung, was die Ausführung des Programmes während des Profilens beschleunigt. + Pausiert die Ereignissprotokollierung, was die Ausführung des Programmes während des Profilings beschleunigt. Go back one step in history. This will select the previously selected item. @@ -40849,4 +40038,1858 @@ Möchten Sie sie überschreiben? Bild exportieren + + Beautifier::Internal::GeneralOptionsPage + + Form + Formular + + + Automatic Formatting on File Save + Automatische Formatierung beim Speichern einer Datei + + + Enable auto format on file save + Beim Speichern einer Datei automatisch formatieren + + + Tool: + Werkzeug: + + + Restrict to MIME types: + Auf MIME-Typen beschränken: + + + Restrict to files contained in the current project + Auf Dateien des aktuellen Projekts beschränken + + + General + Allgemein + + + + Nim::NimCompilerBuildStepConfigWidget + + Form + Formular + + + Target: + Ziel: + + + Extra arguments: + Zusätzliche Argumente: + + + Command: + Kommando: + + + Default arguments: + Standardargumente: + + + None + Keine + + + Debug + Debug + + + Release + Release + + + + Nim::NimCompilerCleanStepConfigWidget + + Form + Formular + + + Working directory: + Arbeitsverzeichnis: + + + + QmlDesigner::OpenUiQmlFileDialog + + Open ui.qml file + ui.qml-Datei öffnen + + + You are opening a .qml file in the designer. Do you want to open a .ui.qml file instead? + Sie öffnen eine .qml-Datei im Designer. Wollen Sie stattdessen eine ui.qml-Datei öffnen? + + + Do not show this dialog again + Diesen Dialog nicht noch einmal anzeigen + + + Cancel + Abbrechen + + + + TextEditor::Internal::CompletionSettingsPage + + Behavior + Verhalten + + + Activate completion: + Code-Vervollständigung aktivieren: + + + &Case-sensitivity: + &Groß/Kleinschreibung: + + + Full + Vollständig + + + None + Keine + + + First Letter + Erster Buchstabe + + + Manually + Manuell + + + When Triggered + Auf Anforderung + + + Always + Immer + + + Timeout in ms: + Zeitüberschreitung nach (ms): + + + Inserts the common prefix of available completion items. + Fügt den gemeinsamen Präfix aller verfügbaren Vervollständigungen ein. + + + Autocomplete common &prefix + Gemeinsamen &Präfix ergänzen + + + Splits a string into two lines by adding an end quote at the cursor position when you press Enter and a start quote to the next line, before the rest of the string. + +In addition, Shift+Enter inserts an escape character at the cursor position and moves the rest of the string to the next line. + Fügt Anführungszeichen an der aktuellen Position und am Beginn der nächsten Zeile vor der restlichen Zeichenkette ein, um eine Zeichenkette zu teilen, wenn Sie die Eingabetaste drücken. + +Drücken Sie zusätzlich die Umschalttaste, wird ein Escape-Zeichen an der aktuellen Position eingefügt und der Rest der Zeichenkette in die nächste Zeile verschoben. + + + Automatically split strings + Zeichenketten automatisch teilen + + + &Automatically insert matching characters + &Passende Zeichen automatisch einfügen + + + Insert opening or closing brackets + Öffnende und schließende Klammern einfügen + + + Insert closing quote + Abschließende Anführungszeichen einfügen + + + When typing a matching bracket and there is a text selection, instead of removing the selection, surrounds it with the corresponding characters. + Wenn eine Textauswahl existiert und man ein passendes Klammerzeichen eingibt, wird die Auswahl in die entsprechenden Klammerzeichen eingeschlossen, anstatt sie zu löschen. + + + Surround text selection with brackets + Textauswahl in Klammern einschließen + + + Insert &space after function name + Leerzeichen nach &Funktionsname einfügen + + + When typing a matching quote and there is a text selection, instead of removing the selection, surrounds it with the corresponding characters. + Wenn eine Textauswahl existiert und man ein passendes Anführungszeichen eingibt, wird die Auswahl in die entsprechenden Anführungszeichen eingeschlossen, anstatt sie zu löschen. + + + Surround text selection with quotes + Textauswahl in Anführungszeichen einschließen + + + Show a visual hint when for example a brace or a quote is automatically inserted by the editor. + Einen sichtbaren Hinweis anzeigen, wenn beispielsweise eine Klammer oder ein Anführungszeichen vom Editor automatisch eingefügt wird. + + + Animate automatically inserted text + Automatisch eingefügten Text animieren + + + Highlight automatically inserted text + Automatisch eingefügten Text hervorheben + + + Skip automatically inserted character if re-typed manually after completion. + Automatisch eingefügtes Zeichen überspringen, wenn es nach der Vervollständigung erneut eingegeben wird. + + + Skip automatically inserted character when typing + Automatisch eingefügtes Zeichen beim Tippen überspringen + + + Remove the automatically inserted character if the trigger is deleted by backspace after the completion. + Das automatisch eingefügte Zeichen entfernen, wenn das auslösende Zeichen nach der Vervollständigung durch die Rückschritttaste entfernt wird. + + + Remove automatically inserted text on backspace + Das automatisch eingefügte Zeichen bei Rückschritt entfernen + + + Documentation Comments + Kommentare für Dokumentation + + + Automatically creates a Doxygen comment upon pressing enter after a '/**', '/*!', '//!' or '///'. + Erstellt automatisch einen Doxygen-Kommentar, wenn man nach '/**', '/*!', '//!' oder '///' die Enter-Taste betätigt. + + + Enable Doxygen blocks + Doxygen-Blöcke aktivieren + + + Generates a <i>brief</i> command with an initial description for the corresponding declaration. + Erstellt ein <i>brief</i>-Kommando mit einer anfänglichen Beschreibung für die entsprechende Deklaration. + + + Generate brief description + Kurzbeschreibung erstellen + + + Adds leading asterisks when continuing C/C++ "/*", Qt "/*!" and Java "/**" style comments on new lines. + Fügt voranstehende Asterisk-Zeichen ein, wenn Kommentare im C/C++-Stil "/*", Qt-Stil "/*!" oder Java-Stil "/**" auf neuen Zeilen fortgesetzt werden. + + + Add leading asterisks + Vorangehenden Asterisk einfügen + + + Completion + Code-Vervollständigung + + + + AnchorButtons + + Anchor item to the top. + Item am oberen Ende verankern. + + + Anchor item to the bottom. + Item am unteren Ende verankern. + + + Anchor item to the left. + Item an der linken Seite verankern. + + + Anchor item to the right. + Item an der rechten Seite verankern. + + + Fill parent item. + Übergeordnetes Element ausfüllen. + + + Anchor item vertically. + Item vertikal verankern. + + + Anchor item horizontally. + Item horizontal verankern. + + + + ExtendedFunctionButton + + Binding Editor + Binding-Editor + + + + Utils::EnvironmentDialog + + Enter one variable per line with the variable name separated from the variable value by "=".<br>Environment variables can be referenced with ${OTHER}. + Geben Sie eine Variable pro Zeile ein. Trennen Sie Variablennamen und Wert durch "=".<br>Umgebungsvariablen können mit ${ANDERE} referenziert werden. + + + Change environment by assigning one environment variable per line: + Ändern Sie die Umgebung, indem Sie eine Umgebungsvariable pro Zeile zuweisen: + + + Edit Environment + Umgebung bearbeiten + + + + GTestFramework + + Google Tests + Google Tests + + + + GTestTreeItem + + parameterized + parametrisiert + + + typed + typisiert + + + + QtTestFramework + + Qt Tests + Qt Tests + + + + QuickTestFramework + + Quick Tests + Quick Tests + + + + QuickTestTreeItem + + <unnamed> + <unbenannt> + + + <p>Give all test cases a name to ensure correct behavior when running test cases and to be able to select them.</p> + <p>Geben Sie allen Testfällen einen Namen, um die korrekte Durchführung sicherzustellen und sie auswählen zu können.</p> + + + + Autotest::Internal::TestRunConfiguration + + AutoTest Debug + AutoTest Debug + + + + Autotest::Internal::TestSettingsWidget + + No active test frameworks. + Keine aktiven Test-Frameworks. + + + You will not be able to use the AutoTest plugin without having at least one active test framework. + Ohne ein aktives Test-Framework können Sie das AutoTest-Plugin nicht verwenden. + + + + TestTreeItem + + (none) + (keine) + + + + Beautifier::Internal::AbstractSettings + + Cannot save styles. %1 does not exist. + Die Stile konnten nicht gespeichert werden. %1 existiert nicht. + + + Cannot open file "%1": %2. + Die Datei "%1" kann nicht geöffnet werden: %2. + + + Cannot save file "%1": %2. + Die Datei "%1" kann nicht gespeichert werden: %2. + + + No documentation file specified. + Keine Dokumentationsdatei angegeben. + + + Cannot open documentation file "%1". + Die Dokumentationsdatei "%1" kann nicht geöffnet werden. + + + The file "%1" is not a valid documentation file. + Die Datei "%1" ist keine gültige Dokumentationsdatei. + + + Cannot read documentation file "%1": %2. + Die Dokumentationsdatei "%1" kann nicht gelesen werden: %2. + + + + Beautifier::Internal::ArtisticStyle::ArtisticStyle + + Artistic Style + Artistic Style + + + + Beautifier::Internal::ClangFormat::ClangFormat + + ClangFormat + ClangFormat + + + + Beautifier::Internal::ClangFormat::ClangFormatSettings + + No description available. + Keine Beschreibung verfügbar. + + + + Beautifier::Internal::Uncrustify::Uncrustify + + Uncrustify + Uncrustify + + + + ClangCodeModel::Internal::ClangDiagnosticManager + + Inspect available fixits + Verfügbare "fixits" untersuchen + + + + ClangStaticAnalyzer::Internal::LogFileReader + + File "%1" does not exist or is not readable. + Die Datei "%1" fehlt oder ist nicht lesbar. + + + Could not read file "%1": UnexpectedElementError. + Konnte die Datei "%1" nicht lesen: UnexpectedElementError. + + + Could not read file "%1": CustomError. + Konnte die Datei "%1" nicht lesen: CustomError. + + + Could not read file "%1": NotWellFormedError. + Konnte die Datei "%1" nicht lesen: NotWellFormedError. + + + Could not read file "%1": PrematureEndOfDocumentError. + Konnte die Datei "%1" nicht lesen: PrematureEndOfDocumentError. + + + + ClangStaticAnalyzer::Internal::ClangStaticAnalyzerLogFileReader + + File is not a plist version 1.0 file. + Die Datei ist keine plist mit Version 1.0. + + + Expected a string element. + Erwartete ein Zeichenkettenelement. + + + Expected an array element. + Erwartete ein Feldelement. + + + Expected an integer element. + Erwartete ein Ganzzahlelement. + + + + ClangStaticAnalyzer::Internal::ClangStaticAnalyzerRunner + + An error occurred with the Clang Static Analyzer process. + Im Clang Static Analyzer-Prozess trat ein Fehler auf. + + + Clang Static Analyzer crashed. + Der Clang Static Analyzer ist abgestürzt. + + + Clang Static Analyzer finished with exit code: %1. + Der Clang Static Analyzer lieferte den Fehlercode: %1. + + + Command line: %1 +Process Error: %2 +Output: +%3 + Kommandozeile: %1 +Prozessfehler: %2 +Ausgabe: +%3 + + + + CMakeProjectManager::Internal::CMakeBuildConfiguration + + CMake configuration set by the kit was overridden in the project. + Die im Kit festgelegte CMake-Einstellung wurde im Projekt überschrieben. + + + + CMakeProjectManager::Internal::CMakeEditorFactory + + CMake Editor + CMake-Editor + + + + Core::Internal::ShortcutButton + + Click and type the new key sequence. + Hier klicken, um die neue Tastenkombination einzutippen. + + + Stop Recording + Aufnahme beenden + + + Record + Aufnehmen + + + + Core::Internal::DocumentModelPrivate + + <no document> + <kein Dokument> + + + No document is selected. + Es ist kein Dokument ausgewählt. + + + + Core::Find + + &Find/Replace + &Suchen/Ersetzen + + + Advanced Find + Erweiterte Suche + + + Open Advanced Find... + Erweiterte Suche öffnen... + + + Advanced... + Erweitert... + + + Ctrl+Shift+F + Ctrl+Shift+F + + + + ICore + + (%1) + (%1) + + + Qt Creator %1%2 + Qt Creator %1%2 + + + Based on Qt %1 (%2, %3 bit) + Based on Qt %1 (%2, %3 bit) + + + + Core::Internal::SpotlightLocatorFilter + + Spotlight File Name Index + Spotlight-Dateinamensindex + + + + CppEditor::CppIncludeHierarchy + + No include hierarchy available + Keine Include-Hierarchie verfügbar + + + + ModelEditor + + Zoom: %1% + Vergrößerung: %1% + + + + NimRunConfiguration + + Current Build Target + Aktuelles Build-Ziel + + + + NimBuildConfigurationWidget + + General + Allgemein + + + + NimCompilerBuildStep + + Nim Compiler Build Step + Nim-Compiler Build-Schritt + + + + NimCompilerBuildStepConfigWidget + + Nim build step + Nim-Build-Schritt + + + + NimCompilerCleanStepFactory + + Nim Compiler Clean Step + Nim-Compiler-Schritt zur Bereinigung + + + + NimCompilerCleanStepWidget + + Nim clean step + Nim-Schritt zur Bereinigung + + + + NimCodeStyleSettingsPage + + Code Style + Coding-Stil + + + Nim + Nim + + + + NimCodeStylePreferencesFactory + + Nim + Nim + + + + NimSnippetProvider + + Nim + Nim + + + + Nim::NimBuildConfigurationFactory + + Build + Erstellen + + + + Nim::NimBuildConfigurationWidget + + Build directory: + Build-Verzeichnis: + + + + Nim::NimCompilerBuildStepFactory + + Nim Compiler Build Step + Nim-Compiler Build-Schritt + + + + Nim::NimCompilerCleanStep + + Nim Clean Step + Nim-Schritt zur Bereinigung + + + Build directory "%1" does not exist. + Build-Verzeichnis "%1" existiert nicht. + + + Failed to delete the cache directory. + Das Cache-Verzeichnis konnte nicht gelöscht werden. + + + Failed to delete the out file. + Die Ausgabedatei konnte nicht gelöscht werden. + + + Clean step completed successfully. + Der Schritt zur Bereinigung war erfolgreich. + + + + Nim::NimProjectManager + + Failed opening project "%1": Project is not a file. + Das Projekt "%1" konnte nicht geöffnet werden: Die angegebene Projektdatei ist keine Datei. + + + + Nim::NimRunControl + + %1 crashed + %1 ist abgestürzt + + + %1 exited with code %2 + %1 beendet, Rückgabewert %2 + + + + Nim::NimSettings + + Global + Settings + Global + + + Nim + Nim + + + + ProjectExplorer::Internal::CustomExecutableConfigurationWidget + + Executable: + Ausführbare Datei: + + + Working directory: + Arbeitsverzeichnis: + + + + ProjectExplorer::CustomExecutableDialog + + Could not find the executable, please specify one. + Es konnte keine ausführbare Datei gefunden werden; bitte geben Sie eine an. + + + + ProjectExplorer::CustomExecutableRunConfiguration + + No executable. + Keine ausführbare Datei. + + + The executable +%1 +cannot be found in the path. + Die ausführbare Datei +%1 +konnte nicht im Pfad gefunden werden. + + + Custom Executable + Benutzerdefinierte ausführbare Datei + + + Run %1 + %1 ausführen + + + + ProjectExplorer::CustomExecutableRunConfigurationFactory + + Custom Executable + Benutzerdefinierte ausführbare Datei + + + + QmakeProjectManager::Internal::FilesSelectionWizardPage + + Files + Dateien + + + + QmakeProjectManager::Internal::SimpleProjectWizardDialog + + Import Existing Project + Import eines existierenden Projekts + + + Project Name and Location + Name und Verzeichnis des Projekts + + + Project name: + Projektname: + + + Location: + Verzeichnis: + + + File Selection + Dateiauswahl + + + + QmakeProjectManager::Internal::SimpleProjectWizard + + Import as qmake Project (Limited Functionality) + Als qmake-Projekt importieren (Funktion eingeschränkt) + + + Imports existing projects that do not use qmake, CMake or Autotools.<p>This creates a qmake .pro file that allows you to use Qt Creator as a code editor and as a launcher for debugging and analyzing tools. If you want to build the project, you might need to edit the generated .pro file. + Importiert bestehende Projekte, die qmake, CMake und Autotools nicht verwenden.<p>Dies erstellt eine qmake .pro-Datei, wodurch Sie Qt Creator als Quelltexteditor und zum Starten von Debuggern und Analysewerkzeugen verwenden können. Wenn Sie das Projekt erstellen wollen, müssen Sie möglicherweise die erzeugte .pro-Datei bearbeiten. + + + + QmlDesigner::BackgroundAction + + Set the color of the canvas. + Die Farbe der Leinwand einstellen + + + + QmlDesigner::RewriterError + + Error parsing + Fehler beim Parsen + + + Internal error + Interner Fehler + + + line %1 + Zeile %1 + + + column %1 + Spalte %1 + + + + QmlProfiler::Internal::DebugMessagesModel + + Unknown Message %1 + Unbekannte Nachricht %1 + + + Timestamp + Zeitstempel + + + Message + Nachricht + + + Location + Ort + + + + QmlProfiler::Internal::FlameGraphModel + + Compile + Kompilierung + + + Create + Erzeugung + + + Binding + Binding + + + Signal + Signal + + + JavaScript + JavaScript + + + Source code not available + Kein Quelltext verfügbar + + + + QmlProfiler::Internal::FlameGraphView + + Show Full Range + Ganzen Bereich anzeigen + + + + QmlProfiler::Internal::InputEventsModel + + Mouse Events + Mausereignisse + + + Keyboard Events + Tastaturereignisse + + + Timestamp + Zeitstempel + + + Key Press + Tastendruck + + + Key Release + Tastenfreigabe + + + Key + Taste + + + Modifiers + Modifizierer + + + Double Click + Doppelklick + + + Mouse Press + Mausdruck + + + Mouse Release + Mausfreigabe + + + Button + Maustaste + + + Result + Ergebnis + + + Mouse Move + Mausbewegung + + + X + X + + + Y + Y + + + Mouse Wheel + Mausrad + + + Angle X + X-Winkel + + + Angle Y + Y-Winkel + + + Keyboard Event + Tastaturereignis + + + Mouse Event + Mausereignis + + + + QmlProfiler::Internal::MemoryUsageModel + + Memory Allocation + Speicherallokation + + + Memory Usage + Speicherverbrauch + + + Memory Allocated + Speicher allokiert + + + Memory Freed + Speicher freigegeben + + + Total + Summe + + + %1 bytes + %1 Bytes + + + Allocated + Allokiert + + + Allocations + Allokationen + + + Deallocated + Freigegeben + + + Deallocations + Freigaben + + + Heap Allocation + Heap-Allokation + + + Large Item Allocation + Allokation großer Elemente + + + Heap Usage + Heap-Verbrauch + + + Type + Typ + + + Location + Ort + + + + QmlProfiler::Internal::PixmapCacheModel + + Cache Size + Puffergröße + + + Image Cached + Bild gepuffert + + + Image Loaded + Bild geladen + + + Result + Ergebnis + + + Load Error + Ladefehler + + + Duration + Dauer + + + File + Datei + + + Width + Breite + + + Height + Höhe + + + + QmlProfiler::Internal::SceneGraphTimelineModel + + Stage + Phase + + + Duration + Dauer + + + Glyphs + Glyphen + + + + QmlProfiler::Internal::DebugMessagesModelTest + + Timestamp + Zeitstempel + + + Message + Nachricht + + + Location + Ort + + + + QmlProfiler::Internal::InputEventsModelTest + + Mouse Events + Mausereignisse + + + Keyboard Events + Tastaturereignisse + + + Timestamp + Zeitstempel + + + Key Press + Tastendruck + + + Key + Taste + + + Modifiers + Modifizierer + + + Key Release + Tastenfreigabe + + + Keyboard Event + Tastaturereignis + + + Mouse Press + Mausdruck + + + Button + Maustaste + + + Result + Ergebnis + + + Mouse Release + Mausfreigabe + + + Mouse Move + Mausbewegung + + + X + X + + + Y + Y + + + Double Click + Doppelklick + + + Mouse Wheel + Mausrad + + + Angle X + X-Winkel + + + Angle Y + Y-Winkel + + + Mouse Event + Mausereignis + + + + QmlProfiler::Internal::MemoryUsageModelTest + + Memory Allocation + Speicherallokation + + + Memory Usage + Speicherverbrauch + + + Memory Allocated + Speicher allokiert + + + Total + Summe + + + %1 bytes + %1 Bytes + + + Allocated + Allokiert + + + Allocations + Allokationen + + + Type + Typ + + + Heap Allocation + Heap-Allokation + + + Location + Ort + + + Deallocated + Freigegeben + + + Deallocations + Freigaben + + + Large Item Allocation + Allokation großer Elemente + + + Memory Freed + Speicher freigegeben + + + Heap Usage + Heap-Verbrauch + + + + QmlProfiler::Internal::PixmapCacheModelTest + + Image Cached + Bild gepuffert + + + Image Loaded + Bild geladen + + + Duration + Dauer + + + Cache Size + Puffergröße + + + File + Datei + + + Width + Breite + + + Height + Höhe + + + + Qnx::Internal::QnxDevice + + QNX + QNX + + + Deploy Qt libraries... + Deployment der Qt-Bibliotheken... + + + + Qnx::Internal::QnxDeviceFactory + + QNX Device + QNX-Gerät + + + + Qnx::Internal::QnxDeviceWizard + + QNX Device + QNX-Gerät + + + New QNX Device Configuration Setup + Neue QNX-Geräte-Konfiguration + + + + TextEditorWidget + + CTRL+D + CTRL+D + + + <b>Error:</b> Could not decode "%1" with "%2"-encoding. Editing not possible. + <b>Fehler:</b> Die Datei "%1" kann nicht mit der Zeichenkodierung "%2" dargestellt werden. Sie kann nicht bearbeitet werden. + + + Select Encoding + Zeichenkodierung auswählen + + + Line: %1, Col: %2 + Zeile: %1, Spalte: %2 + + + Line: 9999, Col: 999 + Zeile: 9999, Spalte: 999 + + + + TextEditorSettings + + Text + Text + + + Generic text. +Applied to text, if no other rules matching. + Generischer Text. +Wird auf Text angewendet, sofern keine andere Regel zutrifft. + + + Link + Verweis + + + Links that follow symbol under cursor. + Verweise, die dem Symbol unter der Einfügemarke folgen. + + + Selection + Auswahl + + + Selected text. + Ausgewählter Text. + + + Line Number + Zeilennummer + + + Line numbers located on the left side of the editor. + Zeilennummern an der linken Seite des Editors. + + + Search Result + Suchergebnis + + + Highlighted search results inside the editor. + Hervorgehobene Suchergebnisse im Editor. + + + Search Scope + Suchbereich + + + Section where the pattern is searched in. + Bereich, in dem das Muster gesucht wird. + + + Parentheses + Klammern + + + Displayed when matching parentheses, square brackets or curly brackets are found. + Wird angezeigt, wenn passende runde, eckige oder geschweifte Klammern gefunden werden. + + + Mismatched Parentheses + Alleinstehende Klammern + + + Displayed when mismatched parentheses, square brackets, or curly brackets are found. + Wird angezeigt, wenn runde, eckige oder geschweifte Klammern nicht paarweise vorkommen. + + + Auto Complete + Automatische Vervollständigung + + + Displayed when a character is automatically inserted like brackets or quotes. + Wird angezeigt, wenn ein Zeichen wie Klammern oder Anführungszeichen automatisch eingefügt wird. + + + Current Line + Aktuelle Zeile + + + Line where the cursor is placed in. + Zeile, in der sich die Einfügemarke befindet. + + + Current Line Number + Aktuelle Zeilennummer + + + Line number located on the left side of the editor where the cursor is placed in. + Nummer der Zeile, in der sich die Einfügemarke befindet, an der linken Seite des Editors. + + + Occurrences + Vorkommen + + + Occurrences of the symbol under the cursor. +(Only the background will be applied.) + Vorkommen des unter der Einfügemarke befindlichen Symbols. +(Nur der Hintergrund wird benutzt.) + + + Unused Occurrence + Nicht verwendet + + + Occurrences of unused variables. + Vorkommen unbenutzter Variablen. + + + Renaming Occurrence + Umbenennung + + + Occurrences of a symbol that will be renamed. + Vorkommen eines umzubenennenden Symbols. + + + Number + Zahl + + + Number literal. + Zahlenliteral. + + + String + Zeichenkette + + + Character and string literals. + Zeichen- und Zeichenkettenliterale. + + + Primitive Type + Einfacher Typ + + + Name of a primitive data type. + Name eines einfachen Datentyps. + + + Type + Typ + + + Name of a type. + Typname. + + + Local + Lokale Variable + + + Local variables. + Lokale Variablen. + + + Field + Feld + + + Class' data members. + Mitgliedsvariablen von Klassen. + + + Global + Global + + + Global variables. + Globale Variablen. + + + Enumeration + Aufzählung + + + Applied to enumeration items. + Wird auf Aufzählungen angewandt. + + + Function + Funktion + + + Name of a function. + Name einer Funktion. + + + Virtual Function + Virtuelle Funktion + + + Name of function declared as virtual. + Name einer als virtuell deklarierten Funktion. + + + QML Binding + QML-Binding + + + QML item property, that allows a binding to another property. + QML-Eigenschaft, die ein Binding zu einer anderen Eigenschaft ermöglicht. + + + QML Local Id + Lokale QML-Id + + + QML item id within a QML file. + QML-Element-Id in einer QML-Datei. + + + QML Root Object Property + Eigenschaft des QML-Wurzelelements + + + QML property of a parent item. + QML-Eigenschaft eines übergeordneten QML-Objektes. + + + QML Scope Object Property + Objekteigenschaft im Gültigkeitsbereich von QML + + + Property of the same QML item. + Eigenschaft des selben QML-Objektes. + + + QML State Name + QML-Statusnname + + + Name of a QML state. + Name eines States in QML. + + + QML Type Name + QML-Typname + + + Name of a QML type. + Name eines QML-Typs. + + + QML External Id + Externe QML-Id + + + QML id defined in another QML file. + In einer anderen QML-Datei definierte QML-Element-Id. + + + QML External Object Property + Eigenschaft eines externen QML-Objektes + + + QML property defined in another QML file. + In einer anderen QML-Datei definierte QML-Eigenschaft. + + + JavaScript Scope Var + JavaScript-Variable im Bereich + + + Variables defined inside the JavaScript file. + In einer JavaScript-Datei definierte Variablen. + + + JavaScript Import + JavaScript-Import + + + Name of a JavaScript import inside a QML file. + Name eines JavaScript-Imports in einer QML-Datei. + + + JavaScript Global Variable + Globale JavaScript-Variable + + + Variables defined outside the script. + Außerhalb des Skripts definierte Variablen. + + + Keyword + Schlüsselwort + + + Reserved keywords of the programming language except keywords denoting primitive types. + Reservierte Schlüsselworte der Programmiersprache außer Schlüsselworte, die einfache Typen bezeichnen. + + + Operator + Operator + + + Operators (for example operator++ or operator-=). + Operatoren (zum Beispiel operator++ oder operator-=). + + + Preprocessor + Präprozessor + + + Preprocessor directives. + Präprozessor-Anweisungen. + + + Label + Sprungmarke + + + Labels for goto statements. + Sprungmarken für goto-Befehle. + + + Comment + Kommentar + + + All style of comments except Doxygen comments. + Alle Arten von Kommentaren außer Doxygen-Kommentaren. + + + Doxygen Comment + Doxygen-Kommentar + + + Doxygen comments. + Doxygen-Kommentare. + + + Doxygen Tag + Doxygen-Tag + + + Doxygen tags. + Doxygen-Tags. + + + Visual Whitespace + Leerzeichen darstellen + + + Whitespace. +Will not be applied to whitespace in comments and strings. + Leerzeichen. +Außer Leerzeichen innerhalb von Kommentaren und Zeichenketten. + + + Disabled Code + Deaktivierter Code + + + Code disabled by preprocessor directives. + Durch Präprozessor-Anweisungen deaktivierter Code. + + + Added Line + Hinzugefügte Zeile + + + Applied to added lines in differences (in diff editor). + Wird auf hinzugefügte Zeilen angewendet (in Diff-Editor). + + + Removed Line + Entfernte Zeile + + + Applied to removed lines in differences (in diff editor). + Wird auf entfernte Zeilen angewendet (in Diff-Editor). + + + Diff File + Diff-Dateiangabe + + + Compared files (in diff editor). + Verglichene Dateien (in Diff-Editor). + + + Diff Location + Diff-Zeilenangabe + + + Location in the files where the difference is (in diff editor). + Stelle, an der sich der Unterschied befindet (in Diff-Editor). + + + Diff File Line + Diff-Dateizeile + + + Applied to lines with file information in differences (in side-by-side diff editor). + Wird auf Zeilen mit Dateiinformationen in den Unterschieden angewendet (bei Anzeige mit Gegenüberstellung der Unterschiede). + + + Diff Context Line + Diff-Kontextzeile + + + Applied to lines describing hidden context in differences (in side-by-side diff editor). + Wird auf Zeilen angewendet, die verborgenen Kontext in den Unterschieden beschreiben (bei Anzeige mit Gegenüberstellung der Unterschiede). + + + Diff Source Line + Diff-Zeile aus Quelldatei + + + Applied to source lines with changes in differences (in side-by-side diff editor). + Wird auf geänderte Zeilen der Quelldatei in den Unterschieden angewendet (bei Anzeige mit Gegenüberstellung der Unterschiede). + + + Diff Source Character + Diff-Zeichen aus Quelldatei + + + Applied to removed characters in differences (in side-by-side diff editor). + Wird auf gelöschte Zeichen in den Unterschieden angewendet (bei Anzeige mit Gegenüberstellung der Unterschiede). + + + Diff Destination Line + Diff-Zeile aus Zieldatei + + + Applied to destination lines with changes in differences (in side-by-side diff editor). + Wird auf geänderte Zeilen der Zieldatei in den Unterschieden angewendet (bei Anzeige mit Gegenüberstellung der Unterschiede). + + + Diff Destination Character + Diff-Zeichen aus Zieldatei + + + Applied to added characters in differences (in side-by-side diff editor). + Wird auf hinzugefügte Zeichen in den Unterschieden angewendet (bei Anzeige mit Gegenüberstellung der Unterschiede). + + + Log Change Line + Zeile in Änderungslogs + + + Applied to lines describing changes in VCS log. + Wird auf Zeilen angewendet, die Änderungen in einem Versionskontroll-Log beschreiben. + + + Error + Fehler + + + Underline color of error diagnostics. + Unterstreichung von Fehlern. + + + Error Context + Fehlerkontext + + + Underline color of the contexts of error diagnostics. + Unterstreichung der Kontexte von Fehlern. + + + Warning + Warnung + + + Underline color of warning diagnostics. + Unterstreichung von Warnungen. + + + Warning Context + Warnungskontext + + + Underline color of the contexts of warning diagnostics. + Unterstreichung der Kontexte von Warnungen. + + + Declaration + Deklaration + + + Declaration of a function, variable, and so on. + Deklaration einer Funktion, Variable oder vergleichbarem. + + + Behavior + Verhalten + + + Display + Anzeige + + From 8579e684dfdc413fdedac12b0234eadad599b735 Mon Sep 17 00:00:00 2001 From: Risto Avila Date: Wed, 5 Oct 2016 13:25:35 +0300 Subject: [PATCH 02/72] Fix behavior with no_plugin_name_prefix in CONFIG If both plugin and no_plugin_name_prefix are defined in CONFIG, QtCreator would not assemble the file name correctly. Change-Id: Iebfc0402ff7c89f2a964cfcee77dfc77a6e5b0db Reviewed-by: Oswald Buddenhagen --- src/plugins/qmakeprojectmanager/qmakeproject.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmakeprojectmanager/qmakeproject.cpp b/src/plugins/qmakeprojectmanager/qmakeproject.cpp index d286ca37205..b3c54f4d1ff 100644 --- a/src/plugins/qmakeprojectmanager/qmakeproject.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeproject.cpp @@ -1471,7 +1471,9 @@ void QmakeProject::collectLibraryData(const QmakeProFileNode *node, DeploymentDa destDir.append(QLatin1Char('/')).append(ti.target) .append(QLatin1String(".framework")); } else { - targetFileName.prepend(QLatin1String("lib")); + if (!(isPlugin && config.contains(QLatin1String("no_plugin_name_prefix")))) + targetFileName.prepend(QLatin1String("lib")); + if (!isPlugin) { targetFileName += QLatin1Char('.'); const QString version = node->singleVariableValue(VersionVar); @@ -1490,7 +1492,9 @@ void QmakeProject::collectLibraryData(const QmakeProFileNode *node, DeploymentDa case Abi::LinuxOS: case Abi::BsdOS: case Abi::UnixOS: - targetFileName.prepend(QLatin1String("lib")); + if (!(isPlugin && config.contains(QLatin1String("no_plugin_name_prefix")))) + targetFileName.prepend(QLatin1String("lib")); + targetFileName += QLatin1Char('.'); if (isStatic) { targetFileName += QLatin1Char('a'); From 54a7188c277b955085902fb0b7792fe0635f8271 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Thu, 6 Oct 2016 18:25:17 +0200 Subject: [PATCH 03/72] Squish: Cloning installer-framework instead of jom in tst_git_clone jom's repository can be cloned quicker than Squish can cancel the procedure, making the test instable. Cloning installer-framework takes a couple of seconds longer. Change-Id: I032a4bf60cfd3b070e4c311fbd1dae5b81e8fcd1 Reviewed-by: Christian Stenger --- tests/system/suite_tools/tst_git_clone/test.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/system/suite_tools/tst_git_clone/test.py b/tests/system/suite_tools/tst_git_clone/test.py index 21ce9ba6bbb..5798ce56f45 100644 --- a/tests/system/suite_tools/tst_git_clone/test.py +++ b/tests/system/suite_tools/tst_git_clone/test.py @@ -25,8 +25,8 @@ source("../../shared/qtcreator.py") -cloneUrl = "https://codereview.qt-project.org/p/qt-labs/jom" -cloneDir = "myCloneOfJom" +cloneUrl = "https://code.qt.io/installer-framework/installer-framework.git" +cloneDir = "myCloneOfIfw" def verifyCloneLog(targetDir, canceled): if canceled: @@ -39,8 +39,7 @@ def verifyCloneLog(targetDir, canceled): test.warning("Cloning failed outside Creator.") return False # test for QTCREATORBUG-10112 - test.compare(cloneLog.count("remote: Counting objects:"), 1) - test.compare(cloneLog.count("remote: Finding sources:"), 1) + test.compare(cloneLog.count("remote: Total"), 1) test.compare(cloneLog.count("Receiving objects:"), 1) test.compare(cloneLog.count("Resolving deltas:"), 1) test.verify(not "Stopping..." in cloneLog, @@ -75,9 +74,9 @@ def verifyVersionControlView(targetDir, canceled): clickButton(waitForObject(":*Qt Creator.Clear_QToolButton")) def verifyFiles(targetDir): - for file in [".gitignore", "CMakeLists.txt", "jom.pro", - os.path.join("bin", "ibjom.bat"), - os.path.join("src", "app", "main.cpp")]: + for file in [".gitignore", "LGPL_EXCEPTION.txt", "installerfw.pro", + os.path.join("tests", "test-installer", "create-test-installer.bat"), + os.path.join("src", "sdk", "main.cpp")]: test.verify(os.path.exists(os.path.join(targetDir, cloneDir, file)), "Verify the existence of %s" % file) @@ -95,7 +94,7 @@ def main(): replaceEditorContent(waitForObject(":Working Copy_Utils::BaseValidatingLineEdit"), targetDir) cloneDirEdit = waitForObject("{name='Dir' type='QLineEdit' visible='1'}") - test.compare(cloneDirEdit.text, "jom") + test.compare(cloneDirEdit.text, "installer-framework") replaceEditorContent(cloneDirEdit, cloneDir) clickButton(waitForObject(":Next_QPushButton")) cloneLog = waitForObject(":Git Repository Clone.logPlainTextEdit_QPlainTextEdit", 1000) From ad947035dd8ba2802a26ad8def757f7ecde48e6c Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Wed, 5 Oct 2016 14:04:36 +0200 Subject: [PATCH 04/72] Add changes file for 4.1.1 Change-Id: I8416f825efe8b1369913c3cfda883a5b2149944e Reviewed-by: Leena Miettinen --- dist/changes-4.1.1.md | 72 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 dist/changes-4.1.1.md diff --git a/dist/changes-4.1.1.md b/dist/changes-4.1.1.md new file mode 100644 index 00000000000..79de654dc20 --- /dev/null +++ b/dist/changes-4.1.1.md @@ -0,0 +1,72 @@ +Qt Creator version 4.1.1 contains bug fixes. + +The most important changes are listed in this document. For a complete +list of changes, see the Git log for the Qt Creator sources that +you can check out from the public Git repository. For example: + + git clone git://code.qt.io/qt-creator/qt-creator.git + git log --cherry-pick --pretty=oneline v4.1.0..v4.1.1 + +General + +* Fixed issues with output pane height + (QTCREATORBUG-15986, QTCREATORBUG-16829) + +Editing + +* Fixed performance of cleaning whitespace (QTCREATORBUG-16420) +* Fixed selection color in help viewer for dark theme (QTCREATORBUG-16375) + +Help + +* Fixed that no results could be shown in Locator (QTCREATORBUG-16753) + +QMake Projects + +* Fixed issue with make steps in deploy configurations (QTCREATORBUG-16795) + +Qbs Projects + +* Fixed handling of generated files (QTCREATORBUG-16976) + +QML Support + +* Fixed handling of circular dependencies (QTCREATORBUG-16585) + +Debugging + +* Fixed scrolling in memory editor (QTCREATORBUG-16751) +* Fixed expansion of items in tool tip (QTCREATORBUG-16947) +* GDB + * Fixed handling of built-in pretty printers from new versions of GDB + (QTCREATORBUG-16758) + * Fixed that remote working directory was used for local process + (QTCREATORBUG-16211) +* CDB + * Fixed display order of vectors in vectors (QTCREATORBUG-16813) + * Fixed display of QList contents (QTCREATORBUG-16750) + +QML Profiler + +* Separated compile events from other QML/JS events in statistics and + flamegraph, since compilation can happen asynchronously + +Beatifier + +* Fixed that beautifier was not enabled for Objective-C/C++ files + (QTCREATORBUG-16806) + +Platform Specific + +macOS + +* Fixed issue with detecting LLDB through `xcrun` + +Android + +* Added API level 24 for Android 7 +* Fixed debugging on Android 6+ with NDK r11+ (QTCREATORBUG-16721) + +iOS + +* Fixed QML debugging on device (QTCREATORBUG-15812) From 01db726870af06d8b1a8aad308c1065740edad68 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 10 Oct 2016 12:42:48 +0200 Subject: [PATCH 05/72] AutoTest: Fix running selected quick test functions Task-number: QTCREATORBUG-17093 Change-Id: Ia404efe5779eaf5e735410db83840d9b9f58f5bd Reviewed-by: David Schulz --- src/plugins/autotest/quick/quicktesttreeitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/autotest/quick/quicktesttreeitem.cpp b/src/plugins/autotest/quick/quicktesttreeitem.cpp index 3ff2d4d4764..12b85008255 100644 --- a/src/plugins/autotest/quick/quicktesttreeitem.cpp +++ b/src/plugins/autotest/quick/quicktesttreeitem.cpp @@ -237,7 +237,7 @@ QList QuickTestTreeItem::getSelectedTestConfigurations() co int grandChildCount = child->childCount(); for (int grandChildRow = 0; grandChildRow < grandChildCount; ++grandChildRow) { const TestTreeItem *grandChild = child->childItem(grandChildRow); - if (grandChild->type() != TestFunctionOrSet) + if (grandChild->checked() != Qt::Checked || grandChild->type() != TestFunctionOrSet) continue; testFunctions << child->name() + QLatin1String("::") + grandChild->name(); } From 3b8087a85cf412013acb404a09a2eb5b319e56cb Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 10 Oct 2016 11:56:56 +0200 Subject: [PATCH 06/72] Debugger: Keep expansion state when stepping in QML Change-Id: I88c87c040fe276a4436d398ba777b98b6732f37a Reviewed-by: Eike Ziller Reviewed-by: Ulf Hermann --- src/plugins/debugger/qml/qmlengine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index bbfe86037fb..bb51ad7b5e5 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -2391,6 +2391,7 @@ void QmlEnginePrivate::insertSubItems(WatchItem *parent, const QVariantList &pro QTC_ASSERT(parent, return); LookupItems itemsToLookup; + const QSet expandedINames = engine->watchHandler()->expandedINames(); foreach (const QVariant &property, properties) { QmlV8ObjectData propertyData = extractData(property); auto item = new WatchItem; @@ -2412,7 +2413,7 @@ void QmlEnginePrivate::insertSubItems(WatchItem *parent, const QVariantList &pro item->id = propertyData.handle; item->type = propertyData.type; item->value = propertyData.value.toString(); - if (item->type.isEmpty()) + if (item->type.isEmpty() || expandedINames.contains(item->iname)) itemsToLookup.insert(propertyData.handle, {item->iname, item->name, item->exp}); item->setHasChildren(propertyData.properties.count() > 0); parent->appendChild(item); From 2d2db8312dca1747aadde698ff4d565de0d412d2 Mon Sep 17 00:00:00 2001 From: Thomas Epting Date: Tue, 4 Oct 2016 11:29:30 +0200 Subject: [PATCH 07/72] MSVC: Ensure the correct MSVC installation folder is detected With this change, tools like Bullseye Coverage that wrap cl.exe are disregarded. Only true MSVC installation folders are considered now, which allows using Creator+Qbs with such tools again. Task-number: QBS-1000 Change-Id: Ifb49b3c032359aa4ba1bc702de0dc3d30d3b6075 Reviewed-by: Christian Kandeler --- src/libs/utils/environment.cpp | 7 ++++--- src/libs/utils/environment.h | 4 +++- src/plugins/projectexplorer/abstractmsvctoolchain.cpp | 11 ++++++++++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/libs/utils/environment.cpp b/src/libs/utils/environment.cpp index 50c32f9a07a..900d4e63e1c 100644 --- a/src/libs/utils/environment.cpp +++ b/src/libs/utils/environment.cpp @@ -273,7 +273,8 @@ QStringList Environment::appendExeExtensions(const QString &executable) const } FileName Environment::searchInPath(const QString &executable, - const QStringList &additionalDirs) const + const QStringList &additionalDirs, + bool (*func)(const QString &name)) const { if (executable.isEmpty()) return FileName(); @@ -296,7 +297,7 @@ FileName Environment::searchInPath(const QString &executable, continue; alreadyChecked.insert(dir); FileName tmp = searchInDirectory(execs, dir); - if (!tmp.isEmpty()) + if (!tmp.isEmpty() && (!func || func(tmp.toString()))) return tmp; } @@ -308,7 +309,7 @@ FileName Environment::searchInPath(const QString &executable, continue; alreadyChecked.insert(p); FileName tmp = searchInDirectory(execs, QDir::fromNativeSeparators(p)); - if (!tmp.isEmpty()) + if (!tmp.isEmpty() && (!func || func(tmp.toString()))) return tmp; } return FileName(); diff --git a/src/libs/utils/environment.h b/src/libs/utils/environment.h index 78f51bb7f4a..a04cbe92849 100644 --- a/src/libs/utils/environment.h +++ b/src/libs/utils/environment.h @@ -100,7 +100,9 @@ public: Environment::const_iterator constFind(const QString &name) const; FileName searchInPath(const QString &executable, - const QStringList &additionalDirs = QStringList()) const; + const QStringList &additionalDirs = QStringList(), + bool (*func)(const QString &name) = nullptr) const; + QStringList path() const; QStringList appendExeExtensions(const QString &executable) const; diff --git a/src/plugins/projectexplorer/abstractmsvctoolchain.cpp b/src/plugins/projectexplorer/abstractmsvctoolchain.cpp index 34436b892c8..e2930db03a3 100644 --- a/src/plugins/projectexplorer/abstractmsvctoolchain.cpp +++ b/src/plugins/projectexplorer/abstractmsvctoolchain.cpp @@ -201,7 +201,16 @@ Utils::FileName AbstractMsvcToolChain::compilerCommand() const { Utils::Environment env = Utils::Environment::systemEnvironment(); addToEnvironment(env); - return env.searchInPath(QLatin1String("cl.exe")); + + Utils::FileName clexe = env.searchInPath(QLatin1String("cl.exe"), QStringList(), [](const QString &name) { + QDir dir(QDir::cleanPath(QFileInfo(name).absolutePath() + QStringLiteral("/.."))); + do { + if (QFile::exists(dir.absoluteFilePath(QStringLiteral("vcvarsall.bat")))) + return true; + } while (dir.cdUp() && !dir.isRoot()); + return false; + }); + return clexe; } IOutputParser *AbstractMsvcToolChain::outputParser() const From edd239a3debe2fb1bcdfb7e17e17219ed0f85489 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Mon, 10 Oct 2016 14:35:30 +0200 Subject: [PATCH 08/72] Cdb: Strip const before template parameter lookup Change-Id: I21226e867944c3277fcb3fec40a04436d055d9e2 Reviewed-by: Christian Stenger --- src/libs/qtcreatorcdbext/pytype.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/qtcreatorcdbext/pytype.cpp b/src/libs/qtcreatorcdbext/pytype.cpp index f032c62f63c..2e769fa61f5 100644 --- a/src/libs/qtcreatorcdbext/pytype.cpp +++ b/src/libs/qtcreatorcdbext/pytype.cpp @@ -241,7 +241,7 @@ PyObject *type_TemplateArgument(Type *self, PyObject *args) if (innerTypes.size() <= index) Py_RETURN_NONE; - const std::string &innerType = innerTypes.at(index); + const std::string &innerType = SymbolGroupValue::stripConst(innerTypes.at(index)); if (numeric) { try { return Py_BuildValue("i", std::stoi(innerType)); From 646b3bd55364f6f5a5052da1f13f668b3fecbff0 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Mon, 10 Oct 2016 14:37:10 +0200 Subject: [PATCH 09/72] Dumper: Fix std map dumper for msvc And potentially for QNX. Change-Id: I77f1c9803ff5441394a3d446720a928b12777e6a Reviewed-by: hjk --- share/qtcreator/debugger/stdtypes.py | 29 ++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/share/qtcreator/debugger/stdtypes.py b/share/qtcreator/debugger/stdtypes.py index 890ace20d88..15141bbea19 100644 --- a/share/qtcreator/debugger/stdtypes.py +++ b/share/qtcreator/debugger/stdtypes.py @@ -213,12 +213,20 @@ def qform__std__map(): def qdump__std__map(d, value): if d.isQnxTarget(): - qdump__std__map__QNX(d, value) + proxy, head, size = value.split('ppI') + d.putItemCount(size) + qdump_std__map__helper(d, size, value) return + elif d.isMsvcTarget(): + proxy, head, size = value.split('ppQ') + d.putItemCount(size) + try: + qdump_std__map__helper(d, size, value['_Mypair']['_Myval2']['_Myval2']) + finally: + return # stuff is actually (color, pad) with 'I@', but we can save cycles/ (compare, stuff, parent, left, right, size) = value.split('pppppp') - impl = value["_M_t"]["_M_impl"] d.check(0 <= size and size <= 100*1000*1000) d.putItemCount(size) @@ -226,7 +234,7 @@ def qdump__std__map(d, value): pairType = value.type[3][0] pairPointer = pairType.pointer() with PairedChildren(d, size, pairType=pairType, maxNumChild=1000): - node = impl["_M_header"]["_M_left"] + node = value["_M_t"]["_M_impl"]["_M_header"]["_M_left"] nodeSize = node.dereference().type.size() typeCode = "@{%s}@{%s}" % (pairType[0].name, pairType[1].name) for i in d.childRange(): @@ -248,26 +256,23 @@ def qdump__std__map(d, value): break node = node["_M_left"] -def qdump__std__map__QNX(d, value): - size = value['_Mysize'] - d.check(0 <= size and size <= 100*1000*1000) - d.putItemCount(size) - +def qdump_std__map__helper(d, size, value): if d.isExpanded(): head = value['_Myhead'] node = head['_Left'] nodeType = head.type - with Children(d, size, maxNumChild=1000): + pairType = head.type[0] + with PairedChildren(d, size, pairType=pairType, maxNumChild=1000): for i in d.childRange(): pair = node.cast(nodeType).dereference()['_Myval'] d.putPairItem(i, pair) - if not node['_Right']['_Isnil']: + if node['_Right']['_Isnil'].integer() == 0: node = node['_Right'] - while not node['_Left']['_Isnil']: + while node['_Left']['_Isnil'].integer() == 0: node = node['_Left'] else: parent = node['_Parent'] - while node == parent['_Right']['_Isnil']: + while node and parent['_Right']['_Isnil'].integer() == 0: node = parent parent = parent['_Parent'] if node['_Right'] != parent: From 8acca9f37ba49ac6331151f4b41d710b3448bde8 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Wed, 12 Oct 2016 12:50:01 +0200 Subject: [PATCH 10/72] Squish: Fix error handling in tst_git_clone Change-Id: Id59ba23361beb0994f400647680e4facb223d22f Reviewed-by: Christian Stenger --- tests/system/suite_tools/tst_git_clone/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system/suite_tools/tst_git_clone/test.py b/tests/system/suite_tools/tst_git_clone/test.py index 5798ce56f45..7d05b267288 100644 --- a/tests/system/suite_tools/tst_git_clone/test.py +++ b/tests/system/suite_tools/tst_git_clone/test.py @@ -128,7 +128,7 @@ def main(): except: clickButton(waitForObject(":Cannot Open Project.Show Details..._QPushButton")) test.fail("The checked out project was not being opened.", - waitForObject(":Cannot Open Project_QTextEdit").plainText) + str(waitForObject(":Cannot Open Project_QTextEdit").plainText)) clickButton(waitForObject(":Cannot Open Project.OK_QPushButton")) verifyVersionControlView(targetDir, button == "Cancel immediately") invokeMenuItem("File", "Exit") From 169723dd873b541fd67d2159ec21ad81f437ce3e Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Wed, 12 Oct 2016 12:50:35 +0200 Subject: [PATCH 11/72] Squish: Fix openVcsLog() when an OutputWindow is already shown Change-Id: I47432b7367f238a92921bffb030eada902327bd5 Reviewed-by: Christian Stenger --- tests/system/shared/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py index ff36510a7cc..84242831084 100644 --- a/tests/system/shared/utils.py +++ b/tests/system/shared/utils.py @@ -628,6 +628,8 @@ def openVcsLog(): "window=':Qt Creator_Core::Internal::MainWindow'}", 2000) if className(foundObj) != 'Core::OutputWindow': raise Exception("Found derived class, but not a pure QPlainTextEdit.") + waitForObject("{text='Version Control' type='QLabel' unnamed='1' visible='1' " + "window=':Qt Creator_Core::Internal::MainWindow'}", 2000) except: invokeMenuItem("Window", "Output Panes", "Version Control") From b729d6da7f6e4953aa7230ca340e9a1cc1fdea77 Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Wed, 12 Oct 2016 12:48:20 +0200 Subject: [PATCH 12/72] Squish: Update tst_git_clone Change-Id: Ie775ae993651b51699ebfedbe6b37c823392435e Reviewed-by: Christian Stenger --- tests/system/objects.map | 2 +- tests/system/shared/project.py | 6 ++---- tests/system/suite_WELP/tst_WELP03/test.py | 6 ++---- tests/system/suite_tools/tst_git_clone/test.py | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/tests/system/objects.map b/tests/system/objects.map index 9865323bf11..9bd6992fc03 100644 --- a/tests/system/objects.map +++ b/tests/system/objects.map @@ -1,7 +1,6 @@ :*Qt Creator.Add Kit_QPushButton {text='Add Kit' type='QPushButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :*Qt Creator.Build Project_Core::Internal::FancyToolButton {text?='Build Project*' type='Core::Internal::FancyToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :*Qt Creator.Cancel Build_QToolButton {text='Cancel Build' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} -:*Qt Creator.Cancel_QPushButton {text='Cancel' type='QPushButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :*Qt Creator.Clear_QToolButton {text='Clear' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :*Qt Creator.Continue_Core::Internal::FancyToolButton {toolTip?='Continue *' type='Core::Internal::FancyToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :*Qt Creator.Events_QDockWidget {name='QmlProfilerStatisticsViewDockWidget' type='QDockWidget' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} @@ -125,6 +124,7 @@ :Qt Creator.CloseDoc_QToolButton {toolTip?='Close Document *' type='QToolButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.CloseFind_QToolButton {name='close' type='QToolButton' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.Compile Output_Core::OutputWindow {type='Core::OutputWindow' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Compile Output'} +:Qt Creator.Configure Project_QPushButton {text='Configure Project' type='QPushButton' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.DebugModeWidget_QSplitter {name='DebugModeWidget' type='QSplitter' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator.Issues_QListView {type='QListView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' windowTitle='Issues'} :Qt Creator.Project.Menu.File_QMenu {name='Project.Menu.File' type='QMenu'} diff --git a/tests/system/shared/project.py b/tests/system/shared/project.py index 3eba7a13d67..6b7f7dbd054 100644 --- a/tests/system/shared/project.py +++ b/tests/system/shared/project.py @@ -50,8 +50,7 @@ def openQmakeProject(projectPath, targets=Targets.desktopTargetClasses(), fromWe except: pass checkedTargets = __chooseTargets__(targets) - configureButton = waitForObject("{text='Configure Project' type='QPushButton' unnamed='1' visible='1'" - "window=':Qt Creator_Core::Internal::MainWindow'}") + configureButton = waitForObject(":Qt Creator.Configure Project_QPushButton") clickButton(configureButton) return checkedTargets @@ -74,8 +73,7 @@ def openCmakeProject(projectPath, buildDir): selectFromFileDialog(projectPath) __chooseTargets__(0) # uncheck all __chooseTargets__(Targets.DESKTOP_480_DEFAULT, additionalFunc=additionalFunction) - clickButton(waitForObject("{text='Configure Project' type='QPushButton' unnamed='1' visible='1'" - "window=':Qt Creator_Core::Internal::MainWindow'}")) + clickButton(waitForObject(":Qt Creator.Configure Project_QPushButton")) return True # this function returns a list of available targets - this is not 100% error proof diff --git a/tests/system/suite_WELP/tst_WELP03/test.py b/tests/system/suite_WELP/tst_WELP03/test.py index 97e40d3700f..8ba0263e0ab 100644 --- a/tests/system/suite_WELP/tst_WELP03/test.py +++ b/tests/system/suite_WELP/tst_WELP03/test.py @@ -90,8 +90,7 @@ def main(): "Verifying: The example application is opened inside Help.") sendEvent("QCloseEvent", helpWidget) # assume the correct kit is selected, hit Configure Project - clickButton(waitForObject("{text='Configure Project' type='QPushButton' unnamed='1' visible='1'" - "window=':Qt Creator_Core::Internal::MainWindow'}")) + clickButton(waitForObject(":Qt Creator.Configure Project_QPushButton")) test.verify(checkIfObjectExists("{column='0' container=':Qt Creator_Utils::NavigationTreeView'" " text='2dpainting' type='QModelIndex'}"), "Verifying: The project is shown in 'Edit' mode.") @@ -124,8 +123,7 @@ def main(): "Verifying: The example application is opened inside Help.") sendEvent("QCloseEvent", helpWidget) # assume the correct kit is selected, hit Configure Project - clickButton(waitForObject("{text='Configure Project' type='QPushButton' unnamed='1' visible='1'" - "window=':Qt Creator_Core::Internal::MainWindow'}")) + clickButton(waitForObject(":Qt Creator.Configure Project_QPushButton")) # close second example application test.verify(checkIfObjectExists("{column='0' container=':Qt Creator_Utils::NavigationTreeView'" " text='propertyanimation' type='QModelIndex'}", False) and diff --git a/tests/system/suite_tools/tst_git_clone/test.py b/tests/system/suite_tools/tst_git_clone/test.py index 21ce9ba6bbb..85206b309cd 100644 --- a/tests/system/suite_tools/tst_git_clone/test.py +++ b/tests/system/suite_tools/tst_git_clone/test.py @@ -124,7 +124,7 @@ def main(): if button == ":Git Repository Clone.Finish_QPushButton": try: # Projects mode shown - clickButton(waitForObject(":*Qt Creator.Cancel_QPushButton", 5000)) + clickButton(waitForObject(":Qt Creator.Configure Project_QPushButton", 5000)) test.passes("The checked out project was being opened.") except: clickButton(waitForObject(":Cannot Open Project.Show Details..._QPushButton")) From d6858b2f9f29632e1762ff8677a804189a5aba0c Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Wed, 12 Oct 2016 11:45:58 +0200 Subject: [PATCH 13/72] Clang: Fix unused warning Change-Id: I1ed0698eb9ea2d73e4ccc6540121610b30d5f646 Reviewed-by: Tim Jenssen --- tests/unit/unittest/highlightingmarks-test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/unittest/highlightingmarks-test.cpp b/tests/unit/unittest/highlightingmarks-test.cpp index 9433bf9249e..59c86305d48 100644 --- a/tests/unit/unittest/highlightingmarks-test.cpp +++ b/tests/unit/unittest/highlightingmarks-test.cpp @@ -1024,7 +1024,7 @@ TEST_F(HighlightingMarks, OutputArgumentsAreEmptyAfterIteration) { const auto infos = translationUnit.highlightingMarksInRange(sourceRange(501, 63)); - for (const auto &info : infos ) {} + for (const auto &info : infos ) { Q_UNUSED(info) } ASSERT_TRUE(infos.currentOutputArgumentRangesAreEmpty()); } From 50f5b6b5e35bc82555356d983d0672b7a19d63be Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Wed, 12 Oct 2016 10:34:28 +0200 Subject: [PATCH 14/72] QmlDesigner: no need to copy the list Change-Id: Ie6d5c1e7a0baaec9f6065854e451bb5d767619e6 Reviewed-by: Thomas Hartmann --- src/plugins/qmldesigner/documentmanager.cpp | 2 +- src/plugins/qmldesigner/documentmanager.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/documentmanager.cpp b/src/plugins/qmldesigner/documentmanager.cpp index 8572420c92b..725b53cbd75 100644 --- a/src/plugins/qmldesigner/documentmanager.cpp +++ b/src/plugins/qmldesigner/documentmanager.cpp @@ -299,7 +299,7 @@ bool DocumentManager::hasCurrentDesignDocument() const return m_currentDesignDocument.data(); } -void DocumentManager::removeEditors(QList editors) +void DocumentManager::removeEditors(const QList &editors) { foreach (Core::IEditor *editor, editors) delete m_designDocumentHash.take(editor).data(); diff --git a/src/plugins/qmldesigner/documentmanager.h b/src/plugins/qmldesigner/documentmanager.h index 83d773d75f3..7e4da751879 100644 --- a/src/plugins/qmldesigner/documentmanager.h +++ b/src/plugins/qmldesigner/documentmanager.h @@ -49,7 +49,7 @@ public: DesignDocument *currentDesignDocument() const; bool hasCurrentDesignDocument() const; - void removeEditors(QList editors); + void removeEditors(const QList &editors); static void goIntoComponent(const ModelNode &modelNode); From 1dccd2579419c38799996b840ffc55aa15878074 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Wed, 12 Oct 2016 10:35:01 +0200 Subject: [PATCH 15/72] QmlDesigner: qDeleteAll does the same Change-Id: I5ccb9279cfcc38455347badf61ab6ddd2ad047ca Reviewed-by: Thomas Hartmann --- src/plugins/qmldesigner/documentmanager.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/documentmanager.cpp b/src/plugins/qmldesigner/documentmanager.cpp index 725b53cbd75..01ec2dfec66 100644 --- a/src/plugins/qmldesigner/documentmanager.cpp +++ b/src/plugins/qmldesigner/documentmanager.cpp @@ -270,8 +270,7 @@ DocumentManager::DocumentManager() DocumentManager::~DocumentManager() { - foreach (const QPointer &designDocument, m_designDocumentHash) - delete designDocument.data(); + qDeleteAll(m_designDocumentHash); } void DocumentManager::setCurrentDesignDocument(Core::IEditor *editor) From a77c5836e98a6b26b1339b9720953d9d9b1893ac Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 12 Oct 2016 15:55:25 +0200 Subject: [PATCH 16/72] Utils: HighDPI and themable copy/cut/paste icons Change-Id: I7ff7ca17f719d1a94b9b4e841db4d8f01f2781d7 Reviewed-by: Alessandro Portale --- src/libs/utils/images/editcopy.png | Bin 1715 -> 160 bytes src/libs/utils/images/editcopy@2x.png | Bin 0 -> 196 bytes src/libs/utils/images/editcut.png | Bin 1949 -> 249 bytes src/libs/utils/images/editcut@2x.png | Bin 0 -> 470 bytes src/libs/utils/images/editpaste.png | Bin 2087 -> 154 bytes src/libs/utils/images/editpaste@2x.png | Bin 0 -> 214 bytes src/libs/utils/images/redo.png | Bin 134 -> 135 bytes src/libs/utils/images/redo@2x.png | Bin 222 -> 222 bytes src/libs/utils/images/undo.png | Bin 132 -> 131 bytes src/libs/utils/images/undo@2x.png | Bin 211 -> 211 bytes src/libs/utils/utils.qrc | 3 + src/libs/utils/utilsicons.cpp | 12 +- src/tools/icons/qtcreatoricons.svg | 163 ++++++++++++++++++++++++- 13 files changed, 170 insertions(+), 8 deletions(-) create mode 100644 src/libs/utils/images/editcopy@2x.png create mode 100644 src/libs/utils/images/editcut@2x.png create mode 100644 src/libs/utils/images/editpaste@2x.png diff --git a/src/libs/utils/images/editcopy.png b/src/libs/utils/images/editcopy.png index ceb520e3051909a7545ef6fe6cafbf89445270c7..69d0c5ec7a0abb0702df204d547fb90acedd02ce 100644 GIT binary patch literal 160 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd7G?$phPQVgfdnK1d_r6q7#LVtS;fS}8X6k* z?%lh8|Ng^=5C8xFe?n&R6b1$cXHOT$5Dr<^gN}mD3=AwATiN*v8X9&TICu6#$6qzZ zBd^qs{p{+0eeu<`g@yZ;71}Plm?)J7hTpsoUohCB#qxnYj?v(Sf~w4X1_lNOPgg&e IbxsLQ0M8>iWB>pF literal 1715 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}Ea{HEjtmUfZd~z?Fk)a} zkSuYHC<)F_D=AMbN@Z|N$xljE@XSq2PYp^V6X&Yb9-edI1%zl4GtF^;jQwHvg!ieMC&hfvm zTP|eE^xa!HLBL~X(#Lb_{m-ne+0Va&!-sk6|CtN{E}D{8uWi`H^-f{k0n2u?X$F^1 zPduoBeV7aBy2MLCAmMsD~Q?zAdD<*kWb~z~??p-Z@&HbLl{$F!X$FMw` zTfA!})Aap{`+mQ89KS0;_mrhNyWN-8Ia~c6%wc%(qHf9Ff;T2k%Q_e5#{GZVJ;&~U zYL(x-o63QD;U~&NU)ug-F%GUzda-l5b@=o1_N+0iS_h(nnV9zd`m(*g{?h)ng?z8R zT0JeA>CVK|9O1?lN;Ib|m?(eK+-;?Z3!t)7)A_wlFSlxXsRaf=w;h zg4?gTTRKM2>Rw`MCFfF+zwdvmFsJJo)IXP>GCh66wMTQ3(|0pDNThX?Ox)$h#HwI( zrN!<#Cu20bV3Wt898s4J-xs{SY9DlOjRI>)$+qMaxwWQVo>hHi z4|d7E%$ZoTu{*%DEptsnx1+{|*LBa+v?JFyuARiiyVurr)l^X}>Eag|%{f*_u590M zEvZMbOKHnBm%x^-+g{p9YdDrwXDn9)SM>chy5rj%_x=1<&Vbl|b}yJ7 zP6}$x+Ug~9d`XaIi@=Ek2|lak1RB|UmkG-sse8U^!WmbGYW|RaTxHTOQZ4qPOD{_b z2rYH`^t0^J%$RPj8Ko=yot`oO)>`84Sevz9B{hig;Km~@Vwx&9V;GZlZ|2MkQFD*p zIN8B6y!XPsJ#r>4pWRx%Jy^L<<^A``AxG{_dCah_yuat+G$*iu`+~vy0as z<^H@lt@PpCUtbIFv2OdrE%&OCqe;#nu!v>Wx83LG`f4ey^ML2c(C5&cfP^* zQgNEt_A_Tr$e&sJ@cyyM!jo@5Huhnhd_W?gh`rxeH?&cw=}zNXd*^q`3ydacIaM_* z{po4^?NPD0wgPPJ-3R_evWWbQoWsygC27AH&H@Q5So7<2%*!dR_%(zO#3H z&$yZMMb)D>UYq4FOykH2t9;sizh>Rvdu-3nN{Y>HSSM!?aYyUL!vAef9eEEPANXBs iyXnJ!Hd~8-yl)i>L`}kVi7|NkFnuv3YFfg#<~#W6%9c<=d*yayC`TrTn(Z(y>GHt-PhIJ$N| zlVzdIr6ng!r_G;mZh^ox28UOSEBI70?LJ=cYS8@}&AnK(b2Z}$^?>xLE%_6g!c0m3XBGQV-k+=$@Z`47H0}BWO#k=$ zCGG$F{XX-#xD^W>F3;V%ukP~pzu)B5KKx%>a4>e_^#6iP_S=l}cK(s|eDHrc%f|Bm ziA>9pE3PQs?FrCOg4ck8V3zAn|sYO%jIHTTb-rM+(t`eb77hsWnuXwGlB$y9c!e8P)*hW$=w?=~+z+X(WLr>mdKI;Vst E0Nm@fhpuY+!OfpuD0bXJYY?+x*^lI*B>%%|y{l2&N{@;D?>-AX}1pccE z8x<87C-2&|ORluA@S%mZ^?vL6e>L_^3R?uOx?BC&&TsXNhm&(>WW*7Ijt zZm9jetxRq5%-r)-r}>@OqRH8CHmzRu zna}~>gj2n}y{^yHZnb7J^SUkUYUrAyTa=ys`uznRftjYFtK$W?7OqWs@ylt`3~9~n z8#V|${E)4uv-{Sy7-4~r;*-tH%+6YfwMzIN{ikjo<15jYCHrF4UEX&{L+K*f6toV zx8F_>OkZeVXt=X)nZAOWaKr@t(iM?9*Q~?B!gOS2{aaC9QkH+gx1;aUzS@-EC7X6< zG2dC)9egQtr<|5Cljsjc!&|oPXMVCDKi}TkI`vv@xT>tYwBqk~r6+T9bM237?sjK& zxSJoG61w2~oYy};vh++fOjvS8LS(6w!rBOy8B6u%-2YWBxj?49t!>)1t6@C7Jv|MR z5;aXa_f33!?dk&03od0&vX!SUTqsC&Iq>G-JDojEswSzoHsq(bh&;D*m9ExGC@(LU zJ!RMxe)H?ANeln|tJ`s&;m+G>6V~sS()=7}^1N@}yg0F2?mo{vGIR^J_EdjgD#@kc z^xWK>S#vk*AN}pUi^W9F&9OA*SpTMx_w}J!S}Z@EWo2bQG_32pU9k1VoIB~Ao2R_Z zaJakV@(Ht7i+t4>M6>2M|Ly5kIaDDbD;s*LT6?;SXC5zq^j*C@r{pJks5o5I$_)Lt ztwa07-`$7XBm0g`+UYi{=8v0>P~Vy5sWn0UyCzPY=%0{~@c6+41r5m;ZQXZNT+`Cj zLc+qFYHRmSlIAs?P_0;a=j6d%mydp28C7FG(N0^g<72Y6`nqfP4jz0sIeY5#?`}yb@!_2!jlhb&4dA(M}FXl5!@(mB1dR%ZRYlvr@ zIFN3-39 z$wgURZyY|A=YHK6I^oxwgnLI-JpBFJj~sEasQqP9urubw$#ad*o~5bIee0WYLF;~e z!Rn$H!Fj&ieWy~g91N`fCY@d7+N;U=&vtJ3v{Q}=jLDW#2kcj}zMS*;z+WxNd;PVp zb#Fe@xrQCnbak#3eOD{nk=OBHdgJbbKPT=v?s;frdyl$FM3fN zq#?rO8vgwJhqF(M7q6(ufR4u3&ocn(SI{>nz5(GJYLfk|2IZoIdS1> zmGiv39<`jq@3uVMIq{Q@ti|SbhWkg^wtu|Z|8lbIqm0uX$DKmI9(=gs;igI60WmQ= zNgE}iq*jYcu<$p>^p@SK=WNp2xz8?d(KVajfjex3S>6k8Fs_-Uq~x&w`kj#PTC?VC z+_FW-^0!>}hV?0`HQUOi-oz}w+x}SdgxHa3?>f#1=C9#>`R}yYw`b{d1D-s6+UTIr z@NNE)C$kjxm))7voRR#aT{m#r9iG>TJ63R|^S_v^`0v-;6L7FyVXWvW; zt#YaqlKz%=Me4v#o)q~*e_~yO7q=c2M4tA{B%$Icko>j*sS!Z!e)1;Z=(KaoA zFFwJklXF8$6; zPDt3mUb@hvs{Ma})N>V%t{{z<%WmyRJ(X`^X?gTbynXGS*27Kr);Bw-6|fyOwG9Y) z?HvDa)BQQsyUu1E5ufy8cdpIB>a~8~IlDK`weC(|o9_KYNb_FT`ocGnM;eThb{P2z z$M?-pv=&*(b;p_K!SPudo_*I^nFCjG-TJBSp^{|j=^DK7>2_P9a`>)IlQ8V~Z1J5@cH`Ck8T+qhS}yy==3ezRtA1X} zC0(SgG`1)?al$lYV7! VfqKPy69xtb22WQ%mvv4FO#n0+p|}75 diff --git a/src/libs/utils/images/editcut@2x.png b/src/libs/utils/images/editcut@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..d41f7febeaa575f60ed64a97a7cfae63ecc2f2d1 GIT binary patch literal 470 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4h9AWhA=@@4F(3rxt=bLAr_~nPWIMtDHJ)j zf99Dh6)7<(3uhkHT|d=knTc?s^TtgIU9%2#Qb341GtKcv#x}82UdcA% z!m2z%pABX_j_a@foBr;r#p?GZb>Huu`#zWZ*U}H}2PRv5G-&v#R9Bat#^7A5!fZjQyJGRS zEhqN=oWNgsVU4PlC4))r3cdy52VZ#@ZcyMd4-g4Cbtv26mEc87_Pc#W5q<}RmO3WH zsGf~rHt4`a4QfCJ9QlSZ*41o?6ulL;8$x`U{Wrb&_;eoAF(yEyfn!RfR8wo7;nG6 aYA>UGwt4=woS#QP5$5UY=d#Wzp$PyM1I|zY literal 0 HcmV?d00001 diff --git a/src/libs/utils/images/editpaste.png b/src/libs/utils/images/editpaste.png index 7238fae7f19365b9add1bbdfb9beb6b775709c3b..1e22d0a2366f4ac5d45a44ecc38edb34c7078330 100644 GIT binary patch literal 154 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4h9AW2CEqh_A)RqBzn3yhDb=V9^5E+$U%T% zqwk;lj9Z;bzO-;kGHDgDI&m>5>?!-ra-ueLtDM8N(s$o}-*RBGX=GW|r!T~D*G@&? z*IhfI6F#LL3JRPlX>ObJI6UN5SEZ$SG&HcRSS7@8Kwf|5PQQbDrsRVx^>p=fS?83{ F1OP88F@^vD literal 2087 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}Ea{HEjtmUfZd~z?Fk)a} zkSuYHC<)F_D=AMbN@Z|N$xljE@XSq2PYp^&mFD zS&>nV8C+UkKQ9P$1xSl++@h*!Q7vzx^`lRb1dT1o%2z54z3-qj89Om7cdIV2VE zp+@!n!B?Ume$B2=NvU8s{o`PE=&5eooa4(jB}}Q^pSfg1iRA;vEQjC~OkK}+J}I)C zlOg!pJk+Y(Om4sVdpqgsR~-GF9__21r88E%+xgtZ(IzxTKJP{ad%1|~hrg;C3-&3w zt%#VXB)9pc?Ki&GrP>b58O$BlKh$I}pPyQj(~}Z7$3^MnHe3H?pML)Fo5=ic^8ZJL zf-gg^{;^>bIU24JJLS=~Nv=zbEjLB-pAXjY?r_tc#42dFk#_<=155kN)SoeJ7ccr3 zEIO(poV(GiT%<=528cYlftoO6Jup~F8a!ymV*miImZ=dkFZ3j282s-=~ zsHnU5;f~JCFA_In>aP9k&c88-;TluxW~UAL_w8z*9d^IEiS>44#+3&T6I?nh+x6g@ctf`hYZ+P$nSLyYTfkVF{(Sq};D8AW3`AAu`U!V0Es(Je;SlQE8M#10 zT83REYlAZ1#TBj3W7laqX7IRiFg$3oxAbT3dm0oZlIZ)i=+tR0LE*(4Dl84zc|*As zK6`C6WHPhpJJ=PmLaK)MfZ`!;{i~m@?auvT(*JRLF@M7|C&5#ys`rV+!C zd8+c+wGVokCnwf^K765NrRFT=&K9YU=_)lJ62w>(j3wqKSIh62=`I&@y7T$|v%fy+ z&0!H>Rca7^x5DmKx?}N*EQ8-WXENxu|M6mwnsqEAOL88s$AZ1ZJ1p+sz<;7Ew#MzBmFxwhm0+^{`}s@zaNLJee+~lX{t|Z?5kJoD=nXIDm$%Q zlKazc`K*>XvP=bs6I-7qt}_p1*=xm+FV`CV{oj;%q1!JOKRItAZ{02IDG>iP_Kkkt zvj+*1^5utH_`_tp76-&|Ep|?DZOW~=&)*&T;{NxI>!vm4#y2+Wzg_;Q-9K>q)5Ny? z=8HUE`VSp2ShBon>Pn}Gy&T&_${)}F&pkPmf5VC;O%n}Rrt`0NOw(PklGU`J+Vsr| zxn=Lfci*V^;u`jvqfRoq4i`gerblW%TflG{^nd;gZ9V{I+-UfKUCOIA-m zbVDGx`NM_t{=s1;jqm#wta`Jv-n#nT{koG6&+wM+I#8p=U_AG9M)KU^UbIfUjW6lv3!PO6>BqaVFUwS-qd9V1wb&|h+ zU3^^=Fd;KZzgZxJH_25%_~;ClV}6fz8SX9kvf=gxSN{m}yZ%=X98uX)e)y+aMrQlM z#4D#CxY@*5pI$Oug;C1+;P>XsZ0fy9Yb=sP6W%!OnsvT%bzJ==gB@E|+x}g zSC1ws7H^z?Z?gE#3zyuv4H&*K#TvF(_r!LHY97zv%#+Kt`P*3i?eG3)=Vj~FWAD2@ z|Jc9swd6uon?magyfsWcZHY5@6B4Fe=aWy#jFvywezv65?{~wx0v?8Bhg;iDNNGDp zAO88LbyoP^%&zlWF2>w;l)b>bg;Ca_{)Ne6tKFrOX1-KXTDc){4Ug+3fzfHI9!VTYD8{6*%uQloMza(ju%YB`%{dH0Ju2pAQ6Bs!ar zTY{;9pwSiM=0}>LU+rJ#X@pm{$GrIUj=|Nz@dp3W!?QP5>;C>D|MdKtZ!vycpe6x> Mr>mdKI;Vst0KJ*!1poj5 diff --git a/src/libs/utils/images/editpaste@2x.png b/src/libs/utils/images/editpaste@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..09a3ebf9dc398c10d5c356c8fbab2fa84bf6b411 GIT binary patch literal 214 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4h9AWhA=@@4F(2=xt=bLAr}5iFB}wXG7xBe zxW6}HNA-bE9lf2R3EJl}SSzCRC1cEV0&BLvsrkH#Gl=tk(`iNpKD`cx3+ozJ@~>$5 zVzl7+lN^T!%hpR|@-PTWDmhe7tjbR_Oa{gem<*x?{MvUi-+lSNQ-pzGlk>xkdCYg8GcYhP Nc)I$ztaD0e0st#`E42Us delta 105 zcmZo?Y-60DlH}{@;us<^HTg$Bo5X}0-!HO0dAEqupuyz;ll|}B9TE-)n;D&9U|?YI MboFyt=akR{0Ab226951J diff --git a/src/libs/utils/images/redo@2x.png b/src/libs/utils/images/redo@2x.png index 4f15b451e67c114dca1015d7bd6ab313eac840d6..f38b88584a0f81a235f7cd7c9915019890673afc 100644 GIT binary patch delta 66 zcmcb|c#m;{p{Sdqr6McO(-skhl?N6wEM%I_w1cZgTe~DWM4f7)TfJ delta 66 zcmcb|c#m;{p{SRmr6McO(-x5fp$|eBf*Ye5Ls&OWbSqQxDoOUg>cQE@C)vJ^i{b0e Xu8U`c6ABp^7#KWV{an^LB{Ts5385D# diff --git a/src/libs/utils/images/undo.png b/src/libs/utils/images/undo.png index bea04707faeb25d2b262dfe207cfdf3537963eca..7ba4e37cab20929a5b87347d1780b902c2877e35 100644 GIT binary patch delta 58 zcmZo+Y-XIG!sq4b;usY+;N diff --git a/src/libs/utils/images/undo@2x.png b/src/libs/utils/images/undo@2x.png index db21fb16f0ac60a510f31cacdf37f0773b621fc9..d4b6be89aae6612c1b412225816741f6be413e20 100644 GIT binary patch delta 170 zcmcc2c$sm6VST8hEhFn!o*$xDj30zEOgX-qL8afHF+z@Ohe(W7-a_pc2@b4hHlDw@ z=7mGV$FKixxtOud+?>((#-Z@Ab2Zz>_KbUP915T4>$9nUX?W%E@o2SRTkVhLT@w{~ zV;Qw9&M)YTKPb+Y_lL{Q@Iz1rtD<|-XEmb(VgV-@q5}>y_MK2>GWzIdK8a}!C!4v1 c5EsMImUdmvSM?Ja7#J8lUHx3vIVCg!0JalF(*OVf delta 170 zcmcc2c$sm6VSS*ZEhFn!o*$xDj30ytoNtJCv}LYi{mR2}VCjQPh1{`@?95sTeYJgQ zuIz`p)_=dQw#o3s9M|F$_AY6;TgDx>E}zrbyOirI4J{V3hp>0)-|IGbb6EaLFHhzV z<<~aNR&}iL5<5O>|2T5Md!cBHOy}9z|2bJij1GuhDQHmMv_M&A&c)s(4B1T!!_O_6 b$;4pO+^@R*images/compile_error_taskbar@2x.png images/dir.png images/editcopy.png + images/editcopy@2x.png images/editcut.png + images/editcut@2x.png images/editpaste.png + images/editpaste@2x.png images/empty14.png images/filenew.png images/fileopen.png diff --git a/src/libs/utils/utilsicons.cpp b/src/libs/utils/utilsicons.cpp index c91a0981b32..5b3a1737d8b 100644 --- a/src/libs/utils/utilsicons.cpp +++ b/src/libs/utils/utilsicons.cpp @@ -76,12 +76,12 @@ const Icon UNDO({ {QLatin1String(":/utils/images/undo.png"), Theme::PanelTextColorMid}}, Icon::Tint); const Icon REDO({ {QLatin1String(":/utils/images/redo.png"), Theme::PanelTextColorMid}}, Icon::Tint); -const Icon COPY( - QLatin1String(":/utils/images/editcopy.png")); -const Icon PASTE( - QLatin1String(":/utils/images/editpaste.png")); -const Icon CUT( - QLatin1String(":/utils/images/editcut.png")); +const Icon COPY({ + {QLatin1String(":/utils/images/editcopy.png"), Theme::PanelTextColorMid}}, Icon::Tint); +const Icon PASTE({ + {QLatin1String(":/utils/images/editpaste.png"), Theme::PanelTextColorMid}}, Icon::Tint); +const Icon CUT({ + {QLatin1String(":/utils/images/editcut.png"), Theme::PanelTextColorMid}}, Icon::Tint); const Icon DIR( QLatin1String(":/utils/images/dir.png")); const Icon RESET({ diff --git a/src/tools/icons/qtcreatoricons.svg b/src/tools/icons/qtcreatoricons.svg index f6e5541ece7..2b4688f6964 100644 --- a/src/tools/icons/qtcreatoricons.svg +++ b/src/tools/icons/qtcreatoricons.svg @@ -440,6 +440,17 @@ height="16" id="rect6129" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Date: Tue, 11 Oct 2016 15:34:06 +0300 Subject: [PATCH 17/72] SessionManager: Improve encapsulation on save Change-Id: I3fa5edf226c8369f9f12ccf95bf2914b50f9d48b Reviewed-by: Eike Ziller --- src/plugins/projectexplorer/projectexplorer.cpp | 12 ++---------- src/plugins/projectexplorer/session.cpp | 12 +++++++----- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 2820174d616..862359e66a0 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -1518,11 +1518,7 @@ void ProjectExplorerPlugin::openNewProjectDialog() void ProjectExplorerPluginPrivate::showSessionManager() { - if (SessionManager::isDefaultVirgin()) { - // do not save new virgin default sessions - } else { - SessionManager::save(); - } + SessionManager::save(); SessionDialog sessionDialog(ICore::mainWindow()); sessionDialog.setAutoLoadSession(dd->m_projectExplorerSettings.autorestoreLastSession); sessionDialog.exec(); @@ -1551,11 +1547,7 @@ void ProjectExplorerPluginPrivate::savePersistentSettings() foreach (Project *pro, SessionManager::projects()) pro->saveSettings(); - if (SessionManager::isDefaultVirgin()) { - // do not save new virgin default sessions - } else { - SessionManager::save(); - } + SessionManager::save(); } QSettings *s = ICore::settings(); diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp index 54f4947e4e4..ee33bc79cc8 100644 --- a/src/plugins/projectexplorer/session.cpp +++ b/src/plugins/projectexplorer/session.cpp @@ -408,6 +408,10 @@ bool SessionManager::loadingSession() bool SessionManager::save() { + // do not save new virgin default sessions + if (isDefaultVirgin()) + return true; + emit m_instance->aboutToSaveSession(); if (!d->m_writer || d->m_writer->fileName() != sessionNameToFileName(d->m_sessionName)) { @@ -961,11 +965,9 @@ bool SessionManager::loadSession(const QString &session) // Allow everyone to set something in the session and before saving emit m_instance->aboutToUnloadSession(d->m_sessionName); - if (!isDefaultVirgin()) { - if (!save()) { - d->m_loadingSession = false; - return false; - } + if (!save()) { + d->m_loadingSession = false; + return false; } // Clean up From f2f951187b27d98052b5474ba70ccd3df3cb1e4b Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 12 Oct 2016 17:20:56 +0200 Subject: [PATCH 18/72] Bookmarks: Fix qbs build Change-Id: I9a867183f1e03468e009950d9289c84c261a012a Reviewed-by: Alessandro Portale --- src/plugins/bookmarks/bookmarks.qbs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/plugins/bookmarks/bookmarks.qbs b/src/plugins/bookmarks/bookmarks.qbs index 979f06b084f..0d7b16e54d1 100644 --- a/src/plugins/bookmarks/bookmarks.qbs +++ b/src/plugins/bookmarks/bookmarks.qbs @@ -15,7 +15,6 @@ QtcPlugin { "bookmark.h", "bookmarkmanager.cpp", "bookmarkmanager.h", - "bookmarks.qrc", "bookmarks_global.h", "bookmarksplugin.cpp", "bookmarksplugin.h", From 3087ccbebc4a8d8e3e848003957bff331152ab25 Mon Sep 17 00:00:00 2001 From: Lorenz Haas Date: Wed, 12 Oct 2016 18:53:07 +0200 Subject: [PATCH 19/72] Changelog: Fix spelling Change-Id: Ibfd7bfc02e5f5c7b24b41f070917d4c67fb8a175 Reviewed-by: Orgad Shaneh --- dist/changes-4.1.1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/changes-4.1.1.md b/dist/changes-4.1.1.md index 79de654dc20..938843162be 100644 --- a/dist/changes-4.1.1.md +++ b/dist/changes-4.1.1.md @@ -51,7 +51,7 @@ QML Profiler * Separated compile events from other QML/JS events in statistics and flamegraph, since compilation can happen asynchronously -Beatifier +Beautifier * Fixed that beautifier was not enabled for Objective-C/C++ files (QTCREATORBUG-16806) From 3517480557049af762ccbc7ccad40fc6500d2e64 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 12 Oct 2016 16:38:50 +0200 Subject: [PATCH 20/72] ClangRefactoringPlugin: Avoid building the plugin for the 4.2 release Building it (and its companion tool) on Windows is such an obstacle that most developers and also the nightly build has not yet been able to do that. Change-Id: Ic0f10fbbbc4e2fe041ff64b30cd8afdff241d7a2 Reviewed-by: Marco Bubke --- src/plugins/plugins.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index 1d1c759a0d1..9bbd07b2100 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -77,7 +77,7 @@ exists(../shared/qbs/qbs.pro)|!isEmpty(QBS_INSTALL_DIR): \ isEmpty(LLVM_INSTALL_DIR):LLVM_INSTALL_DIR=$$(LLVM_INSTALL_DIR) exists($$LLVM_INSTALL_DIR) { SUBDIRS += clangcodemodel - SUBDIRS += clangrefactoring +# SUBDIRS += clangrefactoring } else { warning("Set LLVM_INSTALL_DIR to build the Clang Code Model. " \ "For details, see doc/src/editors/creator-clang-codemodel.qdoc.") From eed064c7ede5a8829debed737ba6769eafb4d793 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Mon, 10 Oct 2016 14:51:55 +0300 Subject: [PATCH 21/72] Core: Save session state on autoSave If Creator crashes, session information (like open files, bookmarks etc.) should be restored. Task-number: QTCREATORBUG-16752 Change-Id: Ife1a2ffb62a3dd9b302e08ad9df9537667173e47 Reviewed-by: Eike Ziller --- src/plugins/coreplugin/editormanager/editormanager.cpp | 1 + src/plugins/coreplugin/editormanager/editormanager.h | 1 + src/plugins/projectexplorer/projectexplorer.cpp | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 433e74b35fc..7f344ecd95f 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -1970,6 +1970,7 @@ void EditorManagerPrivate::autoSave() if (!errors.isEmpty()) QMessageBox::critical(ICore::mainWindow(), tr("File Error"), errors.join(QLatin1Char('\n'))); + emit m_instance->autoSaved(); } void EditorManagerPrivate::handleContextChange(const QList &context) diff --git a/src/plugins/coreplugin/editormanager/editormanager.h b/src/plugins/coreplugin/editormanager/editormanager.h index afcd082d68e..46656e51b0c 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.h +++ b/src/plugins/coreplugin/editormanager/editormanager.h @@ -185,6 +185,7 @@ signals: void editorsClosed(QList editors); void findOnFileSystemRequest(const QString &path); void aboutToSave(IDocument *document); + void autoSaved(); public slots: static void saveDocument(); diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index 862359e66a0..a441ca87c5b 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -1061,6 +1061,10 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er connect(ICore::instance(), &ICore::saveSettingsRequested, dd, &ProjectExplorerPluginPrivate::savePersistentSettings); + connect(EditorManager::instance(), &EditorManager::autoSaved, this, [this] { + if (!dd->m_shuttingDown && !SessionManager::loadingSession()) + SessionManager::save(); + }); addAutoReleasedObject(new ProjectTreeWidgetFactory); addAutoReleasedObject(new FolderNavigationWidgetFactory); From a07e9450e8a27dafdcaa5e59bdfcb855da56adf7 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 11 Oct 2016 14:29:10 +0200 Subject: [PATCH 22/72] Debugger: Fix type lookup for pointers Change-Id: Ie89a120cafd6755f1e2f61f15eb39fd64f0494d5 Reviewed-by: Christian Stenger --- src/libs/qtcreatorcdbext/pytype.cpp | 34 ++++++++++++++++++++--------- src/libs/qtcreatorcdbext/pytype.h | 2 +- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/libs/qtcreatorcdbext/pytype.cpp b/src/libs/qtcreatorcdbext/pytype.cpp index 2e769fa61f5..1610637ef9f 100644 --- a/src/libs/qtcreatorcdbext/pytype.cpp +++ b/src/libs/qtcreatorcdbext/pytype.cpp @@ -53,11 +53,30 @@ PyObject *lookupType(const std::string &typeNameIn) { std::string typeName = typeNameIn; CIDebugSymbols *symbols = ExtensionCommandContext::instance()->symbols(); + std::string fullTypeName = typeName; + // GetSymbolTypeId doesn't support pointer types so we need to strip off the '*' first + while (endsWith(typeName, '*')) + typeName.pop_back(); ULONG64 module; ULONG typeId; if (FAILED(symbols->GetSymbolTypeId(typeName.c_str(), &typeId, &module))) Py_RETURN_NONE; - return createType(module, typeId); + if (typeName != fullTypeName) { + if (module == 0) { // found some builtin type like char so we take the first module available to look up the pointer type + ULONG loaded, unloaded; + if (FAILED(symbols->GetNumberModules(&loaded, &unloaded))) + Py_RETURN_NONE; + if ((loaded + unloaded == 0) || FAILED(symbols->GetModuleByIndex(0, &module))) + Py_RETURN_NONE; + } + if (FAILED(symbols->GetTypeId(module, fullTypeName.c_str(), &typeId))) + Py_RETURN_NONE; + } + size_t typeNameLength = fullTypeName.length(); + char *cTypeName = new char[typeNameLength + 1]; + fullTypeName.copy(cTypeName, fullTypeName.length()); + cTypeName[typeNameLength] = 0; + return createType(module, typeId, cTypeName); } char *getTypeName(ULONG64 module, ULONG typeId) @@ -143,13 +162,8 @@ PyObject *type_Target(Type *self) Py_XINCREF(self); return (PyObject *)self; } - typeName = typeName.substr(0, typeName.length() - 1); - - CIDebugSymbols *symbols = ExtensionCommandContext::instance()->symbols(); - ULONG typeId; - if (FAILED(symbols->GetTypeId(self->m_module, typeName.c_str(), &typeId))) - return NULL; - return createType(self->m_module, typeId); + typeName.pop_back(); + return lookupType(typeName); } PyObject *type_StripTypedef(Type *self) @@ -270,12 +284,12 @@ void type_Dealloc(Type *self) delete[] self->m_name; } -PyObject *createType(ULONG64 module, ULONG typeId) +PyObject *createType(ULONG64 module, ULONG typeId, char* name) { Type *type = PyObject_New(Type, type_pytype()); type->m_module = module; type->m_typeId = typeId; - type->m_name = nullptr; + type->m_name = name; return reinterpret_cast(type); } diff --git a/src/libs/qtcreatorcdbext/pytype.h b/src/libs/qtcreatorcdbext/pytype.h index 51d2e2071fc..ec8df6ffdf4 100644 --- a/src/libs/qtcreatorcdbext/pytype.h +++ b/src/libs/qtcreatorcdbext/pytype.h @@ -44,4 +44,4 @@ PyTypeObject *type_pytype(); char *getTypeName(ULONG64 module, ULONG typeId); PyObject *lookupType(const std::string &typeName); -PyObject *createType(ULONG64 module, ULONG typeId); +PyObject *createType(ULONG64 module, ULONG typeId, char *name = nullptr); From 792a9015ece7e6ce7032eaa1c3763f594818a0b7 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 11 Oct 2016 14:33:21 +0200 Subject: [PATCH 23/72] Debugger: Fix std vector dumper for msvc And potentially QNX Change-Id: I53bd34df5b3b4dfbaa50cd84c5dd9d3c975181d8 Reviewed-by: hjk --- share/qtcreator/debugger/stdtypes.py | 34 ++++++++++++++++------------ 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/share/qtcreator/debugger/stdtypes.py b/share/qtcreator/debugger/stdtypes.py index 15141bbea19..8e1f198a7e6 100644 --- a/share/qtcreator/debugger/stdtypes.py +++ b/share/qtcreator/debugger/stdtypes.py @@ -799,7 +799,7 @@ def qedit__std__vector(d, value, data): gdb.execute(cmd) def qdump__std__vector(d, value): - if d.isQnxTarget(): + if d.isQnxTarget() or d.isMsvcTarget(): qdumpHelper__std__vector__QNX(d, value) else: qdumpHelper__std__vector(d, value, False) @@ -840,20 +840,26 @@ def qdumpHelper__std__vector(d, value, isLibCpp): def qdumpHelper__std__vector__QNX(d, value): innerType = value.type[0] - isBool = str(innerType) == 'bool' + isBool = innerType.name == 'bool' if isBool: - impl = value['_Myvec'] - start = impl['_Myfirst'] - last = impl['_Mylast'] - end = impl['_Myend'] - size = value['_Mysize'] + try: + impl = value['_Myvec']['_Mypair']['_Myval2'] + except: + impl = value['_Myvec'] + start = impl['_Myfirst'].pointer() + last = impl['_Mylast'].pointer() + end = impl['_Myend'].pointer() + size = value['_Mysize'].integer() storagesize = start.dereference().type.size() * 8 else: - start = value['_Myfirst'] - last = value['_Mylast'] - end = value['_Myend'] - size = (last.integer() - start.integer()) / innerType.size() - alloc = (end.integer() - start.integer()) / innerType.size() + try: + impl = value['_Mypair']['_Myval2'] + except: + impl = value + start = impl['_Myfirst'].pointer() + last = impl['_Mylast'].pointer() + end = impl['_Myend'].pointer() + size = (last - start) // innerType.size() d.check(0 <= size and size <= 1000 * 1000 * 1000) d.check(last <= end) @@ -868,11 +874,11 @@ def qdumpHelper__std__vector__QNX(d, value): for i in d.childRange(): q = start + int(i / storagesize) with SubItem(d, i): - d.putValue((q.dereference() >> (i % storagesize)) & 1) + d.putValue((q.dereference().pointer() >> (i % storagesize)) & 1) d.putType("bool") d.putNumChild(0) else: - d.putArrayData(start, size, innerType) + d.putPlotData(start, size, innerType) def qdump__std____1__vector(d, value): qdumpHelper__std__vector(d, value, True) From b01119543fdf79c1a5a76305835b6cafccb7fade Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 12 Oct 2016 14:38:24 +0200 Subject: [PATCH 24/72] Debugger: Overwrite unsupported call functions in cdbbridge Change-Id: I64f933d649432fb680fc7e2e0cdfa251e798a58c Reviewed-by: hjk --- share/qtcreator/debugger/cdbbridge.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/share/qtcreator/debugger/cdbbridge.py b/share/qtcreator/debugger/cdbbridge.py index ead824f4d78..8d6cb8c8040 100644 --- a/share/qtcreator/debugger/cdbbridge.py +++ b/share/qtcreator/debugger/cdbbridge.py @@ -196,3 +196,9 @@ class Dumper(DumperBase): def nativeDynamicTypeName(self, address, baseType): return None # FIXME: Seems sufficient, no idea why. + + def callHelper(self, rettype, value, function, args): + raise Exception("cdb does not support calling functions") + + def putCallItem(self, name, rettype, value, func, *args): + return From 9ad46e7d0457b5681793125adc9e722284dc6544 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 12 Oct 2016 14:40:30 +0200 Subject: [PATCH 25/72] Debugger: Fix QDir dumper for Cdb Calling functions is currently not supported in the cdb python dumper. Change-Id: I07da5ba93ea3ad838e758ca79062ae9aa4e8fabc Reviewed-by: hjk --- share/qtcreator/debugger/qttypes.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py index 61de98ed3ce..0d154a1e633 100644 --- a/share/qtcreator/debugger/qttypes.py +++ b/share/qtcreator/debugger/qttypes.py @@ -353,7 +353,8 @@ def qdump__QDateTime(d, value): def qdump__QDir(d, value): - d.putNumChild(1) + if not d.isMsvcTarget(): + d.putNumChild(1) privAddress = d.extractPointer(value) bit32 = d.ptrSize() == 4 qt5 = d.qtVersion() >= 0x050000 @@ -424,7 +425,7 @@ def qdump__QDir(d, value): absoluteDirEntryOffset = dirEntryOffset + fileSystemEntrySize d.putStringValue(privAddress + dirEntryOffset) - if d.isExpanded(): + if d.isExpanded() and not d.isMsvcTarget(): with Children(d): ns = d.qtNamespace() d.call('int', value, 'count') # Fill cache. From 9c88b03415f927b43152866bb6fa6329c7a6a751 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Mon, 10 Oct 2016 17:10:32 +0200 Subject: [PATCH 26/72] ClangStaticAnalyzer: Tests: Clarify meaning of assert 'arguments.first().toBool()' returned FALSE ...is not very expressive. Change-Id: Ia0c8e8fbe2e84ea4f41668a5179a63e2003bab03 Reviewed-by: Christian Kandeler --- .../clangstaticanalyzerpreconfiguredsessiontests.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/clangstaticanalyzer/clangstaticanalyzerpreconfiguredsessiontests.cpp b/src/plugins/clangstaticanalyzer/clangstaticanalyzerpreconfiguredsessiontests.cpp index 83d9c104432..eacaa7f4acd 100644 --- a/src/plugins/clangstaticanalyzer/clangstaticanalyzerpreconfiguredsessiontests.cpp +++ b/src/plugins/clangstaticanalyzer/clangstaticanalyzerpreconfiguredsessiontests.cpp @@ -107,7 +107,8 @@ void ClangStaticAnalyzerPreconfiguredSessionTests::testPreconfiguredSession() QSignalSpy waitUntilAnalyzerFinished(&m_analyzerTool, SIGNAL(finished(bool))); QVERIFY(waitUntilAnalyzerFinished.wait(30000)); const QList arguments = waitUntilAnalyzerFinished.takeFirst(); - QVERIFY(arguments.first().toBool()); + const bool analyzerFinishedSuccessfully = arguments.first().toBool(); + QVERIFY(analyzerFinishedSuccessfully); QCOMPARE(m_analyzerTool.diagnostics().count(), 0); } From 55eb030f4f1c16d2da28a88baa4c9fc3c00da376 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Thu, 18 Aug 2016 17:16:46 +0200 Subject: [PATCH 27/72] ClangStaticAnalyzer: Use native paths consistently ...when passing on arguments to the clang executable. Change-Id: I78d523289abadee85d8987e54fb962220b1e62a8 Reviewed-by: Christian Kandeler --- .../clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp | 2 +- src/plugins/clangstaticanalyzer/clangstaticanalyzerrunner.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp index e05b5c68813..54863f04f7a 100644 --- a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp +++ b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp @@ -189,7 +189,7 @@ public: optionsBuilder.addDefines(projectPart.projectDefines); optionsBuilder.undefineClangVersionMacrosForMsvc(); optionsBuilder.undefineCppLanguageFeatureMacrosForMsvc2015(); - optionsBuilder.addHeaderPathOptions(); + optionsBuilder.addHeaderPathOptions(true); optionsBuilder.addMsvcCompatibilityVersion(); if (type != ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID) diff --git a/src/plugins/clangstaticanalyzer/clangstaticanalyzerrunner.cpp b/src/plugins/clangstaticanalyzer/clangstaticanalyzerrunner.cpp index 725712b8da2..dc6f53fb5d8 100644 --- a/src/plugins/clangstaticanalyzer/clangstaticanalyzerrunner.cpp +++ b/src/plugins/clangstaticanalyzer/clangstaticanalyzerrunner.cpp @@ -63,7 +63,7 @@ static QStringList constructCommandLineArguments(const QString &filePath, arguments << QLatin1String("--analyze") << QLatin1String("-o") - << logFile + << QDir::toNativeSeparators(logFile) ; arguments += options; arguments << QDir::toNativeSeparators(filePath); @@ -80,7 +80,7 @@ ClangStaticAnalyzerRunner::ClangStaticAnalyzerRunner(const QString &clangExecuta const Utils::Environment &environment, QObject *parent) : QObject(parent) - , m_clangExecutable(clangExecutable) + , m_clangExecutable(QDir::toNativeSeparators(clangExecutable)) , m_clangLogFileDir(clangLogFileDir) { QTC_CHECK(!m_clangExecutable.isEmpty()); From bd8c12c94c5ebaa413dd96ac81f1ace0fbfbd24f Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Wed, 12 Oct 2016 19:01:37 +0200 Subject: [PATCH 28/72] Squish: Update tst_session_handling again Someone removed the numbers again. This reverts commit 816d0010c2b68f760f52b9194b5130cebf26d8e8. Also, the sessionList was replaced. Change-Id: I23e135e5b240321e30097c0d1d48c82cb24b6c49 Reviewed-by: Christian Stenger --- tests/system/suite_general/tst_session_handling/test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/system/suite_general/tst_session_handling/test.py b/tests/system/suite_general/tst_session_handling/test.py index 2c069495faf..b337d8ae583 100644 --- a/tests/system/suite_general/tst_session_handling/test.py +++ b/tests/system/suite_general/tst_session_handling/test.py @@ -84,7 +84,7 @@ def prepareTestExamples(): def switchSession(toSession): test.log("Switching to session '%s'" % toSession) invokeMenuItem("File", "Session Manager...") - clickItem(waitForObject("{name='sessionList' type='QListWidget' visible='1' " + clickItem(waitForObject("{name='sessionView' type='ProjectExplorer::Internal::SessionView' visible='1' " "window=':Session Manager_ProjectExplorer::Internal::SessionDialog'}"), toSession, 5, 5, 0, Qt.LeftButton) clickButton(waitForObject("{name='btSwitch' text='Switch to' type='QPushButton' visible='1' " @@ -111,9 +111,9 @@ def checkWelcomePage(sessionName, isCurrent=False): waitForObject("{container='%s' id='sessionsTitle' text='Sessions' type='Text' " "unnamed='1' visible='true'}" % welcomePage) if isCurrent: - sessions = ["1: default", "2: %s (current session)" % sessionName] + sessions = ["default", "%s (current session)" % sessionName] else: - sessions = ["1: default (current session)", "2: %s" % sessionName] + sessions = ["default (current session)", sessionName] for sessionName in sessions: test.verify(object.exists("{container='%s' enabled='true' type='Text' unnamed='1' " "visible='true' text='%s'}" % (welcomePage, sessionName)), From 4dffc26cd12ea6a3a11ed093a3f2463608ccfe2f Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Fri, 7 Oct 2016 14:16:49 +0200 Subject: [PATCH 29/72] QmlDesigner: use Utils::FileName No behavior change. Change-Id: I7e8bc51bf1fed99159945c656402bb315aebc3f0 Reviewed-by: Thomas Hartmann --- .../components/componentcore/crumblebar.cpp | 12 ++++++------ .../components/componentcore/crumblebar.h | 5 +++-- .../components/integration/designdocument.cpp | 2 +- .../qmldesigner/designercore/include/viewmanager.h | 4 +++- .../qmldesigner/designercore/model/viewmanager.cpp | 2 +- src/plugins/qmldesigner/designmodewidget.cpp | 8 ++++---- src/plugins/qmldesigner/designmodewidget.h | 2 +- src/plugins/qmldesigner/qmldesignerplugin.cpp | 6 +++--- 8 files changed, 22 insertions(+), 19 deletions(-) diff --git a/src/plugins/qmldesigner/components/componentcore/crumblebar.cpp b/src/plugins/qmldesigner/components/componentcore/crumblebar.cpp index cecb5a478a4..383279bcf4b 100644 --- a/src/plugins/qmldesigner/components/componentcore/crumblebar.cpp +++ b/src/plugins/qmldesigner/components/componentcore/crumblebar.cpp @@ -63,7 +63,7 @@ static CrumbleBarInfo createCrumbleBarInfoFromModelNode(const ModelNode &modelNo { CrumbleBarInfo crumbleBarInfo; crumbleBarInfo.displayName = componentIdForModelNode(modelNode); - crumbleBarInfo.fileName = currentDesignDocument()->textEditor()->document()->filePath().toString(); + crumbleBarInfo.fileName = currentDesignDocument()->textEditor()->document()->filePath(); crumbleBarInfo.modelNode = modelNode; return crumbleBarInfo; @@ -87,7 +87,7 @@ CrumbleBar::~CrumbleBar() delete m_crumblePath; } -void CrumbleBar::pushFile(const QString &fileName) +void CrumbleBar::pushFile(const Utils::FileName &fileName) { if (m_isInternalCalled == false) { crumblePath()->clear(); @@ -102,7 +102,7 @@ void CrumbleBar::pushFile(const QString &fileName) CrumbleBarInfo crumbleBarInfo; crumbleBarInfo.fileName = fileName; - crumblePath()->pushElement(fileName.split(QLatin1String("/")).last(), QVariant::fromValue(crumbleBarInfo)); + crumblePath()->pushElement(fileName.fileName(), QVariant::fromValue(crumbleBarInfo)); m_isInternalCalled = false; @@ -171,7 +171,7 @@ void CrumbleBar::onCrumblePathElementClicked(const QVariant &data) m_isInternalCalled = true; if (!clickedCrumbleBarInfo.modelNode.isValid() - && Utils::FileName::fromString(clickedCrumbleBarInfo.fileName) == currentDesignDocument()->fileName()) { + && clickedCrumbleBarInfo.fileName == currentDesignDocument()->fileName()) { nextFileIsCalledInternally(); currentDesignDocument()->changeToDocumentModel(); QmlDesignerPlugin::instance()->viewManager().setComponentViewToMaster(); @@ -179,8 +179,8 @@ void CrumbleBar::onCrumblePathElementClicked(const QVariant &data) showSaveDialog(); crumblePath()->popElement(); nextFileIsCalledInternally(); - Core::EditorManager::openEditor(clickedCrumbleBarInfo.fileName, Core::Id(), - Core::EditorManager::DoNotMakeVisible); + Core::EditorManager::openEditor(clickedCrumbleBarInfo.fileName.toString(), + Core::Id(), Core::EditorManager::DoNotMakeVisible); if (clickedCrumbleBarInfo.modelNode.isValid()) { currentDesignDocument()->changeToSubComponent(clickedCrumbleBarInfo.modelNode); QmlDesignerPlugin::instance()->viewManager().setComponentNode(clickedCrumbleBarInfo.modelNode); diff --git a/src/plugins/qmldesigner/components/componentcore/crumblebar.h b/src/plugins/qmldesigner/components/componentcore/crumblebar.h index a09f2e3b4fc..3cfef61c740 100644 --- a/src/plugins/qmldesigner/components/componentcore/crumblebar.h +++ b/src/plugins/qmldesigner/components/componentcore/crumblebar.h @@ -27,6 +27,7 @@ #include #include +#include #include namespace QmlDesigner { @@ -38,7 +39,7 @@ public: explicit CrumbleBar(QObject *parent = 0); ~CrumbleBar(); - void pushFile(const QString &fileName); + void pushFile(const Utils::FileName &fileName); void pushInFileComponent(const ModelNode &modelNode); void nextFileIsCalledInternally(); @@ -59,7 +60,7 @@ private: class CrumbleBarInfo { public: - QString fileName; + Utils::FileName fileName; QString displayName; ModelNode modelNode; }; diff --git a/src/plugins/qmldesigner/components/integration/designdocument.cpp b/src/plugins/qmldesigner/components/integration/designdocument.cpp index 2d32dc358f9..7004107a645 100644 --- a/src/plugins/qmldesigner/components/integration/designdocument.cpp +++ b/src/plugins/qmldesigner/components/integration/designdocument.cpp @@ -321,7 +321,7 @@ void DesignDocument::changeToMaster() if (m_inFileComponentModel) changeToDocumentModel(); - QmlDesignerPlugin::instance()->viewManager().pushFileOnCrumbleBar(fileName().toString()); + QmlDesignerPlugin::instance()->viewManager().pushFileOnCrumbleBar(fileName()); QmlDesignerPlugin::instance()->viewManager().setComponentNode(rootModelNode()); } diff --git a/src/plugins/qmldesigner/designercore/include/viewmanager.h b/src/plugins/qmldesigner/designercore/include/viewmanager.h index 3304e7e5a93..5270933468e 100644 --- a/src/plugins/qmldesigner/designercore/include/viewmanager.h +++ b/src/plugins/qmldesigner/designercore/include/viewmanager.h @@ -29,6 +29,8 @@ #include +#include + namespace ProjectExplorer { class Kit; class Project; @@ -76,7 +78,7 @@ public: void disableWidgets(); void enableWidgets(); - void pushFileOnCrumbleBar(const QString &fileName); + void pushFileOnCrumbleBar(const Utils::FileName &fileName); void pushInFileComponentOnCrumbleBar(const ModelNode &modelNode); void nextFileIsCalledInternally(); diff --git a/src/plugins/qmldesigner/designercore/model/viewmanager.cpp b/src/plugins/qmldesigner/designercore/model/viewmanager.cpp index cdf44e06064..5056666456f 100644 --- a/src/plugins/qmldesigner/designercore/model/viewmanager.cpp +++ b/src/plugins/qmldesigner/designercore/model/viewmanager.cpp @@ -267,7 +267,7 @@ void ViewManager::enableWidgets() widgetInfo.widget->setEnabled(true); } -void ViewManager::pushFileOnCrumbleBar(const QString &fileName) +void ViewManager::pushFileOnCrumbleBar(const Utils::FileName &fileName) { crumbleBar()->pushFile(fileName); } diff --git a/src/plugins/qmldesigner/designmodewidget.cpp b/src/plugins/qmldesigner/designmodewidget.cpp index fe976e2851d..b162816ebdd 100644 --- a/src/plugins/qmldesigner/designmodewidget.cpp +++ b/src/plugins/qmldesigner/designmodewidget.cpp @@ -452,7 +452,7 @@ ViewManager &DesignModeWidget::viewManager() void DesignModeWidget::setupNavigatorHistory(Core::IEditor *editor) { if (!m_keepNavigatorHistory) - addNavigatorHistoryEntry(editor->document()->filePath().toString()); + addNavigatorHistoryEntry(editor->document()->filePath()); const bool canGoBack = m_navigatorHistoryCounter > 0; const bool canGoForward = m_navigatorHistoryCounter < (m_navigatorHistory.size() - 1); @@ -461,12 +461,12 @@ void DesignModeWidget::setupNavigatorHistory(Core::IEditor *editor) m_toolBar->setCurrentEditor(editor); } -void DesignModeWidget::addNavigatorHistoryEntry(const QString &fileName) +void DesignModeWidget::addNavigatorHistoryEntry(const Utils::FileName &fileName) { if (m_navigatorHistoryCounter > 0) - m_navigatorHistory.insert(m_navigatorHistoryCounter + 1, fileName); + m_navigatorHistory.insert(m_navigatorHistoryCounter + 1, fileName.toString()); else - m_navigatorHistory.append(fileName); + m_navigatorHistory.append(fileName.toString()); ++m_navigatorHistoryCounter; } diff --git a/src/plugins/qmldesigner/designmodewidget.h b/src/plugins/qmldesigner/designmodewidget.h index 86e292a879f..a865bf6105f 100644 --- a/src/plugins/qmldesigner/designmodewidget.h +++ b/src/plugins/qmldesigner/designmodewidget.h @@ -101,7 +101,7 @@ private: // functions void setup(); bool isInNodeDefinition(int nodeOffset, int nodeLength, int cursorPos) const; QmlDesigner::ModelNode nodeForPosition(int cursorPos) const; - void addNavigatorHistoryEntry(const QString &fileName); + void addNavigatorHistoryEntry(const Utils::FileName &fileName); QWidget *createCenterWidget(); QWidget *createCrumbleBarFrame(); diff --git a/src/plugins/qmldesigner/qmldesignerplugin.cpp b/src/plugins/qmldesigner/qmldesignerplugin.cpp index 27526298deb..b8b45729314 100644 --- a/src/plugins/qmldesigner/qmldesignerplugin.cpp +++ b/src/plugins/qmldesigner/qmldesignerplugin.cpp @@ -274,7 +274,7 @@ void QmlDesignerPlugin::createDesignModeWidget() connect(Core::EditorManager::instance(), &Core::EditorManager::editorsClosed, [=] (QList editors) { if (d) { if (d->documentManager.hasCurrentDesignDocument() - && editors.contains(d->documentManager.currentDesignDocument()->textEditor())) + && editors.contains(currentDesignDocument()->textEditor())) hideDesigner(); d->documentManager.removeEditors(editors); @@ -336,7 +336,7 @@ void QmlDesignerPlugin::showDesigner() if (d->documentManager.hasCurrentDesignDocument()) { activateAutoSynchronization(); d->shortCutManager.updateActions(currentDesignDocument()->textEditor()); - d->viewManager.pushFileOnCrumbleBar(d->documentManager.currentDesignDocument()->fileName().toString()); + d->viewManager.pushFileOnCrumbleBar(currentDesignDocument()->fileName()); } d->shortCutManager.updateUndoActions(currentDesignDocument()); @@ -374,7 +374,7 @@ void QmlDesignerPlugin::changeEditor() if (d->documentManager.hasCurrentDesignDocument()) { activateAutoSynchronization(); - d->viewManager.pushFileOnCrumbleBar(d->documentManager.currentDesignDocument()->fileName().toString()); + d->viewManager.pushFileOnCrumbleBar(currentDesignDocument()->fileName()); d->viewManager.setComponentViewToMaster(); } From c4417c49c7ffbb1f1818b579c488b2e4966ed1f9 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Tue, 11 Oct 2016 16:21:42 +0200 Subject: [PATCH 30/72] QmlDesigner: Write single non ASCII chars as escaped unicode We do not know if the string was escaped or not in the model. But this heuristic at least improves the issue and single characters are escaped. Task-number: QTCREATORBUG-12616 Change-Id: I3dcc251ce111ab3ee377a17876e2cdb64162d6e8 Reviewed-by: Tim Jenssen --- .../designercore/model/qmltextgenerator.cpp | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp b/src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp index c8e5888aea6..3fe89aea5e7 100644 --- a/src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp +++ b/src/plugins/qmldesigner/designercore/model/qmltextgenerator.cpp @@ -61,6 +61,23 @@ inline static QString doubleToString(double d) return string; } +static QString unicodeEscape(const QString &stringValue) +{ + if (stringValue.count() == 1) { + ushort code = stringValue.at(0).unicode(); + bool isUnicode = code <= 127; + if (isUnicode) { + return stringValue; + } else { + QString escaped; + escaped += "\\u"; + escaped += QString::number(code, 16).rightJustified(4, '0'); + return escaped; + } + } + return stringValue; +} + QmlTextGenerator::QmlTextGenerator(const PropertyNameList &propertyOrder, int indentDepth): m_propertyOrder(propertyOrder), m_indentDepth(indentDepth) @@ -131,7 +148,9 @@ QString QmlTextGenerator::toQml(const AbstractProperty &property, int indentDept case QMetaType::UInt: case QMetaType::ULongLong: return stringValue; - + case QMetaType::QString: + case QMetaType::QChar: + return QStringLiteral("\"%1\"").arg(escape(unicodeEscape(stringValue))); default: return QStringLiteral("\"%1\"").arg(escape(stringValue)); } From 2c9fb06b97dfdd32801b15a866fefcff60f5b56e Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 12 Oct 2016 09:54:07 +0200 Subject: [PATCH 31/72] QmlDesigner: Adding elide property to text Task-number: QTCREATORBUG-13455 Change-Id: I7e333840ccf2b7dde85f25f60392158167798c54 Reviewed-by: Leena Miettinen Reviewed-by: Tim Jenssen --- .../HelperWidgets/StandardTextSection.qml | 14 ++++++++++++++ .../QtQuick/TextSpecifics.qml | 1 + 2 files changed, 15 insertions(+) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/StandardTextSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/StandardTextSection.qml index 987f126196b..e710af40c18 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/StandardTextSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/StandardTextSection.qml @@ -33,6 +33,7 @@ Section { caption: qsTr("Text") property bool showIsWrapping: false + property bool showElide: false property bool showVerticalAlignment: false property bool useLineEdit: true property bool showFormatProperty: false @@ -62,6 +63,19 @@ Section { model: ["NoWrap", "WordWrap", "WrapAnywhere", "WrapAtWordBoundaryOrAnywhere"] } + Label { + visible: showElide + text: qsTr("Elide") + } + + ComboBox { + visible: showElide + Layout.fillWidth: true + backendValue: backendValues.elide + scope: "Text" + model: ["ElideNone", "ElideLeft", "ElideMiddle", "ElideRight"] + } + Label { text: qsTr("Alignment") } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextSpecifics.qml index fb6b271700e..03f29c520e8 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextSpecifics.qml @@ -36,6 +36,7 @@ Column { showIsWrapping: true showVerticalAlignment: true showFormatProperty: true + showElide: true } Section { From cdb218a3e1c8a204664334891c433d5b461d42d2 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 13 Oct 2016 08:40:06 +0200 Subject: [PATCH 32/72] Debugger: Show raw object data for pixmap "Separate display" can be triggered for QRasterPlatformPixmap on the embeddded QImage. Task-number: QTCREATORBUG-17107 Change-Id: Ib54a6f76f634b0dcf601836dc10609f212581d14 Reviewed-by: Christian Stenger --- share/qtcreator/debugger/qttypes.py | 2 +- tests/manual/debugger/simple/simple_test_app.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py index 0d154a1e633..5ce5531c682 100644 --- a/share/qtcreator/debugger/qttypes.py +++ b/share/qtcreator/debugger/qttypes.py @@ -1043,7 +1043,7 @@ def qdump__QPixmap(d, value): else: (dummy, width, height) = d.split('pii', dataPtr) d.putValue('(%dx%d)' % (width, height)) - d.putNumChild(0) + d.putPlainChildren(value) def qdump__QPoint(d, value): diff --git a/tests/manual/debugger/simple/simple_test_app.cpp b/tests/manual/debugger/simple/simple_test_app.cpp index 631c9e08953..b1fbf257060 100644 --- a/tests/manual/debugger/simple/simple_test_app.cpp +++ b/tests/manual/debugger/simple/simple_test_app.cpp @@ -177,6 +177,7 @@ void dummyStatement(...) {} #include #include #include +#include #include #include #include @@ -1144,12 +1145,13 @@ namespace painting { pain.drawLine(2, 2, 130, 130); pain.end(); QPixmap pm = QPixmap::fromImage(im); + QSize size = pm.size(); BREAK_HERE; // Check im (200x200) QImage. // CheckType pain QPainter. // Check pm (200x200) QPixmap. // Continue. - dummyStatement(&im, &pm); + dummyStatement(&im, &pm, &size); #endif } From 3d68a8d0dec033eebef7d0ead082a291afa9454d Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 13 Oct 2016 12:11:13 +0200 Subject: [PATCH 33/72] Dumper: Fix dumping of QImage on 32bit Change-Id: I3cc10a858f392ea34418698411d250809ba374e4 Reviewed-by: hjk --- share/qtcreator/debugger/qttypes.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py index 5ce5531c682..0dd094906b8 100644 --- a/share/qtcreator/debugger/qttypes.py +++ b/share/qtcreator/debugger/qttypes.py @@ -821,8 +821,12 @@ def qdump__QImage(d, value): d.putValue('(invalid)') return - (ref, width, height, depth, nbytes, padding, devicePixelRatio, colorTable, - bits, iformat) = d.split('iiiii@dppi', imageData) + if d.ptrSize() == 8: + (ref, width, height, depth, nbytes, padding, devicePixelRatio, colorTable, + bits, iformat) = d.split('iiiii@dppi', imageData) + else: + (ref, width, height, depth, nbytes, devicePixelRatio, colorTable, + bits, iformat) = d.split('iiiiidppi', imageData) d.putValue('(%dx%d)' % (width, height)) d.putNumChild(1) From 6884ab080e28699ca662878d7083cd84b9f206d4 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Mon, 10 Oct 2016 17:31:19 +0200 Subject: [PATCH 34/72] ClangStaticAnalyzer: Fix path for intrinsics for clang toolchains Ignore the include path for intrinsics coming from the toolchain. The clang static analyzer comes with its own intrinsics and does not cope well with intrinsics from other clang versions. Move the relevant implementation from LibClangOptionsBuilder into the base class so that ClangStaticAnalyzer profits from this, too. Task-number: QTCREATORBUG-17102 Change-Id: Id9a28ddebb889c862939332dce888a80b3bb7e63 Reviewed-by: Christian Kandeler --- src/plugins/clangcodemodel/clangutils.cpp | 17 +++++------------ .../refactoringcompileroptionsbuilder.cpp | 16 +++++----------- .../refactoringcompileroptionsbuilder.h | 1 - src/plugins/cpptools/compileroptionsbuilder.cpp | 11 ++++++++++- 4 files changed, 20 insertions(+), 25 deletions(-) diff --git a/src/plugins/clangcodemodel/clangutils.cpp b/src/plugins/clangcodemodel/clangutils.cpp index 5ef7b1648d6..c18f1900ba3 100644 --- a/src/plugins/clangcodemodel/clangutils.cpp +++ b/src/plugins/clangcodemodel/clangutils.cpp @@ -38,7 +38,6 @@ #include #include -#include #include using namespace ClangCodeModel; @@ -118,18 +117,12 @@ private: bool excludeHeaderPath(const QString &path) const override { - if (path.contains(QLatin1String("lib/gcc/i686-apple-darwin"))) - return true; + if (m_projectPart.toolchainType == ProjectExplorer::Constants::CLANG_TOOLCHAIN_TYPEID) { + if (path.contains(QLatin1String("lib/gcc/i686-apple-darwin"))) + return true; + } - // We already provide a custom clang include path matching the used libclang version, - // so better ignore the clang include paths from the system as this might lead to an - // unfavorable order with regard to include_next. - static QRegularExpression clangIncludeDir( - QLatin1String("\\A.*/lib/clang/\\d+\\.\\d+(\\.\\d+)?/include\\z")); - if (clangIncludeDir.match(path).hasMatch()) - return true; - - return false; + return CompilerOptionsBuilder::excludeHeaderPath(path); } void addPredefinedMacrosAndHeaderPathsOptions() diff --git a/src/plugins/clangrefactoring/refactoringcompileroptionsbuilder.cpp b/src/plugins/clangrefactoring/refactoringcompileroptionsbuilder.cpp index 6546e9b9500..372cf1af150 100644 --- a/src/plugins/clangrefactoring/refactoringcompileroptionsbuilder.cpp +++ b/src/plugins/clangrefactoring/refactoringcompileroptionsbuilder.cpp @@ -56,18 +56,12 @@ RefactoringCompilerOptionsBuilder::RefactoringCompilerOptionsBuilder(CppTools::P bool RefactoringCompilerOptionsBuilder::excludeHeaderPath(const QString &path) const { - if (path.contains(QLatin1String("lib/gcc/i686-apple-darwin"))) - return true; + if (m_projectPart.toolchainType == ProjectExplorer::Constants::CLANG_TOOLCHAIN_TYPEID) { + if (path.contains(QLatin1String("lib/gcc/i686-apple-darwin"))) + return true; + } - // We already provide a custom clang include path matching the used libclang version, - // so better ignore the clang include paths from the system as this might lead to an - // unfavorable order with regard to include_next. - static QRegularExpression clangIncludeDir( - QLatin1String("\\A.*/lib/clang/\\d+\\.\\d+(\\.\\d+)?/include\\z")); - if (clangIncludeDir.match(path).hasMatch()) - return true; - - return false; + return CompilerOptionsBuilder::excludeHeaderPath(path); } void RefactoringCompilerOptionsBuilder::addPredefinedMacrosAndHeaderPathsOptions() diff --git a/src/plugins/clangrefactoring/refactoringcompileroptionsbuilder.h b/src/plugins/clangrefactoring/refactoringcompileroptionsbuilder.h index f0f0dcc016d..9a11573e8d0 100644 --- a/src/plugins/clangrefactoring/refactoringcompileroptionsbuilder.h +++ b/src/plugins/clangrefactoring/refactoringcompileroptionsbuilder.h @@ -34,7 +34,6 @@ #include #include -#include namespace ClangRefactoring { diff --git a/src/plugins/cpptools/compileroptionsbuilder.cpp b/src/plugins/cpptools/compileroptionsbuilder.cpp index a5bf1ad0b65..c529e96b45d 100644 --- a/src/plugins/cpptools/compileroptionsbuilder.cpp +++ b/src/plugins/cpptools/compileroptionsbuilder.cpp @@ -28,6 +28,7 @@ #include #include +#include namespace CppTools { @@ -393,7 +394,15 @@ bool CompilerOptionsBuilder::excludeDefineLine(const QByteArray &defineLine) con bool CompilerOptionsBuilder::excludeHeaderPath(const QString &headerPath) const { - Q_UNUSED(headerPath); + // A clang tool chain might have another version and passing in the + // intrinsics path from that version will lead to errors (unknown + // intrinsics, unfavorable order with regard to include_next). + if (m_projectPart.toolchainType == ProjectExplorer::Constants::CLANG_TOOLCHAIN_TYPEID) { + static QRegularExpression clangIncludeDir( + QLatin1String("\\A.*/lib/clang/\\d+\\.\\d+(\\.\\d+)?/include\\z")); + return clangIncludeDir.match(headerPath).hasMatch(); + } + return false; } From 614d14274d37941b3dbd432249748efea49380f5 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 11 Oct 2016 14:57:20 +0200 Subject: [PATCH 35/72] Extend source creation script for other plugins/components And implement that in Python Change-Id: I08d555927efffb0f8a4bafb54064ac2e5e06d730 Reviewed-by: Iikka Eklund --- scripts/createSourcePackages.py | 111 ++++++++++++++++++++++++++++++++ scripts/createSourcePackages.sh | 55 ---------------- 2 files changed, 111 insertions(+), 55 deletions(-) create mode 100755 scripts/createSourcePackages.py delete mode 100755 scripts/createSourcePackages.sh diff --git a/scripts/createSourcePackages.py b/scripts/createSourcePackages.py new file mode 100755 index 00000000000..d6e89a85fa3 --- /dev/null +++ b/scripts/createSourcePackages.py @@ -0,0 +1,111 @@ +#!/usr/bin/env python +############################################################################ +# +# Copyright (C) 2016 The Qt Company Ltd. +# Contact: https://www.qt.io/licensing/ +# +# This file is part of Qt Creator. +# +# Commercial License Usage +# Licensees holding valid commercial Qt licenses may use this file in +# accordance with the commercial license agreement provided with the +# Software or, alternatively, in accordance with the terms contained in +# a written agreement between you and The Qt Company. For licensing terms +# and conditions see https://www.qt.io/terms-conditions. For further +# information use the contact form at https://www.qt.io/contact-us. +# +# GNU General Public License Usage +# Alternatively, this file may be used under the terms of the GNU +# General Public License version 3 as published by the Free Software +# Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +# included in the packaging of this file. Please review the following +# information to ensure the GNU General Public License requirements will +# be met: https://www.gnu.org/licenses/gpl-3.0.html. +# +############################################################################ + +import argparse +import os +import shutil +import subprocess +import tempfile + +def archive(repository, target_file, prefix='', crlf=False): + crlf_args = (['-c', 'core.autocrlf=true', '-c', 'core.eol=crlf'] if crlf + else []) + subprocess.check_call(['git'] + crlf_args + + ['archive', '--format=tar', '--prefix=' + prefix, + '-o', target_file, 'HEAD'], + cwd=repository) + +def extract_combined(archive_list, target_dir): + if not os.path.exists(target_dir): + os.makedirs(target_dir) + for a in archive_list: + subprocess.check_call(['tar', 'xf', a], cwd=target_dir) + +def createTarGz(source_dir, target_file): + (cwd, path) = os.path.split(source_dir) + subprocess.check_call(['tar', 'czf', target_file, path], cwd=cwd) + +def createTarXz(source_dir, target_file): + (cwd, path) = os.path.split(source_dir) + subprocess.check_call(['tar', 'cJf', target_file, path], cwd=cwd) + +def createZip(source_dir, target_file): + (cwd, path) = os.path.split(source_dir) + subprocess.check_call(['zip', '-9qr', target_file, path], cwd=cwd) + +def package_repos(repos, combined_prefix, target_file_base): + workdir = tempfile.mkdtemp(suffix="-createQtcSource") + def crlf_postfix(crlf): + return '_win' if crlf else '' + def tar_name(name, crlf): + sanitized_name = name.replace('/', '_').replace('\\', '_') + return os.path.join(workdir, sanitized_name + crlf_postfix(crlf) + '.tar') + def archive_path(crlf=False): + return os.path.join(workdir, 'src' + crlf_postfix(crlf), combined_prefix) + print('Working in "' + workdir + '"') + print('Pre-packaging archives...') + for (name, repo, prefix) in repos: + print(' ' + name + '...') + for crlf in [False, True]: + archive(repo, tar_name(name, crlf), prefix, crlf=crlf) + print('Preparing for packaging...') + for crlf in [False, True]: + archive_list = [tar_name(name, crlf) for (name, _, _) in repos] + extract_combined(archive_list, archive_path(crlf)) + print('Creating .tar.gz...') + createTarGz(archive_path(crlf=False), target_file_base + '.tar.gz') + print('Creating .tar.xz...') + createTarGz(archive_path(crlf=False), target_file_base + '.tar.xz') + print('Creating .zip with CRLF...') + createZip(archive_path(crlf=True), target_file_base + '.zip') + print('Removing temporary directory...') + shutil.rmtree(workdir) + +def parse_arguments(): + script_path = os.path.dirname(os.path.realpath(__file__)) + qtcreator_repo = os.path.join(script_path, '..') + parser = argparse.ArgumentParser(description="Create Qt Creator source packages") + parser.add_argument('-p', default=qtcreator_repo, dest='repo', help='path to repository') + parser.add_argument('-n', default='', dest='name', help='name of plugin') + parser.add_argument('-s', action='append', default=[], dest='modules', help='submodule to add') + parser.add_argument('version', help='full version including tag, e.g. 4.2.0-beta1') + parser.add_argument('edition', help='(opensource | enterprise)') + return parser.parse_args() + +def main(): + args = parse_arguments() + base_repo_name = args.name if args.name else "qtcreator" + if not args.name and not args.modules: # default Qt Creator repository + args.modules = [os.path.join('src', 'shared', 'qbs')] + repos = [(base_repo_name, args.repo, '')] + for module in args.modules: + repos += [(module, os.path.join(args.repo, module), module + os.sep)] + name_part = '-' + args.name if args.name else '' + prefix = 'qt-creator-' + args.edition + name_part + '-src-' + args.version + package_repos(repos, prefix, os.path.join(os.getcwd(), prefix)) + +if __name__ == "__main__": + main() diff --git a/scripts/createSourcePackages.sh b/scripts/createSourcePackages.sh deleted file mode 100755 index c25872d4196..00000000000 --- a/scripts/createSourcePackages.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -## Command line parameters -if [[ $# != 2 ]]; then - cat < - - Creates tar and zip source package from HEAD of the main repository and submodules. - Files and directories are named after qt-creator--src-. - example: - $0 2.2.0-beta opensource -USAGE - exit 1 -fi - -VERSION=$1 -EDITION=$2 -PREFIX=qt-creator-${EDITION}-src-${VERSION} -cd `dirname $0`/.. -RESULTDIR=`pwd` -TEMPSOURCES=`mktemp -d -t qtcCreatorSourcePackage.XXXXXX` -echo "Temporary directory: ${TEMPSOURCES}" -echo "Creating tar archive..." - -echo " Creating tar sources of repositories..." -git archive --format=tar --prefix=${PREFIX}/ HEAD > ${TEMPSOURCES}/__qtcreator_main.tar || exit 1 -echo " qbs..." -cd src/shared/qbs || exit 1 -git archive --format=tar --prefix=${PREFIX}/src/shared/qbs/ HEAD > ${TEMPSOURCES}/__qtcreator_qbs.tar || exit 1 - -echo " Combining tar sources..." -cd ${TEMPSOURCES} || exit 1 -tar xf __qtcreator_main.tar || exit 1 -tar xf __qtcreator_qbs.tar || exit 1 -tar czf "${RESULTDIR}/${PREFIX}.tar.gz" ${PREFIX}/ || exit 1 -tar cJf "${RESULTDIR}/${PREFIX}.tar.xz" ${PREFIX}/ || exit 1 - -echo "Creating zip archive..." -echo " Filtering binary vs text files..." -# write filter for text files (for use with 'file' command) -echo ".*:.*ASCII -.*:.*directory -.*:.*empty -.*:.*POSIX -.*:.*html -.*:.*text" > __txtpattern || exit 1 -# list all files -find ${PREFIX} > __packagedfiles || exit 1 -# record file types -file -f __packagedfiles > __filetypes || exit 1 -echo " Creating archive..." -# zip text files and binary files separately -cat __filetypes | grep -f __txtpattern -v | cut -d: -f1 | zip -9q "${RESULTDIR}/${PREFIX}.zip" -@ || exit 1 -cat __filetypes | grep -f __txtpattern | cut -d: -f1 | zip -l9q "${RESULTDIR}/${PREFIX}.zip" -@ || exit 1 From da202bff82e5c470ee2662542c47aa6381ed591c Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Thu, 13 Oct 2016 12:30:48 +0200 Subject: [PATCH 36/72] QmlDesigner: Adding support for padding This property has been added to Qt Quick 2.6. We do not show the padding section for Qt Quick versions that do not support padding. Change-Id: I10123c65849e1708d452320ba3e3b4cb19f5b5bb Reviewed-by: Tim Jenssen --- .../HelperWidgets/PaddingSection.qml | 122 ++++++++++++++++++ .../HelperWidgets/qmldir | 1 + .../QtQuick/TextEditSpecifics.qml | 4 + .../QtQuick/TextInputSpecifics.qml | 5 + .../QtQuick/TextSpecifics.qml | 4 + .../propertyeditorcontextobject.cpp | 20 ++- .../propertyeditorcontextobject.h | 11 +- .../propertyeditorqmlbackend.cpp | 4 +- .../designercore/include/abstractview.h | 1 + .../designercore/model/abstractview.cpp | 40 ++++++ 10 files changed, 204 insertions(+), 8 deletions(-) create mode 100644 share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/PaddingSection.qml diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/PaddingSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/PaddingSection.qml new file mode 100644 index 00000000000..aad10455c7d --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/PaddingSection.qml @@ -0,0 +1,122 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +import QtQuick 2.1 +import HelperWidgets 2.0 +import QtQuick.Layouts 1.0 +import QtQuick.Controls 1.0 as Controls + +Section { + caption: qsTr("Padding") + + anchors.left: parent.left + anchors.right: parent.right + + SectionLayout { + Label { + text: qsTr("Vertical") + } + SecondColumnLayout { + Label { + text: qsTr("Top") + tooltip: qsTr("Padding between the content and the top edge of the item.") + width: 42 + } + SpinBox { + maximumValue: 9999999 + minimumValue: -9999999 + decimals: 0 + backendValue: backendValues.topPadding + Layout.fillWidth: true + } + Item { + width: 4 + height: 4 + } + + Label { + text: qsTr("Bottom") + tooltip: qsTr("Padding between the content and the bottom edge of the item.") + width: 42 + } + SpinBox { + maximumValue: 9999999 + minimumValue: -9999999 + decimals: 0 + backendValue: backendValues.bottomPadding + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Horizontal") + } + SecondColumnLayout { + Label { + text: qsTr("Left") + tooltip: qsTr("Padding between the content and the left edge of the item.") + width: 42 + } + SpinBox { + maximumValue: 9999999 + minimumValue: -9999999 + decimals: 0 + backendValue: backendValues.leftPadding + Layout.fillWidth: true + } + Item { + width: 4 + height: 4 + } + + Label { + text: qsTr("Right") + tooltip: qsTr("Padding between the content and the right edge of the item.") + width: 42 + } + SpinBox { + maximumValue: 9999999 + minimumValue: -9999999 + decimals: 0 + backendValue: backendValues.rightPadding + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Padding") + tooltip: qsTr("Padding between the content and the edges of the items.") + } + SecondColumnLayout { + SpinBox { + maximumValue: 9999999 + minimumValue: -9999999 + decimals: 0 + backendValue: backendValues.padding + Layout.fillWidth: true + } + } + } +} diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/qmldir b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/qmldir index b4ee6dda7fc..10f92a578ad 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/qmldir +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/qmldir @@ -38,3 +38,4 @@ Tab 2.0 Tab.qml TabView 2.0 TabView.qml ToolTipArea 2.0 ToolTipArea.qml UrlChooser 2.0 UrlChooser.qml +PaddingSection 2.0 PaddingSection.qml diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextEditSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextEditSpecifics.qml index 09d14657795..c1a7a1e8d6d 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextEditSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextEditSpecifics.qml @@ -68,4 +68,8 @@ Column { TextInputSection { } + + PaddingSection { + visible: minorQtQuickVersion > 5 + } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextInputSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextInputSpecifics.qml index 62f1ee9ba07..615ce16aefe 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextInputSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextInputSpecifics.qml @@ -68,4 +68,9 @@ Column { TextInputSection { isTextInput: true } + + PaddingSection { + visible: minorQtQuickVersion > 5 + } + } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextSpecifics.qml index 03f29c520e8..28910fc05a4 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextSpecifics.qml @@ -67,4 +67,8 @@ Column { FontSection { showStyle: true } + + PaddingSection { + visible: minorQtQuickVersion > 5 + } } diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp index c6ca7974c7b..12d716c4100 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.cpp @@ -80,9 +80,6 @@ PropertyEditorContextObject::PropertyEditorContextObject(QObject *parent) : m_isBaseState(false), m_selectionChanged(false), m_backendValues(0), - m_majorVersion(-1), - m_minorVersion(-1), - m_majorQtQuickVersion(-1), m_qmlComponent(0), m_qmlContext(0) { @@ -167,7 +164,12 @@ int PropertyEditorContextObject::majorVersion() const int PropertyEditorContextObject::majorQtQuickVersion() const { - return m_majorQtQuickVersion; + return m_majorQtQuickVersion; +} + +int PropertyEditorContextObject::minorQtQuickVersion() const +{ + return m_minorQtQuickVersion; } void PropertyEditorContextObject::setMajorVersion(int majorVersion) @@ -191,6 +193,16 @@ void PropertyEditorContextObject::setMajorQtQuickVersion(int majorVersion) } +void PropertyEditorContextObject::setMinorQtQuickVersion(int minorVersion) +{ + if (m_minorQtQuickVersion == minorVersion) + return; + + m_minorQtQuickVersion = minorVersion; + + emit minorQtQuickVersionChanged(); +} + int PropertyEditorContextObject::minorVersion() const { return m_minorVersion; diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h index 6b6e572ef3d..ae79d9bd863 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorcontextobject.h @@ -51,6 +51,7 @@ class PropertyEditorContextObject : public QObject Q_PROPERTY(int majorVersion READ majorVersion WRITE setMajorVersion NOTIFY majorVersionChanged) Q_PROPERTY(int minorVersion READ minorVersion WRITE setMinorVersion NOTIFY minorVersionChanged) Q_PROPERTY(int majorQtQuickVersion READ majorQtQuickVersion WRITE setMajorQtQuickVersion NOTIFY majorQtQuickVersionChanged) + Q_PROPERTY(int minorQtQuickVersion READ minorQtQuickVersion WRITE setMinorQtQuickVersion NOTIFY minorQtQuickVersionChanged) Q_PROPERTY(bool hasAliasExport READ hasAliasExport NOTIFY hasAliasExportChanged) @@ -81,8 +82,10 @@ public: int majorVersion() const; int majorQtQuickVersion() const; + int minorQtQuickVersion() const; void setMajorVersion(int majorVersion); void setMajorQtQuickVersion(int majorVersion); + void setMinorQtQuickVersion(int minorVersion); int minorVersion() const; void setMinorVersion(int minorVersion); @@ -102,6 +105,7 @@ signals: void majorVersionChanged(); void minorVersionChanged(); void majorQtQuickVersionChanged(); + void minorQtQuickVersionChanged(); void specificQmlComponentChanged(); void hasAliasExportChanged(); @@ -137,9 +141,10 @@ private: QQmlPropertyMap* m_backendValues; - int m_majorVersion; - int m_minorVersion; - int m_majorQtQuickVersion; + int m_majorVersion = 1; + int m_minorVersion = 1; + int m_majorQtQuickVersion = 1; + int m_minorQtQuickVersion = -1; QQmlComponent *m_qmlComponent; QQmlContext *m_qmlContext; diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp index 4e7256ca9f4..3d4884d9bd5 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp @@ -328,10 +328,12 @@ void PropertyEditorQmlBackend::setup(const QmlObjectNode &qmlObjectNode, const Q } else { contextObject()->setMajorVersion(-1); contextObject()->setMinorVersion(-1); - contextObject()->setMajorQtQuickVersion(-1); + contextObject()->setMajorQtQuickVersion(-1); + contextObject()->setMinorQtQuickVersion(-1); } contextObject()->setMajorQtQuickVersion(qmlObjectNode.view()->majorQtQuickVersion()); + contextObject()->setMinorQtQuickVersion(qmlObjectNode.view()->minorQtQuickVersion()); } else { qWarning() << "PropertyEditor: invalid node for setup"; } diff --git a/src/plugins/qmldesigner/designercore/include/abstractview.h b/src/plugins/qmldesigner/designercore/include/abstractview.h index aae79fc9ef4..8d4ca2de834 100644 --- a/src/plugins/qmldesigner/designercore/include/abstractview.h +++ b/src/plugins/qmldesigner/designercore/include/abstractview.h @@ -236,6 +236,7 @@ public: QmlModelState currentState() const; int majorQtQuickVersion() const; + int minorQtQuickVersion() const; void resetView(); diff --git a/src/plugins/qmldesigner/designercore/model/abstractview.cpp b/src/plugins/qmldesigner/designercore/model/abstractview.cpp index 4673b33601a..0ebc577c90d 100644 --- a/src/plugins/qmldesigner/designercore/model/abstractview.cpp +++ b/src/plugins/qmldesigner/designercore/model/abstractview.cpp @@ -672,6 +672,21 @@ QmlModelState AbstractView::currentState() const return QmlModelState(currentStateNode()); } +static int getMinorVersionFromImport(const Model *model) +{ + foreach (const Import &import, model->imports()) { + if (import.isLibraryImport() && import.url() == "QtQuick") { + const QString versionString = import.version(); + if (versionString.contains(".")) { + const QString minorVersionString = versionString.split(".").last(); + return minorVersionString.toInt(); + } + } + } + + return -1; +} + static int getMajorVersionFromImport(const Model *model) { foreach (const Import &import, model->imports()) { @@ -702,6 +717,21 @@ static int getMajorVersionFromNode(const ModelNode &modelNode) return 1; //default } +static int getMinorVersionFromNode(const ModelNode &modelNode) +{ + if (modelNode.metaInfo().isValid()) { + if (modelNode.type() == "QtQuick.QtObject" || modelNode.type() == "QtQuick.Item") + return modelNode.minorVersion(); + + foreach (const NodeMetaInfo &superClass, modelNode.metaInfo().superClasses()) { + if (modelNode.type() == "QtQuick.QtObject" || modelNode.type() == "QtQuick.Item") + return superClass.minorVersion(); + } + } + + return 1; //default +} + int AbstractView::majorQtQuickVersion() const { int majorVersionFromImport = getMajorVersionFromImport(model()); @@ -711,4 +741,14 @@ int AbstractView::majorQtQuickVersion() const return getMajorVersionFromNode(rootModelNode()); } +int AbstractView::minorQtQuickVersion() const +{ + int minorVersionFromImport = getMinorVersionFromImport(model()); + if (minorVersionFromImport >= 0) + return minorVersionFromImport; + + return getMinorVersionFromNode(rootModelNode()); +} + + } // namespace QmlDesigner From 92a085d27395cde07d2055fa5cb785858cfbcb78 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 12 Oct 2016 11:42:26 +0200 Subject: [PATCH 37/72] QmlDesigner: Adding support for the render type of text Change-Id: I0690f8ec77cc5c76255d4a49cd91bb3c23e12728 Reviewed-by: Leena Miettinen Reviewed-by: Tim Jenssen --- .../HelperWidgets/StandardTextSection.qml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/StandardTextSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/StandardTextSection.qml index e710af40c18..f298d90134c 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/StandardTextSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/StandardTextSection.qml @@ -105,5 +105,16 @@ Section { backendValue: backendValues.textFormat Layout.fillWidth: true } + + Label { + text: qsTr("Render type") + toolTip: qsTr("Override the default rendering type for this item.") + } + ComboBox { + scope: "Text" + model: ["QtRendering", "NativeRendering"] + backendValue: backendValues.renderType + Layout.fillWidth: true + } } } From 5d5c4aa9cceb469c4ec178416109d010c2b15a46 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 12 Oct 2016 11:41:28 +0200 Subject: [PATCH 38/72] QmlDesigner: Adding support for fontSizeMode Change-Id: I34d5b4b801951929c8463ac741ee89977a017781 Reviewed-by: Tim Jenssen --- .../HelperWidgets/StandardTextSection.qml | 12 ++++++++++++ .../QtQuick/TextSpecifics.qml | 1 + 2 files changed, 13 insertions(+) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/StandardTextSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/StandardTextSection.qml index f298d90134c..5fb4d612fb2 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/StandardTextSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/StandardTextSection.qml @@ -37,6 +37,7 @@ Section { property bool showVerticalAlignment: false property bool useLineEdit: true property bool showFormatProperty: false + property bool showFontSizeMode: false SectionLayout { columns: 2 @@ -116,5 +117,16 @@ Section { backendValue: backendValues.renderType Layout.fillWidth: true } + + Label { + text: qsTr("Font size mode") + toolTip: qsTr("Specifies how the font size of the displayed text is determined.") + } + ComboBox { + scope: "Text" + model: ["FixedSize", "HorizontalFit", "VerticalFit", "Fit"] + backendValue: backendValues.fontSizeMode + Layout.fillWidth: true + } } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextSpecifics.qml index 28910fc05a4..64ea73f1cd6 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/TextSpecifics.qml @@ -37,6 +37,7 @@ Column { showVerticalAlignment: true showFormatProperty: true showElide: true + showFontSizeMode: true } Section { From b0d5887638922ce02ec6b29425bf5d93754bd920 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 12 Oct 2016 11:35:32 +0200 Subject: [PATCH 39/72] QmlDesigner: Adding support for font weight We have to tell the rewriter that an enum scope called "Font" does exist. Change-Id: Ib77a099d94ec84b99e54e3c9151249df53eb53fa Reviewed-by: Tim Jenssen --- .../HelperWidgets/FontSection.qml | 12 ++++++++++++ .../designercore/model/texttomodelmerger.cpp | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontSection.qml index e74c5c329a5..c4d14d40073 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontSection.qml @@ -142,6 +142,18 @@ Section { } + Label { + text: qsTr("Font weight") + toolTip: qsTr("Sets the font's weight.") + } + + ComboBox { + Layout.fillWidth: true + backendValue: backendValues.font_weight + model: ["Normal", "Light", "ExtraLight", "Thin", "Medium", "DemiBold", "Bold", "ExtraBold", "Black"] + scope: "Font" + } + Label { visible: showStyle text: qsTr("Style") diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp index 1b11300be79..c0968a15f1a 100644 --- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp +++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp @@ -90,7 +90,7 @@ static inline QStringList globalQtEnums() static inline QStringList knownEnumScopes() { static const QStringList list = { - "TextInput", "TextEdit", "Material", "Universal" + "TextInput", "TextEdit", "Material", "Universal", "Font" }; return list; } From eed82c82688fccc5415359b0cc4bd76abeb745e9 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 12 Oct 2016 11:39:59 +0200 Subject: [PATCH 40/72] QmlDesigner: Adding support for text capitalization Change-Id: I236e8e3152929cd2a5669c78aa7841e84a211aa3 Reviewed-by: Tim Jenssen --- .../HelperWidgets/FontSection.qml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontSection.qml index c4d14d40073..227bf3ec489 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontSection.qml @@ -142,6 +142,18 @@ Section { } + Label { + text: qsTr("Font capitalization") + toolTip: qsTr("Sets the capitalization for the text.") + } + + ComboBox { + Layout.fillWidth: true + backendValue: backendValues.font_capitalization + model: ["MixedCase", "AllUppercase", "AllLowercase", "SmallCaps", "Capitalize"] + scope: "Font" + } + Label { text: qsTr("Font weight") toolTip: qsTr("Sets the font's weight.") From 33e5ff9ecff99a00e7650484e9671c1321543708 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 12 Oct 2016 12:07:13 +0200 Subject: [PATCH 41/72] QmlDesigner: Adding support for font spacings Change-Id: I55843cade308cab00f4394a239507447fb84e0da Reviewed-by: Leena Miettinen Reviewed-by: Tim Jenssen --- .../HelperWidgets/FontSection.qml | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontSection.qml index 227bf3ec489..5b718338379 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontSection.qml @@ -178,5 +178,41 @@ Section { model: ["Normal", "Outline", "Raised", "Sunken"] scope: "Text" } + + Label { + text: qsTr("Spacing") + } + + SecondColumnLayout { + Label { + text: qsTr("Word") + tooltip: qsTr("Sets the word spacing for the font.") + width: 42 + } + SpinBox { + maximumValue: 9999999 + minimumValue: -9999999 + decimals: 0 + backendValue: backendValues.font_wordSpacing + Layout.fillWidth: true + } + Item { + width: 4 + height: 4 + } + + Label { + text: qsTr("Letter") + tooltip: qsTr("Sets the letter spacing for the font.") + width: 42 + } + SpinBox { + maximumValue: 9999999 + minimumValue: -9999999 + decimals: 0 + backendValue: backendValues.font_letterSpacing + Layout.fillWidth: true + } + } } } From 034f1728ea56f3750625905a3baedabd52144faf Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Thu, 13 Oct 2016 11:59:09 +0200 Subject: [PATCH 42/72] QmlDesigner: Set QQuickItem parent if item is written to a property The QQuickEngine does the same. Before in cases like this: Item { Slider { handle: Item { } } } The item parent of the handle was the root item instead of the slider. Change-Id: Ia022c82c6d85c2a957763c56639ac77bca9297e6 Reviewed-by: Tim Jenssen --- .../qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp index 1695e6e55f4..c3d0437bf6a 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp @@ -336,6 +336,10 @@ void ObjectNodeInstance::addToNewProperty(QObject *object, QObject *newParent, c list.append(object); } else if (isObject(property)) { property.write(objectToVariant(object)); + + if (QQuickItem *item = qobject_cast(object)) + if (QQuickItem *newParentItem = qobject_cast(newParent)) + item->setParentItem(newParentItem); } Q_ASSERT(objectToVariant(object).isValid()); From b0ea129299899da4d50c68a3d725ee7a78b5ed31 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 13 Oct 2016 09:36:03 +0200 Subject: [PATCH 43/72] Debugger: Fix bitsize for pointer Change-Id: Icb3fe3dafbff75cba72758459d760470e01afb9b Reviewed-by: Christian Stenger --- src/libs/qtcreatorcdbext/pytype.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libs/qtcreatorcdbext/pytype.cpp b/src/libs/qtcreatorcdbext/pytype.cpp index 1610637ef9f..efa998b5cbb 100644 --- a/src/libs/qtcreatorcdbext/pytype.cpp +++ b/src/libs/qtcreatorcdbext/pytype.cpp @@ -112,7 +112,9 @@ PyObject *type_bitSize(Type *self) { ULONG size; auto extcmd = ExtensionCommandContext::instance(); - if (FAILED(extcmd->symbols()->GetTypeSize(self->m_module, self->m_typeId, &size))) + if (endsWith(getTypeName(self), '*')) + size = SUCCEEDED(ExtensionCommandContext::instance()->control()->IsPointer64Bit()) ? 8 : 4; + else if (FAILED(extcmd->symbols()->GetTypeSize(self->m_module, self->m_typeId, &size))) return NULL; return Py_BuildValue("k", size * 8); } From e0a6b45f22963e745a7735c36e6b477bc7d03bdd Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 13 Oct 2016 12:41:31 +0200 Subject: [PATCH 44/72] Dumper: Fix padding handling (32bit) This also reverts 3d68a8d0dec033eebef7d0ead082a291afa9454d. Change-Id: I3e527096b4d36a102f010e538e428654cc3b783c Reviewed-by: hjk --- share/qtcreator/debugger/dumper.py | 6 +++++- share/qtcreator/debugger/qttypes.py | 8 ++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index a1ee6a6d3cd..c0264a1fdb3 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -2999,6 +2999,8 @@ class DumperBase: return self.code in (TypeCodeIntegral, TypeCodeFloat, TypeCodeEnum) def alignment(self): + if self.code == TypeCodeTypedef: + return self.stripTypedefs().alignment() if self.isSimpleType(): if self.name == 'double': return self.dumper.ptrSize() # Crude approximation. @@ -3371,7 +3373,9 @@ class DumperBase: builder.addField(ptrSize, 'Q' if ptrSize == 8 else 'I') elif c == 'P': # Pointer as Value builder.addField(ptrSize, '%ss' % ptrSize) - elif c in ('q', 'Q', 'd'): + elif c in ('d'): + builder.addField(8, c, fieldType = 'double') + elif c in ('q', 'Q'): builder.addField(8, c) elif c in ('i', 'I', 'f'): builder.addField(4, c) diff --git a/share/qtcreator/debugger/qttypes.py b/share/qtcreator/debugger/qttypes.py index 0dd094906b8..5ce5531c682 100644 --- a/share/qtcreator/debugger/qttypes.py +++ b/share/qtcreator/debugger/qttypes.py @@ -821,12 +821,8 @@ def qdump__QImage(d, value): d.putValue('(invalid)') return - if d.ptrSize() == 8: - (ref, width, height, depth, nbytes, padding, devicePixelRatio, colorTable, - bits, iformat) = d.split('iiiii@dppi', imageData) - else: - (ref, width, height, depth, nbytes, devicePixelRatio, colorTable, - bits, iformat) = d.split('iiiiidppi', imageData) + (ref, width, height, depth, nbytes, padding, devicePixelRatio, colorTable, + bits, iformat) = d.split('iiiii@dppi', imageData) d.putValue('(%dx%d)' % (width, height)) d.putNumChild(1) From b17c43b6d9c48a9ff41a7b6d53c4cd5358e483db Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 13 Oct 2016 14:39:13 +0200 Subject: [PATCH 45/72] QmlDesigner: Make sure that the export alias icon is not scaled SecondColumnLayout would otherwise scale it up, at least on HightDPI. Change-Id: I5c1bd6357e8559deee26002b90128abfbacf449f Reviewed-by: Thomas Hartmann --- .../qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml index 09134d52b5b..409854f72df 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/ItemPane.qml @@ -78,8 +78,8 @@ Rectangle { // right size after resizing to a wider width Image { - width: 16 - height: 16 + Layout.preferredWidth: 16 + Layout.preferredHeight: 16 source: hasAliasExport ? "image://icons/alias-export-checked" : "image://icons/alias-export-unchecked" ToolTipArea { anchors.fill: parent From f38a71961514499727341ad1e304b96c9168d917 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 13 Oct 2016 17:32:13 +0200 Subject: [PATCH 46/72] Utils: HighDPI-able, themable filenew and open icons Change-Id: I1b9dc3393c6ec7965fbca42a561303ddc01201eb Reviewed-by: Alessandro Portale --- src/libs/utils/images/filenew.png | Bin 977 -> 134 bytes src/libs/utils/images/filenew@2x.png | Bin 0 -> 158 bytes src/libs/utils/images/fileopen.png | Bin 2402 -> 134 bytes src/libs/utils/images/fileopen@2x.png | Bin 0 -> 209 bytes src/libs/utils/utils.qrc | 2 ++ src/libs/utils/utilsicons.cpp | 8 ++--- src/tools/icons/qtcreatoricons.svg | 48 ++++++++++++++++++++++++++ 7 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 src/libs/utils/images/filenew@2x.png create mode 100644 src/libs/utils/images/fileopen@2x.png diff --git a/src/libs/utils/images/filenew.png b/src/libs/utils/images/filenew.png index dd795cfffc5c1ce273b3afedb5ed01da3fc5668c..a1a34b0084c1dcf15c45407363ab3b72b575d012 100644 GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd7G?$phPQVgfdoVYd_r6q7#LVtS;fS}_U_%g zfB*i&hY$b%|G(*_a5Mu0gN~<*V+codvPUyh+ZGl!HaBwvWnEoI$zvQw%|;SO6neIp jm}MDBG%y@#U}7*d(%S0sY1>i;1_lOCS3j3^P6B!2B(CN39V9M2t42;Veop&0V}Dirgqi8i=QNnPatNTj7nb@ydwaO}f+v+({xm)wHw(eSTOk(e*52c@;b=UmXH)L35ny@jRQaC=1DI>9!@cDX7mtDnc%`(@`nd^)}Fql|%~Qqgfm zpS{=gE^Lu`5TLV)^K6Y$}4<9ElUVi`AkC{7#mNz&%B%TPJz|`n!IM0De;>hHa z&vNhY&GSJ<~A!d{QcdX5z>=b z$~S{yRr#8R6rBrxazeLmO2~?)rSV_Nxpwo;n#40|t%o?)KGTZ(m*K&>Cfvcg*4wRB zA>`d`T|?8K7RMwOX(;va7u2zwO%>ogSMGC+%~g;^RY0+?)#6-~t(!#2lFKqi6Mk%8 zvfx&Gp4Yjj=3Terwp-^nd-&^Ymlpj$e+~x+-`R)@Y74Ee9X69a8QyrM>7PpV%cmX= ze;-WLW8UTX(sS0cOvfo|Q|H=HPTB#4D3M3=sjhGkoEc9V! zw|&vd_d@^rikMX&eqZAK$CPzI=tIAK+ttRiilP=yYd7VHKRf@PwMur!E63Ld+Su=2 zVvM(A=3HZL`Tg9=Ltnm1-1& mjLZIByj7Li&U7~JKjY5~fj+_TG8F~}1_n=8KbLh*2~7YwJGfc^ diff --git a/src/libs/utils/images/filenew@2x.png b/src/libs/utils/images/filenew@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..0c380b8a81b64a26622c811f5ad9b11f62c59cd0 GIT binary patch literal 158 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I7G?$phQ^Te;|vT85&=FTt_%ze8X6ipIy$<# zy3d|Hd-?L^t5>i7|NkFnuv3YFfx*$!#W6(Ve6of+GtUhci31H6WqlhQMHLwm9j7R8 zN^~sXRB4{7z&WLHssg8hfx$vI}IoCg^782@bKXZY4}@ac+(XXh9g7#KWV L{an^LB{Ts5cPB7` literal 0 HcmV?d00001 diff --git a/src/libs/utils/images/fileopen.png b/src/libs/utils/images/fileopen.png index 58d70149e9ebb6b1b99c24f24d604f9f34bc5042..6650425bf86c360f1980da8e27d453fe1c89a81b 100644 GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4h9AW2CEqh_A)Rq_VdwIQ*0M@w~;d!ND}9{}1nm1ECWCyOd@vyc?Op kbZ&NnUMthL^DY&94EN@otXR-L`!&b{Pgg&ebxsLQ0GO35LI3~& literal 2402 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}Ea{HEjtmUfZd~z?Fk)a} zkSuYHC<)F_D=AMbN@Z|N$xljE@XSq2PYp^UDVHvD9=<#x)M z88gkATjz7CK;?#zM&{eT`~Ua+-9O*iD<^Ol_wE?UEh2|?ofgD5x$k}IQJlDQnO06| zoAzg&kBNsx=CJSm*ZuR!Kg)?XJlAbFx9=5$&$lN`z4t0&Qh2twH3cs^@ccT*H_N^) zJtZQQn+<4r>h|m;yQ7omB`r{9^FMvYQ0dY^hjog#g1##3*u}57 zeb0Qse%mJ(uPe1pw-mlCCBHAEP1Dau`M1#KZPya=_dX~tHo7pi=VVqj&$Bnj6Ye>d zEP3rLvw|=Gy6}n>Q_c$bFJAh>=1j;8aow#?+?SsHoZ$Ml)$Bpd)QXLLOS;b_Z#zGk zH%{W@<>LYS1a}$nEl_e2zAnRi;`y299_{Y(2^lFo&4(AS*t3^MUN804k&PL8kHR0l zx#_m*TE@A{>b9*8=}ctMHI>*6QDjnlt<_yW9PI zQ+JT5cgu%2Yb;m3=kNU>S$t&c*Itbie2w?*_d9)Bs&8;<8edP)cAg^-67%(%wo2OX ztvml!>(?iPS?l{dg_1WC5V$UCJ zYq!ebnXYJikX_;&#8SfMwQ$9cH}p_a{rdUARl~ltQ$uVaauo zua(C#^gbWptu@=2sayPzX~Jy211}pdNm~nUzWu^&=bwJ}cK!V6yZ3#x775a%;h?HQC7hN ze_a-QXWN&*=}>uP)C8`w1xp?HuU3X>@LoOWnrr5@$DKp|49kZlp$)q{Shp;D5$M1A z@v66K9$eker|e$6T-^8U+6i~px^3BSxaQmbUI%&U2Z^$|P77ybY(2W*jfPaw6-8mK z#d_YnrZ?R(G)j({GMoLI?RuuS;wk6;C(H|CxsrP~PGHM*t(+mnGS513$+zj2PxCTg zJAB=1wd8nQ%iNP%T3)3krkyJ`B{$~z_k_$|Xc*3H`m(yCLVnfdkbtS{THAumkI2R| zt=_w4n#FcOF+YBVolg30QziK(o>$}8TlVnO%3h1~WTVSrbMCyIdv`^4Mw5!Z+&*!U zgyIa|C9NM1c-SdUpT65Jx>tSe**o3Vo?a__?zOJkvUkOqjZHsx8O`~&S@4myN5rwS z^Jg*~nJ#(jRP%%v+vK*t*?#C(gUz~Mzdq)g>VBVV9pqAxebDK1t_yoC!@Mn@k7QUk zUz94|BKBf|=aQ3?!&(9OOZh0u`Q1)i`4KeSw^OPpl zx7@1d3h(|JaA$)|>Qm90(&8fS!?_8`8${~fwa?!w>VD^O>qD*JlIc>PT#ubRH*uP} zhLV1Xa-wmU@Rh*$cfB5uTMcd=J=Kvd{P1l3edZ@dcO|rp_B<%}l3UJe-*`x@(k?sC z{d0NPQP0C$S4>}eQ9*NV=IVKynlmQ9SY#PLTYt-;6>ImrDG%P~SUAV%)aA1QQ{S^R zzV+JiYE$B)i^_lU*7fOki29L7EdjtBv&zZbi=U=`+YfWda~YelxYzB{phX(NNJS?0PUY#oPZZFtt+ zmsG?lE^+CwY(n}Lsi>~i1t$*+H!VrY(5!7(z#yH{{{CTf=jmzMM(18Pb?DY8#0aQv z?Amijbm#K`sr)vMNq_c8RsVSQT4(+>d*=xEipTBW>UXXv=J{xT{!mo9=(YMiA{Pw{ zf9!r3pIGZ7xu_!fNn6gd&UdLRJ{c9yD~|IPE?;C3$Li`NwNc1jDPiC3=gnC+>qFwxd4)BpJsyQPQvukke9y;2iz zH}$Kwe(|@-pY0Dmcwfe&wn}?L_U-u(O2U{W1$TLTnfiRQUf)eV$)CEu*ADD$+Pp%@ z@C)!Xe9_)IDDw=kjD-v=K|39i#En^1_images/editpaste@2x.png images/empty14.png images/filenew.png + images/filenew@2x.png images/fileopen.png + images/fileopen@2x.png images/filesave.png images/filesave@2x.png images/inputfield.png diff --git a/src/libs/utils/utilsicons.cpp b/src/libs/utils/utilsicons.cpp index 5b3a1737d8b..2117acb09cb 100644 --- a/src/libs/utils/utilsicons.cpp +++ b/src/libs/utils/utilsicons.cpp @@ -64,10 +64,10 @@ const Icon BOOKMARK_TOOLBAR({ const Icon BOOKMARK_TEXTEDITOR({ {QLatin1String(":/utils/images/bookmark.png"), Theme::Bookmarks_TextMarkColor}}, Icon::Tint); -const Icon NEWFILE( - QLatin1String(":/utils/images/filenew.png")); -const Icon OPENFILE( - QLatin1String(":/utils/images/fileopen.png")); +const Icon NEWFILE({ + {QLatin1String(":/utils/images/filenew.png"), Theme::PanelTextColorMid}}, Icon::Tint); +const Icon OPENFILE({ + {QLatin1String(":/utils/images/fileopen.png"), Theme::PanelTextColorMid}}, Icon::Tint); const Icon SAVEFILE({ {QLatin1String(":/utils/images/filesave.png"), Theme::PanelTextColorMid}}, Icon::Tint); const Icon SAVEFILE_TOOLBAR({ diff --git a/src/tools/icons/qtcreatoricons.svg b/src/tools/icons/qtcreatoricons.svg index 2b4688f6964..4b03178b5ef 100644 --- a/src/tools/icons/qtcreatoricons.svg +++ b/src/tools/icons/qtcreatoricons.svg @@ -3585,6 +3585,54 @@ width="100%" height="100%" /> + + + + + + + + + + Date: Wed, 12 Oct 2016 14:20:30 +0200 Subject: [PATCH 47/72] QmlDesigner: Allow adding of file imports All the functionality to support file imports in the import manager is already there. We just have to add the file imports as possible imports. We only include direct sub directories that contain at least one qml file, but no qmldir file. Task-number: QTCREATORBUG-12126 Task-number: QTCREATORBUG-11518 Change-Id: I1b606ae11682886f430794f451177980b9c5f9aa Reviewed-by: Tim Jenssen --- .../designercore/model/texttomodelmerger.cpp | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp index c0968a15f1a..a0e75e314a7 100644 --- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp +++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp @@ -819,7 +819,23 @@ static void removeUsedImports(QHash &filteredPossibleImportK filteredPossibleImportKeys.remove(import.info.path()); } -static QList generatePossibleImports(const QHash &filteredPossibleImportKeys) +static QList generatePossibleFileImports(const QString &path) +{ + QList possibleImports; + + foreach (const QString &subDir, QDir(path).entryList(QDir::Dirs | QDir::NoDot | QDir::NoDotDot)) { + QDir dir(path + "/" + subDir); + if (!dir.entryInfoList(QStringList("*.qml"), QDir::Files).isEmpty() + && dir.entryInfoList(QStringList("qmldir"), QDir::Files).isEmpty()) { + QmlDesigner::Import import = QmlDesigner::Import::createFileImport(subDir); + possibleImports.append(import); + } + } + + return possibleImports; +} + +static QList generatePossibleLibraryImports(const QHash &filteredPossibleImportKeys) { QList possibleImports; @@ -842,9 +858,11 @@ void TextToModelMerger::setupPossibleImports(const QmlJS::Snapshot &snapshot, co removeUsedImports(filteredPossibleImportKeys, m_scopeChain->context()->imports(m_document.data())->all()); - QList possibleImports = generatePossibleImports(filteredPossibleImportKeys); + QList possibleImports = generatePossibleLibraryImports(filteredPossibleImportKeys); - if ( m_rewriterView->isAttached()) + possibleImports.append(generatePossibleFileImports(document()->path())); + + if (m_rewriterView->isAttached()) m_rewriterView->model()->setPossibleImports(possibleImports); } From e05cb92ceafc341b4d704d3cabd7adfedb75a319 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Wed, 12 Oct 2016 14:17:22 +0200 Subject: [PATCH 48/72] QmlDesigner: Changing order of imports in UI File imports should be first, because they relate to the project and there are most likely just a view. Change-Id: If7bfc648c694bcc3f010d99b125d7349061bb6db Reviewed-by: Tim Jenssen --- .../qmldesigner/components/importmanager/importswidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/components/importmanager/importswidget.cpp b/src/plugins/qmldesigner/components/importmanager/importswidget.cpp index 6841817a165..625c5d0497f 100644 --- a/src/plugins/qmldesigner/components/importmanager/importswidget.cpp +++ b/src/plugins/qmldesigner/components/importmanager/importswidget.cpp @@ -71,10 +71,10 @@ static bool importLess(const Import &firstImport, const Import &secondImport) return false; if (firstImport.isLibraryImport() && secondImport.isFileImport()) - return true; + return false; if (firstImport.isFileImport() && secondImport.isLibraryImport()) - return false; + return true; if (firstImport.isFileImport() && secondImport.isFileImport()) return QString::localeAwareCompare(firstImport.file(), secondImport.file()) < 0; From 5b5aaf9eb3d9cb835df40e4b41cf7e5ff4e299e5 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Thu, 13 Oct 2016 11:15:15 +0200 Subject: [PATCH 49/72] QmlDesigner: Add more items to component combobox It makes sense to also add items that are not in a default properties to the component comobox. These are items like styling delegates: Slider { handle: Item { } } or the items of e.g. a Flipable: Flipable { front: Item { } Those items are not shown in the navigator (TODO) and it makes sense to edit them if they were an inline component. Change-Id: Iab5b6e0238625b5a486901fbf617911d06a34581 Reviewed-by: Tim Jenssen --- .../qmldesigner/components/integration/componentview.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/plugins/qmldesigner/components/integration/componentview.cpp b/src/plugins/qmldesigner/components/integration/componentview.cpp index be304dd44d4..1bd29179ec8 100644 --- a/src/plugins/qmldesigner/components/integration/componentview.cpp +++ b/src/plugins/qmldesigner/components/integration/componentview.cpp @@ -191,7 +191,9 @@ void ComponentView::searchForComponentAndAddToList(const ModelNode &node) bool masterNotAdded = true; foreach (const ModelNode &node, node.allSubModelNodesAndThisNode()) { - if (node.nodeSourceType() == ModelNode::NodeWithComponentSource) { + if (node.nodeSourceType() == ModelNode::NodeWithComponentSource + || (node.hasParentProperty() + && !node.parentProperty().isDefaultProperty())) { if (masterNotAdded) { masterNotAdded = true; addMasterDocument(); @@ -200,9 +202,6 @@ void ComponentView::searchForComponentAndAddToList(const ModelNode &node) if (!hasEntryForNode(node)) { QString description = descriptionForNode(node); - - - QStandardItem *item = new QStandardItem(description); item->setData(QVariant::fromValue(node.internalId()), ModelNodeRole); item->setEditable(false); From d81becd5fc9dc0b5f2af45bb31d57e00bebd4824 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Thu, 13 Oct 2016 15:38:57 +0200 Subject: [PATCH 50/72] QmlDesigner: Ensure lineedit has the correct color Task-number: QTCREATORBUG-12513 Change-Id: I5a169561cb378bbe952c5544ec86510a9b7349f3 Reviewed-by: Tim Jenssen --- .../propertyEditorQmlSources/HelperWidgets/ColorEditor.qml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml index 6e32419acc8..007de033723 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ColorEditor.qml @@ -190,8 +190,9 @@ Column { ButtonRowButton { iconSource: "images/icon_color_solid.png" onClicked: { - colorEditor.backendValue.resetValue() gradientLine.deleteGradient() + textField.text = colorEditor.color + colorEditor.backendValue.resetValue() } tooltip: qsTr("Solid Color") } From d75d94c8c0ab453692a5406e209c86dc5d5952e1 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Thu, 13 Oct 2016 18:44:08 +0200 Subject: [PATCH 51/72] QmlDesigner: Do not allow JavaScript keywords as ids Change-Id: Ifbbc7c36778dcc4e63df8c34929cd7f872875087 Reviewed-by: Tim Jenssen --- .../designercore/model/abstractview.cpp | 4 +-- .../designercore/model/modelnode.cpp | 30 +++++++++++++++++-- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/model/abstractview.cpp b/src/plugins/qmldesigner/designercore/model/abstractview.cpp index 0ebc577c90d..4d9c17c2b83 100644 --- a/src/plugins/qmldesigner/designercore/model/abstractview.cpp +++ b/src/plugins/qmldesigner/designercore/model/abstractview.cpp @@ -477,9 +477,9 @@ QString AbstractView::generateNewId(const QString &prefixName) const QString newId = QString(QStringLiteral("%1")).arg(firstCharToLower(prefixName)); newId.remove(QRegExp(QStringLiteral("[^a-zA-Z0-9_]"))); - while (hasId(newId) || rootModelNode().hasProperty(newId.toUtf8()) || newId == "item") { + while (!ModelNode::isValidId(newId) || hasId(newId) || rootModelNode().hasProperty(newId.toUtf8()) || newId == "item") { counter += 1; - newId = QString(QStringLiteral("%1%2")).arg(firstCharToLower(prefixName)).arg(counter); + newId = QString(QStringLiteral("%1%2")).arg(firstCharToLower(prefixName)).arg(counter - 1); newId.remove(QRegExp(QStringLiteral("[^a-zA-Z0-9_]"))); } diff --git a/src/plugins/qmldesigner/designercore/model/modelnode.cpp b/src/plugins/qmldesigner/designercore/model/modelnode.cpp index e847c109551..3fe7e9ce2e2 100644 --- a/src/plugins/qmldesigner/designercore/model/modelnode.cpp +++ b/src/plugins/qmldesigner/designercore/model/modelnode.cpp @@ -143,8 +143,34 @@ QString ModelNode::validId() static bool idIsQmlKeyWord(const QString& id) { - QStringList keywords; - keywords << QLatin1String("import") << QLatin1String("as"); + QStringList keywords = { "import", + "as", + "break", + "case", + "catch", + "continue", + "debugger", + "default", + "delete", + "do", + "else", + "finally", + "for", + "function", + "if", + "in", + "instanceof", + "new", + "return", + "switch", + "this", + "throw", + "try", + "typeof", + "var", + "void", + "while", + "with" }; return keywords.contains(id); } From a1876a8509dd048fd97054a71d619baa322226cd Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Thu, 13 Oct 2016 21:23:19 +0300 Subject: [PATCH 52/72] QmlDesigner: Use a static const QSet for keyword list Makes the lookup faster. Also sort the keywords. Change-Id: I25ce0f2d1de7be572fecccc09b5ec12d81152e95 Reviewed-by: Tim Jenssen --- .../designercore/model/modelnode.cpp | 64 ++++++++++--------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/src/plugins/qmldesigner/designercore/model/modelnode.cpp b/src/plugins/qmldesigner/designercore/model/modelnode.cpp index 3fe7e9ce2e2..eafc521815e 100644 --- a/src/plugins/qmldesigner/designercore/model/modelnode.cpp +++ b/src/plugins/qmldesigner/designercore/model/modelnode.cpp @@ -29,8 +29,6 @@ #include #include #include "internalnode_p.h" -#include -#include #include "invalidargumentexception.h" #include "invalididexception.h" #include "invalidmodelnodeexception.h" @@ -44,6 +42,10 @@ #include "nodeproperty.h" #include +#include +#include +#include + namespace QmlDesigner { using namespace QmlDesigner::Internal; @@ -143,34 +145,36 @@ QString ModelNode::validId() static bool idIsQmlKeyWord(const QString& id) { - QStringList keywords = { "import", - "as", - "break", - "case", - "catch", - "continue", - "debugger", - "default", - "delete", - "do", - "else", - "finally", - "for", - "function", - "if", - "in", - "instanceof", - "new", - "return", - "switch", - "this", - "throw", - "try", - "typeof", - "var", - "void", - "while", - "with" }; + static const QSet keywords = { + "as", + "break", + "case", + "catch", + "continue", + "debugger", + "default", + "delete", + "do", + "else", + "finally", + "for", + "function", + "if", + "import", + "in", + "instanceof", + "new", + "return", + "switch", + "this", + "throw", + "try", + "typeof", + "var", + "void", + "while", + "with" + }; return keywords.contains(id); } From 3016c6c96f092cf3968e4d622be67b63a163ba5a Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 3 Aug 2016 14:06:45 +0200 Subject: [PATCH 53/72] Cdb: Optimize dump of std container Cache container member offsets. Task-number: QTCREATORBUG-16710 Change-Id: I47c471eae355e1f1220fe22ad1cdd0cb67d430a1 Reviewed-by: Christian Stenger --- src/libs/qtcreatorcdbext/containers.cpp | 43 +++++++++---------- src/libs/qtcreatorcdbext/symbolgroupvalue.cpp | 11 ++++- src/libs/qtcreatorcdbext/symbolgroupvalue.h | 1 + 3 files changed, 32 insertions(+), 23 deletions(-) diff --git a/src/libs/qtcreatorcdbext/containers.cpp b/src/libs/qtcreatorcdbext/containers.cpp index bab12104f2b..f1c7432a36d 100644 --- a/src/libs/qtcreatorcdbext/containers.cpp +++ b/src/libs/qtcreatorcdbext/containers.cpp @@ -101,25 +101,22 @@ static inline std::string fixInnerType(const std::string &type, // Return size from an STL vector (last/first iterators). static inline int msvcStdVectorSize(const SymbolGroupValue &v) { - // MSVC2012 has 2 base classes, MSVC2010 1, MSVC2008 none - if (const SymbolGroupValue myFirstPtrV = SymbolGroupValue::findMember(v, "_Myfirst")) { - if (const SymbolGroupValue myLastPtrV = myFirstPtrV.parent()["_Mylast"]) { - const ULONG64 firstPtr = myFirstPtrV.pointerValue(); - const ULONG64 lastPtr = myLastPtrV.pointerValue(); - if (!firstPtr || lastPtr < firstPtr) - return -1; - if (lastPtr == firstPtr) - return 0; - // Subtract the pointers: We need to do the pointer arithmetics ourselves - // as we get char *pointers. - const std::string innerType = fixInnerType(SymbolGroupValue::stripPointerType(myFirstPtrV.type()), v); - const size_t size = SymbolGroupValue::sizeOf(innerType.c_str()); - if (size == 0) - return -1; - return static_cast((lastPtr - firstPtr) / size); - } - } - return -1; + const ULONG64 firstPtr = v.readPointerValueFromAncestor("_Myfirst"); + const ULONG64 lastPtr = v.readPointerValueFromAncestor("_Mylast"); + if (!firstPtr || lastPtr < firstPtr) + return -1; + const std::vector innerTypes = v.innerTypes(); + if (innerTypes.empty()) + return -1; + const std::string innerType = fixInnerType(SymbolGroupValue::stripPointerType(innerTypes[0]), v); + const size_t size = SymbolGroupValue::sizeOf(innerType.c_str()); + if (size == 0) + return -1; + if (lastPtr == firstPtr) + return 0; + // Subtract the pointers: We need to do the pointer arithmetics ourselves + // as we get char *pointers. + return static_cast((lastPtr - firstPtr) / size); } // Return size of container or -1 @@ -193,10 +190,12 @@ int containerSize(KnownType kt, const SymbolGroupValue &v) case KT_StdMap: case KT_StdMultiMap: case KT_StdValArray: - case KT_StdList: - if (const SymbolGroupValue size = SymbolGroupValue::findMember(v, "_Mysize")) - return size.intValue(); + case KT_StdList: { + const int size = v.readIntegerFromAncestor("_Mysize"); + if (size >= 0) + return size; break; + } case KT_StdStack: if (const SymbolGroupValue deque = v[unsigned(0)]) return containerSize(KT_StdDeque, deque); diff --git a/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp b/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp index 46b9a3ff911..339441d41fb 100644 --- a/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp +++ b/src/libs/qtcreatorcdbext/symbolgroupvalue.cpp @@ -154,6 +154,15 @@ int SymbolGroupValue::readIntegerFromAncestor(const std::string &name, int defau return readPODFromAncestor(name, defaultValue); } +ULONG64 SymbolGroupValue::offsetOfChild(const SymbolGroupValue &child) const +{ + const ULONG64 base = isPointerType(type()) ? pointerValue() : address(); + const ULONG64 childAddress = child.address(); + if (base == 0 || childAddress == 0) + return 0; + return childAddress - base; +} + LONG64 SymbolGroupValue::offsetOfAncestor(const std::string &name) const { return infoOfAncestor(name).offset; @@ -204,7 +213,7 @@ SymbolAncestorInfo SymbolGroupValue::infoOfAncestor(const std::string &name) con continue; info = child.infoOfAncestor(name); if (info.isValid()) { - info.offset += offsetOfAncestor(child.name()); + info.offset += offsetOfChild(child); break; } } diff --git a/src/libs/qtcreatorcdbext/symbolgroupvalue.h b/src/libs/qtcreatorcdbext/symbolgroupvalue.h index 73f00bce08e..2ab829acb9f 100644 --- a/src/libs/qtcreatorcdbext/symbolgroupvalue.h +++ b/src/libs/qtcreatorcdbext/symbolgroupvalue.h @@ -71,6 +71,7 @@ public: SymbolGroupValue operator[](const char *name) const; SymbolGroupValue operator[](unsigned) const; unsigned childCount() const; + ULONG64 offsetOfChild(const SymbolGroupValue &child) const; SymbolGroupValue parent() const; // take address and cast to desired (pointer) type SymbolGroupValue typeCast(const char *type) const; From dd647b4236c5d818462f69dae1721e03b0dfca84 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Thu, 13 Oct 2016 13:11:07 +0200 Subject: [PATCH 54/72] CppEditor: Clean up header error indicator * Show/hide the error indicator button instead of enabling/disabling it. * Use "Minimize" instead of "Do Not Show Again" in the info bar button and use a custom setting to save this. The current info bar API does not signal addition/removal of global suppression ids which would be needed to update all editor widgets properly. We are the only client and it feels wrong to add this API there at the moment. * Remove not needed code anymore. Change-Id: I2bb872522b7410434f060cc359a3b62dfed0af4d Reviewed-by: David Schulz --- src/plugins/coreplugin/infobar.cpp | 9 +--- src/plugins/coreplugin/infobar.h | 2 - src/plugins/cppeditor/cppeditor.cpp | 57 +++++++++++------------ src/plugins/cppeditor/cppeditor.h | 7 +-- src/plugins/cpptools/cpptoolsconstants.h | 1 + src/plugins/cpptools/cpptoolssettings.cpp | 18 +++++++ src/plugins/cpptools/cpptoolssettings.h | 4 ++ src/plugins/texteditor/texteditor.cpp | 8 ++-- src/plugins/texteditor/texteditor.h | 2 +- 9 files changed, 58 insertions(+), 50 deletions(-) diff --git a/src/plugins/coreplugin/infobar.cpp b/src/plugins/coreplugin/infobar.cpp index 9fcc7ce18ae..7c301af8a30 100644 --- a/src/plugins/coreplugin/infobar.cpp +++ b/src/plugins/coreplugin/infobar.cpp @@ -68,11 +68,6 @@ void InfoBarEntry::setCancelButtonInfo(const QString &_cancelButtonText, CallBac m_cancelButtonCallBack = callBack; } -void InfoBarEntry::setSuppressionButtonInfo(InfoBarEntry::CallBack callback) -{ - m_suppressionButtonCallBack = callback; -} - void InfoBarEntry::setShowDefaultCancelButton(bool yesno) { m_showDefaultCancelButton = yesno; @@ -282,9 +277,7 @@ void InfoBarDisplay::update() if (info.globalSuppression == InfoBarEntry::GlobalSuppressionEnabled) { infoWidgetSuppressButton = new QToolButton; infoWidgetSuppressButton->setText(tr("Do Not Show Again")); - connect(infoWidgetSuppressButton, &QAbstractButton::clicked, this, [this, info, id] { - if (info.m_suppressionButtonCallBack) - info.m_suppressionButtonCallBack(); + connect(infoWidgetSuppressButton, &QAbstractButton::clicked, this, [this, id] { m_infoBar->removeInfo(id); InfoBar::globallySuppressInfo(id); }); diff --git a/src/plugins/coreplugin/infobar.h b/src/plugins/coreplugin/infobar.h index e832e570055..c5d1120fc33 100644 --- a/src/plugins/coreplugin/infobar.h +++ b/src/plugins/coreplugin/infobar.h @@ -58,7 +58,6 @@ public: void setCustomButtonInfo(const QString &_buttonText, CallBack callBack); void setCancelButtonInfo(CallBack callBack); void setCancelButtonInfo(const QString &_cancelButtonText, CallBack callBack); - void setSuppressionButtonInfo(CallBack callback); void setShowDefaultCancelButton(bool yesno); using DetailsWidgetCreator = std::function; @@ -71,7 +70,6 @@ private: CallBack m_buttonCallBack; QString cancelButtonText; CallBack m_cancelButtonCallBack; - CallBack m_suppressionButtonCallBack; GlobalSuppressionMode globalSuppression; DetailsWidgetCreator m_detailsWidgetCreator; bool m_showDefaultCancelButton = true; diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index 0492635d1a6..4b861658fc0 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -56,6 +56,7 @@ #include #include #include +#include #include #include #include @@ -130,7 +131,7 @@ public: QScopedPointer m_followSymbolUnderCursor; QToolButton *m_preprocessorButton = nullptr; - QToolButton *m_headerErrorsIndicatorButton = nullptr; + QAction *m_headerErrorsIndicatorAction = nullptr; CppSelectionChanger m_cppSelectionChanger; @@ -229,15 +230,20 @@ void CppEditorWidget::finalizeInitialization() connect(cmd, &Command::keySequenceChanged, this, &CppEditorWidget::updatePreprocessorButtonTooltip); updatePreprocessorButtonTooltip(); connect(d->m_preprocessorButton, &QAbstractButton::clicked, this, &CppEditorWidget::showPreProcessorWidget); - - d->m_headerErrorsIndicatorButton = new QToolButton(this); - d->m_headerErrorsIndicatorButton->setIcon(Utils::Icons::WARNING_TOOLBAR.pixmap()); - connect(d->m_headerErrorsIndicatorButton, &QAbstractButton::clicked, - this, &CppEditorWidget::showHeaderErrorInfoBar); - d->m_headerErrorsIndicatorButton->setEnabled(false); - insertExtraToolBarWidget(TextEditorWidget::Left, d->m_preprocessorButton); - insertExtraToolBarWidget(TextEditorWidget::Left, d->m_headerErrorsIndicatorButton); + + auto *headerErrorsIndicatorButton = new QToolButton(this); + headerErrorsIndicatorButton->setToolTip(tr("Show First Error in Included Files")); + headerErrorsIndicatorButton->setIcon(Utils::Icons::WARNING_TOOLBAR.pixmap()); + connect(headerErrorsIndicatorButton, &QAbstractButton::clicked, []() { + CppToolsSettings::instance()->setShowHeaderErrorInfoBar(true); + }); + d->m_headerErrorsIndicatorAction = insertExtraToolBarWidget(TextEditorWidget::Left, + headerErrorsIndicatorButton); + d->m_headerErrorsIndicatorAction->setVisible(false); + connect(CppToolsSettings::instance(), &CppToolsSettings::showHeaderErrorInfoBarChanged, + this, &CppEditorWidget::updateHeaderErrorWidgets); + insertExtraToolBarWidget(TextEditorWidget::Left, d->m_cppEditorOutline->widget()); } @@ -252,6 +258,10 @@ void CppEditorWidget::finalizeInitializationAfterDuplication(TextEditorWidget *o d->m_cppEditorOutline->update(); const Id selectionKind = CodeWarningsSelection; setExtraSelections(selectionKind, cppEditorWidget->extraSelections(selectionKind)); + + d->m_headerErrorDiagnosticWidgetCreator + = cppEditorWidget->d->m_headerErrorDiagnosticWidgetCreator; + updateHeaderErrorWidgets(); } CppEditorWidget::~CppEditorWidget() @@ -329,13 +339,14 @@ void CppEditorWidget::updateHeaderErrorWidgets() infoBar->removeInfo(id); if (d->m_headerErrorDiagnosticWidgetCreator) { - if (infoBar->canInfoBeAdded(id)) { - addHeaderErrorInfoBarEntryAndHideIndicator(); + if (CppToolsSettings::instance()->showHeaderErrorInfoBar()) { + addHeaderErrorInfoBarEntry(); + d->m_headerErrorsIndicatorAction->setVisible(false); } else { - d->m_headerErrorsIndicatorButton->setEnabled(true); + d->m_headerErrorsIndicatorAction->setVisible(true); } } else { - d->m_headerErrorsIndicatorButton->setEnabled(false); + d->m_headerErrorsIndicatorAction->setVisible(false); } } @@ -434,23 +445,20 @@ void CppEditorWidget::renameSymbolUnderCursorBuiltin() renameUsages(); // Rename non-local symbol or macro } -void CppEditorWidget::addHeaderErrorInfoBarEntryAndHideIndicator() const +void CppEditorWidget::addHeaderErrorInfoBarEntry() const { InfoBarEntry info(Constants::ERRORS_IN_HEADER_FILES, tr("Warning: The code model could not parse an included file, " "which might lead to slow or incorrect code completion and " - "highlighting, for example."), - InfoBarEntry::GlobalSuppressionEnabled); + "highlighting, for example.")); info.setDetailsWidgetCreator(d->m_headerErrorDiagnosticWidgetCreator); info.setShowDefaultCancelButton(false); - info.setSuppressionButtonInfo([this](){ - d->m_headerErrorsIndicatorButton->setEnabled(true); + info.setCustomButtonInfo("Minimize", [](){ + CppToolsSettings::instance()->setShowHeaderErrorInfoBar(false); }); InfoBar *infoBar = textDocument()->infoBar(); infoBar->addInfo(info); - - d->m_headerErrorsIndicatorButton->setEnabled(false); } namespace { @@ -1024,14 +1032,5 @@ void CppEditorWidget::showPreProcessorWidget() } } -void CppEditorWidget::showHeaderErrorInfoBar() -{ - const Id id(Constants::ERRORS_IN_HEADER_FILES); - QTC_CHECK(!textDocument()->infoBar()->canInfoBeAdded(id)); - - InfoBar::globallyUnsuppressInfo(id); - addHeaderErrorInfoBarEntryAndHideIndicator(); -} - } // namespace Internal } // namespace CppEditor diff --git a/src/plugins/cppeditor/cppeditor.h b/src/plugins/cppeditor/cppeditor.h index cce22cebcd4..9475710480d 100644 --- a/src/plugins/cppeditor/cppeditor.h +++ b/src/plugins/cppeditor/cppeditor.h @@ -31,10 +31,6 @@ #include -namespace Core { -class InfoBarEntry; -} - namespace CppTools { class CppEditorOutline; class RefactoringEngineInterface; @@ -91,7 +87,6 @@ public: void switchDeclarationDefinition(bool inNextSplit); void showPreProcessorWidget(); - void showHeaderErrorInfoBar(); void findUsages(); void renameSymbolUnderCursor(); @@ -150,7 +145,7 @@ private: void renameSymbolUnderCursorClang(); void renameSymbolUnderCursorBuiltin(); - void addHeaderErrorInfoBarEntryAndHideIndicator() const; + void addHeaderErrorInfoBarEntry() const; CppTools::ProjectPart *projectPart() const; diff --git a/src/plugins/cpptools/cpptoolsconstants.h b/src/plugins/cpptools/cpptoolsconstants.h index b82ecad14e2..11a5f1a1abf 100644 --- a/src/plugins/cpptools/cpptoolsconstants.h +++ b/src/plugins/cpptools/cpptoolsconstants.h @@ -49,6 +49,7 @@ const char CPPTOOLS_SETTINGSGROUP[] = "CppTools"; const char LOWERCASE_CPPFILES_KEY[] = "LowerCaseFiles"; enum { lowerCaseFilesDefault = 1 }; const char CPPTOOLS_SORT_EDITOR_DOCUMENT_OUTLINE[] = "SortedMethodOverview"; +const char CPPTOOLS_SHOW_INFO_BAR_FOR_HEADER_ERRORS[] = "ShowInfoBarForHeaderErrors"; const char CPPTOOLS_MODEL_MANAGER_PCH_USAGE[] = "PCHUsage"; const char CPPTOOLS_SKIP_INDEXING_BIG_FILES[] = "SkipIndexingBigFiles"; const char CPPTOOLS_INDEXER_FILE_SIZE_LIMIT[] = "IndexerFileSizeLimit"; diff --git a/src/plugins/cpptools/cpptoolssettings.cpp b/src/plugins/cpptools/cpptoolssettings.cpp index 0b122520df1..fbfbce7a4dc 100644 --- a/src/plugins/cpptools/cpptoolssettings.cpp +++ b/src/plugins/cpptools/cpptoolssettings.cpp @@ -267,3 +267,21 @@ void CppToolsSettings::setSortedEditorDocumentOutline(bool sorted) ICore::settings()->setValue(sortEditorDocumentOutlineKey(), sorted); emit editorDocumentOutlineSortingChanged(sorted); } + +static QString showHeaderErrorInfoBarKey() +{ + return QLatin1String(CppTools::Constants::CPPTOOLS_SETTINGSGROUP) + + QLatin1Char('/') + + QLatin1String(CppTools::Constants::CPPTOOLS_SHOW_INFO_BAR_FOR_HEADER_ERRORS); +} + +bool CppToolsSettings::showHeaderErrorInfoBar() const +{ + return ICore::settings()->value(showHeaderErrorInfoBarKey(), true).toBool(); +} + +void CppToolsSettings::setShowHeaderErrorInfoBar(bool show) +{ + ICore::settings()->setValue(showHeaderErrorInfoBarKey(), show); + emit showHeaderErrorInfoBarChanged(show); +} diff --git a/src/plugins/cpptools/cpptoolssettings.h b/src/plugins/cpptools/cpptoolssettings.h index e36956be1a2..a118d700042 100644 --- a/src/plugins/cpptools/cpptoolssettings.h +++ b/src/plugins/cpptools/cpptoolssettings.h @@ -63,8 +63,12 @@ public: bool sortedEditorDocumentOutline() const; void setSortedEditorDocumentOutline(bool sorted); + bool showHeaderErrorInfoBar() const; + void setShowHeaderErrorInfoBar(bool show); + signals: void editorDocumentOutlineSortingChanged(bool isSorted); + void showHeaderErrorInfoBarChanged(bool isShown); private: Internal::CppToolsSettingsPrivate *d; diff --git a/src/plugins/texteditor/texteditor.cpp b/src/plugins/texteditor/texteditor.cpp index db9efb356a2..5b1f0f6d7ac 100644 --- a/src/plugins/texteditor/texteditor.cpp +++ b/src/plugins/texteditor/texteditor.cpp @@ -7035,8 +7035,8 @@ QWidget *BaseTextEditor::toolBar() return editorWidget()->d->m_toolBar; } -void TextEditorWidget::insertExtraToolBarWidget(TextEditorWidget::Side side, - QWidget *widget) +QAction * TextEditorWidget::insertExtraToolBarWidget(TextEditorWidget::Side side, + QWidget *widget) { if (widget->sizePolicy().horizontalPolicy() & QSizePolicy::ExpandFlag) { if (d->m_stretchWidget) @@ -7045,9 +7045,9 @@ void TextEditorWidget::insertExtraToolBarWidget(TextEditorWidget::Side side, } if (side == Right) - d->m_toolBar->insertWidget(d->m_cursorPositionLabelAction, widget); + return d->m_toolBar->insertWidget(d->m_cursorPositionLabelAction, widget); else - d->m_toolBar->insertWidget(d->m_toolBar->actions().first(), widget); + return d->m_toolBar->insertWidget(d->m_toolBar->actions().first(), widget); } void TextEditorWidget::keepAutoCompletionHighlight(bool keepHighlight) diff --git a/src/plugins/texteditor/texteditor.h b/src/plugins/texteditor/texteditor.h index 60038d73ed9..2cd60da3806 100644 --- a/src/plugins/texteditor/texteditor.h +++ b/src/plugins/texteditor/texteditor.h @@ -322,7 +322,7 @@ public: bool isMissingSyntaxDefinition() const; enum Side { Left, Right }; - void insertExtraToolBarWidget(Side side, QWidget *widget); + QAction *insertExtraToolBarWidget(Side side, QWidget *widget); // keep the auto completion even if the focus is lost void keepAutoCompletionHighlight(bool keepHighlight); From 389ef1cc99e7233adb01c5dc2a337282ff04d936 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 11 Oct 2016 11:18:38 +0200 Subject: [PATCH 55/72] AutoTest: Polish framework settingspages Change-Id: If39e157c499b7ee9454d61de39ce2b360a109a94 Reviewed-by: David Schulz --- .../autotest/gtest/gtestsettingspage.ui | 162 ++++++------------ .../autotest/qtest/qttestsettingspage.ui | 3 - 2 files changed, 53 insertions(+), 112 deletions(-) diff --git a/src/plugins/autotest/gtest/gtestsettingspage.ui b/src/plugins/autotest/gtest/gtestsettingspage.ui index 4b2f998310f..40c06015dca 100644 --- a/src/plugins/autotest/gtest/gtestsettingspage.ui +++ b/src/plugins/autotest/gtest/gtestsettingspage.ui @@ -6,8 +6,8 @@ 0 0 - 397 - 205 + 449 + 210 @@ -17,57 +17,44 @@ - - - Executes disabled tests when performing a test run. - - - Run disabled tests - - - - - - - Turn failures into debugger breakpoints. - - - Break on failure while debugging - - - true - - - - - - - + + + - Repeats a test run (you might be required to increase the timeout to avoid canceling the tests). + Turn failures into debugger breakpoints. - Repeat tests + Break on failure while debugging + + + true - - - - Qt::Horizontal + + + + Executes disabled tests when performing a test run. - - - 40 - 20 - + + Run disabled tests - + - + + + + Turn assertion failures into C++ exceptions. + + + Throw on failure + + + + - + 0 0 @@ -77,7 +64,27 @@ - + + + + Shuffle tests automatically on every iteration by the given seed. + + + Shuffle tests + + + + + + + Repeats a test run (you might be required to increase the timeout to avoid canceling the tests). + + + Repeat tests + + + + false @@ -90,50 +97,10 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Shuffle tests automatically on every iteration by the given seed. - - - Shuffle tests - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + - + 0 0 @@ -143,7 +110,7 @@ - + false @@ -159,31 +126,8 @@ - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Turn assertion failures into C++ exceptions. - - - Throw on failure - - - diff --git a/src/plugins/autotest/qtest/qttestsettingspage.ui b/src/plugins/autotest/qtest/qttestsettingspage.ui index 6c5db71a30a..c45233e4154 100644 --- a/src/plugins/autotest/qtest/qttestsettingspage.ui +++ b/src/plugins/autotest/qtest/qttestsettingspage.ui @@ -36,9 +36,6 @@ Benchmark Metrics - - true - From c30d659a99ab4cc6db0d6377f9725f35bfcbf4ef Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 12 Oct 2016 14:44:38 +0200 Subject: [PATCH 56/72] Update README.md Add information on how build LLVM on Windows. Change-Id: If67c07a82554ec88edf798951212c036966710ba Reviewed-by: Nikolai Kosjar --- README.md | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 08d253afc8e..f5567748de7 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,9 @@ Prerequisites: * ActiveState Active Perl * MinGW with g++ 4.8 or Visual Studio 2015 or later * jom + + The optional Clang code model requires LLVM. A manual build of it requires in addition: + * cmake * On Mac OS X: latest Xcode * On Linux: g++ 4.8 or later * LLVM 3.8.0 or later (optional, needed for the Clang Code Model) @@ -118,9 +121,32 @@ For detailed information on the supported compilers, see command...` error. If a `sh.exe` is found, the compile process will fail. You have to remove it from the path. - 10. To enable the Clang-based code model: Install Clang (>= version 3.8.0) - and set the environment variable LLVM_INSTALL_DIR to point to the + 10. As of Qt Creator 4.2, a complete build of LLVM and Clang is required + to enable the Clang-based code model (recommmended: 3.9). For 32bit, + a pre-built package can be downloaded from: + https://download.qt.io/development_releases/prebuilt/libclang/. + The environment variable LLVM_INSTALL_DIR needs to be set to point to the installation location. + It is also possible to build Clang manually, roughly following the + instructions at http://llvm.org/docs/GettingStarted.html#git-mirror . + * Clone LLVM + git clone http://llvm.org/git/llvm.git + * Switch to a suitable branch, for example, release_39 + cd llvm + git checkout -b release_39 + * Clone Clang under llvm\tools + cd tools + git clone http://llvm.org/git/clang.git + * Switch Clang to a suitable branch + cd clang + git checkout -b release_39 + * Create a shadow build directory and build + cd ..\..\.. + mkdir build + cd build + cmake -G "NMake Makefiles JOM" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX= -DLLVM_ENABLE_RTTI=ON ..\llvm + jom install + 11. You are now ready to configure and build Qt and Qt Creator. Please see for From 35f6a0b95446a01b6713a62090c871c894761b15 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Fri, 14 Oct 2016 11:26:07 +0200 Subject: [PATCH 57/72] Clang: Fix uninitialized member Change-Id: I31cbce287f1f8d2b0c55be23fde4288ec3472639 Reviewed-by: David Schulz --- src/libs/clangbackendipc/lineprefixer.cpp | 3 +-- src/libs/clangbackendipc/lineprefixer.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/libs/clangbackendipc/lineprefixer.cpp b/src/libs/clangbackendipc/lineprefixer.cpp index 1f307f2bd47..b11f98e7a76 100644 --- a/src/libs/clangbackendipc/lineprefixer.cpp +++ b/src/libs/clangbackendipc/lineprefixer.cpp @@ -28,8 +28,7 @@ namespace ClangBackEnd { LinePrefixer::LinePrefixer(const QByteArray &prefix) - : m_prefix(prefix), - m_previousIsEndingWithNewLine(true) + : m_prefix(prefix) {} void LinePrefixer::setPrefix(const QByteArray &prefix) diff --git a/src/libs/clangbackendipc/lineprefixer.h b/src/libs/clangbackendipc/lineprefixer.h index a710997a8cf..4e2972319c7 100644 --- a/src/libs/clangbackendipc/lineprefixer.h +++ b/src/libs/clangbackendipc/lineprefixer.h @@ -43,7 +43,7 @@ public: private: QByteArray m_prefix; - bool m_previousIsEndingWithNewLine; + bool m_previousIsEndingWithNewLine = true; }; } // namespace ClangBackEnd From d78e87329f9e637de7742cffd167810cc95565cb Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 13 Oct 2016 11:25:31 +0200 Subject: [PATCH 58/72] ProjectExplorer: Filter out unusable kits As side-effect, fix missing expansion of subitems in some cases. Task-number: QTCREATORBUG-17110 Change-Id: Ib0c74e968d6d814f9dadbb37b323c8ac68cda310 Reviewed-by: Robert Loehning Reviewed-by: Tobias Hunger --- src/plugins/projectexplorer/projectwindow.cpp | 16 ++++++++------ src/plugins/projectexplorer/projectwindow.h | 1 + .../projectexplorer/targetsettingspanel.cpp | 22 ++++++++++++++++--- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/src/plugins/projectexplorer/projectwindow.cpp b/src/plugins/projectexplorer/projectwindow.cpp index 14773cf608c..5267b25a52b 100644 --- a/src/plugins/projectexplorer/projectwindow.cpp +++ b/src/plugins/projectexplorer/projectwindow.cpp @@ -234,6 +234,11 @@ public: { Q_UNUSED(column) + if (role == ItemUpdatedFromBelowRole) { + announceChange(); + return true; + } + if (role == ItemDeactivatedFromBelowRole) { announceChange(); return true; @@ -375,16 +380,13 @@ public: this, &SelectorModel::openContextMenu); } - void announceChange() - { - m_changeListener(m_projectsModel.rootItem()->childAt(0)->data(0, PanelWidgetRole).value()); - } - void updatePanel() { - announceChange(); + ProjectItem *projectItem = m_projectsModel.rootItem()->childAt(0); + m_changeListener(projectItem->data(0, PanelWidgetRole).value()); - QModelIndex activeIndex = m_projectsModel.rootItem()->childAt(0)->activeIndex(); + QModelIndex activeIndex = projectItem->activeIndex(); + m_selectorTree->expandAll(); m_selectorTree->selectionModel()->clear(); m_selectorTree->selectionModel()->select(activeIndex, QItemSelectionModel::Select); } diff --git a/src/plugins/projectexplorer/projectwindow.h b/src/plugins/projectexplorer/projectwindow.h index a9918a093be..50a6b8ff9af 100644 --- a/src/plugins/projectexplorer/projectwindow.h +++ b/src/plugins/projectexplorer/projectwindow.h @@ -42,6 +42,7 @@ enum { ItemActivatedFromBelowRole, // A subitem gots activated and gives us the opportunity to adjust ItemActivatedFromAboveRole, // A parent item gots activated and makes us its active child. ItemDeactivatedFromBelowRole, // A subitem got deactivated and gives us the opportunity to adjust + ItemUpdatedFromBelowRole, // A subitem got updated, re-expansion is necessary. ActiveItemRole, // The index of the currently selected item in the tree view PanelWidgetRole // This item's widget to be shown as central widget. }; diff --git a/src/plugins/projectexplorer/targetsettingspanel.cpp b/src/plugins/projectexplorer/targetsettingspanel.cpp index 8e380a37040..0700dbe4a76 100644 --- a/src/plugins/projectexplorer/targetsettingspanel.cpp +++ b/src/plugins/projectexplorer/targetsettingspanel.cpp @@ -212,6 +212,7 @@ public: void handleRemovedKit(Kit *kit); void handleAddedKit(Kit *kit); + void handleUpdatedKit(Kit *kit); void handleTargetAdded(Target *target); void handleTargetRemoved(Target *target); @@ -755,6 +756,8 @@ TargetGroupItemPrivate::TargetGroupItemPrivate(TargetGroupItem *q, Project *proj this, &TargetGroupItemPrivate::handleAddedKit); connect(KitManager::instance(), &KitManager::kitRemoved, this, &TargetGroupItemPrivate::handleRemovedKit); + connect(KitManager::instance(), &KitManager::kitUpdated, + this, &TargetGroupItemPrivate::handleUpdatedKit); rebuildContents(); } @@ -789,7 +792,7 @@ QVariant TargetGroupItem::data(int column, int role) const bool TargetGroupItem::setData(int column, const QVariant &data, int role) { Q_UNUSED(data) - if (role == ItemActivatedFromBelowRole) { + if (role == ItemActivatedFromBelowRole || role == ItemUpdatedFromBelowRole) { // Bubble up to trigger setting the active project. parent()->setData(column, QVariant::fromValue(static_cast(this)), role); return true; @@ -823,9 +826,16 @@ void TargetGroupItemPrivate::handleRemovedKit(Kit *kit) rebuildContents(); } +void TargetGroupItemPrivate::handleUpdatedKit(Kit *kit) +{ + Q_UNUSED(kit); + rebuildContents(); +} + void TargetGroupItemPrivate::handleAddedKit(Kit *kit) { - q->appendChild(new TargetItem(m_project, kit->id())); + if (m_project->supportsKit(kit)) + q->appendChild(new TargetItem(m_project, kit->id())); } void TargetItem::updateSubItems() @@ -843,8 +853,14 @@ void TargetGroupItemPrivate::rebuildContents() { q->removeChildren(); - foreach (Kit *kit, KitManager::sortKits(KitManager::kits())) + KitMatcher matcher([this](const Kit *kit) { return m_project->supportsKit(const_cast(kit)); }); + const QList kits = KitManager::sortKits(KitManager::matchingKits(matcher)); + for (Kit *kit : kits) q->appendChild(new TargetItem(m_project, kit->id())); + + if (q->parent()) + q->parent()->setData(0, QVariant::fromValue(static_cast(q)), + ItemUpdatedFromBelowRole); } void TargetGroupItemPrivate::handleTargetAdded(Target *target) From e4fd1f2e0c22f6ca2354cffce78e5c0138b61e8d Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 14 Oct 2016 15:38:38 +0200 Subject: [PATCH 59/72] fix build of qmldesigner coretests against namespaced qt Change-Id: I6fcd87a4f1a3e59994ca13d559a215b789f02e96 Reviewed-by: Tim Jenssen Reviewed-by: Thomas Hartmann --- tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp index 2031d36aaa6..00bfa7b4a64 100644 --- a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp +++ b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp @@ -86,6 +86,8 @@ using namespace QmlDesigner; # define SHARE_PATH "/share/qtcreator" #endif +QT_BEGIN_NAMESPACE + //Allow comparison of QByteArray and QString. We always assume utf8 as the encoding. namespace QTest { bool qCompare(const QString &string, const QByteArray &array, const char *actual, @@ -103,6 +105,8 @@ namespace QTest { } +QT_END_NAMESPACE + QString resourcePath() { return QDir::cleanPath(QTCREATORDIR + QLatin1String(SHARE_PATH)); From 5da074f95a0a8fcc548a5b0bad4fe50a5fa11e5a Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Fri, 14 Oct 2016 17:18:24 +0200 Subject: [PATCH 60/72] QmlDesigner: Fix ESC issues We do not want to switch to the editor whenever pressing ESCAPE. Using shortcut override does not work for QQuickWidget. Therefore we register our own action and disable it. Change-Id: I399265a5254767d2825edf3fe823dd35177a6ce5 Reviewed-by: Tim Jenssen --- .../HelperWidgets/ExpressionTextField.qml | 2 ++ src/plugins/qmldesigner/shortcutmanager.cpp | 5 +++++ src/plugins/qmldesigner/shortcutmanager.h | 1 + 3 files changed, 8 insertions(+) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ExpressionTextField.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ExpressionTextField.qml index 3bcced8bc65..0bbb1cbc48d 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ExpressionTextField.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/ExpressionTextField.qml @@ -133,6 +133,8 @@ Controls.TextField { event.accepted = true if (textField.completionActive) { listView.model = null + } else { + textField.rejected() } } diff --git a/src/plugins/qmldesigner/shortcutmanager.cpp b/src/plugins/qmldesigner/shortcutmanager.cpp index d06f32c1181..417eeb34806 100644 --- a/src/plugins/qmldesigner/shortcutmanager.cpp +++ b/src/plugins/qmldesigner/shortcutmanager.cpp @@ -218,6 +218,11 @@ void ShortCutManager::registerActions(const Core::Context &qmlDesignerMainContex command->setAttribute(Core::Command::CA_Hide); viewsMenu->addAction(command); + /* Registering disabled action for Escape, because Qt Quick does not support shortcut overrides. */ + command = Core::ActionManager::registerAction(&m_escapeAction, Core::Constants::S_RETURNTOEDITOR, qmlDesignerMainContext); + command->setDefaultKeySequence(QKeySequence(Qt::Key_Escape)); + m_escapeAction.setEnabled(false); + Core::ActionManager::registerAction(&m_hideSidebarsAction, Core::Constants::TOGGLE_SIDEBAR, qmlDesignerMainContext); } diff --git a/src/plugins/qmldesigner/shortcutmanager.h b/src/plugins/qmldesigner/shortcutmanager.h index 226babb9875..310b08d69c7 100644 --- a/src/plugins/qmldesigner/shortcutmanager.h +++ b/src/plugins/qmldesigner/shortcutmanager.h @@ -91,6 +91,7 @@ private: QAction m_toggleLeftSidebarAction; QAction m_toggleRightSidebarAction; QAction m_goIntoComponentAction; + QAction m_escapeAction; }; } // namespace QmlDesigner From a1155883bda03c883842cf1df732c74b8035fe17 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 14 Oct 2016 20:24:14 +0200 Subject: [PATCH 61/72] Update qbs submodule To HEAD of 1.6 branch. Change-Id: I36b6804100a41e52a8f1ec20e987ffeed6721245 Reviewed-by: Jake Petroules --- src/shared/qbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/qbs b/src/shared/qbs index ed69ed958d6..704eb30d271 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit ed69ed958d6ca25cb97dc81b21322f8ab398b7df +Subproject commit 704eb30d27117d88e3edbe5d255ea5b8989509f3 From fc641923124c111b8966d6d19b9d92a85207586f Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sun, 16 Oct 2016 00:48:52 +0300 Subject: [PATCH 62/72] QmlDesigner: Fix compilation with Qt 5.6 Broke by 5da074f95a0a8fcc548a5b0bad4fe50a5fa11e5a. Change-Id: Icd0400e7b19a564ba2777e1cceadd4994eb867f8 Reviewed-by: Christian Stenger Reviewed-by: Thomas Hartmann --- src/plugins/qmldesigner/shortcutmanager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/shortcutmanager.cpp b/src/plugins/qmldesigner/shortcutmanager.cpp index 417eeb34806..0dde203732b 100644 --- a/src/plugins/qmldesigner/shortcutmanager.cpp +++ b/src/plugins/qmldesigner/shortcutmanager.cpp @@ -69,7 +69,8 @@ ShortCutManager::ShortCutManager() m_restoreDefaultViewAction(tr("&Restore Default View"), 0), m_toggleLeftSidebarAction(tr("Toggle &Left Sidebar"), 0), m_toggleRightSidebarAction(tr("Toggle &Right Sidebar"), 0), - m_goIntoComponentAction (tr("&Go into Component"), 0) + m_goIntoComponentAction(tr("&Go into Component"), 0), + m_escapeAction(this) { } From 19dcb9ed967b5103f74561140e7b124d6b68eac8 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 17 Oct 2016 10:24:55 +0200 Subject: [PATCH 63/72] Doc: Describe profile build configuration Change-Id: I1e4ef880423c16346f338fa41ff5b14708aced82 Task-number: QTCREATORBUG-17123 Reviewed-by: Eike Ziller --- doc/src/projects/creator-projects-settings-build.qdoc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/src/projects/creator-projects-settings-build.qdoc b/doc/src/projects/creator-projects-settings-build.qdoc index db5420621ec..ca38fa89d54 100644 --- a/doc/src/projects/creator-projects-settings-build.qdoc +++ b/doc/src/projects/creator-projects-settings-build.qdoc @@ -38,12 +38,14 @@ \title Specifying Build Settings Different build configurations allow you to quickly switch between - different build settings. By default, \QC creates \b debug - and \b release build configurations. A debug build contains additional + different build settings. By default, \QC creates \e debug, \e release, and + \e profile build configurations. A debug build contains additional debug symbols that you need for debugging the application but that you can leave out from the release version. Generally, you use the debug configuration for testing and the release configuration for creating - the final installation file. + the final installation file. A profile configuration is an optimized release + build that is delivered with separate debug information. It is best suited + for analyzing applications. You specify build settings in the \uicontrol Projects mode. To add a new build configuration, click \uicontrol Add and select the type of From 57e0bb7d844ba17d57f5c32e102d57ce3e60d4de Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Fri, 14 Oct 2016 10:46:49 +0200 Subject: [PATCH 64/72] QmlDesigner: Adding ExtendedFunction button to UrlChooser This allows to edit/set bindings on urls for e.g. images. Instead of the hack before we now use padding in the style to reserve space for button. Task-number: QTCREATORBUG-13328 Change-Id: I94bad70618440a2ed835629e561a394d76990883 Reviewed-by: Tim Jenssen --- .../HelperWidgets/CustomComboBoxStyle.qml | 20 +++++++++---------- .../HelperWidgets/UrlChooser.qml | 7 +++++++ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomComboBoxStyle.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomComboBoxStyle.qml index 97d10c2c789..c335153de22 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomComboBoxStyle.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/CustomComboBoxStyle.qml @@ -33,6 +33,8 @@ ComboBoxStyle { } + padding.left: 20 + background: Item { implicitWidth: 120 implicitHeight: 24 @@ -65,17 +67,13 @@ ComboBoxStyle { } } - label: Item { - implicitWidth: textitem.implicitWidth + 20 - Text { - id: textitem - anchors.left: parent.left - anchors.leftMargin: 14 - anchors.verticalCenter: parent.verticalCenter - text: control.currentText - renderType: Text.NativeRendering - color: control.textColor - } + label: Text { + id: textitem + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter + text: control.currentText + renderType: Text.NativeRendering + color: control.textColor } __dropDownStyle: MenuStyle { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/UrlChooser.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/UrlChooser.qml index 74320b4dbbc..c0e10a1ee4c 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/UrlChooser.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/UrlChooser.qml @@ -52,6 +52,13 @@ RowLayout { Controls.ComboBox { id: comboBox + ExtendedFunctionButton { + x: 2 + anchors.verticalCenter: parent.verticalCenter + backendValue: urlChooser.backendValue + visible: comboBox.enabled + } + property bool isComplete: false function setCurrentText(text) { From 8af2c1834188bda0472867c75a43d138634d944c Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Fri, 14 Oct 2016 10:55:07 +0200 Subject: [PATCH 65/72] QmlDesigner.PropertyEditor: Fix color logic for LineEdit Explicit changes should be highlighted in blue. Change-Id: I221016e5cd70643ae68faf7ebd0d6e0b1616a41c Reviewed-by: Tim Jenssen --- .../propertyEditorQmlSources/HelperWidgets/LineEdit.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml index afabd39276e..a9d45c9ee83 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/LineEdit.qml @@ -108,7 +108,7 @@ Controls.TextField { selectionColor: creatorTheme.PanelTextColorLight selectedTextColor: creatorTheme.PanelTextColorMid - textColor: creatorTheme.PanelTextColorLight + textColor: lineEdit.textColor placeholderTextColor: creatorTheme.PanelTextColorMid padding.top: 3 From 669a77bac497aae5ef44d282ea2a8122cdbcad23 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Fri, 14 Oct 2016 14:36:08 +0200 Subject: [PATCH 66/72] QmlDesigner.PropertyEditor: Fixing font issues fully qualify properties to avoid ambiguities Task-number: QTCREATORBUG-16403 Change-Id: I0f0f7a7dbf28f51aa82bf3e2fd2652189c460102 Reviewed-by: Tim Jenssen --- .../propertyEditorQmlSources/HelperWidgets/FontComboBox.qml | 4 ++-- .../propertyEditorQmlSources/HelperWidgets/FontSection.qml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontComboBox.qml index dafd287dd85..ffc774d7cd0 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontComboBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontComboBox.qml @@ -40,7 +40,7 @@ Controls.ComboBox { model: ["Arial", "Times New Roman", "Courier", "Verdana", "Tahoma"] onModelChanged: { - editText = backendValue.valueToString + editText = comboBox.backendValue.valueToString } style: CustomComboBoxStyle { @@ -50,7 +50,7 @@ Controls.ComboBox { ColorLogic { id: colorLogic backendValue: comboBox.backendValue - property string textValue: backendValue.value + property string textValue: comboBox.backendValue.valueToString onTextValueChanged: { comboBox.editText = textValue } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontSection.qml index 5b718338379..f823a58ba8e 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/HelperWidgets/FontSection.qml @@ -60,7 +60,7 @@ Section { text: qsTr("Font") } FontComboBox { - backendValue: fontFamily + backendValue: fontSection.fontFamily Layout.fillWidth: true } From 91090f8871c72e70a060134b2cf58875655e6cf8 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 13 Oct 2016 12:09:54 +0200 Subject: [PATCH 67/72] ProjectExplorer: Add an "Active Project" label to Project window Change-Id: I9036d25f9cde0849c8a2fed5b2c3ce97f1315f55 Reviewed-by: Tobias Hunger Reviewed-by: Eike Ziller Reviewed-by: Leena Miettinen --- src/plugins/projectexplorer/projectwindow.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugins/projectexplorer/projectwindow.cpp b/src/plugins/projectexplorer/projectwindow.cpp index 5267b25a52b..1b34faf9f6e 100644 --- a/src/plugins/projectexplorer/projectwindow.cpp +++ b/src/plugins/projectexplorer/projectwindow.cpp @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -483,9 +484,16 @@ ProjectWindow::ProjectWindow() selectorView->setWindowTitle(tr("Project Selector")); selectorView->setAutoFillBackground(true); + auto activeLabel = new QLabel(tr("Active Project")); + QFont font = activeLabel->font(); + font.setBold(true); + font.setPointSizeF(font.pointSizeF() * 1.2); + activeLabel->setFont(font); + auto innerLayout = new QVBoxLayout; innerLayout->setSpacing(10); innerLayout->setContentsMargins(14, innerLayout->spacing(), 14, 0); + innerLayout->addWidget(activeLabel); innerLayout->addWidget(selectorModel->m_projectSelection); innerLayout->addWidget(selectorModel->m_selectorTree); From 3394cc7bfe22d323c3af15d2c31a536f5fda8c12 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Mon, 17 Oct 2016 12:52:07 +0200 Subject: [PATCH 68/72] ClangStaticAnalyzer: Remove new line character from define value Change-Id: I3949ba372c490d39b4277825f5194a8d36ee26d2 Reviewed-by: Christian Kandeler --- .../clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp index 54863f04f7a..7d4fc329455 100644 --- a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp +++ b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp @@ -182,7 +182,7 @@ public: const Core::Id type = projectPart.toolchainType; if (type == ProjectExplorer::Constants::MINGW_TOOLCHAIN_TYPEID || type == ProjectExplorer::Constants::GCC_TOOLCHAIN_TYPEID) - optionsBuilder.addDefine("#define _X86INTRIN_H_INCLUDED\n"); + optionsBuilder.addDefine("#define _X86INTRIN_H_INCLUDED"); if (type != ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID) optionsBuilder.addDefines(projectPart.toolchainDefines); From f31735142c93be7c0a17df6c9c080faee01915d0 Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Mon, 17 Oct 2016 13:14:07 +0200 Subject: [PATCH 69/72] CppTools: Exclude compiler option from conversion to native path ...otherwise e.g. MSVC's "/I" option will be converted to "\I". Change-Id: Ia01519ee5c942d0f3cdd32c4302055d0e58fb865 Reviewed-by: Christian Kandeler --- src/plugins/cpptools/compileroptionsbuilder.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/cpptools/compileroptionsbuilder.cpp b/src/plugins/cpptools/compileroptionsbuilder.cpp index c529e96b45d..ff96c13c4ca 100644 --- a/src/plugins/cpptools/compileroptionsbuilder.cpp +++ b/src/plugins/cpptools/compileroptionsbuilder.cpp @@ -127,10 +127,11 @@ void CompilerOptionsBuilder::addHeaderPathOptions(bool addAsNativePath) break; } - QString path = prefix + headerPath.path; - path = addAsNativePath ? QDir::toNativeSeparators(path) : path; + const QString path = addAsNativePath + ? QDir::toNativeSeparators(headerPath.path) + : headerPath.path; - result.append(path); + result.append(prefix + path); } m_options.append(result); From f4994a5f76fead64cb098cee4e5c9b75fa16242c Mon Sep 17 00:00:00 2001 From: Nikolai Kosjar Date: Mon, 17 Oct 2016 13:20:29 +0200 Subject: [PATCH 70/72] CppTools: Always pass in header paths as native paths Change-Id: I473c737107c14a4bc2c78b7c697eef02eb4bacff Reviewed-by: Christian Kandeler --- src/plugins/clangcodemodel/clangutils.cpp | 2 +- .../clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp | 2 +- src/plugins/cpptools/compileroptionsbuilder.cpp | 8 ++------ src/plugins/cpptools/compileroptionsbuilder.h | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/plugins/clangcodemodel/clangutils.cpp b/src/plugins/clangcodemodel/clangutils.cpp index c18f1900ba3..ae1e74020e6 100644 --- a/src/plugins/clangcodemodel/clangutils.cpp +++ b/src/plugins/clangcodemodel/clangutils.cpp @@ -99,7 +99,7 @@ public: optionsBuilder.addPredefinedMacrosAndHeaderPathsOptions(); optionsBuilder.addWrappedQtHeadersIncludePath(); - optionsBuilder.addHeaderPathOptions(/*addAsNativePath*/ true); + optionsBuilder.addHeaderPathOptions(); optionsBuilder.addProjectConfigFileInclude(); optionsBuilder.addMsvcCompatibilityVersion(); diff --git a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp index 7d4fc329455..75f4f025736 100644 --- a/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp +++ b/src/plugins/clangstaticanalyzer/clangstaticanalyzerruncontrol.cpp @@ -189,7 +189,7 @@ public: optionsBuilder.addDefines(projectPart.projectDefines); optionsBuilder.undefineClangVersionMacrosForMsvc(); optionsBuilder.undefineCppLanguageFeatureMacrosForMsvc2015(); - optionsBuilder.addHeaderPathOptions(true); + optionsBuilder.addHeaderPathOptions(); optionsBuilder.addMsvcCompatibilityVersion(); if (type != ProjectExplorer::Constants::MSVC_TOOLCHAIN_TYPEID) diff --git a/src/plugins/cpptools/compileroptionsbuilder.cpp b/src/plugins/cpptools/compileroptionsbuilder.cpp index ff96c13c4ca..c7c16744545 100644 --- a/src/plugins/cpptools/compileroptionsbuilder.cpp +++ b/src/plugins/cpptools/compileroptionsbuilder.cpp @@ -101,7 +101,7 @@ void CompilerOptionsBuilder::enableExceptions() add(QLatin1String("-fexceptions")); } -void CompilerOptionsBuilder::addHeaderPathOptions(bool addAsNativePath) +void CompilerOptionsBuilder::addHeaderPathOptions() { typedef ProjectPartHeaderPath HeaderPath; const QString defaultPrefix = includeOption(); @@ -127,11 +127,7 @@ void CompilerOptionsBuilder::addHeaderPathOptions(bool addAsNativePath) break; } - const QString path = addAsNativePath - ? QDir::toNativeSeparators(headerPath.path) - : headerPath.path; - - result.append(prefix + path); + result.append(prefix + QDir::toNativeSeparators(headerPath.path)); } m_options.append(result); diff --git a/src/plugins/cpptools/compileroptionsbuilder.h b/src/plugins/cpptools/compileroptionsbuilder.h index 739db8b5f67..cb116719ad1 100644 --- a/src/plugins/cpptools/compileroptionsbuilder.h +++ b/src/plugins/cpptools/compileroptionsbuilder.h @@ -46,7 +46,7 @@ public: // Add options based on project part virtual void addTargetTriple(); virtual void enableExceptions(); - void addHeaderPathOptions(bool addAsNativePath = false); + void addHeaderPathOptions(); void addToolchainAndProjectDefines(); void addDefines(const QByteArray &defineDirectives); virtual void addLanguageOption(ProjectFile::Kind fileKind); From 2b0daf42ce2c6ccb40d66c29eea18be7cf4d769c Mon Sep 17 00:00:00 2001 From: Vikas Pachdha Date: Mon, 26 Sep 2016 12:40:09 +0200 Subject: [PATCH 71/72] iOS: Replaces ios_sim tool with simctl Task-number: QTCREATORBUG-16947 Change-Id: Ia28d5e4f9f220d566bd64da73989e8c24ef3eb37 Reviewed-by: Eike Ziller --- src/plugins/ios/ios.pro | 6 +- src/plugins/ios/ios.qbs | 4 +- src/plugins/ios/iosconfigurations.cpp | 3 +- src/plugins/ios/iosdebugsupport.cpp | 2 + src/plugins/ios/iosdeploystep.cpp | 21 +- src/plugins/ios/iosdeploystep.h | 1 + src/plugins/ios/iosrunconfiguration.cpp | 5 +- src/plugins/ios/iosrunner.cpp | 6 + src/plugins/ios/iosrunner.h | 4 + src/plugins/ios/iossimulator.cpp | 45 --- src/plugins/ios/iossimulator.h | 6 - src/plugins/ios/iostoolhandler.cpp | 434 +++++++++++++++--------- src/plugins/ios/iostoolhandler.h | 10 +- src/plugins/ios/simulatorcontrol.cpp | 422 +++++++++++++++++++++++ src/plugins/ios/simulatorcontrol.h | 64 ++++ 15 files changed, 793 insertions(+), 240 deletions(-) create mode 100644 src/plugins/ios/simulatorcontrol.cpp create mode 100644 src/plugins/ios/simulatorcontrol.h diff --git a/src/plugins/ios/ios.pro b/src/plugins/ios/ios.pro index b991353a243..f54bde30e81 100644 --- a/src/plugins/ios/ios.pro +++ b/src/plugins/ios/ios.pro @@ -33,7 +33,8 @@ HEADERS += \ iosdeploystep.h \ iosdeploystepfactory.h \ iosdeploystepwidget.h \ - iosanalyzesupport.h + iosanalyzesupport.h \ + simulatorcontrol.h SOURCES += \ @@ -61,7 +62,8 @@ SOURCES += \ iosdeploystep.cpp \ iosdeploystepfactory.cpp \ iosdeploystepwidget.cpp \ - iosanalyzesupport.cpp + iosanalyzesupport.cpp \ + simulatorcontrol.cpp FORMS += \ iossettingswidget.ui \ diff --git a/src/plugins/ios/ios.qbs b/src/plugins/ios/ios.qbs index e38618c7a4f..080d0145401 100644 --- a/src/plugins/ios/ios.qbs +++ b/src/plugins/ios/ios.qbs @@ -69,6 +69,8 @@ QtcPlugin { "iossimulatorfactory.cpp", "iossimulatorfactory.h", "iostoolhandler.cpp", - "iostoolhandler.h" + "iostoolhandler.h", + "simulatorcontrol.cpp", + "simulatorcontrol.h" ] } diff --git a/src/plugins/ios/iosconfigurations.cpp b/src/plugins/ios/iosconfigurations.cpp index e1748b93715..f9cd910c36c 100644 --- a/src/plugins/ios/iosconfigurations.cpp +++ b/src/plugins/ios/iosconfigurations.cpp @@ -27,6 +27,7 @@ #include "iosconstants.h" #include "iosdevice.h" #include "iossimulator.h" +#include "simulatorcontrol.h" #include "iosprobe.h" #include @@ -333,7 +334,7 @@ void IosConfigurations::updateSimulators() dev = IDevice::ConstPtr(new IosSimulator(devId)); devManager->addDevice(dev); } - IosSimulator::updateAvailableDevices(); + SimulatorControl::updateAvailableSimulators(); } void IosConfigurations::setDeveloperPath(const FileName &devPath) diff --git a/src/plugins/ios/iosdebugsupport.cpp b/src/plugins/ios/iosdebugsupport.cpp index b715ab0b29b..754061d0153 100644 --- a/src/plugins/ios/iosdebugsupport.cpp +++ b/src/plugins/ios/iosdebugsupport.cpp @@ -169,6 +169,8 @@ IosDebugSupport::IosDebugSupport(IosRunConfiguration *runConfig, m_runner, &IosRunner::start); connect(m_runControl, &RunControl::finished, m_runner, &IosRunner::stop); + connect(m_runControl, &DebuggerRunControl::stateChanged, + m_runner, &IosRunner::debuggerStateChanged); connect(m_runner, &IosRunner::gotServerPorts, this, &IosDebugSupport::handleServerPorts); diff --git a/src/plugins/ios/iosdeploystep.cpp b/src/plugins/ios/iosdeploystep.cpp index 0cefa4179c6..420b7bf9aec 100644 --- a/src/plugins/ios/iosdeploystep.cpp +++ b/src/plugins/ios/iosdeploystep.cpp @@ -101,7 +101,12 @@ bool IosDeployStep::init(QList &earlierSteps) this->target()->activeRunConfiguration()); QTC_ASSERT(runConfig, return false); m_bundlePath = runConfig->bundleDirectory().toString(); - if (m_device.isNull()) { + + if (iosdevice()) { + m_deviceType = IosDeviceType(IosDeviceType::IosDevice, deviceId()); + } else if (iossimulator()) { + m_deviceType = runConfig->deviceType(); + } else { emit addOutput(tr("Error: no device available, deploy failed."), BuildStep::ErrorMessageOutput); return false; @@ -113,17 +118,15 @@ void IosDeployStep::run(QFutureInterface &fi) { m_futureInterface = fi; QTC_CHECK(m_transferStatus == NoTransfer); - if (iosdevice().isNull()) { - if (iossimulator().isNull()) - TaskHub::addTask(Task::Error, tr("Deployment failed. No iOS device found."), - ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT); + if (device().isNull()) { + TaskHub::addTask(Task::Error, tr("Deployment failed. No iOS device found."), + ProjectExplorer::Constants::TASK_CATEGORY_DEPLOYMENT); reportRunResult(m_futureInterface, !iossimulator().isNull()); cleanup(); return; } + m_toolHandler = new IosToolHandler(m_deviceType, this); m_transferStatus = TransferInProgress; - QTC_CHECK(m_toolHandler == 0); - m_toolHandler = new IosToolHandler(IosDeviceType(IosDeviceType::IosDevice), this); m_futureInterface.setProgressRange(0, 200); m_futureInterface.setProgressValueAndText(0, QLatin1String("Transferring application")); m_futureInterface.reportStarted(); @@ -136,7 +139,7 @@ void IosDeployStep::run(QFutureInterface &fi) connect(m_toolHandler, &IosToolHandler::errorMsg, this, &IosDeployStep::handleErrorMsg); checkProvisioningProfile(); - m_toolHandler->requestTransferApp(appBundle(), deviceId()); + m_toolHandler->requestTransferApp(appBundle(), m_deviceType.identifier); } void IosDeployStep::cancel() @@ -150,7 +153,7 @@ void IosDeployStep::cleanup() QTC_CHECK(m_transferStatus != TransferInProgress); m_transferStatus = NoTransfer; m_device.clear(); - m_toolHandler = 0; + m_toolHandler = nullptr; m_expectFail = false; } diff --git a/src/plugins/ios/iosdeploystep.h b/src/plugins/ios/iosdeploystep.h index fba0993a429..2dc7916deab 100644 --- a/src/plugins/ios/iosdeploystep.h +++ b/src/plugins/ios/iosdeploystep.h @@ -101,6 +101,7 @@ private: QFutureInterface m_futureInterface; ProjectExplorer::IDevice::ConstPtr m_device; QString m_bundlePath; + IosDeviceType m_deviceType; static const Core::Id Id; bool m_expectFail; }; diff --git a/src/plugins/ios/iosrunconfiguration.cpp b/src/plugins/ios/iosrunconfiguration.cpp index 66f4826e0c9..01fb0d92cc8 100644 --- a/src/plugins/ios/iosrunconfiguration.cpp +++ b/src/plugins/ios/iosrunconfiguration.cpp @@ -27,6 +27,7 @@ #include "iosconstants.h" #include "iosmanager.h" #include "iosdeploystep.h" +#include "simulatorcontrol.h" #include #include @@ -346,7 +347,7 @@ IosDeviceType IosRunConfiguration::deviceType() const { QList availableSimulators; if (m_deviceType.type == IosDeviceType::SimulatedDevice) - availableSimulators = IosSimulator::availableDevices(); + availableSimulators = SimulatorControl::availableSimulators(); if (!availableSimulators.isEmpty()) { QList elegibleDevices; QString devname = m_deviceType.identifier.split(QLatin1Char(',')).value(0); @@ -417,7 +418,7 @@ void IosRunConfigurationWidget::updateValues() m_deviceTypeLabel->setVisible(showDeviceSelector); m_deviceTypeComboBox->setVisible(showDeviceSelector); if (showDeviceSelector && m_deviceTypeModel.rowCount() == 0) { - foreach (const IosDeviceType &dType, IosSimulator::availableDevices()) { + foreach (const IosDeviceType &dType, SimulatorControl::availableSimulators()) { QStandardItem *item = new QStandardItem(dType.displayName); QVariant v; v.setValue(dType); diff --git a/src/plugins/ios/iosrunner.cpp b/src/plugins/ios/iosrunner.cpp index 59a2e1bec77..20fbd794be9 100644 --- a/src/plugins/ios/iosrunner.cpp +++ b/src/plugins/ios/iosrunner.cpp @@ -168,6 +168,12 @@ void IosRunner::stop() } } +void IosRunner::debuggerStateChanged(Debugger::DebuggerState state) +{ + if (m_toolHandler) + m_toolHandler->debuggerStateChanged(state); +} + void IosRunner::handleDidStartApp(IosToolHandler *handler, const QString &bundlePath, const QString &deviceId, IosToolHandler::OpStatus status) { diff --git a/src/plugins/ios/iosrunner.h b/src/plugins/ios/iosrunner.h index 78f28146a24..d798b521eb2 100644 --- a/src/plugins/ios/iosrunner.h +++ b/src/plugins/ios/iosrunner.h @@ -29,6 +29,7 @@ #include "iostoolhandler.h" #include "iossimulator.h" +#include #include #include @@ -64,6 +65,9 @@ public: void start(); void stop(); +public slots: + void debuggerStateChanged(Debugger::DebuggerState state); + signals: void didStartApp(Ios::IosToolHandler::OpStatus status); void gotServerPorts(Utils::Port gdbPort, Utils::Port qmlPort); diff --git a/src/plugins/ios/iossimulator.cpp b/src/plugins/ios/iossimulator.cpp index a5c0bf39658..07743dbe049 100644 --- a/src/plugins/ios/iossimulator.cpp +++ b/src/plugins/ios/iossimulator.cpp @@ -44,9 +44,6 @@ static const QLatin1String iosDeviceTypeDisplayNameKey = QLatin1String("displayN static const QLatin1String iosDeviceTypeTypeKey = QLatin1String("type"); static const QLatin1String iosDeviceTypeIdentifierKey = QLatin1String("identifier"); -QMutex IosSimulator::_mutex; -QList IosSimulator::_availableDevices; - IosSimulator::IosSimulator(Core::Id id) : IDevice(Core::Id(Constants::IOS_SIMULATOR_TYPE), IDevice::AutoDetected, @@ -119,48 +116,6 @@ IDevice::Ptr IosSimulator::clone() const return IDevice::Ptr(new IosSimulator(*this)); } -QList IosSimulator::availableDevices() -{ - QMutexLocker l(&_mutex); - return _availableDevices; -} - -void IosSimulator::setAvailableDevices(QList value) -{ - QMutexLocker l(&_mutex); - _availableDevices = value; -} - -namespace { -void handleDeviceInfo(Ios::IosToolHandler *handler, const QString &deviceId, - const Ios::IosToolHandler::Dict &info) -{ - Q_UNUSED(deviceId); - QList res; - QMapIterator i(info); - while (i.hasNext()) { - i.next(); - IosDeviceType simulatorType(IosDeviceType::SimulatedDevice); - simulatorType.displayName = i.value(); - simulatorType.identifier = i.key(); - QStringList ids = i.key().split(QLatin1Char(',')); - if (ids.length() > 1) - simulatorType.displayName += QLatin1String(", iOS ") + ids.last().trimmed(); - res.append(simulatorType); - } - handler->deleteLater(); - std::stable_sort(res.begin(), res.end()); - IosSimulator::setAvailableDevices(res); -} -} - -void IosSimulator::updateAvailableDevices() -{ - IosToolHandler *toolHandler = new IosToolHandler(IosDeviceType(IosDeviceType::SimulatedDevice)); - QObject::connect(toolHandler, &IosToolHandler::deviceInfo, &handleDeviceInfo); - toolHandler->requestDeviceInfo(QString()); -} - void IosSimulator::fromMap(const QVariantMap &map) { IDevice::fromMap(map); diff --git a/src/plugins/ios/iossimulator.h b/src/plugins/ios/iossimulator.h index df02e6807a1..b661821a3d0 100644 --- a/src/plugins/ios/iossimulator.h +++ b/src/plugins/ios/iossimulator.h @@ -67,10 +67,6 @@ public: typedef QSharedPointer Ptr; ProjectExplorer::IDevice::DeviceInfo deviceInformation() const override; - static QList availableDevices(); - static void setAvailableDevices(QList value); - static void updateAvailableDevices(); - QString displayType() const override; ProjectExplorer::IDeviceWidget *createWidget() override; QList actionIds() const override; @@ -91,8 +87,6 @@ protected: IosSimulator(const IosSimulator &other); private: mutable quint16 m_lastPort; - static QMutex _mutex; - static QList _availableDevices; }; namespace IosKitInformation { diff --git a/src/plugins/ios/iostoolhandler.cpp b/src/plugins/ios/iostoolhandler.cpp index 35d3d3b2ed9..c5da66c3598 100644 --- a/src/plugins/ios/iostoolhandler.cpp +++ b/src/plugins/ios/iostoolhandler.cpp @@ -27,13 +27,18 @@ #include "iosconfigurations.h" #include "iosconstants.h" #include "iossimulator.h" +#include "simulatorcontrol.h" +#include "debugger/debuggerconstants.h" #include #include #include #include #include +#include +#include +#include #include #include #include @@ -52,6 +57,8 @@ namespace Ios { namespace Internal { +using namespace std::placeholders; + struct ParserState { enum Kind { Msg, @@ -132,7 +139,8 @@ public: virtual void requestDeviceInfo(const QString &deviceId, int timeout = 1000) = 0; bool isRunning(); void start(const QString &exe, const QStringList &args); - void stop(int errorCode); + virtual void stop(int errorCode) = 0; + virtual void debuggerStateChanged(Debugger::DebuggerState state) { Q_UNUSED(state); } // signals void isTransferringApp(const QString &bundlePath, const QString &deviceId, int progress, @@ -148,15 +156,12 @@ public: void appOutput(const QString &output); void errorMsg(const QString &msg); void toolExited(int code); - // slots - void subprocessError(QProcess::ProcessError error); - void subprocessFinished(int exitCode, QProcess::ExitStatus exitStatus); - void subprocessHasData(); - void killProcess(); - virtual bool expectsFileDescriptor() = 0; -protected: - void processXml(); +protected: + void killProcess(); + + +protected: IosToolHandler *q; QProcess *process; QTimer killTimer; @@ -176,34 +181,56 @@ class IosDeviceToolHandlerPrivate : public IosToolHandlerPrivate { public: explicit IosDeviceToolHandlerPrivate(const IosDeviceType &devType, IosToolHandler *q); - virtual void requestTransferApp(const QString &bundlePath, const QString &deviceId, - int timeout = 1000); - virtual void requestRunApp(const QString &bundlePath, const QStringList &extraArgs, - IosToolHandler::RunKind runKind, - const QString &deviceId, int timeout = 1000); - virtual void requestDeviceInfo(const QString &deviceId, int timeout = 1000); - virtual bool expectsFileDescriptor(); + +// IosToolHandlerPrivate overrides +public: + void requestTransferApp(const QString &bundlePath, const QString &deviceId, + int timeout = 1000) override; + void requestRunApp(const QString &bundlePath, const QStringList &extraArgs, + IosToolHandler::RunKind runKind, + const QString &deviceId, int timeout = 1000) override; + void requestDeviceInfo(const QString &deviceId, int timeout = 1000) override; + void stop(int errorCode) override; + +private: + void subprocessError(QProcess::ProcessError error); + void subprocessFinished(int exitCode, QProcess::ExitStatus exitStatus); + void subprocessHasData(); + void processXml(); }; class IosSimulatorToolHandlerPrivate : public IosToolHandlerPrivate { public: explicit IosSimulatorToolHandlerPrivate(const IosDeviceType &devType, IosToolHandler *q); - virtual void requestTransferApp(const QString &bundlePath, const QString &deviceId, - int timeout = 1000); - virtual void requestRunApp(const QString &bundlePath, const QStringList &extraArgs, - IosToolHandler::RunKind runKind, - const QString &deviceId, int timeout = 1000); - virtual void requestDeviceInfo(const QString &deviceId, int timeout = 1000); - virtual bool expectsFileDescriptor(); + +// IosToolHandlerPrivate overrides +public: + void requestTransferApp(const QString &bundlePath, const QString &deviceIdentifier, + int timeout = 1000) override; + void requestRunApp(const QString &bundlePath, const QStringList &extraArgs, + IosToolHandler::RunKind runKind, + const QString &deviceIdentifier, int timeout = 1000) override; + void requestDeviceInfo(const QString &deviceId, int timeout = 1000) override; + void stop(int errorCode) override; + void debuggerStateChanged(Debugger::DebuggerState state) override; + private: - void addDeviceArguments(QStringList &args) const; + void simAppProcessError(QProcess::ProcessError error); + void simAppProcessFinished(int exitCode, QProcess::ExitStatus exitStatus); + void simAppProcessHasData(); + void simAppProcessHasErrorOutput(); + void launchAppOnSimulator(); + +private: + qint64 appPId = -1; + bool appLaunched = false; }; IosToolHandlerPrivate::IosToolHandlerPrivate(const IosDeviceType &devType, Ios::IosToolHandler *q) : q(q), - process(new QProcess), + process(nullptr), state(NonStarted), devType(devType), iBegin(0), @@ -211,36 +238,6 @@ IosToolHandlerPrivate::IosToolHandlerPrivate(const IosDeviceType &devType, gdbSocket(-1) { killTimer.setSingleShot(true); - QProcessEnvironment env(QProcessEnvironment::systemEnvironment()); - foreach (const QString &k, env.keys()) - if (k.startsWith(QLatin1String("DYLD_"))) - env.remove(k); - QStringList frameworkPaths; - Utils::FileName xcPath = IosConfigurations::developerPath(); - QString privateFPath = xcPath.appendPath(QLatin1String("Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks")).toFileInfo().canonicalFilePath(); - if (!privateFPath.isEmpty()) - frameworkPaths << privateFPath; - QString otherFPath = xcPath.appendPath(QLatin1String("../OtherFrameworks")).toFileInfo().canonicalFilePath(); - if (!otherFPath.isEmpty()) - frameworkPaths << otherFPath; - QString sharedFPath = xcPath.appendPath(QLatin1String("../SharedFrameworks")).toFileInfo().canonicalFilePath(); - if (!sharedFPath.isEmpty()) - frameworkPaths << sharedFPath; - frameworkPaths << QLatin1String("/System/Library/Frameworks") - << QLatin1String("/System/Library/PrivateFrameworks"); - env.insert(QLatin1String("DYLD_FALLBACK_FRAMEWORK_PATH"), frameworkPaths.join(QLatin1Char(':'))); - qCDebug(toolHandlerLog) << "IosToolHandler runEnv:" << env.toStringList(); - process->setProcessEnvironment(env); - QObject::connect(process, &QProcess::readyReadStandardOutput, - q, &IosToolHandler::subprocessHasData); - QObject::connect(process, - static_cast(&QProcess::finished), - q, &IosToolHandler::subprocessFinished); - QObject::connect(process, - static_cast(&QProcess::error), - q, &IosToolHandler::subprocessError); - QObject::connect(&killTimer, &QTimer::timeout, - q, &IosToolHandler::killProcess); } IosToolHandlerPrivate::~IosToolHandlerPrivate() @@ -260,6 +257,7 @@ bool IosToolHandlerPrivate::isRunning() void IosToolHandlerPrivate::start(const QString &exe, const QStringList &args) { + Q_ASSERT(process); QTC_CHECK(state == NonStarted); state = Starting; qCDebug(toolHandlerLog) << "running " << exe << args; @@ -267,44 +265,6 @@ void IosToolHandlerPrivate::start(const QString &exe, const QStringList &args) state = StartedInferior; } -void IosToolHandlerPrivate::stop(int errorCode) -{ - qCDebug(toolHandlerLog) << "IosToolHandlerPrivate::stop"; - State oldState = state; - state = Stopped; - switch (oldState) { - case NonStarted: - qCWarning(toolHandlerLog) << "IosToolHandler::stop() when state was NonStarted"; - // pass - case Starting: - switch (op){ - case OpNone: - qCWarning(toolHandlerLog) << "IosToolHandler::stop() when op was OpNone"; - break; - case OpAppTransfer: - didTransferApp(bundlePath, deviceId, IosToolHandler::Failure); - break; - case OpAppRun: - didStartApp(bundlePath, deviceId, IosToolHandler::Failure); - break; - case OpDeviceInfo: - break; - } - // pass - case StartedInferior: - case XmlEndProcessed: - toolExited(errorCode); - break; - case Stopped: - return; - } - if (isRunning()) { - process->write("k\n\r"); - process->closeWriteChannel(); - killTimer.start(1500); - } -} - // signals void IosToolHandlerPrivate::isTransferringApp(const QString &bundlePath, const QString &deviceId, int progress, int maxProgress, const QString &info) @@ -357,7 +317,7 @@ void IosToolHandlerPrivate::toolExited(int code) emit q->toolExited(q, code); } -void IosToolHandlerPrivate::subprocessError(QProcess::ProcessError error) +void IosDeviceToolHandlerPrivate::subprocessError(QProcess::ProcessError error) { if (state != Stopped) errorMsg(IosToolHandler::tr("iOS tool Error %1").arg(error)); @@ -368,7 +328,7 @@ void IosToolHandlerPrivate::subprocessError(QProcess::ProcessError error) } } -void IosToolHandlerPrivate::subprocessFinished(int exitCode, QProcess::ExitStatus exitStatus) +void IosDeviceToolHandlerPrivate::subprocessFinished(int exitCode, QProcess::ExitStatus exitStatus) { stop((exitStatus == QProcess::NormalExit) ? exitCode : -1 ); qCDebug(toolHandlerLog) << "IosToolHandler::finished(" << this << ")"; @@ -376,7 +336,7 @@ void IosToolHandlerPrivate::subprocessFinished(int exitCode, QProcess::ExitStatu emit q->finished(q); } -void IosToolHandlerPrivate::processXml() +void IosDeviceToolHandlerPrivate::processXml() { while (!outputParser.atEnd()) { QXmlStreamReader::TokenType tt = outputParser.readNext(); @@ -558,7 +518,7 @@ void IosToolHandlerPrivate::processXml() } } -void IosToolHandlerPrivate::subprocessHasData() +void IosDeviceToolHandlerPrivate::subprocessHasData() { qCDebug(toolHandlerLog) << "subprocessHasData, state:" << state; while (true) { @@ -598,7 +558,42 @@ void IosToolHandlerPrivate::subprocessHasData() IosDeviceToolHandlerPrivate::IosDeviceToolHandlerPrivate(const IosDeviceType &devType, IosToolHandler *q) : IosToolHandlerPrivate(devType, q) -{ } +{ + process = new QProcess; + + // Prepare & set process Environment. + QProcessEnvironment env(QProcessEnvironment::systemEnvironment()); + foreach (const QString &k, env.keys()) + if (k.startsWith(QLatin1String("DYLD_"))) + env.remove(k); + QStringList frameworkPaths; + Utils::FileName xcPath = IosConfigurations::developerPath(); + QString privateFPath = xcPath.appendPath(QLatin1String("Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks")).toFileInfo().canonicalFilePath(); + if (!privateFPath.isEmpty()) + frameworkPaths << privateFPath; + QString otherFPath = xcPath.appendPath(QLatin1String("../OtherFrameworks")).toFileInfo().canonicalFilePath(); + if (!otherFPath.isEmpty()) + frameworkPaths << otherFPath; + QString sharedFPath = xcPath.appendPath(QLatin1String("../SharedFrameworks")).toFileInfo().canonicalFilePath(); + if (!sharedFPath.isEmpty()) + frameworkPaths << sharedFPath; + frameworkPaths << QLatin1String("/System/Library/Frameworks") + << QLatin1String("/System/Library/PrivateFrameworks"); + env.insert(QLatin1String("DYLD_FALLBACK_FRAMEWORK_PATH"), frameworkPaths.join(QLatin1Char(':'))); + qCDebug(toolHandlerLog) << "IosToolHandler runEnv:" << env.toStringList(); + process->setProcessEnvironment(env); + + QObject::connect(process, &QProcess::readyReadStandardOutput, + std::bind(&IosDeviceToolHandlerPrivate::subprocessHasData,this)); + + QObject::connect(process, static_cast(&QProcess::finished), + std::bind(&IosDeviceToolHandlerPrivate::subprocessFinished,this, _1,_2)); + + QObject::connect(process, static_cast(&QProcess::error), + std::bind(&IosDeviceToolHandlerPrivate::subprocessError, this, _1)); + + QObject::connect(&killTimer, &QTimer::timeout, std::bind(&IosDeviceToolHandlerPrivate::killProcess, this)); +} void IosDeviceToolHandlerPrivate::requestTransferApp(const QString &bundlePath, const QString &deviceId, int timeout) @@ -646,11 +641,46 @@ void IosDeviceToolHandlerPrivate::requestDeviceInfo(const QString &deviceId, int start(IosToolHandler::iosDeviceToolPath(), args); } -bool IosDeviceToolHandlerPrivate::expectsFileDescriptor() + +void IosDeviceToolHandlerPrivate::stop(int errorCode) { - return op == OpAppRun && runKind == IosToolHandler::DebugRun; + qCDebug(toolHandlerLog) << "IosToolHandlerPrivate::stop"; + State oldState = state; + state = Stopped; + switch (oldState) { + case NonStarted: + qCWarning(toolHandlerLog) << "IosToolHandler::stop() when state was NonStarted"; + // pass + case Starting: + switch (op){ + case OpNone: + qCWarning(toolHandlerLog) << "IosToolHandler::stop() when op was OpNone"; + break; + case OpAppTransfer: + didTransferApp(bundlePath, deviceId, IosToolHandler::Failure); + break; + case OpAppRun: + didStartApp(bundlePath, deviceId, IosToolHandler::Failure); + break; + case OpDeviceInfo: + break; + } + // pass + case StartedInferior: + case XmlEndProcessed: + toolExited(errorCode); + break; + case Stopped: + return; + } + if (isRunning()) { + process->write("k\n\r"); + process->closeWriteChannel(); + killTimer.start(1500); + } } + // IosSimulatorToolHandlerPrivate IosSimulatorToolHandlerPrivate::IosSimulatorToolHandlerPrivate(const IosDeviceType &devType, @@ -659,64 +689,159 @@ IosSimulatorToolHandlerPrivate::IosSimulatorToolHandlerPrivate(const IosDeviceTy { } void IosSimulatorToolHandlerPrivate::requestTransferApp(const QString &bundlePath, - const QString &deviceId, int timeout) + const QString &deviceIdentifier, int timeout) { Q_UNUSED(timeout); this->bundlePath = bundlePath; - this->deviceId = deviceId; - emit didTransferApp(bundlePath, deviceId, IosToolHandler::Success); + this->deviceId = deviceIdentifier; + isTransferringApp(bundlePath, deviceId, 0, 100, ""); + if (SimulatorControl::startSimulator(deviceId)) { + isTransferringApp(bundlePath, deviceId, 20, 100, ""); + QByteArray cmdOutput; + if (SimulatorControl::installApp(deviceId, Utils::FileName::fromString(bundlePath), cmdOutput)) { + isTransferringApp(bundlePath, deviceId, 100, 100, ""); + didTransferApp(bundlePath, deviceId, IosToolHandler::Success); + } else { + errorMsg(IosToolHandler::tr("Application install on Simulator failed. %1").arg(QString::fromLocal8Bit(cmdOutput))); + didTransferApp(bundlePath, deviceId, IosToolHandler::Failure); + } + } else { + errorMsg(IosToolHandler::tr("Application install on Simulator failed. Simulator not running.")); + didTransferApp(bundlePath, deviceId, IosToolHandler::Failure); + } + emit q->finished(q); } + void IosSimulatorToolHandlerPrivate::requestRunApp(const QString &bundlePath, const QStringList &extraArgs, IosToolHandler::RunKind runType, - const QString &deviceId, int timeout) + const QString &deviceIdentifier, int timeout) { Q_UNUSED(timeout); + Q_UNUSED(deviceIdentifier); this->bundlePath = bundlePath; - this->deviceId = deviceId; + this->deviceId = devType.identifier; this->runKind = runType; - QStringList args; - - args << QLatin1String("launch") << bundlePath; - Utils::FileName devPath = IosConfigurations::developerPath(); - if (!devPath.isEmpty()) - args << QLatin1String("--developer-path") << devPath.toString(); - addDeviceArguments(args); - switch (runType) { - case IosToolHandler::NormalRun: - break; - case IosToolHandler::DebugRun: - args << QLatin1String("--wait-for-debugger"); - break; - } - args << QLatin1String("--args") << extraArgs; op = OpAppRun; - start(IosToolHandler::iosSimulatorToolPath(), args); + + Utils::FileName appBundle = Utils::FileName::fromString(bundlePath); + if (!appBundle.exists()) { + errorMsg(IosToolHandler::tr("Application launch on Simulator failed. Invalid Bundle path %1") + .arg(bundlePath)); + didStartApp(bundlePath, deviceId, Ios::IosToolHandler::Failure); + return; + } + + if (SimulatorControl::startSimulator(deviceId)) { + qint64 pId = -1; + bool debugRun = runType == IosToolHandler::DebugRun; + QProcess* controlProcess = SimulatorControl::spawnAppProcess(deviceId, appBundle, pId, debugRun, extraArgs); + if (controlProcess) { + Q_ASSERT(!process || !isRunning()); + if (process) { + delete process; + process = nullptr; + } + process = controlProcess; + QObject::connect(process, &QProcess::readyReadStandardOutput, + std::bind(&IosSimulatorToolHandlerPrivate::simAppProcessHasData,this)); + QObject::connect(process, &QProcess::readyReadStandardError, + std::bind(&IosSimulatorToolHandlerPrivate::simAppProcessHasErrorOutput,this)); + QObject::connect(process, static_cast(&QProcess::finished), + std::bind(&IosSimulatorToolHandlerPrivate::simAppProcessFinished,this, _1,_2)); + QObject::connect(process, static_cast(&QProcess::error), + std::bind(&IosSimulatorToolHandlerPrivate::simAppProcessError, this, _1)); + + appPId = pId; + gotInferiorPid(bundlePath,deviceId,pId); + + // For debug run, wait for the debugger to attach and then launch the app. + if (!debugRun) { + launchAppOnSimulator(); + } + } else { + errorMsg(IosToolHandler::tr("Spawning the Application process on Simulator failed.")); + didStartApp(bundlePath, deviceId, Ios::IosToolHandler::Failure); + } + } else { + errorMsg(IosToolHandler::tr("Application launch on Simulator failed. Simulator not running.") + .arg(bundlePath)); + didStartApp(bundlePath, deviceId, Ios::IosToolHandler::Failure); + } +} + +void IosSimulatorToolHandlerPrivate::launchAppOnSimulator() +{ + // Wait for the app to reach a state when we can launch it on the simulator. + if (appPId != -1 && SimulatorControl::waitForProcessSpawn(appPId)) { + QByteArray commandOutput; + Utils::FileName appBundle = Utils::FileName::fromString(bundlePath); + if (SimulatorControl::launchApp(deviceId, SimulatorControl::bundleIdentifier(appBundle), &commandOutput) != -1) { + appLaunched = true; + didStartApp(bundlePath, deviceId, Ios::IosToolHandler::Success); + } else { + errorMsg(IosToolHandler::tr("Application launch on Simulator failed. %1") + .arg(QString::fromLocal8Bit(commandOutput))); + didStartApp(bundlePath, deviceId, Ios::IosToolHandler::Failure); + } + } else { + errorMsg(IosToolHandler::tr("Spawning the Application process on Simulator failed. Spawning timed out.")); + didStartApp(bundlePath, deviceId, Ios::IosToolHandler::Failure); + } } void IosSimulatorToolHandlerPrivate::requestDeviceInfo(const QString &deviceId, int timeout) { Q_UNUSED(timeout); - this->deviceId = deviceId; - QStringList args; - args << QLatin1String("showdevicetypes"); - op = OpDeviceInfo; - start(IosToolHandler::iosSimulatorToolPath(), args); + Q_UNUSED(deviceId); } -bool IosSimulatorToolHandlerPrivate::expectsFileDescriptor() +void IosSimulatorToolHandlerPrivate::stop(int errorCode) { - return false; -} - -void IosSimulatorToolHandlerPrivate::addDeviceArguments(QStringList &args) const -{ - if (devType.type != IosDeviceType::SimulatedDevice) { - qCWarning(toolHandlerLog) << "IosSimulatorToolHandlerPrivate device type is not SimulatedDevice"; - return; + if (process) { + if (isRunning()) { + process->terminate(); + if (!process->waitForFinished(1000)) + process->kill(); + } + process->deleteLater(); + process = nullptr; + appPId = -1; + appLaunched = false; } - args << QLatin1String("--devicetypeid") << devType.identifier; + + toolExited(errorCode); +} + +void IosSimulatorToolHandlerPrivate::debuggerStateChanged(Debugger::DebuggerState state) +{ + if (!appLaunched && state == Debugger::DebuggerState::InferiorRunOk) { + // Debugger attached. Launch it on the simulator. + launchAppOnSimulator(); + } +} + +void IosSimulatorToolHandlerPrivate::simAppProcessError(QProcess::ProcessError error) +{ + errorMsg(IosToolHandler::tr("Simulator application process error %1").arg(error)); +} + +void IosSimulatorToolHandlerPrivate::simAppProcessFinished(int exitCode, QProcess::ExitStatus exitStatus) +{ + stop((exitStatus == QProcess::NormalExit) ? exitCode : -1 ); + qCDebug(toolHandlerLog) << "IosToolHandler::finished(" << this << ")"; + q->finished(q); +} + +void IosSimulatorToolHandlerPrivate::simAppProcessHasData() +{ + appOutput(QString::fromLocal8Bit(process->readAllStandardOutput())); +} + +void IosSimulatorToolHandlerPrivate::simAppProcessHasErrorOutput() +{ + errorMsg(QString::fromLocal8Bit(process->readAllStandardError())); } void IosToolHandlerPrivate::killProcess() @@ -733,18 +858,6 @@ QString IosToolHandler::iosDeviceToolPath() return res; } -QString IosToolHandler::iosSimulatorToolPath() -{ - Utils::FileName devPath = Internal::IosConfigurations::developerPath(); - bool version182 = devPath.appendPath(QLatin1String( - "Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/iPhoneSimulatorRemoteClient.framework")) - .exists(); - QString res = Core::ICore::libexecPath() + QLatin1String("/ios/iossim"); - if (version182) - res = res.append(QLatin1String("_1_8_2")); - return res; -} - IosToolHandler::IosToolHandler(const Internal::IosDeviceType &devType, QObject *parent) : QObject(parent) { @@ -764,6 +877,11 @@ void IosToolHandler::stop() d->stop(-1); } +void IosToolHandler::debuggerStateChanged(int state) +{ + d->debuggerStateChanged((Debugger::DebuggerState)state); +} + void IosToolHandler::requestTransferApp(const QString &bundlePath, const QString &deviceId, int timeout) { @@ -786,24 +904,4 @@ bool IosToolHandler::isRunning() return d->isRunning(); } -void IosToolHandler::subprocessError(QProcess::ProcessError error) -{ - d->subprocessError(error); -} - -void IosToolHandler::subprocessFinished(int exitCode, QProcess::ExitStatus exitStatus) -{ - d->subprocessFinished(exitCode, exitStatus); -} - -void IosToolHandler::subprocessHasData() -{ - d->subprocessHasData(); -} - -void IosToolHandler::killProcess() -{ - d->killProcess(); -} - } // namespace Ios diff --git a/src/plugins/ios/iostoolhandler.h b/src/plugins/ios/iostoolhandler.h index 4ac3e5716e3..df1cd089cf8 100644 --- a/src/plugins/ios/iostoolhandler.h +++ b/src/plugins/ios/iostoolhandler.h @@ -33,7 +33,6 @@ #include #include - namespace Ios { namespace Internal { class IosToolHandlerPrivate; @@ -56,7 +55,6 @@ public: }; static QString iosDeviceToolPath(); - static QString iosSimulatorToolPath(); explicit IosToolHandler(const Internal::IosDeviceType &type, QObject *parent = 0); ~IosToolHandler(); @@ -66,6 +64,7 @@ public: void requestDeviceInfo(const QString &deviceId, int timeout = 1000); bool isRunning(); void stop(); + void debuggerStateChanged(int state); signals: void isTransferringApp(Ios::IosToolHandler *handler, const QString &bundlePath, @@ -85,11 +84,10 @@ signals: void errorMsg(Ios::IosToolHandler *handler, const QString &msg); void toolExited(Ios::IosToolHandler *handler, int code); void finished(Ios::IosToolHandler *handler); -private: - void subprocessError(QProcess::ProcessError error); - void subprocessFinished(int exitCode, QProcess::ExitStatus exitStatus); - void subprocessHasData(); + +protected: void killProcess(); + private: friend class Ios::Internal::IosToolHandlerPrivate; Ios::Internal::IosToolHandlerPrivate *d; diff --git a/src/plugins/ios/simulatorcontrol.cpp b/src/plugins/ios/simulatorcontrol.cpp new file mode 100644 index 00000000000..a2807996a46 --- /dev/null +++ b/src/plugins/ios/simulatorcontrol.cpp @@ -0,0 +1,422 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ + +#include "simulatorcontrol.h" +#include "iossimulator.h" +#include "iosconfigurations.h" + +#ifdef Q_OS_MAC +#include +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace { +Q_LOGGING_CATEGORY(simulatorLog, "qtc.ios.simulator") +} + +namespace Ios { +namespace Internal { + +static int COMMAND_TIMEOUT = 10000; +static int SIMULATOR_TIMEOUT = 60000; + +static bool checkForTimeout(const std::chrono::time_point< std::chrono::high_resolution_clock, std::chrono::nanoseconds> &start, int msecs = COMMAND_TIMEOUT) +{ + bool timedOut = false; + auto end = std::chrono::high_resolution_clock::now(); + if (std::chrono::duration_cast(end-start).count() > msecs) + timedOut = true; + return timedOut; +} + +class SimulatorControlPrivate :QObject { + Q_OBJECT +private: + struct SimDeviceInfo { + bool isBooted() const { return state.compare(QStringLiteral("Booted")) == 0; } + bool isAvailable() const { return !availability.contains(QStringLiteral("unavailable")); } + QString name; + QString udid; + QString availability; + QString state; + QString sdk; + }; + + SimulatorControlPrivate(QObject *parent = nullptr); + ~SimulatorControlPrivate(); + QByteArray runSimCtlCommand(QStringList args) const; + SimDeviceInfo deviceInfo(const QString &simUdid) const; + bool runCommand(QString command, const QStringList &args, QByteArray *output = nullptr); + + QHash simulatorProcesses; + QReadWriteLock processDataLock; + QList availableDevices; + QReadWriteLock deviceDataLock; + friend class SimulatorControl; +}; + +SimulatorControlPrivate *SimulatorControl::d = new SimulatorControlPrivate; + +SimulatorControl::SimulatorControl() +{ + +} + +QList SimulatorControl::availableSimulators() +{ + QReadLocker locer(&d->deviceDataLock); + return d->availableDevices; +} + +void SimulatorControl::updateAvailableSimulators() +{ + const QByteArray output = d->runSimCtlCommand({QLatin1String("list"), QLatin1String("-j"), QLatin1String("devices")}); + QJsonDocument doc = QJsonDocument::fromJson(output); + if (!doc.isNull()) { + QList availableDevices; + const QJsonObject buildInfo = doc.object().value("devices").toObject(); + foreach (const QString &buildVersion, buildInfo.keys()) { + QJsonArray devices = buildInfo.value(buildVersion).toArray(); + foreach (const QJsonValue device, devices) { + QJsonObject deviceInfo = device.toObject(); + QString deviceName = QString("%1, %2") + .arg(deviceInfo.value("name").toString("Unknown")) + .arg(buildVersion); + QString deviceUdid = deviceInfo.value("udid").toString("Unknown"); + if (!deviceInfo.value("availability").toString().contains("unavailable")) { + IosDeviceType iOSDevice(IosDeviceType::SimulatedDevice, deviceUdid, deviceName); + availableDevices.append(iOSDevice); + } + } + } + std::stable_sort(availableDevices.begin(), availableDevices.end()); + + { + QWriteLocker locker(&d->deviceDataLock); + d->availableDevices = availableDevices; + } + } else { + qCDebug(simulatorLog) << "Error parsing json output from simctl. Output:" << output; + } +} + +// Blocks until simulators reaches "Booted" state. +bool SimulatorControl::startSimulator(const QString &simUdid) +{ + QWriteLocker locker(&d->processDataLock); + bool simulatorRunning = isSimulatorRunning(simUdid); + if (!simulatorRunning && d->deviceInfo(simUdid).isAvailable()) { + // Simulator is not running but it's available. Start the simulator. + QProcess *p = new QProcess; + QObject::connect(p, static_cast(&QProcess::finished), [simUdid]() { + QWriteLocker locker(&d->processDataLock); + d->simulatorProcesses[simUdid]->deleteLater(); + d->simulatorProcesses.remove(simUdid); + }); + + const QString cmd = IosConfigurations::developerPath().appendPath(QStringLiteral("/Applications/Simulator.app")).toString(); + const QStringList args({QStringLiteral("--args"), QStringLiteral("-CurrentDeviceUDID"), simUdid}); + p->start(cmd, args); + + if (p->waitForStarted()) { + d->simulatorProcesses[simUdid] = p; + // At this point the sim device exists, available and was not running. + // So the simulator is started and we'll wait for it to reach to a state + // where we can interact with it. + auto start = std::chrono::high_resolution_clock::now(); + SimulatorControlPrivate::SimDeviceInfo info; + do { + info = d->deviceInfo(simUdid); + } while (!info.isBooted() + && p->state() == QProcess::Running + && !checkForTimeout(start, SIMULATOR_TIMEOUT)); + simulatorRunning = info.isBooted(); + } else { + qCDebug(simulatorLog) << "Error starting simulator." << p->errorString(); + delete p; + } + } + return simulatorRunning; +} + +bool SimulatorControl::isSimulatorRunning(const QString &simUdid) +{ + if (simUdid.isEmpty()) + return false; + return d->deviceInfo(simUdid).isBooted(); +} + +bool SimulatorControl::installApp(const QString &simUdid, const Utils::FileName &bundlePath, QByteArray &commandOutput) +{ + bool installed = false; + if (isSimulatorRunning(simUdid)) { + commandOutput = d->runSimCtlCommand(QStringList() << QStringLiteral("install") << simUdid << bundlePath.toString()); + installed = commandOutput.isEmpty(); + } else { + commandOutput = "Simulator device not running."; + } + return installed; +} + +qint64 SimulatorControl::launchApp(const QString &simUdid, const QString &bundleIdentifier, QByteArray* commandOutput) +{ + qint64 pId = -1; + pId = -1; + if (!bundleIdentifier.isEmpty() && isSimulatorRunning(simUdid)) { + const QStringList args({QStringLiteral("launch"), simUdid , bundleIdentifier}); + const QByteArray output = d->runSimCtlCommand(args); + const QByteArray pIdStr = output.trimmed().split(' ').last().trimmed(); + bool validInt = false; + pId = pIdStr.toLongLong(&validInt); + if (!validInt) { + // Launch Failed. + qCDebug(simulatorLog) << "Launch app failed. Process id returned is not valid. PID =" << pIdStr; + pId = -1; + if (commandOutput) + *commandOutput = output; + } + } + return pId; +} + +QString SimulatorControl::bundleIdentifier(const Utils::FileName &bundlePath) +{ + QString bundleID; +#ifdef Q_OS_MAC + if (bundlePath.exists()) { + CFStringRef cFBundlePath = bundlePath.toString().toCFString(); + CFURLRef bundle_url = CFURLCreateWithFileSystemPath (kCFAllocatorDefault, cFBundlePath, kCFURLPOSIXPathStyle, true); + CFRelease(cFBundlePath); + CFBundleRef bundle = CFBundleCreate (kCFAllocatorDefault, bundle_url); + CFRelease(bundle_url); + CFStringRef cFBundleID = CFBundleGetIdentifier(bundle); + bundleID = QString::fromCFString(cFBundleID).trimmed(); + CFRelease(bundle); + } +#else + Q_UNUSED(bundlePath) +#endif + return bundleID; +} + +QString SimulatorControl::bundleExecutable(const Utils::FileName &bundlePath) +{ + QString executable; +#ifdef Q_OS_MAC + if (bundlePath.exists()) { + CFStringRef cFBundlePath = bundlePath.toString().toCFString(); + CFURLRef bundle_url = CFURLCreateWithFileSystemPath (kCFAllocatorDefault, cFBundlePath, kCFURLPOSIXPathStyle, true); + CFRelease(cFBundlePath); + CFBundleRef bundle = CFBundleCreate (kCFAllocatorDefault, bundle_url); + CFStringRef cFStrExecutableName = (CFStringRef)CFBundleGetValueForInfoDictionaryKey(bundle, kCFBundleExecutableKey); + executable = QString::fromCFString(cFStrExecutableName).trimmed(); + CFRelease(bundle); + } +#else + Q_UNUSED(bundlePath) +#endif + return executable; +} + +SimulatorControlPrivate::SimulatorControlPrivate(QObject *parent): + QObject(parent), + processDataLock(QReadWriteLock::Recursive) +{ +} + +SimulatorControlPrivate::~SimulatorControlPrivate() +{ + +} + +QByteArray SimulatorControlPrivate::runSimCtlCommand(QStringList args) const +{ + QProcess simCtlProcess; + args.prepend(QStringLiteral("simctl")); + simCtlProcess.start(QStringLiteral("xcrun"), args, QProcess::ReadOnly); + if (!simCtlProcess.waitForFinished()) + qCDebug(simulatorLog) << "simctl command failed." << simCtlProcess.errorString(); + return simCtlProcess.readAll(); +} + +// The simctl spawns the process and returns the pId but the application process might not have started, at least in a state where you can interrupt it. +// Use SimulatorControl::waitForProcessSpawn to be sure. +QProcess *SimulatorControl::spawnAppProcess(const QString &simUdid, const Utils::FileName &bundlePath, qint64 &pId, bool waitForDebugger, const QStringList &extraArgs) +{ + QProcess *simCtlProcess = nullptr; + if (isSimulatorRunning(simUdid)) { + QString bundleId = bundleIdentifier(bundlePath); + QString executableName = bundleExecutable(bundlePath); + QByteArray appPath = d->runSimCtlCommand(QStringList() << QStringLiteral("get_app_container") << simUdid << bundleId).trimmed(); + if (!appPath.isEmpty() && !executableName.isEmpty()) { + // Spawn the app. The spawned app is started in suspended mode. + appPath.append('/' + executableName.toLocal8Bit()); + simCtlProcess = new QProcess; + QStringList args; + args << QStringLiteral("simctl"); + args << QStringLiteral("spawn"); + if (waitForDebugger) + args << QStringLiteral("-w"); + args << simUdid; + args << QString::fromLocal8Bit(appPath); + args << extraArgs; + simCtlProcess->start(QStringLiteral("xcrun"), args); + if (!simCtlProcess->waitForStarted()){ + // Spawn command failed. + qCDebug(simulatorLog) << "Spawning the app failed." << simCtlProcess->errorString(); + delete simCtlProcess; + simCtlProcess = nullptr; + } + + // Find the process id of the the app process. + if (simCtlProcess) { + qint64 simctlPId = simCtlProcess->processId(); + pId = -1; + QByteArray commandOutput; + QStringList pGrepArgs; + pGrepArgs << QStringLiteral("-f") << QString::fromLocal8Bit(appPath); + auto begin = std::chrono::high_resolution_clock::now(); + // Find the pid of the spawned app. + while (pId == -1 && d->runCommand(QStringLiteral("pgrep"), pGrepArgs, &commandOutput)) { + foreach (auto pidStr, commandOutput.trimmed().split('\n')) { + qint64 parsedPId = pidStr.toLongLong(); + if (parsedPId != simctlPId) + pId = parsedPId; + } + if (checkForTimeout(begin)) { + qCDebug(simulatorLog) << "Spawning the app failed. Process timed out"; + break; + } + } + } + + if (pId == -1) { + // App process id can't be found. + qCDebug(simulatorLog) << "Spawning the app failed. PID not found."; + delete simCtlProcess; + simCtlProcess = nullptr; + } + } else { + qCDebug(simulatorLog) << "Spawning the app failed. Check installed app." << appPath; + } + } else { + qCDebug(simulatorLog) << "Spawning the app failed. Simulator not running." << simUdid; + } + return simCtlProcess; +} + +bool SimulatorControl::waitForProcessSpawn(qint64 processPId) +{ + bool success = true; + if (processPId != -1) { + // Wait for app to reach intruptible sleep state. + QByteArray wqStr; + QStringList args; + int wqCount = -1; + args << QStringLiteral("-p") << QString::number(processPId) << QStringLiteral("-o") << QStringLiteral("wq="); + auto begin = std::chrono::high_resolution_clock::now(); + do { + if (!d->runCommand(QStringLiteral("ps"), args, &wqStr)) { + success = false; + break; + } + bool validInt = false; + wqCount = wqStr.toInt(&validInt); + if (!validInt) { + wqCount = -1; + } + } while (wqCount < 0 && !checkForTimeout(begin)); + success = wqCount >= 0; + } else { + qCDebug(simulatorLog) << "Wait for spawned failed. Invalid Process ID." << processPId; + } + return success; +} + +SimulatorControlPrivate::SimDeviceInfo SimulatorControlPrivate::deviceInfo(const QString &simUdid) const +{ + SimDeviceInfo info; + bool found = false; + if (!simUdid.isEmpty()) { + // It might happend that the simulator is not started by SimControl. + // Check of intances started externally. + const QByteArray output = runSimCtlCommand({QLatin1String("list"), QLatin1String("-j"), QLatin1String("devices")}); + QJsonDocument doc = QJsonDocument::fromJson(output); + if (!doc.isNull()) { + const QJsonObject buildInfo = doc.object().value(QStringLiteral("devices")).toObject(); + foreach (const QString &buildVersion, buildInfo.keys()) { + QJsonArray devices = buildInfo.value(buildVersion).toArray(); + foreach (const QJsonValue device, devices) { + QJsonObject deviceInfo = device.toObject(); + QString deviceUdid = deviceInfo.value(QStringLiteral("udid")).toString(); + if (deviceUdid.compare(simUdid) == 0) { + found = true; + info.name = deviceInfo.value(QStringLiteral("name")).toString(); + info.udid = deviceUdid; + info.state = deviceInfo.value(QStringLiteral("state")).toString(); + info.sdk = buildVersion; + info.availability = deviceInfo.value(QStringLiteral("availability")).toString(); + break; + } + } + if (found) + break; + } + } else { + qCDebug(simulatorLog) << "Cannot find device info. Error parsing json output from simctl. Output:" << output; + } + } else { + qCDebug(simulatorLog) << "Cannot find device info. Invalid UDID."; + } + return info; +} + +bool SimulatorControlPrivate::runCommand(QString command, const QStringList &args, QByteArray *output) +{ + bool success = false; + QProcess process; + process.start(command, args); + success = process.waitForFinished(); + if (output) + *output = process.readAll().trimmed(); + return success; +} + +} // namespace Internal +} // namespace Ios +#include "simulatorcontrol.moc" diff --git a/src/plugins/ios/simulatorcontrol.h b/src/plugins/ios/simulatorcontrol.h new file mode 100644 index 00000000000..a1bd729b79f --- /dev/null +++ b/src/plugins/ios/simulatorcontrol.h @@ -0,0 +1,64 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 as published by the Free Software +** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +****************************************************************************/ +#ifndef SIMULATORCONTROL_H +#define SIMULATORCONTROL_H + +#include +#include "utils/fileutils.h" + +class QProcess; + +namespace Ios { +namespace Internal { + +class IosDeviceType; +class SimulatorControlPrivate; + +class SimulatorControl +{ + explicit SimulatorControl(); + +public: + static QList availableSimulators(); + static void updateAvailableSimulators(); + + static bool startSimulator(const QString &simUdid); + static bool isSimulatorRunning(const QString &simUdid); + + static bool installApp(const QString &simUdid, const Utils::FileName &bundlePath, QByteArray &commandOutput); + static QProcess* spawnAppProcess(const QString &simUdid, const Utils::FileName &bundlePath, qint64 &pId, + bool waitForDebugger, const QStringList &extraArgs); + + static qint64 launchApp(const QString &simUdid, const QString &bundleIdentifier, QByteArray *commandOutput = nullptr); + static QString bundleIdentifier(const Utils::FileName &bundlePath); + static QString bundleExecutable(const Utils::FileName &bundlePath); + static bool waitForProcessSpawn(qint64 processPId); + +private: + static SimulatorControlPrivate *d; +}; +} // namespace Internal +} // namespace Ios +#endif // SIMULATORCONTROL_H From 28341ac3f1b1a8f4a13e210eaf4f2d066b30e857 Mon Sep 17 00:00:00 2001 From: Vikas Pachdha Date: Tue, 4 Oct 2016 17:49:16 +0200 Subject: [PATCH 72/72] iOS: Removed ios_sim tool source. simctl is used for app deployment on iOS Simulator Task-number: QTCREATORBUG-16942 Change-Id: Ie50bdfdbf9005e383a2753a3c6081a563a175f61 Reviewed-by: Eike Ziller --- src/tools/3rdparty/3rdparty.pro | 7 - src/tools/3rdparty/iossim/IOSSIM_LICENSE | 31 - src/tools/3rdparty/iossim/Info.plist | 16 - .../iossim/coresimulator/coresimulator.h | 450 -------- .../dvtiphonesimulatorremoteclient.h | 295 ------ src/tools/3rdparty/iossim/iossim.pro | 60 -- src/tools/3rdparty/iossim/iossim.qbs | 30 - src/tools/3rdparty/iossim/iphonesimulator.h | 46 - src/tools/3rdparty/iossim/iphonesimulator.mm | 974 ------------------ src/tools/3rdparty/iossim/main.mm | 29 - src/tools/3rdparty/iossim/nsprintf.h | 9 - src/tools/3rdparty/iossim/nsprintf.mm | 75 -- .../3rdparty/iossim/nsstringexpandpath.h | 11 - .../3rdparty/iossim/nsstringexpandpath.mm | 18 - src/tools/3rdparty/iossim/version.h | 1 - .../3rdparty/iossim_1_8_2/IOSSIM_LICENSE | 31 - src/tools/3rdparty/iossim_1_8_2/Info.plist | 16 - src/tools/3rdparty/iossim_1_8_2/iossim.qbs | 30 - .../3rdparty/iossim_1_8_2/iossim_1_8_2.pro | 58 -- .../3rdparty/iossim_1_8_2/iphonesimulator.h | 41 - .../3rdparty/iossim_1_8_2/iphonesimulator.mm | 634 ------------ .../iphonesimulatorremoteclient.h | 126 --- src/tools/3rdparty/iossim_1_8_2/main.mm | 77 -- src/tools/3rdparty/iossim_1_8_2/nsprintf.h | 6 - src/tools/3rdparty/iossim_1_8_2/nsprintf.mm | 44 - .../iossim_1_8_2/nsstringexpandpath.h | 11 - .../iossim_1_8_2/nsstringexpandpath.mm | 18 - src/tools/3rdparty/iossim_1_8_2/version.h | 1 - 28 files changed, 3145 deletions(-) delete mode 100644 src/tools/3rdparty/iossim/IOSSIM_LICENSE delete mode 100644 src/tools/3rdparty/iossim/Info.plist delete mode 100644 src/tools/3rdparty/iossim/coresimulator/coresimulator.h delete mode 100644 src/tools/3rdparty/iossim/dvtiphonesimulatorremoteclient/dvtiphonesimulatorremoteclient.h delete mode 100644 src/tools/3rdparty/iossim/iossim.pro delete mode 100644 src/tools/3rdparty/iossim/iossim.qbs delete mode 100644 src/tools/3rdparty/iossim/iphonesimulator.h delete mode 100644 src/tools/3rdparty/iossim/iphonesimulator.mm delete mode 100644 src/tools/3rdparty/iossim/main.mm delete mode 100644 src/tools/3rdparty/iossim/nsprintf.h delete mode 100644 src/tools/3rdparty/iossim/nsprintf.mm delete mode 100644 src/tools/3rdparty/iossim/nsstringexpandpath.h delete mode 100644 src/tools/3rdparty/iossim/nsstringexpandpath.mm delete mode 100644 src/tools/3rdparty/iossim/version.h delete mode 100644 src/tools/3rdparty/iossim_1_8_2/IOSSIM_LICENSE delete mode 100644 src/tools/3rdparty/iossim_1_8_2/Info.plist delete mode 100644 src/tools/3rdparty/iossim_1_8_2/iossim.qbs delete mode 100644 src/tools/3rdparty/iossim_1_8_2/iossim_1_8_2.pro delete mode 100644 src/tools/3rdparty/iossim_1_8_2/iphonesimulator.h delete mode 100644 src/tools/3rdparty/iossim_1_8_2/iphonesimulator.mm delete mode 100644 src/tools/3rdparty/iossim_1_8_2/iphonesimulatorremoteclient/iphonesimulatorremoteclient.h delete mode 100644 src/tools/3rdparty/iossim_1_8_2/main.mm delete mode 100644 src/tools/3rdparty/iossim_1_8_2/nsprintf.h delete mode 100644 src/tools/3rdparty/iossim_1_8_2/nsprintf.mm delete mode 100644 src/tools/3rdparty/iossim_1_8_2/nsstringexpandpath.h delete mode 100644 src/tools/3rdparty/iossim_1_8_2/nsstringexpandpath.mm delete mode 100644 src/tools/3rdparty/iossim_1_8_2/version.h diff --git a/src/tools/3rdparty/3rdparty.pro b/src/tools/3rdparty/3rdparty.pro index a173e5dd58a..0aec6dd5605 100644 --- a/src/tools/3rdparty/3rdparty.pro +++ b/src/tools/3rdparty/3rdparty.pro @@ -1,10 +1,3 @@ TEMPLATE = subdirs - -mac { - SUBDIRS += \ - iossim \ - iossim_1_8_2 -} - isEmpty(BUILD_CPLUSPLUS_TOOLS):BUILD_CPLUSPLUS_TOOLS=$$(BUILD_CPLUSPLUS_TOOLS) !isEmpty(BUILD_CPLUSPLUS_TOOLS): SUBDIRS += cplusplus-keywordgen diff --git a/src/tools/3rdparty/iossim/IOSSIM_LICENSE b/src/tools/3rdparty/iossim/IOSSIM_LICENSE deleted file mode 100644 index 162622f1db3..00000000000 --- a/src/tools/3rdparty/iossim/IOSSIM_LICENSE +++ /dev/null @@ -1,31 +0,0 @@ -Author: Landon Fuller -Copyright (c) 2008-2011 Plausible Labs Cooperative, Inc. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Modifications made by the following entities are licensed as above: -- Jeff Haynie, Appcelerator, Inc. -- https://github.com/hborders -- http://pivotallabs.com/users/scoward/blog -- Eloy Duran, Fingertips -- Fawzi Mohamed, digia diff --git a/src/tools/3rdparty/iossim/Info.plist b/src/tools/3rdparty/iossim/Info.plist deleted file mode 100644 index a8acefc22a9..00000000000 --- a/src/tools/3rdparty/iossim/Info.plist +++ /dev/null @@ -1,16 +0,0 @@ - - - - - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleExecutable - iossim - CFBundleIdentifier - org.qt-project.qt-creator.iossim - LSUIElement - 1 - - diff --git a/src/tools/3rdparty/iossim/coresimulator/coresimulator.h b/src/tools/3rdparty/iossim/coresimulator/coresimulator.h deleted file mode 100644 index 6f0e57486ef..00000000000 --- a/src/tools/3rdparty/iossim/coresimulator/coresimulator.h +++ /dev/null @@ -1,450 +0,0 @@ -// -// Generated by class-dump 3.5 (64 bit). -// -// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. -// - -#pragma mark Function Pointers and Blocks - -typedef void (*CDUnknownFunctionPointerType)(void); // return type and parameters are unknown - -typedef void (^CDUnknownBlockType)(void); // return type and parameters are unknown - -#pragma mark Named Structures - -/*struct CGSize { - double width; - double height; -};*/ - -#pragma mark - - -// -// File: $(DEVELOPER_DIR)/Library/PrivateFrameworks/CoreSimulator.framework/Versions/A/CoreSimulator -// UUID: C7A40E7B-B10C-3CB4-85F5-42071E2E5C4C -// -// Arch: x86_64 -// Current version: 84.0.0 -// Compatibility version: 1.0.0 -// Source version: 84.0.0.0.0 -// Minimum Mac OS X version: 10.9.0 -// SDK version: 10.9.0 -// -// Objective-C Garbage Collection: Unsupported -// - -@protocol OS_dispatch_queue; -@protocol OS_xpc_object; -@protocol SimBridge; -@class SimDevice; -@class SimDeviceSet; -@class SimDeviceType; -@class SimRuntime; -@class SimDeviceNotificationManager; -@class SimServiceConnectionManager; - -@protocol SimDeviceNotifier -- (BOOL)unregisterNotificationHandler:(unsigned long long)arg1 error:(id *)arg2; -- (unsigned long long)registerNotificationHandlerOnQueue:(NSObject *)arg1 handler:(void (^)(NSDictionary *))arg2; -- (unsigned long long)registerNotificationHandler:(void (^)(NSDictionary *))arg1; -@end - -@interface NSArray (argv) -- (void)freeArgv:(char **)arg1; -- (char **)argv; -@end - -@interface NSDictionary (envp) -- (void)freeEnvp:(char **)arg1; -- (char **)envp; -@end - -@interface NSError (SimError) -+ (id)errorFromXPCDict:(id)arg1; -+ (id)errorWithSimErrno:(int)arg1 localizedDescription:(id)arg2; -+ (id)errorWithSimErrno:(int)arg1 userInfo:(id)arg2; -+ (id)errorWithSimErrno:(int)arg1; -- (id)xpcDict; -@end - -@interface NSString (cputype) -+ (id)stringForCPUType:(int)arg1; -- (int)cputype; -@end - -@interface NSUserDefaults (SimDefaults) -+ (id)simulatorDefaults; -@end - -@interface SimDevice : NSObject -{ - unsigned long long _state; - NSString *_name; - NSDictionary *_uiWindowProperties; - SimDeviceType *_deviceType; - SimRuntime *_runtime; - NSUUID *_UDID; - SimDeviceSet *_deviceSet; - SimServiceConnectionManager *_connectionManager; - NSString *_setPath; - SimDeviceNotificationManager *_notificationManager; - NSObject *_bootstrapQueue; - NSMutableDictionary *_registeredServices; - NSObject *_stateVariableQueue; - NSMachPort *_deathTriggerPort; - NSMachPort *_hostSupportPort; - NSMachPort *_simBridgePort; - NSDistantObject *_simBridgeDistantObject; -} - -+ (id)simDevice:(id)arg1 UDID:(id)arg2 deviceType:(id)arg3 runtime:(id)arg4 state:(unsigned long long)arg5 connectionManager:(id)arg6 setPath:(id)arg7; -+ (id)simDeviceAtPath:(id)arg1; -+ (id)createDeviceWithName:(id)arg1 setPath:(id)arg2 deviceType:(id)arg3 runtime:(id)arg4; -+ (BOOL)isValidState:(unsigned long long)arg1; -@property(retain, nonatomic) NSDistantObject *simBridgeDistantObject; // @synthesize simBridgeDistantObject=_simBridgeDistantObject; -@property(retain, nonatomic) NSMachPort *simBridgePort; // @synthesize simBridgePort=_simBridgePort; -@property(retain, nonatomic) NSMachPort *hostSupportPort; // @synthesize hostSupportPort=_hostSupportPort; -@property(retain) NSMachPort *deathTriggerPort; // @synthesize deathTriggerPort=_deathTriggerPort; -@property(retain) NSObject *stateVariableQueue; // @synthesize stateVariableQueue=_stateVariableQueue; -@property(retain) NSMutableDictionary *registeredServices; // @synthesize registeredServices=_registeredServices; -@property(retain) NSObject *bootstrapQueue; // @synthesize bootstrapQueue=_bootstrapQueue; -@property(retain) SimDeviceNotificationManager *notificationManager; // @synthesize notificationManager=_notificationManager; -@property(copy) NSString *setPath; // @synthesize setPath=_setPath; -@property(retain) SimServiceConnectionManager *connectionManager; // @synthesize connectionManager=_connectionManager; -@property(readonly) SimDeviceSet *deviceSet; // @synthesize deviceSet=_deviceSet; -@property(copy) NSUUID *UDID; // @synthesize UDID=_UDID; -@property(retain) SimRuntime *runtime; // @synthesize runtime=_runtime; -@property(retain) SimDeviceType *deviceType; // @synthesize deviceType=_deviceType; -//- (void).cxx_destruct; -- (BOOL)isAvailableWithError:(id *)arg1; -@property(readonly) BOOL available; -- (int)launchApplicationWithID:(id)arg1 options:(id)arg2 error:(id *)arg3; -- (void)launchApplicationAsyncWithID:(id)arg1 options:(id)arg2 completionHandler:(CDUnknownBlockType)arg3; -- (id)installedAppsWithError:(id *)arg1; -- (BOOL)applicationIsInstalled:(id)arg1 type:(id *)arg2 error:(id *)arg3; -- (BOOL)uninstallApplication:(id)arg1 withOptions:(id)arg2 error:(id *)arg3; -- (BOOL)installApplication:(id)arg1 withOptions:(id)arg2 error:(id *)arg3; -- (BOOL)setKeyboardLanguage:(id)arg1 error:(id *)arg2; -- (BOOL)addPhoto:(id)arg1 error:(id *)arg2; -- (BOOL)openURL:(id)arg1 error:(id *)arg2; -- (void)simBridgeSync:(CDUnknownBlockType)arg1; -- (void)simBridgeAsync:(CDUnknownBlockType)arg1; -- (void)simBridgeCommon:(CDUnknownBlockType)arg1; -- (long long)compare:(id)arg1; -- (id)newDeviceNotification; -- (id)createXPCNotification:(const char *)arg1; -- (id)createXPCRequest:(const char *)arg1; -- (void)handleXPCRequestSpawn:(id)arg1 peer:(id)arg2; -- (void)handleXPCRequestGetenv:(id)arg1 peer:(id)arg2; -- (void)handleXPCRequestLookup:(id)arg1 peer:(id)arg2; -- (void)handleXPCRequestRegister:(id)arg1 peer:(id)arg2; -- (void)handleXPCRequestRestore:(id)arg1 peer:(id)arg2; -- (void)handleXPCRequestUpdateUIWindow:(id)arg1 peer:(id)arg2; -- (void)handleXPCRequestErase:(id)arg1 peer:(id)arg2; -- (void)handleXPCRequestUpgrade:(id)arg1 peer:(id)arg2; -- (void)handleXPCRequestShutdown:(id)arg1 peer:(id)arg2; -- (void)handleXPCRequestBoot:(id)arg1 peer:(id)arg2; -- (void)handleXPCRequestRename:(id)arg1 peer:(id)arg2; -- (void)handleXPCRequest:(id)arg1 peer:(id)arg2; -- (void)handleXPCNotificationDeviceUIWindowPropertiesChanged:(id)arg1; -- (void)handleXPCNotificationDeviceRenamed:(id)arg1; -- (void)handleXPCNotificationDeviceStateChanged:(id)arg1; -- (void)handleXPCNotification:(id)arg1; -@property(copy) NSDictionary *uiWindowProperties; -@property(copy) NSString *name; -@property unsigned long long state; -- (id)stateString; -- (BOOL)unregisterNotificationHandler:(unsigned long long)arg1 error:(id *)arg2; -- (unsigned long long)registerNotificationHandlerOnQueue:(id)arg1 handler:(CDUnknownBlockType)arg2; -- (unsigned long long)registerNotificationHandler:(CDUnknownBlockType)arg1; -- (void)simulateMemoryWarning; -- (id)memoryWarningFilePath; -@property(readonly, copy) NSString *logPath; -- (id)dataPath; -- (id)devicePath; -- (id)environment; -- (int)_spawnFromSelfWithPath:(id)arg1 options:(id)arg2 terminationHandler:(CDUnknownBlockType)arg3 error:(id *)arg4; -- (int)_spawnFromLaunchdWithPath:(id)arg1 options:(id)arg2 terminationHandler:(CDUnknownBlockType)arg3 error:(id *)arg4; -- (int)spawnWithPath:(id)arg1 options:(id)arg2 terminationHandler:(CDUnknownBlockType)arg3 error:(id *)arg4; -- (void)spawnAsyncWithPath:(id)arg1 options:(id)arg2 terminationHandler:(CDUnknownBlockType)arg3 completionHandler:(CDUnknownBlockType)arg4; -- (BOOL)registerPort:(unsigned int)arg1 service:(id)arg2 error:(id *)arg3; -- (unsigned int)lookup:(id)arg1 error:(id *)arg2; -- (unsigned int)_lookup:(id)arg1 error:(id *)arg2; -- (id)getenv:(id)arg1 error:(id *)arg2; -- (BOOL)restoreContentsAndSettingsFromDevice:(id)arg1 error:(id *)arg2; -- (void)restoreContentsAndSettingsAsyncFromDevice:(id)arg1 completionHandler:(CDUnknownBlockType)arg2; -- (BOOL)updateUIWindowProperties:(id)arg1 error:(id *)arg2; -- (void)updateAsyncUIWindowProperties:(id)arg1 completionHandler:(CDUnknownBlockType)arg2; -- (void)_sendUIWindowPropertiesToDevice; -- (BOOL)eraseContentsAndSettingsWithError:(id *)arg1; -- (void)eraseContentsAndSettingsAsyncWithCompletionHandler:(CDUnknownBlockType)arg1; -- (BOOL)upgradeToRuntime:(id)arg1 error:(id *)arg2; -- (void)upgradeAsyncToRuntime:(id)arg1 completionHandler:(CDUnknownBlockType)arg2; -- (BOOL)rename:(id)arg1 error:(id *)arg2; -- (void)renameAsync:(id)arg1 completionHandler:(CDUnknownBlockType)arg2; -- (BOOL)shutdownWithError:(id *)arg1; -- (BOOL)_shutdownWithError:(id *)arg1; -- (void)shutdownAsyncWithCompletionHandler:(CDUnknownBlockType)arg1; -- (BOOL)bootWithOptions:(id)arg1 error:(id *)arg2; -- (void)bootAsyncWithOptions:(id)arg1 completionHandler:(CDUnknownBlockType)arg2; -- (void)launchdDeathHandlerWithDeathPort:(id)arg1; -- (BOOL)startLaunchdWithDeathPort:(id)arg1 deathHandler:(CDUnknownBlockType)arg2 error:(id *)arg3; -- (void)registerPortsWithLaunchd; -@property(readonly) NSArray *launchDaemonsPaths; -- (BOOL)removeLaunchdJobWithError:(id *)arg1; -- (BOOL)createLaunchdJobWithError:(id *)arg1 extraEnvironment:(id)arg2; -- (BOOL)clearTmpWithError:(id *)arg1; -- (BOOL)ensureLogPathsWithError:(id *)arg1; -- (BOOL)supportsFeature:(id)arg1; -@property(readonly, copy) NSString *launchdJobName; -- (void)saveToDisk; -- (id)saveStateDict; -- (void)validateAndFixState; -@property(readonly, copy) NSString *descriptiveName; -- (id)description; -- (void)dealloc; -- (id)initDevice:(id)arg1 UDID:(id)arg2 deviceType:(id)arg3 runtime:(id)arg4 state:(unsigned long long)arg5 connectionManager:(id)arg6 setPath:(id)arg7; - -@end - -@interface SimDeviceNotificationManager : NSObject -{ - NSObject *_handlersQueue; - NSMutableDictionary *_handlers; - unsigned long long _next_regID; - NSObject *_sendQueue; -} - -@property(retain) NSObject *sendQueue; // @synthesize sendQueue=_sendQueue; -@property unsigned long long next_regID; // @synthesize next_regID=_next_regID; -@property(retain) NSMutableDictionary *handlers; // @synthesize handlers=_handlers; -@property(retain) NSObject *handlersQueue; // @synthesize handlersQueue=_handlersQueue; -//- (void).cxx_destruct; -- (void)sendNotification:(id)arg1; -- (BOOL)unregisterNotificationHandler:(unsigned long long)arg1 error:(id *)arg2; -- (unsigned long long)registerNotificationHandlerOnQueue:(id)arg1 handler:(CDUnknownBlockType)arg2; -- (unsigned long long)registerNotificationHandler:(CDUnknownBlockType)arg1; -- (void)dealloc; -- (id)init; - -@end - -@interface SimDeviceSet : NSObject -{ - NSString *_setPath; - NSObject *_devicesQueue; - NSMutableDictionary *__devicesByUDID; - NSMutableDictionary *_devicesNotificationRegIDs; - SimServiceConnectionManager *_connectionManager; - SimDeviceNotificationManager *_notificationManager; -} - -+ (id)setForSetPath:(id)arg1; -+ (id)defaultSet; -+ (id)defaultSetPath; -@property(retain) SimDeviceNotificationManager *notificationManager; // @synthesize notificationManager=_notificationManager; -@property(retain) SimServiceConnectionManager *connectionManager; // @synthesize connectionManager=_connectionManager; -@property(retain) NSMutableDictionary *devicesNotificationRegIDs; // @synthesize devicesNotificationRegIDs=_devicesNotificationRegIDs; -@property(retain) NSMutableDictionary *_devicesByUDID; // @synthesize _devicesByUDID=__devicesByUDID; -@property(retain) NSObject *devicesQueue; // @synthesize devicesQueue=_devicesQueue; -@property(copy) NSString *setPath; // @synthesize setPath=_setPath; -//- (void).cxx_destruct; -- (void)handleXPCRequestDeleteDevice:(id)arg1 peer:(id)arg2 device:(id)arg3; -- (void)handleXPCRequestCreateDevice:(id)arg1 peer:(id)arg2; -- (void)handleXPCRequest:(id)arg1 peer:(id)arg2; -- (void)handleXPCNotificationDeviceRemoved:(id)arg1; -- (void)handleXPCNotificationDeviceAdded:(id)arg1; -- (void)handleXPCNotification:(id)arg1; -- (BOOL)deleteDevice:(id)arg1 error:(id *)arg2; -- (void)deleteDeviceAsync:(id)arg1 completionHandler:(CDUnknownBlockType)arg2; -- (id)createDeviceWithType:(id)arg1 runtime:(id)arg2 name:(id)arg3 error:(id *)arg4; -- (void)createDeviceAsyncWithType:(id)arg1 runtime:(id)arg2 name:(id)arg3 completionHandler:(CDUnknownBlockType)arg4; -- (BOOL)unregisterNotificationHandler:(unsigned long long)arg1 error:(id *)arg2; -- (unsigned long long)registerNotificationHandlerOnQueue:(id)arg1 handler:(CDUnknownBlockType)arg2; -- (unsigned long long)registerNotificationHandler:(CDUnknownBlockType)arg1; -- (void)removeDeviceAsync:(id)arg1; -- (void)addDevice:(id)arg1; -- (void)addDeviceAsync:(id)arg1; -- (void)updateDefaultDevices; -- (id)defaultCreatedPlistPath; -@property(readonly, copy) NSArray *availableDevices; -@property(readonly, copy) NSArray *devices; -@property(readonly, copy) NSDictionary *devicesByUDID; -- (id)description; -- (void)dealloc; -- (id)initWithSetPath:(id)arg1; - -@end - -@interface SimDeviceType : NSObject -{ - float _mainScreenScale; - unsigned int _minRuntimeVersion; - unsigned int _maxRuntimeVersion; - NSString *_name; - NSString *_identifier; - NSString *_modelIdentifier; - NSBundle *_bundle; - NSArray *_supportedArchs; - NSArray *_supportedProductFamilyIDs; - NSDictionary *_capabilities; - NSString *_springBoardConfigName; - NSString *_productClass; - NSDictionary *_environment_extra; - NSDictionary *_aliases; - NSDictionary *_supportedFeatures; - NSDictionary *_supportedFeaturesConditionalOnRuntime; - struct CGSize _mainScreenSize; - struct CGSize _mainScreenDPI; -} - -+ (id)supportedDeviceTypesByName; -+ (id)supportedDeviceTypesByAlias; -+ (id)supportedDeviceTypesByIdentifier; -+ (id)supportedDeviceTypes; -+ (id)supportedDevices; -@property(copy) NSDictionary *supportedFeaturesConditionalOnRuntime; // @synthesize supportedFeaturesConditionalOnRuntime=_supportedFeaturesConditionalOnRuntime; -@property(copy) NSDictionary *supportedFeatures; // @synthesize supportedFeatures=_supportedFeatures; -@property(copy) NSDictionary *aliases; // @synthesize aliases=_aliases; -@property(copy) NSDictionary *environment_extra; // @synthesize environment_extra=_environment_extra; -@property(copy) NSString *productClass; // @synthesize productClass=_productClass; -@property(copy) NSString *springBoardConfigName; // @synthesize springBoardConfigName=_springBoardConfigName; -@property unsigned int maxRuntimeVersion; // @synthesize maxRuntimeVersion=_maxRuntimeVersion; -@property unsigned int minRuntimeVersion; // @synthesize minRuntimeVersion=_minRuntimeVersion; -@property struct CGSize mainScreenDPI; // @synthesize mainScreenDPI=_mainScreenDPI; -@property struct CGSize mainScreenSize; // @synthesize mainScreenSize=_mainScreenSize; -@property(copy) NSDictionary *capabilities; // @synthesize capabilities=_capabilities; -@property float mainScreenScale; // @synthesize mainScreenScale=_mainScreenScale; -@property(copy) NSArray *supportedProductFamilyIDs; // @synthesize supportedProductFamilyIDs=_supportedProductFamilyIDs; -@property(copy) NSArray *supportedArchs; // @synthesize supportedArchs=_supportedArchs; -@property(retain) NSBundle *bundle; // @synthesize bundle=_bundle; -@property(copy) NSString *modelIdentifier; // @synthesize modelIdentifier=_modelIdentifier; -@property(copy) NSString *identifier; // @synthesize identifier=_identifier; -@property(copy) NSString *name; // @synthesize name=_name; -//- (void).cxx_destruct; -- (Class)deviceClass; -- (long long)compare:(id)arg1; -- (BOOL)supportsFeatureConditionally:(id)arg1; -- (BOOL)supportsFeature:(id)arg1; -- (id)environmentForRuntime:(id)arg1; -- (id)environment; -@property(readonly, copy) NSString *productFamily; -@property(readonly) int productFamilyID; -- (id)description; -- (void)dealloc; -- (id)initWithBundle:(id)arg1; -- (id)initWithPath:(id)arg1; -- (id)init; - -@end - -@interface SimRuntime : NSObject -{ - unsigned int _version; - unsigned int _minHostVersion; - unsigned int _maxHostVersion; - NSString *_name; - NSString *_identifier; - NSBundle *_bundle; - NSString *_root; - NSString *_versionString; - NSString *_buildVersionString; - NSDictionary *_supportedFeatures; - NSDictionary *_supportedFeaturesConditionalOnDeviceType; - NSDictionary *_requiredHostServices; - NSString *_platformPath; - NSArray *_supportedProductFamilyIDs; - NSDictionary *_environment_extra; - void *_libLaunchHostHandle; - NSDictionary *_aliases; -} - -+ (id)supportedRuntimesByAlias; -+ (id)supportedRuntimesByIdentifier; -+ (id)supportedRuntimes; -@property unsigned int maxHostVersion; // @synthesize maxHostVersion=_maxHostVersion; -@property unsigned int minHostVersion; // @synthesize minHostVersion=_minHostVersion; -@property(copy) NSDictionary *aliases; // @synthesize aliases=_aliases; -@property(nonatomic) void *libLaunchHostHandle; // @synthesize libLaunchHostHandle=_libLaunchHostHandle; -@property(copy) NSDictionary *environment_extra; // @synthesize environment_extra=_environment_extra; -@property(copy) NSArray *supportedProductFamilyIDs; // @synthesize supportedProductFamilyIDs=_supportedProductFamilyIDs; -@property(copy) NSString *platformPath; // @synthesize platformPath=_platformPath; -@property(copy) NSDictionary *requiredHostServices; // @synthesize requiredHostServices=_requiredHostServices; -@property(copy) NSDictionary *supportedFeaturesConditionalOnDeviceType; // @synthesize supportedFeaturesConditionalOnDeviceType=_supportedFeaturesConditionalOnDeviceType; -@property(copy) NSDictionary *supportedFeatures; // @synthesize supportedFeatures=_supportedFeatures; -@property unsigned int version; // @synthesize version=_version; -@property(copy) NSString *buildVersionString; // @synthesize buildVersionString=_buildVersionString; -@property(copy) NSString *versionString; // @synthesize versionString=_versionString; -@property(copy) NSString *root; // @synthesize root=_root; -@property(retain) NSBundle *bundle; // @synthesize bundle=_bundle; -@property(copy) NSString *identifier; // @synthesize identifier=_identifier; -@property(copy) NSString *name; // @synthesize name=_name; -//- (void).cxx_destruct; -- (id)platformRuntimeOverlay; -- (CDUnknownFunctionPointerType)launch_sim_set_death_handler; -- (CDUnknownFunctionPointerType)launch_sim_waitpid; -- (CDUnknownFunctionPointerType)launch_sim_spawn; -- (CDUnknownFunctionPointerType)launch_sim_getenv; -- (CDUnknownFunctionPointerType)launch_sim_bind_session_to_port; -- (CDUnknownFunctionPointerType)launch_sim_find_endpoint; -- (CDUnknownFunctionPointerType)launch_sim_register_endpoint; -- (BOOL)isAvailableWithError:(id *)arg1; -@property(readonly) BOOL available; -- (BOOL)verifyRuntime; -- (id)dyld_simPath; -- (BOOL)createInitialContentPath:(id)arg1 error:(id *)arg2; -- (void)createInitialContentPath:(id)arg1; -- (id)sampleContentPath; -- (long long)compare:(id)arg1; -- (BOOL)supportsFeatureConditionally:(id)arg1; -- (BOOL)supportsFeature:(id)arg1; -- (BOOL)supportsDeviceType:(id)arg1; -- (BOOL)supportsDevice:(id)arg1; -- (id)environment; -- (id)description; -- (void)dealloc; -- (id)initWithBundle:(id)arg1; -- (id)initWithPath:(id)arg1; -- (id)init; - -@end - -@interface SimServiceConnectionManager : NSObject -{ - NSObject *_serviceConnection; - NSObject *_serviceConnectionQueue; - NSDate *_lastConnectionTime; -} - -+ (void)useService:(BOOL)arg1; -+ (id)sharedConnectionManager; -@property(retain) NSDate *lastConnectionTime; // @synthesize lastConnectionTime=_lastConnectionTime; -@property(retain) NSObject *serviceConnectionQueue; // @synthesize serviceConnectionQueue=_serviceConnectionQueue; -@property(retain) NSObject *serviceConnection; // @synthesize serviceConnection=_serviceConnection; -//- (void).cxx_destruct; -- (void)handleXPCEvent:(id)arg1; -- (void)dealloc; -- (BOOL)connect; -- (id)init; - -@end - -@interface SimVerifier : NSObject -{ - NSObject *_serviceConnection; - NSObject *_serviceConnectionQueue; -} - -+ (id)verificationError:(int)arg1; -+ (id)connectionError; -+ (id)sharedVerifier; -@property(retain) NSObject *serviceConnectionQueue; // @synthesize serviceConnectionQueue=_serviceConnectionQueue; -@property(retain) NSObject *serviceConnection; // @synthesize serviceConnection=_serviceConnection; -//- (void).cxx_destruct; -- (id)verifyDyldSim:(id)arg1; -- (id)verifyAll; -- (BOOL)verifyAllWithError:(id *)arg1; -- (void)dealloc; -- (id)init; - -@end diff --git a/src/tools/3rdparty/iossim/dvtiphonesimulatorremoteclient/dvtiphonesimulatorremoteclient.h b/src/tools/3rdparty/iossim/dvtiphonesimulatorremoteclient/dvtiphonesimulatorremoteclient.h deleted file mode 100644 index 7f83f4b37f7..00000000000 --- a/src/tools/3rdparty/iossim/dvtiphonesimulatorremoteclient/dvtiphonesimulatorremoteclient.h +++ /dev/null @@ -1,295 +0,0 @@ -#import "../coresimulator/coresimulator.h" - -// -// Generated by class-dump 3.5 (64 bit). -// -// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. -// - -#pragma mark Blocks - -typedef void (^CDUnknownBlockType)(void); // return type and parameters are unknown - -#pragma mark - - -// -// File: $(DEVELOPER_DIR)/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/DVTiPhoneSimulatorRemoteClient.framework/Versions/A/DVTiPhoneSimulatorRemoteClient -// -// Arch: x86_64 -// Current version: 12.0.0 -// Compatibility version: 1.0.0 -// Source version: 5037.3.0.0.0 -// Minimum Mac OS X version: 10.8.0 -// SDK version: 10.9.0 -// -// Objective-C Garbage Collection: Unsupported -// -// Run path: @loader_path/../../../../PrivateFrameworks/ -// = $(DEVELOPER_DIR)/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks -// - - -@class DTiPhoneSimulatorApplicationSpecifier; -@class DTiPhoneSimulatorSession; -@class DTiPhoneSimulatorSessionConfig; -@class DTiPhoneSimulatorSystemRoot; -@class DVTiPhoneSimulatorMessenger; - -@protocol DTiPhoneSimulatorSessionDelegate - -- (void) session: (DTiPhoneSimulatorSession *) session didEndWithError: (NSError *) error; -- (void) session: (DTiPhoneSimulatorSession *) session didStart: (BOOL) started withError: (NSError *) error; - -@end - -@protocol OS_dispatch_source -@end -@protocol OS_dispatch_queue -@end -@class DVTDispatchLock; -@class DVTConfinementServiceConnection; -@class DVTTask; - - -@interface DVTiPhoneSimulatorMessenger : NSObject -{ - DTiPhoneSimulatorSession *_session; - CDUnknownBlockType _readyMessageHandler; - CDUnknownBlockType _runningMessageHandler; - CDUnknownBlockType _appDidLaunchMessageHandler; - CDUnknownBlockType _appDidQuitMessageHandler; - CDUnknownBlockType _appPIDExitedMessageHandler; - CDUnknownBlockType _toolDidLaunchMessageHandler; -} - -+ (id)messengerForSession:(id)arg1 withConnection:(id)arg2; -+ (id)messengerForSession:(id)arg1; -@property(copy, nonatomic) CDUnknownBlockType toolDidLaunchMessageHandler; // @synthesize toolDidLaunchMessageHandler=_toolDidLaunchMessageHandler; -@property(copy, nonatomic) CDUnknownBlockType appPIDExitedMessageHandler; // @synthesize appPIDExitedMessageHandler=_appPIDExitedMessageHandler; -@property(copy, nonatomic) CDUnknownBlockType appDidQuitMessageHandler; // @synthesize appDidQuitMessageHandler=_appDidQuitMessageHandler; -@property(copy, nonatomic) CDUnknownBlockType appDidLaunchMessageHandler; // @synthesize appDidLaunchMessageHandler=_appDidLaunchMessageHandler; -@property(copy, nonatomic) CDUnknownBlockType runningMessageHandler; // @synthesize runningMessageHandler=_runningMessageHandler; -@property(copy, nonatomic) CDUnknownBlockType readyMessageHandler; // @synthesize readyMessageHandler=_readyMessageHandler; -@property(readonly) DTiPhoneSimulatorSession *session; // @synthesize session=_session; -- (void)doUbiquityFetchEvent; -- (void)doFetchEventForPID:(int)arg1; -- (void)backgroundAllApps:(int)arg1; -- (void)startSimulatorToolSessionWithParameters:(id)arg1; -- (void)stopSimulatingLocation; -- (void)startSimulatingLocationWithLatitude:(id)arg1 longitute:(id)arg2; -- (void)endSimulatorSessionWithPID:(int)arg1; -- (void)startSimulatorSessionWithRequestInfo:(id)arg1; -- (void)clearAllMessageHandlers; -- (void)waitPID:(int)arg1 withAppPIDExitedMessagedHandler:(CDUnknownBlockType)arg2; -- (void)disconnectFromService; -- (BOOL)connectToServiceWithSessionOnLaunch:(BOOL)arg1 simulatorPID:(int *)arg2 error:(id *)arg3; -- (id)initWithSession:(id)arg1; - -@end - -@interface DVTiPhoneSimulatorLocalMessenger : DVTiPhoneSimulatorMessenger -{ - BOOL _appTerminationMessageSent; - NSObject *_pidDispatchSource; - DVTTask *_simTask; -} - -- (void)doUbiquityFetchEvent; -- (void)doFetchEventForPID:(int)arg1; -- (void)backgroundAllApps:(int)arg1; -- (void)_handleSimulatorToolDidLaunchMessage:(id)arg1; -- (void)setToolDidLaunchMessageHandler:(CDUnknownBlockType)arg1; -- (void)waitPID:(int)arg1 withAppPIDExitedMessagedHandler:(CDUnknownBlockType)arg2; -- (void)_handleSimulatorAppDidQuitMessage:(id)arg1; -- (void)setAppDidQuitMessageHandler:(CDUnknownBlockType)arg1; -- (void)_handleSimulatorAppDidLaunchMessage:(id)arg1; -- (void)setAppDidLaunchMessageHandler:(CDUnknownBlockType)arg1; -- (void)_handleSimulatorRunningMessage:(id)arg1; -- (void)setRunningMessageHandler:(CDUnknownBlockType)arg1; -- (void)_handleSimulatorReadyMessage:(id)arg1; -- (void)setReadyMessageHandler:(CDUnknownBlockType)arg1; -- (void)startSimulatorToolSessionWithParameters:(id)arg1; -- (void)stopSimulatingLocation; -- (void)startSimulatingLocationWithLatitude:(id)arg1 longitute:(id)arg2; -- (void)endSimulatorSessionWithPID:(int)arg1; -- (void)startSimulatorSessionWithRequestInfo:(id)arg1; -- (void)clearAllMessageHandlers; -- (void)disconnectFromService; -- (BOOL)connectToServiceWithSessionOnLaunch:(BOOL)arg1 simulatorPID:(int *)arg2 error:(id *)arg3; -- (void)_enableObserver:(BOOL)arg1 forName:(id)arg2 selector:(SEL)arg3; - -@end - -@interface DVTiPhoneSimulatorRemoteMessenger : DVTiPhoneSimulatorMessenger -{ - unsigned long long _commandTag; - NSObject *_responseQueue; - DVTDispatchLock *_awaitingLock; - NSMutableDictionary *_awaitingSemaphores; - NSMutableDictionary *_awaitingResponses; - NSMutableSet *_waitingAppPIDs; - DVTConfinementServiceConnection *_connection; -} - -@property(readonly) DVTConfinementServiceConnection *connection; // @synthesize connection=_connection; -- (void)handleNotificationResponse:(id)arg1; -- (void)waitPID:(int)arg1 withAppPIDExitedMessagedHandler:(CDUnknownBlockType)arg2; -- (void)startSimulatorToolSessionWithParameters:(id)arg1; -- (void)stopSimulatingLocation; -- (void)startSimulatingLocationWithLatitude:(id)arg1 longitute:(id)arg2; -- (void)endSimulatorSessionWithPID:(int)arg1; -- (void)startSimulatorSessionWithRequestInfo:(id)arg1; -- (void)disconnectFromService; -- (BOOL)connectToServiceWithSessionOnLaunch:(BOOL)arg1 simulatorPID:(int *)arg2 error:(id *)arg3; -- (BOOL)sendTaggedRequest:(id)arg1 awaitingResponse:(id *)arg2 error:(id *)arg3; -- (id)nextCommandTag; -- (id)awaitResponseWithTag:(id)arg1 error:(id *)arg2; -- (void)enqueueResponse:(id)arg1 withTag:(id)arg2 error:(id)arg3; -- (BOOL)sendRequest:(id)arg1 withTag:(id)arg2 error:(id *)arg3; -- (id)initWithSession:(id)arg1 connection:(id)arg2; - -@end - -@interface DTiPhoneSimulatorSession : NSObject -{ - int _simulatedApplicationPID; - int _simulatorPID; - NSString *_uuid; - id _delegate; - NSString *_simulatedAppPath; - long long _sessionLifecycleProgress; - NSTimer *_timeoutTimer; - DTiPhoneSimulatorSessionConfig *_sessionConfig; - DVTiPhoneSimulatorMessenger *_messenger; -} - -@property(retain) DVTiPhoneSimulatorMessenger *messenger; // @synthesize messenger=_messenger; -@property(copy, nonatomic) DTiPhoneSimulatorSessionConfig *sessionConfig; // @synthesize sessionConfig=_sessionConfig; -@property(retain, nonatomic) NSTimer *timeoutTimer; // @synthesize timeoutTimer=_timeoutTimer; -@property(nonatomic) long long sessionLifecycleProgress; // @synthesize sessionLifecycleProgress=_sessionLifecycleProgress; -@property int simulatorPID; // @synthesize simulatorPID=_simulatorPID; -@property(copy) NSString *simulatedAppPath; // @synthesize simulatedAppPath=_simulatedAppPath; -@property int simulatedApplicationPID; // @synthesize simulatedApplicationPID=_simulatedApplicationPID; -@property(retain, nonatomic) id delegate; // @synthesize delegate=_delegate; -@property(copy, nonatomic) NSString *uuid; // @synthesize uuid=_uuid; -- (void)doUbiquityFetchEvent; -- (void)doFetchEventForPID:(int)arg1; -- (void)backgroundAllApps:(int)arg1; -- (id)_invalidConfigError; -- (void)_endSimulatorSession; -- (void)_callDelegateResponseFromSessionEndedInfo:(id)arg1; -- (void)_callDelegateResponseFromSessionStartedInfo:(id)arg1; -- (id)_sessionStartRequestInfoFromConfig:(id)arg1 withError:(id *)arg2; -- (BOOL)_startToolSessionInSimulatorWithError:(id *)arg1; -- (BOOL)_startApplicationSessionInSimulatorWithError:(id *)arg1; -- (BOOL)_startBasicSessionInSimulatorWithError:(id *)arg1; -- (BOOL)_startSessionInSimulatorWithError:(id *)arg1; -- (BOOL)_handleSessionEndedInSimulator:(id)arg1 notification:(id)arg2; -- (void)_handleSessionStartedWithSim:(id)arg1; -- (void)_handleSessionStartedInSimulator:(id)arg1; -- (void)_handleSimulatorReadyMessage:(id)arg1; -- (void)_timeoutElapsed:(id)arg1; -- (BOOL)attachedToTargetWithConfig:(id)arg1 error:(id *)arg2; -- (void)stopLocationSimulation; -- (void)simulateLocationWithLatitude:(id)arg1 longitude:(id)arg2; -- (void)requestEndWithTimeout:(double)arg1; -- (BOOL)requestStartWithConfig:(id)arg1 timeout:(double)arg2 error:(id *)arg3; -- (BOOL)_setUpSimulatorMessengerWithConfig:(id)arg1 error:(id *)arg2; -- (id)description; -- (void)dealloc; -- (id)init; - -@end - -@interface DTiPhoneSimulatorSessionConfig : NSObject -{ - BOOL _launchForBackgroundFetch; - BOOL _simulatedApplicationShouldWaitForDebugger; - NSString *_localizedClientName; - DTiPhoneSimulatorSystemRoot *_simulatedSystemRoot; - NSString *_simulatedDeviceInfoName; - NSNumber *_simulatedDeviceFamily; - NSString *_simulatedArchitecture; - NSNumber *_simulatedDisplayHeight; - NSNumber *_simulatedDisplayScale; - DTiPhoneSimulatorApplicationSpecifier *_applicationToSimulateOnStart; - NSNumber *_pid; - NSArray *_simulatedApplicationLaunchArgs; - NSDictionary *_simulatedApplicationLaunchEnvironment; - NSString *_simulatedApplicationStdOutPath; - NSString *_simulatedApplicationStdErrPath; - NSFileHandle *_stdinFileHandle; - NSFileHandle *_stdoutFileHandle; - NSFileHandle *_stderrFileHandle; - id _confinementService; -} - -+ (id)displayNameForDeviceFamily:(id)arg1; -@property(retain) id confinementService; // @synthesize confinementService=_confinementService; -@property(retain) NSFileHandle *stderrFileHandle; // @synthesize stderrFileHandle=_stderrFileHandle; -@property(retain) NSFileHandle *stdoutFileHandle; // @synthesize stdoutFileHandle=_stdoutFileHandle; -@property(retain) NSFileHandle *stdinFileHandle; // @synthesize stdinFileHandle=_stdinFileHandle; -@property(copy) NSString *simulatedApplicationStdErrPath; // @synthesize simulatedApplicationStdErrPath=_simulatedApplicationStdErrPath; -@property(copy) NSString *simulatedApplicationStdOutPath; // @synthesize simulatedApplicationStdOutPath=_simulatedApplicationStdOutPath; -@property BOOL simulatedApplicationShouldWaitForDebugger; // @synthesize simulatedApplicationShouldWaitForDebugger=_simulatedApplicationShouldWaitForDebugger; -@property(copy) NSDictionary *simulatedApplicationLaunchEnvironment; // @synthesize simulatedApplicationLaunchEnvironment=_simulatedApplicationLaunchEnvironment; -@property(copy) NSArray *simulatedApplicationLaunchArgs; // @synthesize simulatedApplicationLaunchArgs=_simulatedApplicationLaunchArgs; -@property(copy) NSNumber *pid; // @synthesize pid=_pid; -@property(copy) DTiPhoneSimulatorApplicationSpecifier *applicationToSimulateOnStart; // @synthesize applicationToSimulateOnStart=_applicationToSimulateOnStart; -@property(copy) NSNumber *simulatedDisplayScale; // @synthesize simulatedDisplayScale=_simulatedDisplayScale; -@property(copy) NSNumber *simulatedDisplayHeight; // @synthesize simulatedDisplayHeight=_simulatedDisplayHeight; -@property(copy) NSString *simulatedArchitecture; // @synthesize simulatedArchitecture=_simulatedArchitecture; -@property(copy) NSNumber *simulatedDeviceFamily; // @synthesize simulatedDeviceFamily=_simulatedDeviceFamily; -@property(retain) NSString *simulatedDeviceInfoName; // @synthesize simulatedDeviceInfoName=_simulatedDeviceInfoName; -@property(copy) DTiPhoneSimulatorSystemRoot *simulatedSystemRoot; // @synthesize simulatedSystemRoot=_simulatedSystemRoot; -@property(copy) NSString *localizedClientName; // @synthesize localizedClientName=_localizedClientName; -@property BOOL launchForBackgroundFetch; // @synthesize launchForBackgroundFetch=_launchForBackgroundFetch; -@property(retain) SimDevice *device; // @synthesize device=_device; -@property(retain) SimRuntime *runtime; // @synthesize runtime=_runtime; -- (id)description; -- (id)copyWithZone:(struct _NSZone *)arg1; -- (id)init; - -@end - -@interface DTiPhoneSimulatorSystemRoot : NSObject -{ - NSString *sdkRootPath; - NSString *sdkVersion; - NSString *sdkDisplayName; -} - -+ (id)rootWithSDKVersion:(id)arg1; -+ (id)rootWithSDKPath:(id)arg1; -+ (id)defaultRoot; -+ (id)knownRoots; -+ (void)initialize; -@property(copy) NSString *sdkDisplayName; // @synthesize sdkDisplayName; -@property(copy) NSString *sdkVersion; // @synthesize sdkVersion; -@property(copy) NSString *sdkRootPath; // @synthesize sdkRootPath; -@property(readonly) SimRuntime *runtime; // @synthesize runtime=_runtime; -- (id)description; -- (long long)compare:(id)arg1; -- (id)copyWithZone:(struct _NSZone *)arg1; -- (BOOL)isEqual:(id)arg1; -- (id)initWithSDKPath:(id)arg1; - -@end - -@interface DTiPhoneSimulatorApplicationSpecifier : NSObject -{ - NSString *appPath; - NSString *bundleID; - NSString *toolPath; -} - -+ (id)specifierWithToolPath:(id)arg1; -+ (id)specifierWithApplicationBundleIdentifier:(id)arg1; -+ (id)specifierWithApplicationPath:(id)arg1; -@property(copy, nonatomic) NSString *toolPath; // @synthesize toolPath; -@property(copy, nonatomic) NSString *bundleID; // @synthesize bundleID; -@property(copy, nonatomic) NSString *appPath; // @synthesize appPath; -- (id)description; -- (id)copyWithZone:(struct _NSZone *)arg1; - -@end diff --git a/src/tools/3rdparty/iossim/iossim.pro b/src/tools/3rdparty/iossim/iossim.pro deleted file mode 100644 index eb8a49f42dd..00000000000 --- a/src/tools/3rdparty/iossim/iossim.pro +++ /dev/null @@ -1,60 +0,0 @@ -CONFIG += console - -QT -= core -QT -= gui -QT -= test - -CONFIG -= app_bundle - -include(../../../../qtcreator.pri) - -# Prevent from popping up in the dock when launched. -# We embed the Info.plist file, so the application doesn't need to -# be a bundle. -QMAKE_LFLAGS += -Wl,-sectcreate,__TEXT,__info_plist,\"$$PWD/Info.plist\" - -fobjc-link-runtime - -LIBS += \ - -framework Foundation \ - -framework CoreServices \ - -framework ApplicationServices \ - -framework CoreFoundation \ - -F/System/Library/PrivateFrameworks \ - -framework IOKit -framework AppKit - -iPhoneSimulatorRemoteClientDirectLinking { - LIBS += \ - -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks \ - -F/Applications/Xcode.app/Contents/OtherFrameworks - LIBS += \ - -framework DTViPhoneSimulatorRemoteClient - QMAKE_RPATHDIR += /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks \ - /Applications/Xcode.app/Contents/OtherFrameworks \ - /System/Library/PrivateFrameworks -} - -TEMPLATE = app - -# put into a subdir, so we can deploy a separate qt.conf for it -DESTDIR = $$IDE_LIBEXEC_PATH/ios -include(../../../rpath.pri) - -OBJECTIVE_SOURCES += \ - main.mm \ - nsprintf.mm \ - nsstringexpandpath.mm \ - iphonesimulator.mm - -HEADERS += \ - iphonesimulator.h \ - nsprintf.h \ - nsstringexpandpath.h \ - version.h \ - dvtiphonesimulatorremoteclient/dvtiphonesimulatorremoteclient.h \ - coresimulator/coresimulator.h - -DISTFILES = IOSSIM_LICENSE \ - Info.plist - -target.path = $$INSTALL_LIBEXEC_PATH/ios -INSTALLS += target diff --git a/src/tools/3rdparty/iossim/iossim.qbs b/src/tools/3rdparty/iossim/iossim.qbs deleted file mode 100644 index 5a7f6425635..00000000000 --- a/src/tools/3rdparty/iossim/iossim.qbs +++ /dev/null @@ -1,30 +0,0 @@ -import qbs 1.0 - -QtcTool { - name: "iossim" - condition: qbs.targetOS.contains("macos") - - Depends { name: "bundle" } - Depends { name: "Qt"; submodules: ["widgets"] } - Depends { name: "app_version_header" } - - files: [ - "main.mm", - "nsprintf.mm", - "nsstringexpandpath.mm", - "iphonesimulator.mm", - "iphonesimulator.h", - "nsprintf.h", - "nsstringexpandpath.h", - "version.h", - "dvtiphonesimulatorremoteclient/dvtiphonesimulatorremoteclient.h" - ] - cpp.includePaths: ["."] - cpp.linkerFlags: base.concat(["-fobjc-link-runtime"]) - cpp.frameworks: base.concat(["Foundation", "CoreServices", "ApplicationServices", "IOKit", - "AppKit"]) - cpp.frameworkPaths: base.concat("/System/Library/PrivateFrameworks") - bundle.infoPlistFile: "Info.plist" - - installDir: qtc.ide_libexec_path + "/ios" -} diff --git a/src/tools/3rdparty/iossim/iphonesimulator.h b/src/tools/3rdparty/iossim/iphonesimulator.h deleted file mode 100644 index f2044e73ead..00000000000 --- a/src/tools/3rdparty/iossim/iphonesimulator.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Author: Landon Fuller - * Copyright (c) 2008-2011 Plausible Labs Cooperative, Inc. - * All rights reserved. - * - * See the IOSSIM_LICENSE file in this directory for the license on the source code in this file. - */ - -#import -#import "dvtiphonesimulatorremoteclient/dvtiphonesimulatorremoteclient.h" -#import "version.h" - -@interface iPhoneSimulator : NSObject { -@private - DTiPhoneSimulatorSystemRoot *sdkRoot; - NSFileHandle *stdoutFileHandle; - NSFileHandle *stderrFileHandle; - DTiPhoneSimulatorSession *mySession; - BOOL startOnly; - BOOL exitOnStartup; - BOOL shouldWaitDebugger; - BOOL shouldStartDebugger; - BOOL useGDB; - BOOL verbose; - BOOL alreadyPrintedData; - BOOL retinaDevice; - BOOL tallDevice; - BOOL is64BitDevice; - NSString *deviceTypeId; - NSString *m_stderrPath; - NSString *m_stdoutPath; - NSString *dataPath; - int xcodeVersionInt; -} - -- (id)init; -- (void)dealloc; -- (void)runWithArgc:(int)argc argv:(char **)argv; - -- (void)createStdioFIFO:(NSFileHandle **)fileHandle ofType:(NSString *)type atPath:(NSString **)path; -- (void)removeStdioFIFO:(NSFileHandle *)fileHandle atPath:(NSString *)path; -- (void)stop; -- (void)doExit:(int)errorCode; -- (SimDevice*) findDeviceWithFamily:(NSString *)family retina:(BOOL)retina isTallDevice:(BOOL)isTallDevice is64Bit:(BOOL)is64Bit; -- (NSString*)changeDeviceType:(NSString *)family retina:(BOOL)retina isTallDevice:(BOOL)isTallDevice is64Bit:(BOOL)is64Bit; - -@end diff --git a/src/tools/3rdparty/iossim/iphonesimulator.mm b/src/tools/3rdparty/iossim/iphonesimulator.mm deleted file mode 100644 index c75acef7a9d..00000000000 --- a/src/tools/3rdparty/iossim/iphonesimulator.mm +++ /dev/null @@ -1,974 +0,0 @@ -/* Author: Landon Fuller - * Copyright (c) 2008-2011 Plausible Labs Cooperative, Inc. - * All rights reserved. - * - * See the IOSSIM_LICENSE file in this directory for the license on the source code in this file. - */ - -#import "iphonesimulator.h" -#import "nsstringexpandpath.h" -#import "nsprintf.h" -#import -#import -#import -#import -@class DTiPhoneSimulatorSystemRoot; - -NSString *simulatorPrefrencesName = @"com.apple.iphonesimulator"; -NSString *deviceProperty = @"SimulateDevice"; -NSString *deviceIphoneRetina3_5Inch = @"iPhone Retina (3.5-inch)"; -NSString *deviceIphoneRetina4_0Inch = @"iPhone Retina (4-inch)"; -NSString *deviceIphoneRetina4_0Inch_64bit = @"iPhone Retina (4-inch 64-bit)"; -NSString *deviceIphone = @"iPhone"; -NSString *deviceIpad = @"iPad"; -NSString *deviceIpadRetina = @"iPad Retina"; -NSString *deviceIpadRetina_64bit = @"iPad Retina (64-bit)"; - -NSString* deviceTypeIdIphone4s = @"com.apple.CoreSimulator.SimDeviceType.iPhone-4s"; -NSString* deviceTypeIdIphone5 = @"com.apple.CoreSimulator.SimDeviceType.iPhone-5"; -NSString* deviceTypeIdIphone5s = @"com.apple.CoreSimulator.SimDeviceType.iPhone-5s"; -NSString* deviceTypeIdIphone6 = @"com.apple.CoreSimulator.SimDeviceType.iPhone-6"; -NSString* deviceTypeIdIphone6Plus = @"com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus"; -NSString* deviceTypeIdIpad2 = @"com.apple.CoreSimulator.SimDeviceType.iPad-2"; -NSString* deviceTypeIdIpadRetina = @"com.apple.CoreSimulator.SimDeviceType.iPad-Retina"; -NSString* deviceTypeIdIpadAir = @"com.apple.CoreSimulator.SimDeviceType.iPad-Air"; -NSString* deviceTypeIdResizableIphone = @"com.apple.CoreSimulator.SimDeviceType.Resizable-iPhone"; -NSString* deviceTypeIdResizeableIpad = @"com.apple.CoreSimulator.SimDeviceType.Resizable-iPad"; - -// The path within the developer dir of the private Simulator frameworks. -NSString* const kSimulatorFrameworkRelativePathLegacy = @"Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/DVTiPhoneSimulatorRemoteClient.framework"; -NSString* const kSimulatorFrameworkRelativePath = @"../SharedFrameworks/DVTiPhoneSimulatorRemoteClient.framework"; -NSString* const kDVTFoundationRelativePath = @"../SharedFrameworks/DVTFoundation.framework"; -NSString* const kDevToolsFoundationRelativePath = @"../OtherFrameworks/DevToolsFoundation.framework"; -//NSString* const kSimulatorRelativePath = @"Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app"; -NSString* const kCoreSimulatorRelativePath = @"Library/PrivateFrameworks/CoreSimulator.framework"; - -static pid_t gDebuggerProcessId = 0; - -static const char *gDevDir = 0; - -@interface DVTPlatform : NSObject - -+ (BOOL)loadAllPlatformsReturningError:(NSError **)error; -+ (id)platformForIdentifier:(NSString *)identifier; - -@end - -/** - * A simple iPhoneSimulatorRemoteClient framework. - */ -@implementation iPhoneSimulator - -- (id)init { - self = [super init]; - deviceTypeId = 0; - m_stderrPath = 0; - m_stdoutPath = 0; - dataPath = 0; - xcodeVersionInt = 0; - - mySession = nil; - return self; -} - -- (void)dealloc { - [mySession release]; - [super dealloc]; -} - -- (void)doExit:(int)errorCode { - if (stderrFileHandle != nil) { - [self removeStdioFIFO:stderrFileHandle atPath:m_stderrPath]; - } - - if (stdoutFileHandle != nil) { - [self removeStdioFIFO:stdoutFileHandle atPath:m_stdoutPath]; - } - nsprintf(@"", errorCode); - nsprintf(@""); - fflush(stdout); - fflush(stderr); - exit(errorCode); -} - -// Helper to find a class by name and die if it isn't found. --(Class) FindClassByName:(NSString*) nameOfClass { - Class theClass = NSClassFromString(nameOfClass); - if (!theClass) { - nsfprintf(stderr,@"Failed to find class %@ at runtime.", nameOfClass); - [self doExit:EXIT_FAILURE]; - } - return theClass; -} - -// Loads the Simulator framework from the given developer dir. --(void) LoadSimulatorFramework:(NSString*) developerDir { - // The Simulator framework depends on some of the other Xcode private - // frameworks; manually load them first so everything can be linked up. - NSString* dvtFoundationPath = [developerDir stringByAppendingPathComponent:kDVTFoundationRelativePath]; - - NSBundle* dvtFoundationBundle = - [NSBundle bundleWithPath:dvtFoundationPath]; - if (![dvtFoundationBundle load]){ - nsprintf(@"Unable to dvtFoundationBundle. Error: "); - [self doExit:EXIT_FAILURE]; - return ; - } - NSString* devToolsFoundationPath = [developerDir stringByAppendingPathComponent:kDevToolsFoundationRelativePath]; - NSBundle* devToolsFoundationBundle = - [NSBundle bundleWithPath:devToolsFoundationPath]; - if (![devToolsFoundationBundle load]){ - nsprintf(@"Unable to devToolsFoundationPath."); - return ; - } - NSString* coreSimulatorPath = [developerDir stringByAppendingPathComponent:kCoreSimulatorRelativePath]; - if ([[NSFileManager defaultManager] fileExistsAtPath:coreSimulatorPath]) { - NSBundle* coreSimulatorBundle = [NSBundle bundleWithPath:coreSimulatorPath]; - if (![coreSimulatorBundle load]){ - nsprintf(@"Unable to coreSimulatorPath."); - return ; - } - } - NSString* simBundlePath = [developerDir stringByAppendingPathComponent:kSimulatorFrameworkRelativePathLegacy]; - if (![[NSFileManager defaultManager] fileExistsAtPath:simBundlePath]){ - simBundlePath = [developerDir stringByAppendingPathComponent:kSimulatorFrameworkRelativePath]; - } - NSBundle* simBundle = [NSBundle bundleWithPath:simBundlePath]; - if (![simBundle load]){ - nsprintf(@"Unable to load simulator framework."); - return ; - } - NSError* error = 0; - // Prime DVTPlatform. - Class DVTPlatformClass = [self FindClassByName:@"DVTPlatform"]; - if (![DVTPlatformClass loadAllPlatformsReturningError:&error]) { - nsprintf(@"Unable to loadAllPlatformsReturningError. Error: %@",[error localizedDescription]); - return ; - } - Class systemRootClass = [self FindClassByName:@"DTiPhoneSimulatorSystemRoot"]; - // The following will fail if DVTPlatform hasn't loaded all platforms. - NSAssert(systemRootClass && [systemRootClass knownRoots] != nil, - @"DVTPlatform hasn't been initialized yet."); - // DTiPhoneSimulatorRemoteClient will make this same call, so let's assert - // that it's working. - NSAssert([DVTPlatformClass platformForIdentifier:@"com.apple.platform.iphonesimulator"] != nil, - @"DVTPlatform hasn't been initialized yet."); - return ; -} - -NSString* GetXcodeVersion() { - // Go look for it via xcodebuild. - NSTask* xcodeBuildTask = [[[NSTask alloc] init] autorelease]; - [xcodeBuildTask setLaunchPath:@"/usr/bin/xcodebuild"]; - [xcodeBuildTask setArguments:[NSArray arrayWithObject:@"-version"]]; - - NSPipe* outputPipe = [NSPipe pipe]; - [xcodeBuildTask setStandardOutput:outputPipe]; - NSFileHandle* outputFile = [outputPipe fileHandleForReading]; - - [xcodeBuildTask launch]; - NSData* outputData = [outputFile readDataToEndOfFile]; - [xcodeBuildTask terminate]; - - NSString* output = - [[[NSString alloc] initWithData:outputData - encoding:NSUTF8StringEncoding] autorelease]; - output = [output stringByTrimmingCharactersInSet: - [NSCharacterSet whitespaceAndNewlineCharacterSet]]; - if ([output length] == 0) { - output = nil; - } else { - NSArray* parts = [output componentsSeparatedByCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]]; - if ([parts count] >= 2) { - return parts[1]; - } - } - return output; -} - - -// Finds the developer dir via xcode-select or the DEVELOPER_DIR environment -// variable. -NSString* FindDeveloperDir() { - if (gDevDir) - return [NSString stringWithCString:gDevDir encoding:NSUTF8StringEncoding]; - // Check the env first. - NSDictionary* env = [[NSProcessInfo processInfo] environment]; - NSString* developerDir = [env objectForKey:@"DEVELOPER_DIR"]; - if ([developerDir length] > 0) { - return developerDir; - } - - // Go look for it via xcode-select. - NSTask* xcodeSelectTask = [[[NSTask alloc] init] autorelease]; - [xcodeSelectTask setLaunchPath:@"/usr/bin/xcode-select"]; - [xcodeSelectTask setArguments:[NSArray arrayWithObject:@"-print-path"]]; - - NSPipe* outputPipe = [NSPipe pipe]; - [xcodeSelectTask setStandardOutput:outputPipe]; - NSFileHandle* outputFile = [outputPipe fileHandleForReading]; - - [xcodeSelectTask launch]; - NSData* outputData = [outputFile readDataToEndOfFile]; - [xcodeSelectTask terminate]; - - NSString* output = - [[[NSString alloc] initWithData:outputData - encoding:NSUTF8StringEncoding] autorelease]; - output = [output stringByTrimmingCharactersInSet: - [NSCharacterSet whitespaceAndNewlineCharacterSet]]; - if ([output length] == 0) { - output = nil; - } - return output; -} - -- (void) printUsage { - fprintf(stdout, "Usage: ios-sim <command> <options> [--args ...]\n"); - fprintf(stdout, "\n"); - fprintf(stdout, "Commands:\n"); - fprintf(stdout, " showsdks List the available iOS SDK versions\n"); - fprintf(stdout, " showdevicetypes List the available device types (Xcode6+)\n"); - fprintf(stdout, " launch <application path> Launch the application at the specified path on the iOS Simulator\n"); - fprintf(stdout, " start Launch iOS Simulator without an app\n"); - fprintf(stdout, "\n"); - fprintf(stdout, "Options:\n"); - fprintf(stdout, " --version Print the version of ios-sim\n"); - fprintf(stdout, " --developer-path <developerDir> path to the developer directory (in Xcode)"); - fprintf(stdout, " --help Show this help text\n"); - fprintf(stdout, " --verbose Set the output level to verbose\n"); - fprintf(stdout, " --exit Exit after startup\n"); - fprintf(stdout, " --wait-for-debugger Wait for debugger to attach\n"); - fprintf(stdout, " --debug Attach LLDB to the application on startup\n"); - fprintf(stdout, " --use-gdb Use GDB instead of LLDB. (Requires --debug)\n"); - fprintf(stdout, " --uuid <uuid> A UUID identifying the session (is that correct?)\n"); - fprintf(stdout, " --env <environment file path> A plist file containing environment key-value pairs that should be set\n"); - fprintf(stdout, " --setenv NAME=VALUE Set an environment variable\n"); - fprintf(stdout, " --stdout <stdout file path> The path where stdout of the simulator will be redirected to (defaults to stdout of ios-sim)\n"); - fprintf(stdout, " --stderr <stderr file path> The path where stderr of the simulator will be redirected to (defaults to stderr of ios-sim)\n"); - fprintf(stdout, " --timeout <seconds> The timeout time to wait for a response from the Simulator. Default value: 30 seconds\n"); - fprintf(stdout, " --args <...> All following arguments will be passed on to the application\n"); - fprintf(stdout, " --devicetypeid The id of the device type that should be simulated (Xcode6+). Use 'showdevicetypes' to list devices.\n"); - fprintf(stdout, " e.g \"com.apple.CoreSimulator.SimDeviceType.Resizable-iPhone6, 8.0\"\n"); - fprintf(stdout, "DEPRECATED in 3.x, use devicetypeid instead:\n"); - fprintf(stdout, " --sdk The iOS SDK version to run the application on (defaults to the latest)\n"); - fprintf(stdout, " --family The device type that should be simulated (defaults to `iphone')\n"); - fprintf(stdout, " --retina Start a retina device\n"); - fprintf(stdout, " --tall In combination with --retina flag, start the tall version of the retina device (e.g. iPhone 5 (4-inch))\n"); - fprintf(stdout, " --64bit In combination with --retina flag and the --tall flag, start the 64bit version of the tall retina device (e.g. iPhone 5S (4-inch 64bit))\n"); - fflush(stdout); -} - -- (void) printDeprecation:(char*)option { - (void)option; - //fprintf(stdout, "Usage of '%s' is deprecated in 3.x. Use --devicetypeid instead.\n", option); -} - - -- (int) showSDKs { - Class systemRootClass = [self FindClassByName:@"DTiPhoneSimulatorSystemRoot"]; - - NSArray *roots = [systemRootClass knownRoots]; - - nsprintf(@""); - for (NSUInteger i = 0; i < [roots count]; ++i) { - DTiPhoneSimulatorSystemRoot *root = [roots objectAtIndex:i]; - nsprintf(@"sdk%d_name%@", i, [root sdkDisplayName]); - nsprintf(@"sdk%d_version%@", i, [root sdkVersion]); - nsprintf(@"sdk%d_sysroot%@", i, [root sdkRootPath]); - } - nsprintf(@""); - - return EXIT_SUCCESS; -} - -- (int) showDeviceTypes { - Class simDeviceSet = NSClassFromString(@"SimDeviceSet"); - nsprintf(@""); - bool hasDevices = false; - if (simDeviceSet) { - SimDeviceSet* deviceSet = [simDeviceSet defaultSet]; - NSArray* devices = [deviceSet availableDevices]; - for (SimDevice* device in devices) { - hasDevices = true; - nsfprintf(stdout, @"%@, %@%@",device.deviceType.identifier, device.runtime.versionString, device.deviceType.name); - } - } - if (!hasDevices) { - // fallback devices for Xcode 5.x - nsprintf(@"com.apple.CoreSimulator.SimDeviceType.iPhone-4siPhone 3.5-inch Retina Display"); - nsprintf(@"com.apple.CoreSimulator.SimDeviceType.iPhone-5siPhone 4-inch Retina Display"); - nsprintf(@"com.apple.CoreSimulator.SimDeviceType.iPad-2iPad"); - nsprintf(@"com.apple.CoreSimulator.SimDeviceType.iPad-RetinaiPad Retina Display"); - } - nsprintf(@""); - - return EXIT_SUCCESS; -} - -- (void)session:(DTiPhoneSimulatorSession *)session didEndWithError:(NSError *)error { - (void)session; - if (verbose) { - msgprintf(@"Session did end with error %@", error); - } - - if (error != nil) { - [self doExit:EXIT_FAILURE]; - } - - [self doExit:EXIT_SUCCESS]; -} - -static void IgnoreSignal(int /*arg*/) { -} - -static void ChildSignal(int /*arg*/) { - int status; - waitpid(gDebuggerProcessId, &status, 0); - exit(EXIT_SUCCESS); -} - -- (void)session:(DTiPhoneSimulatorSession *)session didStart:(BOOL)started withError:(NSError *)error { - if (started) { - // bring to front... - [NSTask launchedTaskWithLaunchPath:@"/usr/bin/osascript" - arguments:[NSArray arrayWithObjects: - @"-e", @"tell application \"System Events\"", - @"-e", @" set listOfProcesses to (name of every process where background only is false)", - @"-e", @"end tell", - @"-e", @"repeat with processName in listOfProcesses", - @"-e", @" if processName starts with \"iOS Simulator\" or processName starts with \"iPhone Simulator\" then", - @"-e", @" tell application processName to activate", - @"-e", @" end if", - @"-e", @"end repeat", nil]]; - } - if (startOnly && session) { - msgprintf(@"Simulator started (no session)"); - [self doExit:EXIT_SUCCESS]; - return; - } - if (started) { - int pid = [session simulatedApplicationPID]; - if (shouldStartDebugger) { - char*args[4] = { NULL, NULL, (char*)[[[NSNumber numberWithInt:pid] description] UTF8String], NULL }; - if (useGDB) { - args[0] = strdup("gdb"); - args[1] = strdup("program"); - } else { - args[0] = strdup("lldb"); - args[1] = strdup("--attach-pid"); - } - // The parent process must live on to process the stdout/stderr fifos, - // so start the debugger as a child process. - pid_t child_pid = fork(); - if (child_pid == 0) { - execvp(args[0], args); - } else if (child_pid < 0) { - msgprintf(@"Could not start debugger process: %d", errno); - [self doExit:EXIT_FAILURE]; - return; - } - gDebuggerProcessId = child_pid; - signal(SIGINT, IgnoreSignal); - signal(SIGCHLD, ChildSignal); - } - if (verbose) { - msgprintf(@"Session started"); - } - nsprintf(@"%d", pid); - fflush(stdout); - if (exitOnStartup) { - [self doExit:EXIT_SUCCESS]; - return; - } - } else { - msgprintf(@"Session could not be started: %@", [error localizedDescription]); - [self doExit:EXIT_FAILURE]; - } -} - -- (void)stop { - if (mySession) - [mySession requestEndWithTimeout: 0.1]; -} - -- (void)stdioDataIsAvailable:(NSNotification *)notification { - [[notification object] readInBackgroundAndNotify]; - NSData *data = [[notification userInfo] valueForKey:NSFileHandleNotificationDataItem]; - NSString *str = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; /* dangerous if partially encoded data is at the boundary */ - if (!alreadyPrintedData) { - if ([str length] == 0) { - return; - } else { - alreadyPrintedData = YES; - } - } - if ([notification object] == stdoutFileHandle) { - printf("%s\n", [escapeString(str) UTF8String]); - } else { - nsprintf(@"%@", escapeString(str)); // handle stderr differently? - } - fflush(stdout); -} - - -- (void)createStdioFIFO:(NSFileHandle **)fileHandle ofType:(NSString *)type atPath:(NSString **)path { - *path = [NSString stringWithFormat:@"%@/ios-sim-%@-pipe-%d", NSTemporaryDirectory(), type, (int)time(NULL)]; - if (mkfifo([*path UTF8String], S_IRUSR | S_IWUSR) == -1) { - msgprintf(@"Unable to create %@ named pipe `%@'", type, *path); - [self doExit:EXIT_FAILURE]; - } else { - if (verbose) { - msgprintf(@"Creating named pipe at `%@'", *path); - } - int fd = open([*path UTF8String], O_RDONLY | O_NDELAY); - *fileHandle = [[[NSFileHandle alloc] initWithFileDescriptor:fd] retain]; - [*fileHandle readInBackgroundAndNotify]; - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(stdioDataIsAvailable:) - name:NSFileHandleReadCompletionNotification - object:*fileHandle]; - } -} - - -- (void)removeStdioFIFO:(NSFileHandle *)fileHandle atPath:(NSString *)path { - if (verbose) { - msgprintf(@"Removing named pipe at `%@'", path); - } - [fileHandle closeFile]; - [fileHandle release]; - if (![[NSFileManager defaultManager] removeItemAtPath:path error:NULL]) { - msgprintf(@"Unable to remove named pipe `%@'", path); - } - if (dataPath && ![[NSFileManager defaultManager] removeItemAtPath:[dataPath stringByAppendingPathComponent:path] error:NULL]) { - msgprintf(@"Unable to remove simlink at `%@'", [dataPath stringByAppendingPathComponent:path]); - } -} - - -- (int)launchApp:(NSString *)path withFamily:(NSString *)family - uuid:(NSString *)uuid - environment:(NSDictionary *)environment - stdoutPath:(NSString *)stdoutPath - stderrPath:(NSString *)stderrPath - timeout:(NSTimeInterval)timeout - args:(NSArray *)args { - DTiPhoneSimulatorApplicationSpecifier *appSpec; - DTiPhoneSimulatorSessionConfig *config; - DTiPhoneSimulatorSession *session; - NSError *error; - - NSFileManager *fileManager = [[[NSFileManager alloc] init] autorelease]; - if (!startOnly && ![fileManager fileExistsAtPath:path]) { - msgprintf(@"Application path %@ doesn't exist!", path); - return EXIT_FAILURE; - } - - /* Create the app specifier */ - appSpec = startOnly ? nil : [[self FindClassByName:@"DTiPhoneSimulatorApplicationSpecifier"] specifierWithApplicationPath:path]; - - if (verbose) { - msgprintf(@"App Spec: %@\n", appSpec); - msgprintf(@"SDK Root: %@\n", sdkRoot); - msgprintf(@"SDK Version: %@\n", [sdkRoot sdkVersion]); - - for (id key in environment) { - msgprintf(@"Env: %@ = %@", key, [environment objectForKey:key]); - } - } - - NSString *sdkVersion = [sdkRoot sdkVersion]; - NSString *appSupportDir = [NSString stringWithFormat:@"%@/Library/Application Support/iPhone Simulator/%@", - NSHomeDirectory(), sdkVersion]; - NSMutableDictionary *mutableEnv = [NSMutableDictionary dictionaryWithDictionary:environment]; - [mutableEnv setObject:appSupportDir forKey:@"CFFIXED_USER_HOME"]; - [mutableEnv setObject:appSupportDir forKey:@"IPHONE_SHARED_RESOURCES_DIRECTORY"]; - [mutableEnv setObject:appSupportDir forKey:@"HOME"]; - [mutableEnv setObject:[sdkRoot sdkRootPath] forKey:@"IPHONE_SIMULATOR_ROOT"]; - [mutableEnv setObject:[sdkRoot sdkRootPath] forKey:@"DYLD_ROOT_PATH"]; - [mutableEnv setObject:[sdkRoot sdkRootPath] forKey:@"DYLD_FRAMEWORK_PATH"]; - [mutableEnv setObject:[sdkRoot sdkRootPath] forKey:@"DYLD_LIBRARY_PATH"]; - [mutableEnv setObject:@"YES" forKey:@"NSUnbufferedIO"]; - environment = mutableEnv; - - /* Set up the session configuration */ - config = [[[[self FindClassByName:@"DTiPhoneSimulatorSessionConfig"] alloc] init] autorelease]; - [config setApplicationToSimulateOnStart:appSpec]; - [config setSimulatedSystemRoot:sdkRoot]; - [config setSimulatedApplicationShouldWaitForDebugger:shouldWaitDebugger]; - - [config setSimulatedApplicationLaunchArgs:args]; - [config setSimulatedApplicationLaunchEnvironment:environment]; - - if (stderrPath) { - stderrFileHandle = nil; - } else if (!exitOnStartup) { - [self createStdioFIFO:&stderrFileHandle ofType:@"stderr" atPath:&stderrPath]; - m_stderrPath = stderrPath; - } - [config setSimulatedApplicationStdErrPath:stderrPath]; - - if (stdoutPath) { - stdoutFileHandle = nil; - } else if (!exitOnStartup) { - [self createStdioFIFO:&stdoutFileHandle ofType:@"stdout" atPath:&stdoutPath]; - m_stdoutPath = stdoutPath; - } - [config setSimulatedApplicationStdOutPath:stdoutPath]; - - [config setLocalizedClientName: @"iossim"]; - - // this was introduced in 3.2 of SDK - if ([config respondsToSelector:@selector(setSimulatedDeviceFamily:)]) { - if (family == nil) { - family = @"iphone"; - } - - if (verbose) { - nsprintf(@"using device family %@",family); - } - - if ([family isEqualToString:@"ipad"]) { -[config setSimulatedDeviceFamily:[NSNumber numberWithInt:2]]; - } else{ - [config setSimulatedDeviceFamily:[NSNumber numberWithInt:1]]; - } - } - if ([config respondsToSelector:@selector(setDevice:)]) { - // Xcode6+ - config.device = [self findDeviceWithFamily:family retina:retinaDevice isTallDevice:tallDevice is64Bit:is64BitDevice]; - - // The iOS 8 simulator treats stdout/stderr paths relative to the simulator's data directory. - // Create symbolic links in the data directory that points at the real stdout/stderr paths. - if ([config.simulatedSystemRoot.sdkVersion compare:@"8.0" options:NSNumericSearch] != NSOrderedAscending) { - dataPath = config.device.dataPath; - NSString *simlinkStdout = [dataPath stringByAppendingPathComponent:stdoutPath]; - m_stdoutPath = stdoutPath; - NSString *simlinkStderr = [dataPath stringByAppendingPathComponent:stderrPath]; - m_stderrPath = stderrPath; - [[NSFileManager defaultManager] createSymbolicLinkAtPath:simlinkStdout withDestinationPath:stdoutPath error:NULL]; - [[NSFileManager defaultManager] createSymbolicLinkAtPath:simlinkStderr withDestinationPath:stderrPath error:NULL]; - } - } else { - // Xcode5 or older - NSString* devicePropertyValue = [self changeDeviceType:family retina:retinaDevice isTallDevice:tallDevice is64Bit:is64BitDevice]; - [config setSimulatedDeviceInfoName:devicePropertyValue]; - } - - /* Start the session */ - session = [[[[self FindClassByName:@"DTiPhoneSimulatorSession"] alloc] init] autorelease]; - mySession = session; - [session setDelegate:self]; - if (uuid != nil){ - [session setUuid:uuid]; - } - - if (![session requestStartWithConfig:config timeout:timeout error:&error]) { - msgprintf(@"Could not start simulator session: %@", error); - return EXIT_FAILURE; - } - - return EXIT_SUCCESS; -} - -- (SimDevice*) findDeviceWithFamily:(NSString *)family retina:(BOOL)retina isTallDevice:(BOOL)isTallDevice is64Bit:(BOOL)is64Bit { - NSString* devTypeId = self->deviceTypeId; - - if (!devTypeId) { - devTypeId = deviceTypeIdIphone5; - if (retina) { - if ([family isEqualToString:@"ipad"]) { - if (is64Bit) { - devTypeId = deviceTypeIdIpadAir; - } else { - devTypeId = deviceTypeIdIpadRetina; - } - } else { - if (isTallDevice) { - if (is64Bit) { - devTypeId = deviceTypeIdIphone5s; - } else { - devTypeId = deviceTypeIdIphone5; - } - } else { - devTypeId = deviceTypeIdIphone4s; - } - } - } else { - if ([family isEqualToString:@"ipad"]) { - devTypeId = deviceTypeIdIpad2; - } else { - devTypeId = deviceTypeIdIphone4s; - } - } - } - - SimDeviceSet* deviceSet = [[self FindClassByName:@"SimDeviceSet"] defaultSet]; - NSArray* devices = [deviceSet availableDevices]; - NSArray* deviceTypeAndVersion = [devTypeId componentsSeparatedByString:@","]; - if(deviceTypeAndVersion.count == 2) { - NSString* typeIdentifier = [[deviceTypeAndVersion objectAtIndex:0] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; - NSString* versionString = [[deviceTypeAndVersion objectAtIndex:1] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];; - for (SimDevice* device in devices) { - if ([device.deviceType.identifier isEqualToString:typeIdentifier] && [device.runtime.versionString isEqualToString:versionString]) { - return device; - } - } - } - //maintain old behavior (if the device identifier doesn't have a version as part of the identifier, loop through to find the first matching) - else - { - for (SimDevice* device in devices) { - if ([device.deviceType.identifier isEqualToString:devTypeId]) { - return device; - } - } - } - // Default to whatever is the first device - return [devices count] > 0 ? [devices objectAtIndex:0] : nil; -} - -- (NSString*) changeDeviceType:(NSString *)family retina:(BOOL)retina isTallDevice:(BOOL)isTallDevice is64Bit:(BOOL)is64Bit { - NSString *devicePropertyValue; - if (self->deviceTypeId) { - if ([deviceTypeIdIphone4s isEqual: deviceTypeId]) - devicePropertyValue = deviceIphoneRetina3_5Inch; - else if ([deviceTypeIdIphone5s isEqual: deviceTypeId]) - devicePropertyValue = deviceIphoneRetina4_0Inch; - else if ([deviceTypeIdIpad2 isEqual: deviceTypeId]) - devicePropertyValue = deviceIpad; - else if ([deviceTypeIdIpadRetina isEqual: deviceTypeId]) - devicePropertyValue = deviceIpadRetina; - else { - nsprintf(@"Unknown or unsupported device type: %@\n", deviceTypeId); - [self doExit:EXIT_FAILURE]; - return nil; - } - } else if (retina) { - if (verbose) { - msgprintf(@"using retina"); - } - if ([family isEqualToString:@"ipad"]) { - if (is64Bit) { - devicePropertyValue = deviceIpadRetina_64bit; - } else { - devicePropertyValue = deviceIpadRetina; - } - } - else { - if (isTallDevice) { - if (is64Bit) { - devicePropertyValue = deviceIphoneRetina4_0Inch_64bit; - } else { - devicePropertyValue = deviceIphoneRetina4_0Inch; - } - } else { - devicePropertyValue = deviceIphoneRetina3_5Inch; - } - } - } else { - if ([family isEqualToString:@"ipad"]) { - devicePropertyValue = deviceIpad; - } else { - devicePropertyValue = deviceIphone; - } - } - CFPreferencesSetAppValue((CFStringRef)deviceProperty, (CFPropertyListRef)devicePropertyValue, (CFStringRef)simulatorPrefrencesName); - CFPreferencesAppSynchronize((CFStringRef)simulatorPrefrencesName); - - return devicePropertyValue; -} - - -/** - * Execute 'main' - */ -- (void)runWithArgc:(int)argc argv:(char **)argv { - if (argc < 2) { - [self printUsage]; - exit(EXIT_FAILURE); - } - - NSString* xcodeVersion = GetXcodeVersion(); - if (!([xcodeVersion compare:@"6.0" options:NSNumericSearch] != NSOrderedAscending) && false) { - nsprintf(@"You need to have at least Xcode 6.0 installed -- you have version %@.", xcodeVersion); - nsprintf(@"Run 'xcode-select --print-path' to check which version of Xcode is enabled."); - exit(EXIT_FAILURE); - } - - retinaDevice = NO; - tallDevice = NO; - is64BitDevice = NO; - exitOnStartup = NO; - alreadyPrintedData = NO; - startOnly = strcmp(argv[1], "start") == 0; - deviceTypeId = nil; - - nsprintf(@""); - for (int i = 0; i < argc; ++i) { - if (strcmp(argv[i], "--developer-path") == 0) { - ++i; - if (i < argc) - gDevDir = argv[i]; - } - } - NSString* developerDir = FindDeveloperDir(); - if (!developerDir) { - nsprintf(@"Unable to find developer directory."); - [self doExit:EXIT_FAILURE]; - } - NSString *xcodePlistPath = [developerDir stringByAppendingPathComponent:@"../Info.plist"]; - NSAssert([[NSFileManager defaultManager] fileExistsAtPath:xcodePlistPath isDirectory:NULL], - @"Cannot find Xcode's plist at: %@", xcodePlistPath); - - NSDictionary *infoDict = [NSDictionary dictionaryWithContentsOfFile:xcodePlistPath]; - NSAssert(infoDict[@"DTXcode"], @"Cannot find the 'DTXcode' key in Xcode's Info.plist."); - - NSString *DTXcode = infoDict[@"DTXcode"]; - xcodeVersionInt = [DTXcode intValue]; - NSString* dvtFoundationPath = [developerDir stringByAppendingPathComponent:kDVTFoundationRelativePath]; - if (![[NSFileManager defaultManager] fileExistsAtPath:dvtFoundationPath]) { - // execute old version - char *argNew = new char[strlen(argv[0] + 7)]; - strcpy(argNew, argv[0]); - strcat(argNew, "_1_8_2"); - char **argvNew = new char *[argc + 1]; - argvNew[0] = argNew; - for (int iarg = 1; iarg < argc; ++iarg) - argvNew[iarg] = argv[iarg]; - argvNew[argc] = 0; - execv(argNew, argvNew); - } - if (strcmp(argv[1], "showsdks") == 0) { - [self LoadSimulatorFramework:developerDir]; - [self doExit:[self showSDKs]]; - } else if (strcmp(argv[1], "showdevicetypes") == 0) { - [self LoadSimulatorFramework:developerDir]; - [self doExit:[self showDeviceTypes]]; - } else if (strcmp(argv[1], "launch") == 0 || startOnly) { - if (strcmp(argv[1], "launch") == 0 && argc < 3) { - msgprintf(@"Missing application path argument"); - [self printUsage]; - [self doExit:EXIT_FAILURE]; - } - - NSString *appPath = nil; - int argOffset; - if (startOnly) { - argOffset = 2; - } - else { - argOffset = 3; - appPath = [[NSString stringWithUTF8String:argv[2]] expandPath]; - } - - NSString *family = nil; - NSString *uuid = nil; - NSString *stdoutPath = nil; - NSString *stderrPath = nil; - NSString *xctest = nil; - NSTimeInterval timeout = 60; - NSMutableDictionary *environment = [NSMutableDictionary dictionary]; - - int i = argOffset; - for (; i < argc; i++) { - if (strcmp(argv[i], "--version") == 0) { - printf("%s\n", IOS_SIM_VERSION); - exit(EXIT_SUCCESS); - } else if (strcmp(argv[i], "--help") == 0) { - [self printUsage]; - exit(EXIT_SUCCESS); - } else if (strcmp(argv[i], "--verbose") == 0) { - verbose = YES; - } else if (strcmp(argv[i], "--exit") == 0) { - exitOnStartup = YES; - } else if (strcmp(argv[i], "--wait-for-debugger") == 0) { - shouldWaitDebugger = YES; - } else if (strcmp(argv[i], "--debug") == 0) { - shouldWaitDebugger = YES; - shouldStartDebugger = YES; - } else if (strcmp(argv[i], "--use-gdb") == 0) { - useGDB = YES; - } else if (strcmp(argv[i], "--developer-path") == 0) { - ++i; - if (i == argc) { - nsprintf(@"missing arg after --developer-path"); - [self doExit:EXIT_FAILURE]; - return; - } - } else if (strcmp(argv[i], "--timeout") == 0) { - if (i + 1 < argc) { - timeout = [[NSString stringWithUTF8String:argv[++i]] doubleValue]; - NSLog(@"Timeout: %f second(s)", timeout); - } - } - else if (strcmp(argv[i], "--sdk") == 0) { - [self printDeprecation:argv[i]]; - i++; - if (i == argc) { - nsprintf(@"missing arg after --sdk"); - [self doExit:EXIT_FAILURE]; - return; - } - [self LoadSimulatorFramework:developerDir]; - NSString* ver = [NSString stringWithCString:argv[i] encoding:NSUTF8StringEncoding]; - Class systemRootClass = [self FindClassByName:@"DTiPhoneSimulatorSystemRoot"]; - NSArray *roots = [systemRootClass knownRoots]; - for (DTiPhoneSimulatorSystemRoot *root in roots) { - NSString *v = [root sdkVersion]; - if ([v isEqualToString:ver]) { - sdkRoot = root; - break; - } - } - if (sdkRoot == nil) { - msgprintf(@"Unknown or unsupported SDK version: %s\n",argv[i]); - [self showSDKs]; - exit(EXIT_FAILURE); - } - } else if (strcmp(argv[i], "--family") == 0) { - [self printDeprecation:argv[i]]; - i++; - if (i == argc) { - nsprintf(@"missing arg after --sdkfamilymsg>"); - [self doExit:EXIT_FAILURE]; - return; - } - family = [NSString stringWithUTF8String:argv[i]]; - } else if (strcmp(argv[i], "--uuid") == 0) { - i++; - if (i == argc) { - nsprintf(@"missing arg after --uuid"); - [self doExit:EXIT_FAILURE]; - return; - } - uuid = [NSString stringWithUTF8String:argv[i]]; - } else if (strcmp(argv[i], "--devicetypeid") == 0) { - i++; - if (i == argc) { - nsprintf(@"missing arg after --devicetypeid"); - [self doExit:EXIT_FAILURE]; - return; - } - deviceTypeId = [NSString stringWithUTF8String:argv[i]]; - } else if (strcmp(argv[i], "--setenv") == 0) { - i++; - if (i == argc) { - nsprintf(@"missing arg after --setenv"); - [self doExit:EXIT_FAILURE]; - return; - } - NSArray *parts = [[NSString stringWithUTF8String:argv[i]] componentsSeparatedByString:@"="]; - [environment setObject:[parts objectAtIndex:1] forKey:[parts objectAtIndex:0]]; - } else if (strcmp(argv[i], "--env") == 0) { - i++; - if (i == argc) { - nsprintf(@"missing arg after --env"); - [self doExit:EXIT_FAILURE]; - return; - } - NSString *envFilePath = [[NSString stringWithUTF8String:argv[i]] expandPath]; - [environment setValuesForKeysWithDictionary:[NSDictionary dictionaryWithContentsOfFile:envFilePath]]; - if (!environment) { - msgprintf(@"Could not read environment from file: %s", argv[i]); - [self printUsage]; - exit(EXIT_FAILURE); - } - } else if (strcmp(argv[i], "--stdout") == 0) { - i++; - if (i == argc) { - nsprintf(@"missing arg after --stdout"); - [self doExit:EXIT_FAILURE]; - return; - } - stdoutPath = [[NSString stringWithUTF8String:argv[i]] expandPath]; - NSLog(@"stdoutPath: %@", stdoutPath); - } else if (strcmp(argv[i], "--stderr") == 0) { - i++; - if (i == argc) { - nsprintf(@"missing arg after --stderr"); - [self doExit:EXIT_FAILURE]; - return; - } - stderrPath = [[NSString stringWithUTF8String:argv[i]] expandPath]; - NSLog(@"stderrPath: %@", stderrPath); - } else if (strcmp(argv[i], "--xctest") == 0) { - i++; - if (i == argc) { - nsprintf(@"missing arg after --xctest"); - [self doExit:EXIT_FAILURE]; - return; - } - xctest = [[NSString stringWithUTF8String:argv[i]] expandPath]; - NSLog(@"xctest: %@", xctest); - } else if (strcmp(argv[i], "--retina") == 0) { - [self printDeprecation:argv[i]]; - retinaDevice = YES; - } else if (strcmp(argv[i], "--tall") == 0) { - [self printDeprecation:argv[i]]; - tallDevice = YES; - } else if (strcmp(argv[i], "--64bit") == 0) { - [self printDeprecation:argv[i]]; - is64BitDevice = YES; - } else if (strcmp(argv[i], "--args") == 0) { - i++; - break; - } else { - msgprintf(@"unrecognized argument:%s", argv[i]); - [self printUsage]; - [self doExit:EXIT_FAILURE]; - return; - } - } - NSMutableArray *args = [NSMutableArray arrayWithCapacity:MAX(argc - i,0)]; - for (; i < argc; i++) { - [args addObject:[NSString stringWithUTF8String:argv[i]]]; - } - - if (sdkRoot == nil) { - [self LoadSimulatorFramework:developerDir]; - Class systemRootClass = [self FindClassByName:@"DTiPhoneSimulatorSystemRoot"]; - sdkRoot = [systemRootClass defaultRoot]; - } - if (xctest) { - NSString *appName = [appPath lastPathComponent]; - NSString *executableName = [appName stringByDeletingPathExtension]; - NSString *injectionPath = @"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/IDEBundleInjection.framework/IDEBundleInjection"; - [environment setValuesForKeysWithDictionary:[NSDictionary dictionaryWithObjectsAndKeys: - injectionPath,@"DYLD_INSERT_LIBRARIES", - xctest, @"XCInjectBundle", - [appPath stringByAppendingFormat:@"/%@", executableName],@"XCInjectBundleInto", - nil]]; - } - - /* Don't exit, adds to runloop */ - int res = [self launchApp:appPath - withFamily:family - uuid:uuid - environment:environment - stdoutPath:stdoutPath - stderrPath:stderrPath - timeout:timeout - args:args]; - nsprintf(@"", ((res == 0) ? @"SUCCESS" : @"FAILURE")); - fflush(stdout); - fflush(stderr); - if (res != 0) - [self doExit:EXIT_FAILURE]; - } else { - if (argc == 2 && strcmp(argv[1], "--help") == 0) { - [self printUsage]; - [self doExit:EXIT_SUCCESS]; - } else if (argc == 2 && strcmp(argv[1], "--version") == 0) { - printf("%s\n", IOS_SIM_VERSION); - [self doExit:EXIT_SUCCESS]; - } else { - fprintf(stderr, "Unknown command\n"); - [self printUsage]; - [self doExit:EXIT_FAILURE]; - } - } -} - -@end diff --git a/src/tools/3rdparty/iossim/main.mm b/src/tools/3rdparty/iossim/main.mm deleted file mode 100644 index 7e88c5e4859..00000000000 --- a/src/tools/3rdparty/iossim/main.mm +++ /dev/null @@ -1,29 +0,0 @@ -/* Author: Landon Fuller - * Copyright (c) 2008-2011 Plausible Labs Cooperative, Inc. - * All rights reserved. - * - * See the IOSSIM_LICENSE file in this directory for the license on the source code in this file. - */ -/* derived from https://github.com/phonegap/ios-sim */ - -#import -#import - -#import "iphonesimulator.h" - -/* - * Runs the iPhoneSimulator backed by a main runloop. - */ -int main (int argc, char *argv[]) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - iPhoneSimulator *sim = [[iPhoneSimulator alloc] init]; - - /* Execute command line handler */ - [sim runWithArgc: argc argv: argv]; - - /* Run the loop to handle added input sources, if any */ - [[NSRunLoop mainRunLoop] run]; - - [pool release]; - return 0; -} diff --git a/src/tools/3rdparty/iossim/nsprintf.h b/src/tools/3rdparty/iossim/nsprintf.h deleted file mode 100644 index 0f108a57d57..00000000000 --- a/src/tools/3rdparty/iossim/nsprintf.h +++ /dev/null @@ -1,9 +0,0 @@ -/* - * See the IOSSIM_LICENSE file in this directory for the license on the source code in this file. - */ -int nsvfprintf (FILE *stream, NSString *format, va_list args); -int nsfprintf (FILE *stream, NSString *format, ...); -int nsprintf (NSString *format, ...); -int msgvfprintf (FILE *stream, NSString *format, va_list args); -int msgprintf (NSString *format, ...); -NSString *escapeString(NSString *origString); diff --git a/src/tools/3rdparty/iossim/nsprintf.mm b/src/tools/3rdparty/iossim/nsprintf.mm deleted file mode 100644 index b497d0bb72b..00000000000 --- a/src/tools/3rdparty/iossim/nsprintf.mm +++ /dev/null @@ -1,75 +0,0 @@ -/* - * NSLog() clone, but writes to arbitrary output stream - * - * See the IOSSIM_LICENSE file in this directory for the license on the source code in this file. - */ - -#import -#import - -int nsvfprintf (FILE *stream, NSString *format, va_list args) { - int retval; - - NSString *str = (NSString *) CFStringCreateWithFormatAndArguments(NULL, NULL, (CFStringRef) format, args); - retval = fprintf(stream, "%s\n", [str UTF8String]); - [str release]; - - return retval; -} - -int nsfprintf (FILE *stream, NSString *format, ...) { - va_list ap; - int retval; - - va_start(ap, format); - { - retval = nsvfprintf(stream, format, ap); - } - va_end(ap); - - return retval; -} - -int nsprintf (NSString *format, ...) { - va_list ap; - int retval; - - va_start(ap, format); - { - retval = nsvfprintf(stdout, format, ap); - } - va_end(ap); - - return retval; -} - -NSString *escapeString(NSString *origString) -{ - return [[[[origString stringByReplacingOccurrencesOfString: @"&" withString: @"&"] - stringByReplacingOccurrencesOfString: @"\"" withString: @"""] - stringByReplacingOccurrencesOfString: @">" withString: @">"] - stringByReplacingOccurrencesOfString: @"<" withString: @"<"]; -} - -int msgvfprintf (FILE *stream, NSString *format, va_list args) { - int retval; - - NSString *str = (NSString *) CFStringCreateWithFormatAndArguments(NULL, NULL, (CFStringRef) format, args); - retval = fprintf(stream, "%s\n", [escapeString(str) UTF8String]); - [str release]; - - return retval; -} - -int msgprintf(NSString *format, ...) { - va_list ap; - int retval; - - va_start(ap, format); - { - retval = msgvfprintf(stdout, format, ap); - } - va_end(ap); - - return retval; -} diff --git a/src/tools/3rdparty/iossim/nsstringexpandpath.h b/src/tools/3rdparty/iossim/nsstringexpandpath.h deleted file mode 100644 index 3eed139c0e9..00000000000 --- a/src/tools/3rdparty/iossim/nsstringexpandpath.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - * See the IOSSIM_LICENSE file in this directory for the license on the source code in this file. - */ - -#import - -@interface NSString (ExpandPath) - -- (NSString *)expandPath; - -@end diff --git a/src/tools/3rdparty/iossim/nsstringexpandpath.mm b/src/tools/3rdparty/iossim/nsstringexpandpath.mm deleted file mode 100644 index b36481b5044..00000000000 --- a/src/tools/3rdparty/iossim/nsstringexpandpath.mm +++ /dev/null @@ -1,18 +0,0 @@ -/* - * See the LICENSE file for the license on the source code in this file. - */ - -#import "nsstringexpandpath.h" - -@implementation NSString (ExpandPath) - -- (NSString *)expandPath { - if ([self isAbsolutePath]) { - return [self stringByStandardizingPath]; - } else { - NSString *cwd = [[NSFileManager defaultManager] currentDirectoryPath]; - return [[cwd stringByAppendingPathComponent:self] stringByStandardizingPath]; - } -} - -@end diff --git a/src/tools/3rdparty/iossim/version.h b/src/tools/3rdparty/iossim/version.h deleted file mode 100644 index 9a7e0c34532..00000000000 --- a/src/tools/3rdparty/iossim/version.h +++ /dev/null @@ -1 +0,0 @@ -#define IOS_SIM_VERSION "2.0.1" diff --git a/src/tools/3rdparty/iossim_1_8_2/IOSSIM_LICENSE b/src/tools/3rdparty/iossim_1_8_2/IOSSIM_LICENSE deleted file mode 100644 index 162622f1db3..00000000000 --- a/src/tools/3rdparty/iossim_1_8_2/IOSSIM_LICENSE +++ /dev/null @@ -1,31 +0,0 @@ -Author: Landon Fuller -Copyright (c) 2008-2011 Plausible Labs Cooperative, Inc. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Modifications made by the following entities are licensed as above: -- Jeff Haynie, Appcelerator, Inc. -- https://github.com/hborders -- http://pivotallabs.com/users/scoward/blog -- Eloy Duran, Fingertips -- Fawzi Mohamed, digia diff --git a/src/tools/3rdparty/iossim_1_8_2/Info.plist b/src/tools/3rdparty/iossim_1_8_2/Info.plist deleted file mode 100644 index d33bbeb8554..00000000000 --- a/src/tools/3rdparty/iossim_1_8_2/Info.plist +++ /dev/null @@ -1,16 +0,0 @@ - - - - - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleExecutable - iossim_1_8_2 - CFBundleIdentifier - org.qt-project.qt-creator.iossim_1_8_2 - LSUIElement - 1 - - diff --git a/src/tools/3rdparty/iossim_1_8_2/iossim.qbs b/src/tools/3rdparty/iossim_1_8_2/iossim.qbs deleted file mode 100644 index f2537dad067..00000000000 --- a/src/tools/3rdparty/iossim_1_8_2/iossim.qbs +++ /dev/null @@ -1,30 +0,0 @@ -import qbs 1.0 -import QtcTool - - -QtcTool { - name: "iossim" - condition: qbs.targetOS.contains("macos") - - Depends { name: "Qt"; submodules: ["widgets"] } - Depends { name: "app_version_header" } - - files: [ - "main.mm", - "nsprintf.mm", - "nsstringexpandpath.mm", - "iphonesimulator.mm", - "iphonesimulator.h", - "nsprintf.h", - "nsstringexpandpath.h", - "version.h", - "iphonesimulatorremoteclient/iphonesimulatorremoteclient.h" - ] - cpp.linkerFlags: base.concat(["-fobjc-link-runtime"]) - cpp.frameworks: base.concat(["Foundation", "CoreServices", "ApplicationServices", "IOKit", - "AppKit"]) - cpp.frameworkPaths: base.concat("/System/Library/PrivateFrameworks") - cpp.infoPlistFile: "Info.plist" - - toolInstallDir: project.ide_libexec_path + "/ios" -} diff --git a/src/tools/3rdparty/iossim_1_8_2/iossim_1_8_2.pro b/src/tools/3rdparty/iossim_1_8_2/iossim_1_8_2.pro deleted file mode 100644 index 1d5d3aea40d..00000000000 --- a/src/tools/3rdparty/iossim_1_8_2/iossim_1_8_2.pro +++ /dev/null @@ -1,58 +0,0 @@ -CONFIG += console - -QT += core -QT += gui - -CONFIG -= app_bundle - -include(../../../../qtcreator.pri) - -# Prevent from popping up in the dock when launched. -# We embed the Info.plist file, so the application doesn't need to -# be a bundle. -QMAKE_LFLAGS += -Wl,-sectcreate,__TEXT,__info_plist,\"$$PWD/Info.plist\" \ - -fobjc-link-runtime - -LIBS += \ - -framework Foundation \ - -framework CoreServices \ - -framework ApplicationServices \ - -framework CoreFoundation \ - -F/System/Library/PrivateFrameworks \ - -framework IOKit -framework AppKit - -iPhoneSimulatorRemoteClientDirectLinking { - LIBS += \ - -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks \ - -F/Applications/Xcode.app/Contents/OtherFrameworks - LIBS += \ - -framework iPhoneSimulatorRemoteClient - QMAKE_RPATHDIR += /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks \ - /Applications/Xcode.app/Contents/OtherFrameworks - /System/Library/PrivateFrameworks \ -} - -TEMPLATE = app - -# put into a subdir, so we can deploy a separate qt.conf for it -DESTDIR = $$IDE_LIBEXEC_PATH/ios -include(../../../rpath.pri) - -OBJECTIVE_SOURCES += \ - main.mm \ - nsprintf.mm \ - nsstringexpandpath.mm \ - iphonesimulator.mm - -HEADERS += \ - iphonesimulator.h \ - nsprintf.h \ - nsstringexpandpath.h \ - version.h \ - iphonesimulatorremoteclient/iphonesimulatorremoteclient.h - -DISTFILES = IOSSIM_LICENSE \ - Info.plist - -target.path = $$INSTALL_LIBEXEC_PATH/ios -INSTALLS += target diff --git a/src/tools/3rdparty/iossim_1_8_2/iphonesimulator.h b/src/tools/3rdparty/iossim_1_8_2/iphonesimulator.h deleted file mode 100644 index 0770c50ee3b..00000000000 --- a/src/tools/3rdparty/iossim_1_8_2/iphonesimulator.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Author: Landon Fuller - * Copyright (c) 2008-2011 Plausible Labs Cooperative, Inc. - * All rights reserved. - * - * See the IOSSIM_LICENSE file in this directory for the license on the source code in this file. - */ - -#import -#import "iphonesimulatorremoteclient/iphonesimulatorremoteclient.h" -#import "version.h" - -@interface iPhoneSimulator : NSObject { -@private - DTiPhoneSimulatorSystemRoot *sdkRoot; - NSFileHandle *stdoutFileHandle; - NSFileHandle *stderrFileHandle; - DTiPhoneSimulatorSession *session; - NSTimer *pidCheckingTimer; - BOOL startOnly; - BOOL exitOnStartup; - BOOL shouldWaitDebugger; - BOOL shouldStartDebugger; - BOOL useGDB; - BOOL verbose; - BOOL alreadyPrintedData; - BOOL retinaDevice; - BOOL tallDevice; -} - -- (id)init; -- (void)dealloc; -- (void)runWithArgc:(int)argc argv:(char **)argv; - -- (void)createStdioFIFO:(NSFileHandle **)fileHandle ofType:(NSString *)type atPath:(NSString **)path; -- (void)removeStdioFIFO:(NSFileHandle *)fileHandle atPath:(NSString *)path; -- (void)stop; -- (void)checkPid:(NSTimer *)timer; -- (void)doExit:(int)errorCode; -- (void)changeDeviceType:(NSString *)family retina:(BOOL)retina isTallDevice:(BOOL)isTallDevice; - -@end diff --git a/src/tools/3rdparty/iossim_1_8_2/iphonesimulator.mm b/src/tools/3rdparty/iossim_1_8_2/iphonesimulator.mm deleted file mode 100644 index 737a6947868..00000000000 --- a/src/tools/3rdparty/iossim_1_8_2/iphonesimulator.mm +++ /dev/null @@ -1,634 +0,0 @@ -/* Author: Landon Fuller - * Copyright (c) 2008-2011 Plausible Labs Cooperative, Inc. - * All rights reserved. - * - * See the IOSSIM_LICENSE file in this directory for the license on the source code in this file. - */ - -#import "iphonesimulator.h" -#import "nsstringexpandpath.h" -#import "nsprintf.h" -#import -#import -#import -#import - -NSString *simulatorPrefrencesName = @"com.apple.iphonesimulator"; -NSString *deviceProperty = @"SimulateDevice"; -NSString *deviceIphoneRetina3_5Inch = @"iPhone Retina (3.5-inch)"; -NSString *deviceIphoneRetina4_0Inch = @"iPhone Retina (4-inch)"; -NSString *deviceIphone = @"iPhone"; -NSString *deviceIpad = @"iPad"; -NSString *deviceIpadRetina = @"iPad (Retina)"; - -/** - * A simple iPhoneSimulatorRemoteClient framework. - */ -@implementation iPhoneSimulator - -- (id)init { - self = [super init]; - session = nil; - pidCheckingTimer = nil; - return self; -} - -- (void)dealloc { - [session release]; - [pidCheckingTimer release]; - [super dealloc]; -} - -- (void)doExit:(int)errorCode { - nsprintf(@"", errorCode); - nsprintf(@""); - fflush(stdout); - fflush(stderr); - exit(errorCode); -} - -- (void) printUsage { - fprintf(stdout, "Usage: iossim [--args ...]\n"); - fprintf(stdout, "\n"); - fprintf(stdout, "Commands:\n"); - fprintf(stdout, " showsdks List the available iOS SDK versions\n"); - fprintf(stdout, " launch Launch the application at the specified path on the iOS Simulator\n"); - fprintf(stdout, " start Launch iOS Simulator without an app\n"); - fprintf(stdout, "\n"); - fprintf(stdout, "Options:\n"); - fprintf(stdout, " --version Print the version of ios-sim\n"); - fprintf(stdout, " --developer-path path to the developer directory (in Xcode)"); - fprintf(stdout, " --help Show this help text\n"); - fprintf(stdout, " --verbose Set the output level to verbose\n"); - fprintf(stdout, " --exit Exit after startup\n"); - fprintf(stdout, " --wait-for-debugger Wait for debugger to attach\n"); - fprintf(stdout, " --debug Attach LLDB to the application on startup\n"); - fprintf(stdout, " --use-gdb Use GDB instead of LLDB. (Requires --debug)\n"); - fprintf(stdout, " --sdk The iOS SDK version to run the application on (defaults to the latest)\n"); - fprintf(stdout, " --family The device type that should be simulated (defaults to `iphone')\n"); - fprintf(stdout, " --retina Start a retina device\n"); - fprintf(stdout, " --tall In combination with --retina flag, start the tall version of the retina device (e.g. iPhone 5 (4-inch))\n"); - fprintf(stdout, " --uuid A UUID identifying the session (is that correct?)\n"); - fprintf(stdout, " --env A plist file containing environment key-value pairs that should be set\n"); - fprintf(stdout, " --setenv NAME=VALUE Set an environment variable\n"); - fprintf(stdout, " --stdout The path where stdout of the simulator will be redirected to (defaults to stdout of ios-sim)\n"); - fprintf(stdout, " --stderr The path where stderr of the simulator will be redirected to (defaults to stderr of ios-sim)\n"); - fprintf(stdout, " --timeout The timeout time to wait for a response from the Simulator. Default value: 30 seconds\n"); - fprintf(stdout, " --args <...> All following arguments will be passed on to the application\n"); - fflush(stdout); -} - - -- (int) showSDKs { - NSUInteger i; - id tClass = objc_getClass("DTiPhoneSimulatorSystemRoot"); - if (tClass == nil) { - nsprintf(@"DTiPhoneSimulatorSystemRoot class is nil."); - return EXIT_FAILURE; - } - NSArray *roots = [tClass knownRoots]; - - nsprintf(@""); - for (i = 0; i < [roots count]; ++i) { - DTiPhoneSimulatorSystemRoot *root = [roots objectAtIndex:i]; - nsprintf(@"sdk%d_name%@", i, [root sdkDisplayName]); - nsprintf(@"sdk%d_version%@", i, [root sdkVersion]); - nsprintf(@"sdk%d_sysroot%@", i, [root sdkRootPath]); - } - nsprintf(@""); - return EXIT_SUCCESS; -} - - -- (void)session:(DTiPhoneSimulatorSession *)mySession didEndWithError:(NSError *)error { - if (verbose) { - nsprintf(@"Session did end with error %@", error); - } - - if (stderrFileHandle != nil) { - NSString *stderrPath = [[mySession sessionConfig] simulatedApplicationStdErrPath]; - [self removeStdioFIFO:stderrFileHandle atPath:stderrPath]; - } - - if (stdoutFileHandle != nil) { - NSString *stdoutPath = [[mySession sessionConfig] simulatedApplicationStdOutPath]; - [self removeStdioFIFO:stdoutFileHandle atPath:stdoutPath]; - } - - if (error != nil) - [self doExit:EXIT_FAILURE]; - else - [self doExit:EXIT_SUCCESS]; -} - - -- (void)session:(DTiPhoneSimulatorSession *)mySession didStart:(BOOL)started withError:(NSError *)error { - if (startOnly && mySession) { - [NSTask launchedTaskWithLaunchPath:@"/usr/bin/osascript" - arguments:[NSArray arrayWithObjects:@"-e", @"tell application \"iPhone Simulator\" to activate", nil]]; - nsprintf(@"Simulator started (no session)"); - [self doExit:EXIT_SUCCESS]; - return; - } - if (started) { - [NSTask launchedTaskWithLaunchPath:@"/usr/bin/osascript" - arguments:[NSArray arrayWithObjects:@"-e", @"tell application \"iPhone Simulator\" to activate", nil]]; - if (shouldStartDebugger) { - char*args[4] = { NULL, NULL, (char*)[[[mySession simulatedApplicationPID] description] UTF8String], NULL }; - if (useGDB) { - args[0] = strdup("gdb"); - args[1] = strdup("program"); - } else { - args[0] = strdup("lldb"); - args[1] = strdup("--attach-pid"); - } - // The parent process must live on to process the stdout/stderr fifos, - // so start the debugger as a child process. - pid_t child_pid = fork(); - if (child_pid == 0) { - execvp(args[0], args); - } else if (child_pid < 0) { - nsprintf(@"Could not start debugger process: %@", errno); - [self doExit:EXIT_FAILURE]; - return; - } - } - if (verbose) { - nsprintf(@"Session started"); - } - nsprintf(@"%@", [session simulatedApplicationPID]); - fflush(stdout); - if (exitOnStartup) { - [self doExit:EXIT_SUCCESS]; - return; - } - pidCheckingTimer = [[NSTimer scheduledTimerWithTimeInterval:5.0 target:self - selector:@selector(checkPid:) userInfo:nil repeats: TRUE] retain]; - } else { - nsprintf(@"Session could not be started: %@", error); - [self doExit:EXIT_FAILURE]; - } -} - -- (void)stop { - if (session) - [session requestEndWithTimeout: 0.1]; -} - -- (void)checkPid:(NSTimer *)timer { - (void)timer; - if (session && [[session simulatedApplicationPID]intValue] > 0) { - if (kill((pid_t)[[session simulatedApplicationPID]intValue], 0) == -1) { - nsprintf(@"app stopped"); - [self doExit:EXIT_SUCCESS]; - return; - } - } -} -- (void)stdioDataIsAvailable:(NSNotification *)notification { - [[notification object] readInBackgroundAndNotify]; - NSData *data = [[notification userInfo] valueForKey:NSFileHandleNotificationDataItem]; - NSString *str = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; /* dangerous if partially encoded data is at the boundary */ - if (!alreadyPrintedData) { - if ([str length] == 0) { - return; - } else { - alreadyPrintedData = YES; - } - } - if ([notification object] == stdoutFileHandle) { - printf("%s\n", [str UTF8String]); - } else { - nsprintf(@"%@", str); // handle stderr differently? - } - fflush(stdout); -} - - -- (void)createStdioFIFO:(NSFileHandle **)fileHandle ofType:(NSString *)type atPath:(NSString **)path { - *path = [NSString stringWithFormat:@"%@/ios-sim-%@-pipe-%d", NSTemporaryDirectory(), type, (int)time(NULL)]; - if (mkfifo([*path UTF8String], S_IRUSR | S_IWUSR) == -1) { - nsprintf(@"Unable to create %@ named pipe `%@'", type, *path); - [self doExit:EXIT_FAILURE]; - } else { - if (verbose) { - nsprintf(@"Creating named pipe at `%@'", *path); - } - int fd = open([*path UTF8String], O_RDONLY | O_NDELAY); - *fileHandle = [[[NSFileHandle alloc] initWithFileDescriptor:fd] retain]; - [*fileHandle readInBackgroundAndNotify]; - [[NSNotificationCenter defaultCenter] addObserver:self - selector:@selector(stdioDataIsAvailable:) - name:NSFileHandleReadCompletionNotification - object:*fileHandle]; - } -} - - -- (void)removeStdioFIFO:(NSFileHandle *)fileHandle atPath:(NSString *)path { - if (verbose) { - nsprintf(@"Removing named pipe at `%@'", path); - } - [fileHandle closeFile]; - [fileHandle release]; - if (![[NSFileManager defaultManager] removeItemAtPath:path error:NULL]) { - nsprintf(@"Unable to remove named pipe `%@'", path); - } -} - - -- (int)launchApp:(NSString *)path withFamily:(NSString *)family - uuid:(NSString *)uuid - environment:(NSDictionary *)environment - stdoutPath:(NSString *)stdoutPath - stderrPath:(NSString *)stderrPath - timeout:(NSTimeInterval)timeout - args:(NSArray *)args { - DTiPhoneSimulatorApplicationSpecifier *appSpec; - DTiPhoneSimulatorSessionConfig *config; - NSError *error = 0; - id tClass; - - NSFileManager *fileManager = [[[NSFileManager alloc] init] autorelease]; - if (!startOnly && ![fileManager fileExistsAtPath:path]) { - nsprintf(@"Application path %@ doesn't exist!", path); - return EXIT_FAILURE; - } - - /* Create the app specifier */ - tClass = objc_getClass("DTiPhoneSimulatorApplicationSpecifier"); - if (tClass == nil) { - nsprintf(@"DTiPhoneSimulatorApplicationSpecifier class is nil."); - return EXIT_FAILURE; - } - appSpec = startOnly ? nil : [tClass specifierWithApplicationPath:path]; - - if (verbose) { - nsprintf(@"App Spec: %@", appSpec); - nsprintf(@"SDK Root: %@", sdkRoot); - - for (id key in environment) { - nsprintf(@"Env: %@ = %@", key, [environment objectForKey:key]); - } - } - - - NSString *sdkVersion = [sdkRoot sdkVersion]; - NSString *appSupportDir = [NSString stringWithFormat:@"%@/Library/Application Support/iPhone Simulator/%@", - NSHomeDirectory(), sdkVersion]; - NSMutableDictionary *mutableEnv = [NSMutableDictionary dictionaryWithDictionary:environment]; - [mutableEnv setObject:appSupportDir forKey:@"CFFIXED_USER_HOME"]; - [mutableEnv setObject:appSupportDir forKey:@"IPHONE_SHARED_RESOURCES_DIRECTORY"]; - [mutableEnv setObject:appSupportDir forKey:@"HOME"]; - [mutableEnv setObject:[sdkRoot sdkRootPath] forKey:@"IPHONE_SIMULATOR_ROOT"]; - [mutableEnv setObject:[sdkRoot sdkRootPath] forKey:@"DYLD_ROOT_PATH"]; - [mutableEnv setObject:[sdkRoot sdkRootPath] forKey:@"DYLD_FRAMEWORK_PATH"]; - [mutableEnv setObject:[sdkRoot sdkRootPath] forKey:@"DYLD_LIBRARY_PATH"]; - [mutableEnv setObject:@"YES" forKey:@"NSUnbufferedIO"]; - environment = mutableEnv; - - /* Set up the session configuration */ - tClass = objc_getClass("DTiPhoneSimulatorSessionConfig"); - if (tClass == nil) { - nsprintf(@"DTiPhoneSimulatorApplicationSpecifier class is nil."); - return EXIT_FAILURE; - } - config = [[[tClass alloc] init] autorelease]; - [config setApplicationToSimulateOnStart:appSpec]; - [config setSimulatedSystemRoot:sdkRoot]; - [config setSimulatedApplicationShouldWaitForDebugger:shouldWaitDebugger]; - - [config setSimulatedApplicationLaunchArgs:args]; - [config setSimulatedApplicationLaunchEnvironment:environment]; - - if (stderrPath) { - stderrFileHandle = nil; - } else if (!exitOnStartup) { - [self createStdioFIFO:&stderrFileHandle ofType:@"stderr" atPath:&stderrPath]; - } - [config setSimulatedApplicationStdErrPath:stderrPath]; - - if (stdoutPath) { - stdoutFileHandle = nil; - } else if (!exitOnStartup) { - [self createStdioFIFO:&stdoutFileHandle ofType:@"stdout" atPath:&stdoutPath]; - } - [config setSimulatedApplicationStdOutPath:stdoutPath]; - - [config setLocalizedClientName: @"iossim"]; - - // this was introduced in 3.2 of SDK - if ([config respondsToSelector:@selector(setSimulatedDeviceFamily:)]) { - if (family == nil) { - family = @"iphone"; - } - - if (verbose) { - nsprintf(@"using device family %@",family); - } - - if ([family isEqualToString:@"ipad"]) { -[config setSimulatedDeviceFamily:[NSNumber numberWithInt:2]]; - } else{ - [config setSimulatedDeviceFamily:[NSNumber numberWithInt:1]]; - } - } - - [self changeDeviceType:family retina:retinaDevice isTallDevice:tallDevice]; - - /* Start the session */ - tClass = objc_getClass("DTiPhoneSimulatorSession"); - if (tClass == nil) { - nsprintf(@"DTiPhoneSimulatorSession class is nil."); - return EXIT_FAILURE; - } - session = [[tClass alloc] init]; - [session setDelegate:self]; - if (uuid != nil){ - [session setUuid:uuid]; - } - - if (![session requestStartWithConfig:config timeout:timeout error:&error]) { - nsprintf(@"Could not start simulator session: %@", error); - return EXIT_FAILURE; - } - - return EXIT_SUCCESS; -} - -- (void) changeDeviceType:(NSString *)family retina:(BOOL)retina isTallDevice:(BOOL)isTallDevice { - NSString *devicePropertyValue; - if (retina) { - if (verbose) { - nsprintf(@"using retina"); - } - if ([family isEqualToString:@"ipad"]) { - devicePropertyValue = deviceIpadRetina; - } - else { - if (isTallDevice) { - devicePropertyValue = deviceIphoneRetina4_0Inch; - } else { - devicePropertyValue = deviceIphoneRetina3_5Inch; - } - } - } else { - if ([family isEqualToString:@"ipad"]) { - devicePropertyValue = deviceIpad; - } else { - devicePropertyValue = deviceIphone; - } - } - CFPreferencesSetAppValue((CFStringRef)deviceProperty, (CFPropertyListRef)devicePropertyValue, (CFStringRef)simulatorPrefrencesName); - CFPreferencesAppSynchronize((CFStringRef)simulatorPrefrencesName); -} - - -/** - * Execute 'main' - */ -- (void)runWithArgc:(int)argc argv:(char **)argv { - if (argc < 2) { - [self printUsage]; - exit(EXIT_FAILURE); - } - - retinaDevice = NO; - tallDevice = NO; - exitOnStartup = NO; - alreadyPrintedData = NO; - startOnly = strcmp(argv[1], "start") == 0; - nsprintf(@""); - - if (strcmp(argv[1], "showdevicetypes") == 0) { - nsprintf(@""); - nsprintf(@"com.apple.CoreSimulator.SimDeviceType.iPhone-4siPhone 3.5-inch Retina Display"); - nsprintf(@"com.apple.CoreSimulator.SimDeviceType.iPhone-5siPhone 4-inch Retina Display"); - nsprintf(@"com.apple.CoreSimulator.SimDeviceType.iPad-2iPad"); - nsprintf(@"com.apple.CoreSimulator.SimDeviceType.iPad-RetinaiPad Retina Display"); - nsprintf(@""); - [self doExit:0]; - return; - } else if (strcmp(argv[1], "showsdks") == 0) { - [self doExit:[self showSDKs]]; - return; - } else if (strcmp(argv[1], "launch") == 0 || startOnly) { - if (strcmp(argv[1], "launch") == 0 && argc < 3) { - nsprintf(@"Missing application path argument"); - [self printUsage]; - [self doExit:EXIT_FAILURE]; - return; - } - - NSString *appPath = nil; - int argOffset; - if (startOnly) { - argOffset = 2; - } - else { - argOffset = 3; - appPath = [[NSString stringWithUTF8String:argv[2]] expandPath]; - } - - NSString *family = nil; - NSString *uuid = nil; - NSString *stdoutPath = nil; - NSString *stderrPath = nil; - NSTimeInterval timeout = 60; - NSMutableDictionary *environment = [NSMutableDictionary dictionary]; - - int i = argOffset; - for (; i < argc; i++) { - if (strcmp(argv[i], "--version") == 0) { - printf("%s\n", IOS_SIM_VERSION); - exit(EXIT_SUCCESS); - } else if (strcmp(argv[i], "--help") == 0) { - [self printUsage]; - exit(EXIT_SUCCESS); - } else if (strcmp(argv[i], "--verbose") == 0) { - verbose = YES; - } else if (strcmp(argv[i], "--exit") == 0) { - exitOnStartup = YES; - } else if (strcmp(argv[i], "--wait-for-debugger") == 0) { - shouldWaitDebugger = YES; - } else if (strcmp(argv[i], "--debug") == 0) { - shouldWaitDebugger = YES; - shouldStartDebugger = YES; - } else if (strcmp(argv[i], "--use-gdb") == 0) { - useGDB = YES; - } else if (strcmp(argv[i], "--developer-path") == 0) { - ++i; - if (i == argc) { - nsprintf(@"missing arg after --developer-path"); - [self doExit:EXIT_FAILURE]; - return; - } - } else if (strcmp(argv[i], "--timeout") == 0) { - if (i + 1 < argc) { - timeout = [[NSString stringWithUTF8String:argv[++i]] doubleValue]; - nsprintf(@"Timeout: %f second(s)", timeout); - } - } - else if (strcmp(argv[i], "--sdk") == 0) { - i++; - if (i == argc) { - nsprintf(@"missing arg after --sdk"); - [self doExit:EXIT_FAILURE]; - return; - } - NSString* ver = [NSString stringWithCString:argv[i] encoding:NSUTF8StringEncoding]; - id tClass = objc_getClass("DTiPhoneSimulatorSystemRoot"); - NSArray *roots; - if (tClass == nil) { - nsprintf(@"DTiPhoneSimulatorSystemRoot class is nil."); - [self doExit:EXIT_FAILURE]; - return; - } - roots = [tClass knownRoots]; - for (DTiPhoneSimulatorSystemRoot *root in roots) { - NSString *v = [root sdkVersion]; - if ([v isEqualToString:ver]) { - sdkRoot = root; - break; - } - } - if (sdkRoot == nil) { - fprintf(stdout,"Unknown or unsupported SDK version: %s\n",argv[i]); - [self showSDKs]; - exit(EXIT_FAILURE); - } - } else if (strcmp(argv[i], "--family") == 0) { - i++; - if (i == argc) { - nsprintf(@"missing arg after --family"); - [self doExit:EXIT_FAILURE]; - return; - } - family = [NSString stringWithUTF8String:argv[i]]; - } else if (strcmp(argv[i], "--uuid") == 0) { - i++; - uuid = [NSString stringWithUTF8String:argv[i]]; - } else if (strcmp(argv[i], "--devicetypeid") == 0) { - i++; - if (i == argc) { - nsprintf(@"missing arg after --devicetypeid"); - [self doExit:EXIT_FAILURE]; - return; - } - if (strcmp(argv[i], "com.apple.CoreSimulator.SimDeviceType.iPhone-4s") == 0) { - family = [NSString stringWithUTF8String:"iphone"]; - retinaDevice = YES; - } else if (strcmp(argv[i], "com.apple.CoreSimulator.SimDeviceType.iPad-2") == 0) { - family = [NSString stringWithUTF8String:"ipad"]; - } else if (strcmp(argv[i], "com.apple.CoreSimulator.SimDeviceType.iPhone-5s") == 0) { - family = [NSString stringWithUTF8String:"iphone"]; - retinaDevice = YES; - tallDevice = YES; - } else if (strcmp(argv[i], "com.apple.CoreSimulator.SimDeviceType.iPad-Retina") == 0) { - family = [NSString stringWithUTF8String:"ipad"]; - retinaDevice = YES; - } else { - fprintf(stdout,"Unknown or unsupported device type: %s\n",argv[i]); - [self doExit:EXIT_FAILURE]; - return; - } - } else if (strcmp(argv[i], "--setenv") == 0) { - i++; - if (i == argc) { - nsprintf(@"missing arg after --setenv"); - [self doExit:EXIT_FAILURE]; - return; - } - NSArray *parts = [[NSString stringWithUTF8String:argv[i]] componentsSeparatedByString:@"="]; - [environment setObject:[parts objectAtIndex:1] forKey:[parts objectAtIndex:0]]; - } else if (strcmp(argv[i], "--env") == 0) { - i++; - if (i == argc) { - nsprintf(@"missing arg after --env"); - [self doExit:EXIT_FAILURE]; - return; - } - NSString *envFilePath = [[NSString stringWithUTF8String:argv[i]] expandPath]; - environment = [NSMutableDictionary dictionaryWithContentsOfFile:envFilePath]; - if (!environment) { - fprintf(stdout, "Could not read environment from file: %s\n", argv[i]); - [self printUsage]; - exit(EXIT_FAILURE); - } - } else if (strcmp(argv[i], "--stdout") == 0) { - i++; - if (i == argc) { - nsprintf(@"missing arg after --stdout"); - [self doExit:EXIT_FAILURE]; - return; - } - stdoutPath = [[NSString stringWithUTF8String:argv[i]] expandPath]; - nsprintf(@"stdoutPath: %@", stdoutPath); - } else if (strcmp(argv[i], "--stderr") == 0) { - i++; - if (i == argc) { - nsprintf(@"missing arg after --stderr"); - [self doExit:EXIT_FAILURE]; - return; - } - stderrPath = [[NSString stringWithUTF8String:argv[i]] expandPath]; - nsprintf(@"stderrPath: %@", stderrPath); - } else if (strcmp(argv[i], "--retina") == 0) { - retinaDevice = YES; - } else if (strcmp(argv[i], "--tall") == 0) { - tallDevice = YES; - } else if (strcmp(argv[i], "--args") == 0) { - i++; - break; - } else { - printf("unrecognized argument:%s\n", argv[i]); - [self printUsage]; - [self doExit:EXIT_FAILURE]; - return; - } - } - NSMutableArray *args = [NSMutableArray arrayWithCapacity:MAX(argc - i,0)]; - for (; i < argc; i++) { - [args addObject:[NSString stringWithUTF8String:argv[i]]]; - } - - if (sdkRoot == nil) { - id tClass = objc_getClass("DTiPhoneSimulatorSystemRoot"); - if (tClass == nil) { - nsprintf(@"DTiPhoneSimulatorSystemRoot class is nil."); - [self doExit:EXIT_FAILURE]; - return; - } - sdkRoot = [tClass defaultRoot]; - } - - /* Don't exit, adds to runloop */ - int res = [self launchApp:appPath - withFamily:family - uuid:uuid - environment:environment - stdoutPath:stdoutPath - stderrPath:stderrPath - timeout:timeout - args:args]; - nsprintf(@"", ((res == 0) ? @"SUCCESS" : @"FAILURE")); - fflush(stdout); - fflush(stderr); - if (res != 0) - [self doExit:EXIT_FAILURE]; - } else { - if (argc == 2 && strcmp(argv[1], "--help") == 0) { - [self printUsage]; - [self doExit:EXIT_SUCCESS]; - } else if (argc == 2 && strcmp(argv[1], "--version") == 0) { - printf("%s\n", IOS_SIM_VERSION); - [self doExit:EXIT_SUCCESS]; - } else { - fprintf(stdout, "Unknown command\n"); - [self printUsage]; - [self doExit:EXIT_FAILURE]; - } - } -} - -@end diff --git a/src/tools/3rdparty/iossim_1_8_2/iphonesimulatorremoteclient/iphonesimulatorremoteclient.h b/src/tools/3rdparty/iossim_1_8_2/iphonesimulatorremoteclient/iphonesimulatorremoteclient.h deleted file mode 100644 index abf69c8067b..00000000000 --- a/src/tools/3rdparty/iossim_1_8_2/iphonesimulatorremoteclient/iphonesimulatorremoteclient.h +++ /dev/null @@ -1,126 +0,0 @@ -#import - -/* - * File: /Developer/Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/iPhoneSimulatorRemoteClient.framework/Versions/A/iPhoneSimulatorRemoteClient - * Arch: Intel 80x86 (i386) - * Current version: 12.0.0, Compatibility version: 1.0.0 - * - * See the IOSSIM_LICENSE file in the parent directory for the license on the source code in this file. - */ - -@class DTiPhoneSimulatorSession; - -@protocol DTiPhoneSimulatorSessionDelegate - -- (void) session: (DTiPhoneSimulatorSession *) session didEndWithError: (NSError *) error; -- (void) session: (DTiPhoneSimulatorSession *) session didStart: (BOOL) started withError: (NSError *) error; - -@end - -@interface DTiPhoneSimulatorApplicationSpecifier : NSObject -{ - NSString *_appPath; - NSString *_bundleID; -} - -+ (id) specifierWithApplicationPath: (NSString *) appPath; -+ (id) specifierWithApplicationBundleIdentifier: (NSString *) bundleID; -- (NSString *) bundleID; -- (void) setBundleID: (NSString *) bundleId; -- (NSString *) appPath; -- (void) setAppPath: (NSString *) appPath; - -@end - -@interface DTiPhoneSimulatorSystemRoot : NSObject -{ - NSString *sdkRootPath; - NSString *sdkVersion; - NSString *sdkDisplayName; -} - -+ (id) defaultRoot; - -+ (id)rootWithSDKPath:(id)fp8; -+ (id)rootWithSDKVersion:(id)fp8; -+ (NSArray *) knownRoots; -- (id)initWithSDKPath:(id)fp8; -- (id)sdkDisplayName; -- (void)setSdkDisplayName:(id)fp8; -- (id)sdkVersion; -- (void)setSdkVersion:(id)fp8; -- (id)sdkRootPath; -- (void)setSdkRootPath:(id)fp8; - -@end - - - -@interface DTiPhoneSimulatorSessionConfig : NSObject -{ - NSString *_localizedClientName; - DTiPhoneSimulatorSystemRoot *_simulatedSystemRoot; - DTiPhoneSimulatorApplicationSpecifier *_applicationToSimulateOnStart; - NSArray *_simulatedApplicationLaunchArgs; - NSDictionary *_simulatedApplicationLaunchEnvironment; - BOOL _simulatedApplicationShouldWaitForDebugger; - NSString *_simulatedApplicationStdOutPath; - NSString *_simulatedApplicationStdErrPath; -} - -- (id)simulatedApplicationStdErrPath; -- (void)setSimulatedApplicationStdErrPath:(id)fp8; -- (id)simulatedApplicationStdOutPath; -- (void)setSimulatedApplicationStdOutPath:(id)fp8; -- (id)simulatedApplicationLaunchEnvironment; -- (void)setSimulatedApplicationLaunchEnvironment:(id)fp8; -- (id)simulatedApplicationLaunchArgs; -- (void)setSimulatedApplicationLaunchArgs:(id)fp8; - -- (DTiPhoneSimulatorApplicationSpecifier *) applicationToSimulateOnStart; -- (void) setApplicationToSimulateOnStart: (DTiPhoneSimulatorApplicationSpecifier *) appSpec; -- (DTiPhoneSimulatorSystemRoot *) simulatedSystemRoot; -- (void) setSimulatedSystemRoot: (DTiPhoneSimulatorSystemRoot *) simulatedSystemRoot; - - -- (BOOL) simulatedApplicationShouldWaitForDebugger; -- (void) setSimulatedApplicationShouldWaitForDebugger: (BOOL) waitForDebugger; - -- (id)localizedClientName; -- (void)setLocalizedClientName:(id)fp8; - -// Added in 3.2 to support iPad/iPhone device families -- (void)setSimulatedDeviceFamily:(NSNumber*)family; - -@end - - -@interface DTiPhoneSimulatorSession : NSObject { - NSString *_uuid; - id _delegate; - NSNumber *_simulatedApplicationPID; - int _sessionLifecycleProgress; - NSTimer *_timeoutTimer; - DTiPhoneSimulatorSessionConfig *_sessionConfig; - struct ProcessSerialNumber _simulatorPSN; -} - -- (BOOL) requestStartWithConfig: (DTiPhoneSimulatorSessionConfig *) config timeout: (NSTimeInterval) timeout error: (NSError **) outError; -- (void) requestEndWithTimeout: (NSTimeInterval) timeout; - -- (id)sessionConfig; -- (void)setSessionConfig:(id)fp8; -- (id)timeoutTimer; -- (void)setTimeoutTimer:(id)fp8; -- (int)sessionLifecycleProgress; -- (void)setSessionLifecycleProgress:(int)fp8; -- (id)simulatedApplicationPID; -- (void)setSimulatedApplicationPID:(id)fp8; - -- (id) delegate; -- (void) setDelegate: (id) delegate; - -- (id)uuid; -- (void)setUuid:(id)fp8; - -@end diff --git a/src/tools/3rdparty/iossim_1_8_2/main.mm b/src/tools/3rdparty/iossim_1_8_2/main.mm deleted file mode 100644 index fb83dc3e199..00000000000 --- a/src/tools/3rdparty/iossim_1_8_2/main.mm +++ /dev/null @@ -1,77 +0,0 @@ -/* Author: Landon Fuller - * Copyright (c) 2008-2011 Plausible Labs Cooperative, Inc. - * All rights reserved. - * - * See the IOSSIM_LICENSE file in this directory for the license on the source code in this file. - */ -/* derived from https://github.com/phonegap/ios-sim */ -#import -#import "iphonesimulator.h" -#include -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) -#include -#else -#include -#endif -#include -#include - -/* to do: - * - try to stop inferior when killed (or communicate with creator to allow killing the inferior) - * - remove unneeded functionality and streamline a bit - */ - -/* - * Runs the iPhoneSimulator backed by a main runloop. - */ -int main (int argc, char *argv[]) { - int qtargc = 1; - char *qtarg = 0; - if (argc) - qtarg = argv[0]; -#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) - QApplication a(qtargc, &qtarg); -#else - QGuiApplication a(qtargc, &qtarg); -#endif - - - //NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - QString xcodePath = QLatin1String("/Applications/Xcode.app/Contents/Developer/"); - for (int i = 0; i + 1 < argc; ++i) { - if (strcmp(argv[i], "--developer-path") == 0) - xcodePath = QString::fromLocal8Bit(argv[i + 1]); - } - if (!xcodePath.endsWith(QLatin1Char('/'))) - xcodePath.append(QLatin1Char('/')); - - /* manual loading of the private deps */ - QStringList deps = QStringList() - << QLatin1String("/System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols") - << QLatin1String("/System/Library/PrivateFrameworks/CoreSymbolication.framework/CoreSymbolication") - << (xcodePath + QLatin1String("../OtherFrameworks/DevToolsFoundation.framework/DevToolsFoundation")); - foreach (const QString &libPath, deps) { - QLibrary *lib = new QLibrary(libPath); - //lib->setLoadHints(QLibrary::ExportExternalSymbolsHint); - if (!lib->load()) - printf("error loading %s", libPath.toUtf8().constData()); - } - QLibrary *libIPhoneSimulatorRemoteClient = new QLibrary(xcodePath - + QLatin1String("Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/iPhoneSimulatorRemoteClient.framework/iPhoneSimulatorRemoteClient")); - //libIPhoneSimulatorRemoteClient->setLoadHints(QLibrary::ResolveAllSymbolsHint|QLibrary::ExportExternalSymbolsHint); - if (!libIPhoneSimulatorRemoteClient->load()) - printf("error loading iPhoneSimulatorRemoteClient"); - - iPhoneSimulator *sim = [[iPhoneSimulator alloc] init]; - - /* Execute command line handler */ - [sim runWithArgc: argc argv: argv]; - - /* Run the loop to handle added input sources, if any */ - - int res = a.exec(); - exit(res); - // [pool release]; - return 0; -} diff --git a/src/tools/3rdparty/iossim_1_8_2/nsprintf.h b/src/tools/3rdparty/iossim_1_8_2/nsprintf.h deleted file mode 100644 index cee7c00d289..00000000000 --- a/src/tools/3rdparty/iossim_1_8_2/nsprintf.h +++ /dev/null @@ -1,6 +0,0 @@ -/* - * See the IOSSIM_LICENSE file in this directory for the license on the source code in this file. - */ -int nsvfprintf (FILE *stream, NSString *format, va_list args); -int nsfprintf (FILE *stream, NSString *format, ...); -int nsprintf (NSString *format, ...); diff --git a/src/tools/3rdparty/iossim_1_8_2/nsprintf.mm b/src/tools/3rdparty/iossim_1_8_2/nsprintf.mm deleted file mode 100644 index b7413f593ca..00000000000 --- a/src/tools/3rdparty/iossim_1_8_2/nsprintf.mm +++ /dev/null @@ -1,44 +0,0 @@ -/* - * NSLog() clone, but writes to arbitrary output stream - * - * See the IOSSIM_LICENSE file in this directory for the license on the source code in this file. - */ - -#import -#import - -int nsvfprintf (FILE *stream, NSString *format, va_list args) { - int retval; - - NSString *str = (NSString *) CFStringCreateWithFormatAndArguments(NULL, NULL, (CFStringRef) format, args); - retval = fprintf(stream, "%s\n", [str UTF8String]); - [str release]; - - return retval; -} - -int nsfprintf (FILE *stream, NSString *format, ...) { - va_list ap; - int retval; - - va_start(ap, format); - { - retval = nsvfprintf(stream, format, ap); - } - va_end(ap); - - return retval; -} - -int nsprintf (NSString *format, ...) { - va_list ap; - int retval; - - va_start(ap, format); - { - retval = nsvfprintf(stdout, format, ap); - } - va_end(ap); - - return retval; -} diff --git a/src/tools/3rdparty/iossim_1_8_2/nsstringexpandpath.h b/src/tools/3rdparty/iossim_1_8_2/nsstringexpandpath.h deleted file mode 100644 index 3eed139c0e9..00000000000 --- a/src/tools/3rdparty/iossim_1_8_2/nsstringexpandpath.h +++ /dev/null @@ -1,11 +0,0 @@ -/* - * See the IOSSIM_LICENSE file in this directory for the license on the source code in this file. - */ - -#import - -@interface NSString (ExpandPath) - -- (NSString *)expandPath; - -@end diff --git a/src/tools/3rdparty/iossim_1_8_2/nsstringexpandpath.mm b/src/tools/3rdparty/iossim_1_8_2/nsstringexpandpath.mm deleted file mode 100644 index 53f43e3c12b..00000000000 --- a/src/tools/3rdparty/iossim_1_8_2/nsstringexpandpath.mm +++ /dev/null @@ -1,18 +0,0 @@ -/* - * See the IOSSIM_LICENSE file in this directory for the license on the source code in this file. - */ - -#import "nsstringexpandpath.h" - -@implementation NSString (ExpandPath) - -- (NSString *)expandPath { - if ([self isAbsolutePath]) { - return [self stringByStandardizingPath]; - } else { - NSString *cwd = [[NSFileManager defaultManager] currentDirectoryPath]; - return [[cwd stringByAppendingPathComponent:self] stringByStandardizingPath]; - } -} - -@end diff --git a/src/tools/3rdparty/iossim_1_8_2/version.h b/src/tools/3rdparty/iossim_1_8_2/version.h deleted file mode 100644 index 9f8c0dfc919..00000000000 --- a/src/tools/3rdparty/iossim_1_8_2/version.h +++ /dev/null @@ -1 +0,0 @@ -#define IOS_SIM_VERSION "1.8.2m"