diff --git a/dist/changes-2.8.0 b/dist/changes-2.8.0 index 87cfd4e83ad..60737f2f467 100644 --- a/dist/changes-2.8.0 +++ b/dist/changes-2.8.0 @@ -90,17 +90,14 @@ C++ Support source (QTCREATORBUG-516) * Added refactoring action that assigns a function return value or new expression to local variable (QTCREATORBUG-9052) - * Added refactoring action that adds implementations for pure virtual methods + * Added refactoring action that adds implementations for virtual methods * Fixed parsing of try-catch in constructor initializer (QTCREATORBUG-9064) * Fixed handling of non-arguments in function parameter scope (QTCREATORBUG-8316) * Fixed crash when adding include for undefined identifier in file that has no other include (QTCREATORBUG-8799) - * Fixed that system headers were not reparsed when project configuration - changes (QTCREATORBUG-9056) * Fixed highlighting for template parameters for function calls * Improved support for anonymous classes (QTCREATORBUG-6497, QTCREATORBUG-8963, QTCREATORBUG-3610, QTCREATORBUG-7579) - * Fixed support for typedef of templated typedefs (QTCREATORBUG-8375) * Fixed code completion with 'using' declaration inside functions (QTCREATORBUG-2668) * Fixed highlighting of types when there is 'using Namespace::TypeName' (QTCREATORBUG-7903) @@ -116,7 +113,6 @@ Diff Viewer * Added file list combo box Version Control Systems - * Added "Select All" to clean dialog * Git * Added new side-by-side diff viewer * Added support for interactive rebase @@ -131,6 +127,7 @@ Version Control Systems * Added tags to branches dialog * Added ability to save repository location for Gerrit * Added graph toggle button for log viewer + * Added "Select All" to clean dialog * ClearCase * Removed useless hijack button for dynamic view diff --git a/doc/api/getting-and-building.qdoc b/doc/api/getting-and-building.qdoc index 6a7f56b05d5..b0f87bc2beb 100644 --- a/doc/api/getting-and-building.qdoc +++ b/doc/api/getting-and-building.qdoc @@ -36,7 +36,7 @@ \QC usually uses the latest stable release of Qt, you can see the exact minimum requirement at the top of \QC's qtcreator.pro. (You can find the current version in our source repository here: - \l{https://qt.gitorious.org/qt-creator/qt-creator/blobs/master/qtcreator.pro}.) + \l{http://qt.gitorious.org/qt-creator/qt-creator/blobs/master/qtcreator.pro}.) You find the sources for the different Qt versions for example on our gitorious repository \l{http://qt.gitorious.org/qt}. diff --git a/doc/images/creator-toggle-progress-bar.png b/doc/images/creator-toggle-progress-bar.png new file mode 100644 index 00000000000..80ef8cbdbbb Binary files /dev/null and b/doc/images/creator-toggle-progress-bar.png differ diff --git a/doc/images/qtcreator-editortoolbar-symbols.png b/doc/images/qtcreator-editortoolbar-symbols.png index 7386697de3d..8f55b277b75 100644 Binary files a/doc/images/qtcreator-editortoolbar-symbols.png and b/doc/images/qtcreator-editortoolbar-symbols.png differ diff --git a/doc/images/qtcreator-new-qt-quick-project-wizard.png b/doc/images/qtcreator-new-qt-quick-project-wizard.png index 1ac72704809..571a67eb31b 100644 Binary files a/doc/images/qtcreator-new-qt-quick-project-wizard.png and b/doc/images/qtcreator-new-qt-quick-project-wizard.png differ diff --git a/doc/src/debugger/creator-debugger-setup.qdoc b/doc/src/debugger/creator-debugger-setup.qdoc index a8366f998a9..094be80d1d4 100644 --- a/doc/src/debugger/creator-debugger-setup.qdoc +++ b/doc/src/debugger/creator-debugger-setup.qdoc @@ -231,7 +231,7 @@ \note The Mac OS X Snow Leopard (10.6) has a bug that might cause the application to crash. For a workaround, see: - \l{https://bugreports.qt-project.org/browse/QTBUG-4962}{QTBUG-4962}. + \l{http://bugreports.qt-project.org/browse/QTBUG-4962}{QTBUG-4962}. \endtable diff --git a/doc/src/debugger/creator-debugger.qdoc b/doc/src/debugger/creator-debugger.qdoc index ff73ad3c14a..593d368f311 100644 --- a/doc/src/debugger/creator-debugger.qdoc +++ b/doc/src/debugger/creator-debugger.qdoc @@ -1322,7 +1322,7 @@ existing process or use the \gui {Run in terminal} option in \QC. The reasons for this are described in - \l{https://wiki.ubuntu.com/SecurityTeam/Roadmap/KernelHardening#ptrace%20Protection} + \l{http://wiki.ubuntu.com/SecurityTeam/Roadmap/KernelHardening#ptrace%20Protection} {KernelHardening}. However, the usefulness of this security measure seems dubious, diff --git a/doc/src/editors/creator-coding-edit-mode.qdoc b/doc/src/editors/creator-coding-edit-mode.qdoc index 4dc861df555..a2fd20ba2c1 100644 --- a/doc/src/editors/creator-coding-edit-mode.qdoc +++ b/doc/src/editors/creator-coding-edit-mode.qdoc @@ -57,14 +57,27 @@ select \gui {Sort Alphabetically} to arrange the symbols in alphabetic order. + To jump to a line and column in the current file, select the line and column + indicator (3) or press \key {Ctrl+L} (or \key {Cmd+L} on Mac OS X) to open + the locator. Enter the line number and column number in the locator, + separated by a colon (:). + + To show the file encoding of the current file on the editor toolbar (4), + select \gui Tools > \gui Options > \gui {Text Editor} > \gui Display > + \gui {Display file encoding}. + + \note Other convenient ways of navigating in \QC are provided by the + \l{Searching with the Locator}{locator}, \l{Keyboard Shortcuts} + {keyboard shortcuts}, and the \l{Browsing Project Contents}{sidebar}. + \section1 Splitting the Editor View - Split the editor view when you want to work on and view multiple files on - the same screen. + Split the editor view or open the editor in a new window when you want to + work on and view multiple files on the same screen or on multiple screens. \image qtcreator-spliteditorview.png - You can split the editor view in the following ways: + You can view multiple files simultaneously in the following ways: \list @@ -82,10 +95,17 @@ Side by side split command creates views to the right of the currently active editor view. + \li To open the editor in a detached window, press \key{Ctrl+E, 4}, or + select \gui Window > \gui {Open in New Window}. + + The new window behaves basically in the same way as the editor area + in the main window. For example, you can split this window, as well. + Documents are opened in the currently active editor window. + \endlist - To move between split views, select \gui Window > \gui{Go to Next Split} or - press \key{Ctrl+E, O}. + To move between split views and detached editor windows, select \gui Window + > \gui{Go to Next Split or Window} or press \key{Ctrl+E, O}. To remove a split view, place the cursor within the view you want to remove and select \gui Window > \gui{Remove Current Split}, press @@ -138,14 +158,15 @@ \key {Shift+F2} or right-click the symbol and select \gui {Switch Between Method Declaration/Definition}. - Links are opened in the same split by default. Every operation can also be opened in - the next split by prebending \key {Ctrl+E} to the shortcut. For example \key {Ctrl+E,F2} - to follow the symbol in the next split. If currently is just one editor open a split will be - automatically opened. The default behavior could also be changed in - \gui Tools > \gui{Options} > \gui{Text Editor} > \gui Display, by checking - \gui{Always Open Links in Next Split}. Additional symbols and switching between definition - and decleration is opened in another split. If you change the default behavior the shortcuts - for open in next split are used to open the target in the current split. + Links are opened in the same split by default. To open links in the next + split, prepend \key {Ctrl+E} to the shortcut. For example, press \key {Ctrl+E,F2} + to follow the symbol in the next split. If necessary, the view is + automatically split. To change the default behavior, select \gui Tools > + \gui{Options} > \gui{Text Editor} > \gui Display, and then select + \gui{Always Open Links in Next Split}. Additional symbols are displayed and + switching between definition and declaration is done in another split. + If you change the default behavior, the shortcuts for opening link targets + in the next split are used to open them in the current split. \section1 Using Update Code Model diff --git a/doc/src/editors/creator-editors.qdoc b/doc/src/editors/creator-editors.qdoc index 504559809d3..94dd8bc125d 100644 --- a/doc/src/editors/creator-editors.qdoc +++ b/doc/src/editors/creator-editors.qdoc @@ -2044,11 +2044,24 @@ \title Searching with the Locator You can find the locator in the bottom left of the \QC window. - To activate the locator, press \key Ctrl+K (\key Cmd+K on Mac OS X) or - select \gui Tools > \gui Locate. \image qtcreator-locator.png + To activate the locator: + + \list + + \li Press \key Ctrl+K (\key Cmd+K on Mac OS X). + + \li Select \gui Tools > \gui Locate. + + \li Select \gui Edit > \gui {Go to Line}. + + \li Click the line and column indicator on the + \l{Using the Editor Toolbar}{editor toolbar}. + + \endlist + To edit the currently open project's main.cpp file using the locator: \list 1 @@ -2108,7 +2121,8 @@ \li Locating class and method definitions in the current document - \li Locating a specific line in the document displayed in your editor + \li Locating a specific line and column in the document displayed in + your editor \li Opening help topics, including Qt documentation @@ -2148,7 +2162,7 @@ \list - \li Going to a line in the current file (l). + \li Going to a line and column in the current file (l). \li Going to an open file (o). diff --git a/doc/src/howto/creator-cli.qdoc b/doc/src/howto/creator-cli.qdoc index a9577871520..6e9599ff49a 100644 --- a/doc/src/howto/creator-cli.qdoc +++ b/doc/src/howto/creator-cli.qdoc @@ -120,6 +120,24 @@ Open the projects and files that were open when you last exited \QC. For more information about managing sessions, see \l{Managing Sessions}. + \row + \li -block + \li Open files in editors in a running \QC instance and block the + command line until the first editor is closed. \endtable + \section1 Using Custom Styles + + \QC is a \l{http://qt-project.org/doc/qt-5.0/qtwidgets/qapplication.html#QApplication} + {Qt application}, and therefore, it accepts the command line options + that all Qt applications accept. For example, you can use the \c {-style} and + \c {-stylesheet} options to apply custom styles and + \l{http://qt-project.org/doc/qt-5.0/qtwidgets/stylesheet.html}{stylesheets}. + The styling is only applied during the current session. + + Exercise caution when applying styles, as overriding the existing styling + may make some items difficult to see. Also, setting a stylesheet may affect + the \l{Specifying Text Editor Settings}{text editor color scheme} and the + styling of the integrated \QD. + */ diff --git a/doc/src/howto/creator-ui.qdoc b/doc/src/howto/creator-ui.qdoc index 6afd0ff1d7a..d63d86a4d1d 100644 --- a/doc/src/howto/creator-ui.qdoc +++ b/doc/src/howto/creator-ui.qdoc @@ -66,6 +66,9 @@ modes, click the icons, or use the \l{keyboard-shortcuts} {corresponding keyboard shortcut}. + To hide the mode selector and to save space on the display, select + \gui Window > \gui {Show Mode Selector}. + The following image displays an example application in \gui Edit mode (1) and \gui Design mode (2). diff --git a/doc/src/howto/creator-vcs.qdoc b/doc/src/howto/creator-vcs.qdoc index cb117636621..f1ef7cf9537 100644 --- a/doc/src/howto/creator-vcs.qdoc +++ b/doc/src/howto/creator-vcs.qdoc @@ -63,6 +63,7 @@ \row \li Subversion \li \l{http://subversion.apache.org/} + \li Subversion version 1.6.17 and later \li \endtable diff --git a/doc/src/howto/qtcreator-faq.qdoc b/doc/src/howto/qtcreator-faq.qdoc index dfdfe4fb411..026eb8ef38a 100644 --- a/doc/src/howto/qtcreator-faq.qdoc +++ b/doc/src/howto/qtcreator-faq.qdoc @@ -98,7 +98,7 @@ \b {Has a reported issue been addressed?} You can look up any issue in the - \l{https://bugreports.qt-project.org/}{Qt bug tracker}. + \l{http://bugreports.qt-project.org/}{Qt bug tracker}. \if defined(qcmanual) \include widgets/creator-faq-qtdesigner.qdocinc diff --git a/doc/src/linux-mobile/creator-publish-maemo-extras-devel.qdoc b/doc/src/linux-mobile/creator-publish-maemo-extras-devel.qdoc index 790b830f882..1b6c666b0ae 100644 --- a/doc/src/linux-mobile/creator-publish-maemo-extras-devel.qdoc +++ b/doc/src/linux-mobile/creator-publish-maemo-extras-devel.qdoc @@ -42,7 +42,7 @@ You can upload free applications as Debian packages to \l{http://wiki.maemo.org/Extras-devel}{Extras-devel} at Maemo.org to share new updates to your application and to start the community QA process. - You need a \l{https://garage.maemo.org/}{Garage} account for the uploads, + You need a \l{http://garage.maemo.org/}{Garage} account for the uploads, but the package itself does not need to be hosted in the Garage. You can use the \gui {Publish for Fremantle Extras-devel Free Repository} diff --git a/doc/src/linux-mobile/maemodev.qdoc b/doc/src/linux-mobile/maemodev.qdoc index 143c46430d4..ae4bfba8b08 100644 --- a/doc/src/linux-mobile/maemodev.qdoc +++ b/doc/src/linux-mobile/maemodev.qdoc @@ -68,7 +68,7 @@ Only needed if you develop on Windows and if you use a USB connection to run applications on the device. The drivers are installed as part of the Qt 4 SDK. You can also download them from - \l{https://garage.maemo.org/frs/?group_id=801&release_id=2655}{PC Connectivity} + \l{http://garage.maemo.org/frs/?group_id=801&release_id=2655}{PC Connectivity} on the Maemo web site. Download and install the latest PC_Connectivity_.exe (at the time of writing, PC_Connectivity_0.9.4.exe). diff --git a/doc/src/overview/creator-issues.qdoc b/doc/src/overview/creator-issues.qdoc index 9d7cca7c7f9..8713a745bc5 100644 --- a/doc/src/overview/creator-issues.qdoc +++ b/doc/src/overview/creator-issues.qdoc @@ -35,7 +35,7 @@ bugs. For a list of fixed issues and added features, see the changelog file in - the \c{qtcreator\dist} folder or the \l{https://bugreports.qt-project.org} + the \c{qtcreator\dist} folder or the \l{http://bugreports.qt-project.org} {Qt Bug Tracker}. \section1 General Issues @@ -56,7 +56,7 @@ \li Qt 4.7.4 is known to contain a bug exposed by g++ 4.6 which triggers a crash in \QC. For more information, see - \l{https://bugreports.qt-project.org/browse/QTBUG-21265}{QTBUG-21265} + \l{http://bugreports.qt-project.org/browse/QTBUG-21265}{QTBUG-21265} \li The Okteta KDE custom widget plugin might be installed as part of some Linux distributions. It can cause Qt Designer to crash. For @@ -64,10 +64,10 @@ \list - \li \l{https://bugs.launchpad.net/ubuntu/+source/kdeutils/+bug/662005} + \li \l{http://bugs.launchpad.net/ubuntu/+source/kdeutils/+bug/662005} {Ubuntu bug 662005} - \li \l{https://bugreports.qt-project.org/browse/QTBUG-12025} + \li \l{http://bugreports.qt-project.org/browse/QTBUG-12025} {QTBUG-12025} \endlist diff --git a/doc/src/projects/creator-projects-creating.qdoc b/doc/src/projects/creator-projects-creating.qdoc index de7996d7f36..fcec4c51a0f 100644 --- a/doc/src/projects/creator-projects-creating.qdoc +++ b/doc/src/projects/creator-projects-creating.qdoc @@ -315,6 +315,11 @@ \endlist + \li Python + + Python class and source files that you can use to create Python + classes and scripts with UTF-8 encoding. + \endlist \section2 Creating C++ Classes diff --git a/doc/src/projects/creator-projects-opening.qdoc b/doc/src/projects/creator-projects-opening.qdoc index a9fa6cf2bb7..6d73254e1a8 100644 --- a/doc/src/projects/creator-projects-opening.qdoc +++ b/doc/src/projects/creator-projects-opening.qdoc @@ -79,5 +79,9 @@ \QC parses all the source files in the project and performs a semantic analysis to build up the information that it needs for functions such as navigation and finding usages. A progress bar is displayed during parsing. + To show or hide detailed progress information, select + \gui {Toggle Progress Details} (1). + + \image creator-toggle-progress-bar.png "Toggle Progress Details button" */ diff --git a/doc/src/qnx/creator-deployment-qnx.qdoc b/doc/src/qnx/creator-deployment-qnx.qdoc index 93435787a88..ea5d68299bb 100644 --- a/doc/src/qnx/creator-deployment-qnx.qdoc +++ b/doc/src/qnx/creator-deployment-qnx.qdoc @@ -57,7 +57,7 @@ To tailor your BAR packages, you will have to manually edit the application descriptor file. For a full reference, see - \l{https://bdsc.webapps.blackberry.com/native/documentation/com.qnx.doc.native_sdk.devguide/com.qnx.doc.native_sdk.devguide/topic/r_blackberry_tablet_dtd_intro.html} + \l{http://bdsc.webapps.blackberry.com/native/documentation/com.qnx.doc.native_sdk.devguide/com.qnx.doc.native_sdk.devguide/topic/r_blackberry_tablet_dtd_intro.html} {Document Type Definition (DTD) for the application descriptor file}. \section1 Deploying to QNX Neutrino Devices diff --git a/doc/src/qnx/creator-developing-bb10.qdoc b/doc/src/qnx/creator-developing-bb10.qdoc index fa1de94cae0..1ff5e3160ae 100644 --- a/doc/src/qnx/creator-developing-bb10.qdoc +++ b/doc/src/qnx/creator-developing-bb10.qdoc @@ -24,7 +24,6 @@ \page creator-developing-bb10.html \nextpage creator-developing-generic-linux.html - \title Connecting BlackBerry 10 Devices \QC provides a plugin that enables you to develop for QNX and BlackBerry 10 platforms. @@ -35,9 +34,9 @@ Before starting to develop for BlackBerry 10 you need to download the following tools: \list - \li \l {https://developer.blackberry.com/native/} {The BlackBerry 10 Native SDK} - \li \l {https://developer.blackberry.com/native/} {The BlackBerry 10 Dev Alpha Simulator} if you do not have a BlackBerry DevAlpha device - \li \l {https://www.blackberry.com/SignedKeys/} {BlackBerry signing code keys} + \li \l {http://developer.blackberry.com/native/} {The BlackBerry 10 Native SDK} + \li \l {http://developer.blackberry.com/native/} {The BlackBerry 10 Dev Alpha Simulator} if you do not have a BlackBerry DevAlpha device + \li BlackBerry code signing keys (https://www.blackberry.com/SignedKeys/) \endlist diff --git a/share/qtcreator/dumper/gbridge.py b/share/qtcreator/dumper/gbridge.py index f8caeee1e54..19cb82149e3 100644 --- a/share/qtcreator/dumper/gbridge.py +++ b/share/qtcreator/dumper/gbridge.py @@ -118,7 +118,7 @@ def listOfLocals(varList): for symbol in block: name = symbol.print_name - if name == "__in_chrg": + if name == "__in_chrg" or name == "__PRETTY_FUNCTION__": continue # "NotImplementedError: Symbol type not yet supported in @@ -382,6 +382,9 @@ def registerDumper(function): def bbsetup(args = ''): global qqDumpers, qqFormats, qqEditable, typeCache + qqDumpers = {} + qqFormats = {} + qqEditable = {} typeCache = {} module = sys.modules[__name__] diff --git a/share/qtcreator/dumper/lbridge.py b/share/qtcreator/dumper/lbridge.py index 5487d635965..048ccac306c 100644 --- a/share/qtcreator/dumper/lbridge.py +++ b/share/qtcreator/dumper/lbridge.py @@ -136,7 +136,7 @@ def registerDumper(function): pass def warn(message): - print 'XXX="%s",' % message.encode("latin1").replace('"', "'") + print '\nWARNING="%s",\n' % message.encode("latin1").replace('"', "'") def showException(msg, exType, exValue, exTraceback): warn("**** CAUGHT EXCEPTION: %s ****" % msg) @@ -147,27 +147,9 @@ def showException(msg, exType, exValue, exTraceback): def registerCommand(name, func): pass -def currentFrame(): - currentThread = self.process.GetThreadAtIndex(0) - return currentThread.GetFrameAtIndex(0) - def fileName(file): return str(file) if file.IsValid() else '' -def breakpoint_function_wrapper(baton, process, frame, bp_loc): - result = '*stopped' - result += ',line="%s"' % frame.line_entry.line - result += ',file="%s"' % frame.line_entry.file - warn("WRAPPER: %s " %result) - return result - - -def onBreak(): - db.debugger.HandleCommand("settings set frame-format ''") - db.debugger.HandleCommand("settings set thread-format ''") - result = "*stopped,frame={....}" - print result - PointerCode = None ArrayCode = None @@ -334,7 +316,12 @@ def simpleEncoding(typeobj): # return Hex2EncodedInt1 #if code == IntCode: if code == lldb.eTypeClassBuiltin: - if str(typeobj).find("unsigned") >= 0: + name = str(typeobj) + if name == "float": + return Hex2EncodedFloat4 + if name == "double": + return Hex2EncodedFloat8 + if name.find("unsigned") >= 0: if size == 1: return Hex2EncodedUInt1 if size == 2: @@ -352,11 +339,6 @@ def simpleEncoding(typeobj): return Hex2EncodedInt4 if size == 8: return Hex2EncodedInt8 - #if code == FloatCode: - # if size == 4: - # return Hex2EncodedFloat4 - # if size == 8: - # return Hex2EncodedFloat8 return None class Children: @@ -495,9 +477,7 @@ class Dumper: self.debugger.HandleCommand("settings set auto-confirm on") self.process = None self.target = None - self.pid = None self.eventState = lldb.eStateInvalid - self.listener = None self.options = {} self.expandedINames = {} self.passExceptions = True @@ -505,7 +485,7 @@ class Dumper: self.ns = "" self.autoDerefPointers = True self.useDynamicType = True - self.useLoop = True + self.useFancy = True self.currentIName = None self.currentValuePriority = -100 @@ -518,6 +498,7 @@ class Dumper: self.currentPrintsAddress = None self.currentChildType = None self.currentChildNumChild = None + self.currentWatchers = {} self.executable_ = None self.charType_ = None @@ -526,11 +507,12 @@ class Dumper: self.charPtrType_ = None self.voidType_ = None self.isShuttingDown_ = False + self.dummyValue = None def extractTemplateArgument(self, typename, index): level = 0 skipSpace = False - inner = "" + inner = '' for c in typename[typename.find('<') + 1 : -1]: if c == '<': inner += c @@ -543,7 +525,7 @@ class Dumper: if index == 0: return inner index -= 1 - inner = "" + inner = '' else: inner += c skipSpace = True @@ -624,11 +606,29 @@ class Dumper: return True return self.stripNamespaceFromType(type.GetName()) in movableTypes + def putIntItem(self, name, value): + with SubItem(self, name): + self.putValue(value) + self.putType("int") + self.putNumChild(0) + + def putBoolItem(self, name, value): + with SubItem(self, name): + self.putValue(value) + self.putType("bool") + self.putNumChild(0) + def putNumChild(self, numchild): #warn("NUM CHILD: '%s' '%s'" % (numchild, self.currentChildNumChild)) #if numchild != self.currentChildNumChild: self.put('numchild="%s",' % numchild) + def putEmptyValue(self, priority = -10): + if priority >= self.currentValuePriority: + self.currentValue = "" + self.currentValuePriority = priority + self.currentValueEncoding = None + def putValue(self, value, encoding = None, priority = 0): # Higher priority values override lower ones. if priority >= self.currentValuePriority: @@ -681,6 +681,13 @@ class Dumper: return xrange(0, self.currentNumChild) return xrange(min(self.currentMaxNumChild, self.currentNumChild)) + def putPlainChildren(self, value): + self.putEmptyValue(-99) + self.putNumChild(1) + if self.currentIName in self.expandedINames: + with Children(self): + self.putFields(value) + def lookupType(self, name): #warn("LOOKUP: %s" % self.target.FindFirstType(name)) return self.target.FindFirstType(name) @@ -690,15 +697,6 @@ class Dumper: self.executable_ = executable error = lldb.SBError() self.target = self.debugger.CreateTarget(executable, None, None, True, error) - self.listener = self.target.GetDebugger().GetListener() - self.process = self.target.Launch(self.listener, None, None, - None, None, None, - None, 0, True, error) - self.broadcaster = self.process.GetBroadcaster() - rc = self.broadcaster.AddListener(self.listener, 15) - if rc != 15: - warn("ADDING LISTENER FAILED: %s" % rc) - self.importDumpers() if self.target.IsValid(): @@ -706,22 +704,26 @@ class Dumper: else: self.report('state="inferiorsetupfailed",msg="%s",exe="%s"' % (error, executable)) - warn("STATE AFTER LAUNCH: %s" % stateNames[self.process.GetState()]) - def runEngine(self, _): - error = lldb.SBError() - self.pid = self.process.GetProcessID() - self.report('pid="%s"' % self.pid) - self.consumeEvents() - error = self.process.Continue() - self.consumeEvents() - self.reportError(error) + s = threading.Thread(target=self.loop, args=[]) + s.start() + def loop(self): + error = lldb.SBError() + listener = self.debugger.GetListener() + + self.process = self.target.Launch(listener, None, None, None, None, + None, None, 0, False, error) + + self.report('pid="%s"' % self.process.GetProcessID()) self.report('state="enginerunandinferiorrunok"') - if self.useLoop: - s = threading.Thread(target=self.loop, args=[]) - s.start() + event = lldb.SBEvent() + while True: + if listener.WaitForEvent(10000000, event): + self.handleEvent(event) + else: + warn('TIMEOUT') def describeError(self, error): desc = lldb.SBStream() @@ -749,19 +751,25 @@ class Dumper: self.report('location={file="%s",line="%s",addr="%s"}' % (file, line, frame.pc)) def reportThreads(self): + reasons = ['None', 'Trace', 'Breakpoint', 'Watchpoint', 'Signal', 'Exception', + 'Exec', 'PlanComplete'] result = 'threads={threads=[' for i in xrange(0, self.process.GetNumThreads()): thread = self.process.GetThreadAtIndex(i) + stopReason = thread.GetStopReason() result += '{id="%d"' % thread.GetThreadID() result += ',index="%s"' % i - result += ',stop-reason="%s"' % thread.GetStopReason() + result += ',details="%s"' % thread.GetQueueName() + result += ',stop-reason="%s"' % stopReason + if stopReason >= 0 and stopReason < len(reasons): + result += ',state="%s"' % reasons[stopReason] result += ',name="%s"' % thread.GetName() result += ',frame={' frame = thread.GetFrameAtIndex(0) result += 'pc="0x%x"' % frame.pc result += ',addr="0x%x"' % frame.pc result += ',fp="0x%x"' % frame.fp - result += ',func="%s"' % frame.function.name + result += ',func="%s"' % frame.GetFunctionName() result += ',line="%s"' % frame.line_entry.line result += ',fullname="%s"' % fileName(frame.line_entry.file) result += ',file="%s"' % fileName(frame.line_entry.file) @@ -797,19 +805,12 @@ class Dumper: result += '],hasmore="%s"},' % hasmore self.report(result) - # Convenience function. - def putItemCount(self, count, maximum = 1000000000): - # This needs to override the default value, so don't use 'put' directly. - if count > maximum: - self.putValue('<>%s items>' % maximum) - else: - self.putValue('<%s items>' % count) - def putType(self, type, priority = 0): # Higher priority values override lower ones. if priority >= self.currentTypePriority: self.currentType = str(type) self.currentTypePriority = priority + #warn("TYPE: %s PRIORITY: %s" % (type, priority)) def putBetterType(self, type): try: @@ -817,6 +818,7 @@ class Dumper: except: self.currentType = str(type) self.currentTypePriority = self.currentTypePriority + 1 + #warn("BETTER TYPE: %s PRIORITY: %s" % (type, self.currentTypePriority)) def readRawMemory(self, base, size): if size == 0: @@ -883,7 +885,7 @@ class Dumper: formatter.update() numchild = formatter.num_children() self.put('iname="%s",' % self.currentIName) - self.put('type="%s",' % typeName) + self.putType(typeName) self.put('numchild="%s",' % numchild) self.put('addr="0x%x",' % value.GetLoadAddress()) self.putItemCount(numchild) @@ -902,32 +904,51 @@ class Dumper: if value.GetType().IsReferenceType(): type = value.GetType().GetDereferencedType().GetPointerType() # FIXME: Find something more direct. + origType = value.GetTypeName(); value = value.CreateValueFromAddress(value.GetName(), value.AddressOf().GetValueAsUnsigned(), type).Dereference() #value = value.cast(value.dynamic_type) self.putItem(value) - self.putBetterType("%s &" % value.GetTypeName()) + self.putBetterType(origType) return # Pointers if value.GetType().IsPointerType() and self.autoDerefPointers: - self.putItem(value.Dereference()) + + if isNull(value): + self.putType(typeName) + self.putValue("0x0") + self.putNumChild(0) + return + + origType = value.GetType() + innerType = value.GetType().GetPointeeType() + self.putType(innerType) + savedCurrentChildType = self.currentChildType + self.currentChildType = str(innerType) + self.putItem(value.dereference()) + self.currentChildType = savedCurrentChildType + self.put('origaddr="%s",' % value.address) return - stripped = self.stripNamespaceFromType(typeName).replace("::", "__") #warn("VALUE: %s" % value) - if stripped in qqDumpers: - self.putType(typeName) - qqDumpers[stripped](self, value) - return + #warn("FANCY: %s" % self.useFancy) + if self.useFancy: + stripped = self.stripNamespaceFromType(typeName).replace("::", "__") + #warn("STRIPPED: %s" % stripped) + #warn("DUMPABLE: %s" % (stripped in qqDumpers)) + if stripped in qqDumpers: + self.putType(typeName) + qqDumpers[stripped](self, value) + return # Normal value v = value.GetValue() #numchild = 1 if value.MightHaveChildren() else 0 numchild = value.GetNumChildren() self.put('iname="%s",' % self.currentIName) - self.put('type="%s",' % typeName) - self.putValue("" if v is None else v) + self.putType(typeName) + self.putValue('' if v is None else v) self.put('numchild="%s",' % numchild) self.put('addr="0x%x",' % value.GetLoadAddress()) if self.currentIName in self.expandedINames: @@ -945,12 +966,37 @@ class Dumper: def reportVariables(self, _ = None): frame = self.currentThread().GetSelectedFrame() - self.currentIName = "local" + self.currentIName = 'local' self.put('data=[') for value in frame.GetVariables(True, True, False, False): + if self.dummyValue is None: + self.dummyValue = value with SubItem(self, value): self.put('iname="%s",' % self.currentIName) self.putItem(value) + + # 'watchers':[{'id':'watch.0','exp':'23'},...] + if not self.dummyValue is None: + for watcher in self.currentWatchers: + iname = watcher['iname'] + index = iname[iname.find('.') + 1:] + exp = binascii.unhexlify(watcher['exp']) + warn("EXP: %s" % exp) + warn("INDEX: %s" % index) + if exp == "": + self.put('type="",value="",exp=""') + continue + + value = self.dummyValue.CreateValueFromExpression(iname, exp) + #value = self.dummyValue + warn("VALUE: %s" % value) + self.currentIName = 'watch' + with SubItem(self, index): + self.put('exp="%s",' % exp) + self.put('wname="%s",' % binascii.hexlify(exp)) + self.put('iname="%s",' % self.currentIName) + self.putItem(value) + self.put(']') self.report('') @@ -967,6 +1013,7 @@ class Dumper: self.reportVariables() def reportRegisters(self, _ = None): + return if self.process is None: self.report('process="none"') else: @@ -987,10 +1034,14 @@ class Dumper: def interruptInferior(self, _ = None): if self.process is None: self.report('msg="No process"') - else: - #self.debugger.DispatchInputInterrupt() - error = self.process.Stop() - self.reportError(error) + return + error = self.process.Stop() + self.reportError(error) + self.consumeEvents() + if error.GetType() == 1: + state = self.process.GetState() + if state != lldb.eStateStopped: + self.report('state="inferiorstopfailed"') def detachInferior(self, _ = None): if self.process is None: @@ -1044,12 +1095,9 @@ class Dumper: pass def processEvents(self): - if self.listener is None: - warn("NO LISTENER YET") - return event = lldb.SBEvent() - while self.listener.PeekAtNextEvent(event): - self.listener.GetNextEvent(event) + while self.debugger.GetListener().PeekAtNextEvent(event): + self.debugger.GetListener().GetNextEvent(event) self.handleEvent(event) def describeBreakpoint(self, bp, modelId): @@ -1099,13 +1147,6 @@ class Dumper: bpNew.SetOneShot(int(args["oneshot"])) except: pass - #bpNew.SetCallback(breakpoint_function_wrapper, None) - #bpNew.SetCallback(breakpoint_function_wrapper, None) - #"breakpoint command add 1 -o \"import time; print time.asctime()\" - #cmd = "script print(11111111)" - #cmd = "continue" - #self.debugger.HandleCommand( - # "breakpoint command add -o 'script onBreak()' %s" % bpNew.GetID()) return bpNew def changeBreakpoint(self, args): @@ -1246,14 +1287,27 @@ class Dumper: def setOptions(self, args): self.options = args - def updateData(self, args): - self.expandedINames = set(args['expanded'].split(',')) - self.autoDerefPointers = int(args['autoderef']) - self.useDynamicType = int(args['dyntype']) - # Keep always True for now. - #self.passExceptions = args['pe'] + def setWatchers(self, args): + #self.currentWatchers = args['watchers'] + warn("WATCHERS %s" % self.currentWatchers) self.reportData() + def updateData(self, args): + warn("UPDATE 1") + if 'expanded' in args: + self.expandedINames = set(args['expanded'].split(',')) + if 'autoderef' in args: + self.autoDerefPointers = int(args['autoderef']) + if 'dyntype' in args: + self.useDynamicType = int(args['dyntype']) + if 'fancy' in args: + self.useFancy = int(args['fancy']) + if 'passexceptions' in args: + self.passExceptions = int(args['passexceptions']) + self.passExceptions = True # FIXME + self.reportVariables(args) + warn("UPDATE 2") + def disassemble(self, args): frame = self.currentFrame(); function = frame.GetFunction() @@ -1284,6 +1338,18 @@ class Dumper: result += ',contents="%s"}' % binascii.hexlify(contents) self.report(result) + def assignValue(self, args): + exp = binascii.unhexlify(args['exp']) + value = binascii.unhexlify(args['value']) + warn("EXP: %s" % exp) + warn("VALUE: %s" % value) + lhs = self.dummyValue.CreateValueFromExpression("$$lhs", exp) + rhs = self.dummyValue.CreateValueFromExpression("$$rhs", value) + warn("LHS: %s" % lhs) + warn("RHS: %s" % rhs) + #lhs.SetData(rhs.GetData()) + self.reportVariables() + def importDumpers(self, _ = None): result = lldb.SBCommandReturnObject() interpreter = self.debugger.GetCommandInterpreter() @@ -1292,16 +1358,6 @@ class Dumper: for key in items: registerDumper(items[key]) - def loop(self): - event = lldb.SBEvent() - while True: - # Mac LLDB doesn't like sys.maxsize - # if self.listener.WaitForEvent(sys.maxsize, event): - if self.listener.WaitForEvent(10000000, event): - self.handleEvent(event) - else: - warn('TIMEOUT') - def execute(self, args): getattr(self, args['cmd'])(args) self.report('token="%s"' % args['token']) @@ -1311,8 +1367,8 @@ class Dumper: def consumeEvents(self): event = lldb.SBEvent() - if self.listener and self.listener.PeekAtNextEvent(event): - self.listener.GetNextEvent(event) + if self.debugger.GetListener().PeekAtNextEvent(event): + self.debugger.GetListener().GetNextEvent(event) self.handleEvent(event) @@ -1320,27 +1376,9 @@ currentDir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentfram execfile(os.path.join(currentDir, "qttypes.py")) -def doit1(): +def doit(): db = Dumper() - db.useLoop = False - db.report('state="enginesetupok"') - - while True: - db.consumeEvents() - - readable, _, _ = select.select([sys.stdin], [], [], 0.1) - if sys.stdin in readable: - line = raw_input() - if line.startswith("db "): - db.execute(eval(line[3:])) - - db.consumeEvents() - -def doit2(): - - db = Dumper() - db.useLoop = True db.report('state="enginesetupok"') while True: @@ -1348,49 +1386,64 @@ def doit2(): for reader in readable: if reader == sys.stdin: line = sys.stdin.readline() - #warn("READING LINE %s" % line) + #warn("READING LINE '%s'" % line) if line.startswith("db "): db.execute(eval(line[3:])) -def testit(): +def testit1(): + db = Dumper() - db.useLoop = False - error = lldb.SBError() - db.target = db.debugger.CreateTarget(sys.argv[2], None, None, True, error) - #db.importDumpers() - - bpNew = db.target.BreakpointCreateByName('breakHere', 'doit') - - db.listener = lldb.SBListener("event_Listener") - db.process = db.target.LaunchSimple(None, None, os.getcwd()) - broadcaster = db.process.GetBroadcaster() - listener = lldb.SBListener("event_Listener 2") - rc = broadcaster.AddListener(listener, lldb.SBProcess.eBroadcastBitStateChanged) - event = lldb.SBEvent() + db.setupInferior({'cmd':'setupInferior','executable':sys.argv[2],'token':1}) + db.handleBreakpoints({'cmd':'handleBreakpoints','bkpts':[{'operation':'add', + 'modelid':'1','type':2,'ignorecount':0,'condition':'','function':'main', + 'oneshot':0,'enabled':1,'file':'','line':0}]}) + db.runEngine({'cmd':'runEngine','token':4}) while True: - event = lldb.SBEvent() - if db.listener.WaitForEvent(1, event): - out = lldb.SBStream() - event.GetDescription(out) - warn("EVENT: %s" % event) - type = event.GetType() - msg = lldb.SBEvent.GetCStringFromEvent(event) - flavor = event.GetDataFlavor() - state = lldb.SBProcess.GetStateFromEvent(event) - db.report('event={type="%s",data="%s",msg="%s",flavor="%s",state="%s"}' - % (type, out.GetData(), msg, flavor, state)) - db.report('state="%s"' % stateNames[state]) - if type == lldb.SBProcess.eBroadcastBitStateChanged: - #if state == lldb.eStateStopped: - #db.reportData() - pass - else: - warn('TIMEOUT') + readable, _, _ = select.select([sys.stdin], [], []) + for reader in readable: + if reader == sys.stdin: + line = sys.stdin.readline().strip() + #warn("READING LINE '%s'" % line) + if line.startswith("db "): + db.execute(eval(line[3:])) + else: + db.executeDebuggerCommand({'command':line}) + + +# Used in dumper auto test. +# Usage: python lbridge.py /path/to/testbinary comma-separated-inames +def testit(): + + db = Dumper() + + # Disable intermediate reporting. + savedReport = db.report + db.report = lambda stuff: 0 + + db.debugger.SetAsync(False) + db.expandedINames = set(sys.argv[3].split(',')) + + db.setupInferior({'cmd':'setupInferior','executable':sys.argv[2],'token':1}) + db.handleBreakpoints({'cmd':'handleBreakpoints','bkpts':[{'operation':'add', + 'modelid':'1','type':2,'ignorecount':0,'condition':'','function':'breakHere', + 'oneshot':0,'enabled':1,'file':'','line':0}]}) + + error = lldb.SBError() + listener = db.debugger.GetListener() + db.process = db.target.Launch(listener, None, None, None, None, + None, None, 0, False, error) + + db.currentThread().SetSelectedFrame(1) + + db.report = savedReport + db.reportVariables() + #db.report("DUMPER=%s" % qqDumpers) + if len(sys.argv) > 2: testit() else: - doit2() + doit() diff --git a/share/qtcreator/dumper/qttypes.py b/share/qtcreator/dumper/qttypes.py index 90493fb5a3d..913799698bd 100644 --- a/share/qtcreator/dumper/qttypes.py +++ b/share/qtcreator/dumper/qttypes.py @@ -433,8 +433,8 @@ def qdump__QFixed(d, value): def qdump__QFiniteStack(d, value): - alloc = value["_alloc"] - size = value["_size"] + alloc = int(value["_alloc"]) + size = int(value["_size"]) check(0 <= size and size <= alloc and alloc <= 1000 * 1000 * 1000) d.putItemCount(size) d.putNumChild(size) @@ -483,7 +483,7 @@ def qdump__QHash(d, value): val = value.cast(hashDataType) bucket = val["buckets"] e = val.cast(hashNodeType) - for n in xrange(val["numBuckets"] - 1, -1, -1): + for n in xrange(int(val["numBuckets"]) - 1, -1, -1): n = n - 1 if n < 0: break @@ -497,8 +497,8 @@ def qdump__QHash(d, value): if next["next"]: return next d = node.cast(hashDataType.pointer()).dereference() - numBuckets = d["numBuckets"] - start = (node["h"] % numBuckets) + 1 + numBuckets = int(d["numBuckets"]) + start = (int(node["h"]) % numBuckets) + 1 bucket = d["buckets"] + start for n in xrange(numBuckets - start): if bucket.dereference() != next: @@ -511,7 +511,7 @@ def qdump__QHash(d, value): d_ptr = value["d"] e_ptr = value["e"] - size = d_ptr["size"] + size = int(d_ptr["size"]) hashDataType = d_ptr.type hashNodeType = e_ptr.type @@ -644,7 +644,7 @@ def qform__QImage(): def qdump__QImage(d, value): try: - painters = value["painters"] + painters = int(value["painters"]) except: d.putPlainChildren(value) return @@ -696,7 +696,7 @@ def qdump__QImage(d, value): def qdump__QLinkedList(d, value): d_ptr = value["d"] e_ptr = value["e"] - n = d_ptr["size"] + n = int(d_ptr["size"]) check(0 <= n and n <= 100*1000*1000) checkRef(d_ptr["ref"]) d.putItemCount(n) @@ -762,7 +762,7 @@ def qdump__QMapNode(d, value): def qdumpHelper__Qt4_QMap(d, value, forceLong): d_ptr = value["d"].dereference() e_ptr = value["e"].dereference() - n = d_ptr["size"] + n = int(d_ptr["size"]) check(0 <= n and n <= 100*1000*1000) checkRef(d_ptr["ref"]) @@ -810,7 +810,7 @@ def qdumpHelper__Qt4_QMap(d, value, forceLong): def qdumpHelper__Qt5_QMap(d, value, forceLong): d_ptr = value["d"].dereference() - n = d_ptr["size"] + n = int(d_ptr["size"]) check(0 <= n and n <= 100*1000*1000) checkRef(d_ptr["ref"]) @@ -1325,7 +1325,7 @@ def qdump__QObject(d, value): # } def qdump__QPixmap(d, value): - painters = value["painters"] + painters = int(value["painters"]) check(0 <= painters and painters < 1000) d_ptr = value["data"]["d"] if isNull(d_ptr): @@ -1337,11 +1337,8 @@ def qdump__QPixmap(d, value): def qdump__QPoint(d, value): - x = value["xp"] - y = value["yp"] - # should not be needed, but sometimes yield myns::QVariant::Private::Data::qreal - x = x.cast(x.type.strip_typedefs()) - y = y.cast(y.type.strip_typedefs()) + x = int(value["xp"]) + y = int(value["yp"]) d.putValue("(%s, %s)" % (x, y)) d.putNumChild(2) if d.isExpanded(): @@ -1350,7 +1347,13 @@ def qdump__QPoint(d, value): def qdump__QPointF(d, value): - qdump__QPoint(d, value) + x = float(value["xp"]) + y = float(value["yp"]) + d.putValue("(%s, %s)" % (x, y)) + d.putNumChild(2) + if d.isExpanded(): + with Children(d): + d.putFields(value) def qdump__QRect(d, value): @@ -1463,7 +1466,7 @@ def qdump__QSet(d, value): d_ptr = value["q_hash"]["d"] e_ptr = value["q_hash"]["e"] - size = d_ptr["size"] + size = int(d_ptr["size"]) hashDataType = d_ptr.type hashNodeType = e_ptr.type @@ -1894,11 +1897,11 @@ def qdump__QWeakPointer(d, value): d.putValue("") d.putNumChild(0) return - weakref = d_ptr["weakref"]["_q_value"] - strongref = d_ptr["strongref"]["_q_value"] - check(int(strongref) >= -1) - check(int(strongref) <= int(weakref)) - check(int(weakref) <= 10*1000*1000) + weakref = int(d_ptr["weakref"]["_q_value"]) + strongref = int(d_ptr["strongref"]["_q_value"]) + check(strongref >= -1) + check(strongref <= weakref) + check(weakref <= 10*1000*1000) if isSimpleType(val.dereference().type): d.putNumChild(3) @@ -2045,7 +2048,7 @@ def qform__std__map(): def qdump__std__map(d, value): impl = value["_M_t"]["_M_impl"] - size = impl["_M_node_count"] + size = int(impl["_M_node_count"]) check(0 <= size and size <= 100*1000*1000) d.putItemCount(size) d.putNumChild(size) @@ -2149,7 +2152,7 @@ def qdump__std__set__const_iterator(d, value): def qdump__std__set(d, value): impl = value["_M_t"]["_M_impl"] - size = impl["_M_node_count"] + size = int(impl["_M_node_count"]) check(0 <= size and size <= 100*1000*1000) d.putItemCount(size) d.putNumChild(size) @@ -2217,6 +2220,13 @@ def qdump__std__string(d, value): mem = d.readRawMemory(p, size * charType.sizeof) d.putField("editvalue", mem) +#def qdump__std__string(d, value): +# data = value["__r_"] +# d.putValue("SSSS") +# d.putType("std::string") +# d.putNumChild(1) +# d.putPlainChildren(value) + def qdump__std__shared_ptr(d, value): i = value["_M_ptr"] @@ -2328,7 +2338,7 @@ def qdump__wstring(d, value): def qdump____gnu_cxx__hash_set(d, value): ht = value["_M_ht"] - size = ht["_M_num_elements"] + size = int(ht["_M_num_elements"]) check(0 <= size and size <= 1000 * 1000 * 1000) d.putItemCount(size) d.putNumChild(size) @@ -2398,11 +2408,11 @@ def qdump__boost__shared_ptr(d, value): return countedbase = value["pn"]["pi_"].dereference() - weakcount = countedbase["weak_count_"] - usecount = countedbase["use_count_"] - check(int(weakcount) >= 0) - check(int(weakcount) <= int(usecount)) - check(int(usecount) <= 10*1000*1000) + weakcount = int(countedbase["weak_count_"]) + usecount = int(countedbase["use_count_"]) + check(weakcount >= 0) + check(weakcount <= int(usecount)) + check(usecount <= 10*1000*1000) val = value["px"].dereference() if isSimpleType(val.type): diff --git a/share/qtcreator/generic-highlighter/git-rebase.xml b/share/qtcreator/generic-highlighter/git-rebase.xml deleted file mode 100644 index f86667fb9f2..00000000000 --- a/share/qtcreator/generic-highlighter/git-rebase.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - p - pick - - - r - reword - - - e - edit - - - s - squash - - - f - fixup - - - x - exec - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/share/qtcreator/qml/qmlpuppet/interfaces/commondefines.h b/share/qtcreator/qml/qmlpuppet/interfaces/commondefines.h index 10e0a6470af..7cad0bdcd39 100644 --- a/share/qtcreator/qml/qmlpuppet/interfaces/commondefines.h +++ b/share/qtcreator/qml/qmlpuppet/interfaces/commondefines.h @@ -55,7 +55,9 @@ enum InformationName IsAnchoredBySibling, HasContent, HasBindingForProperty, - ContentTransform + ContentTransform, + ContentItemTransform, + ContentItemBoundingRect }; } diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/graphicalnodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/graphicalnodeinstance.cpp index 6548d8f891e..2a864bd20ea 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/graphicalnodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/graphicalnodeinstance.cpp @@ -143,8 +143,6 @@ QImage GraphicalNodeInstance::renderImage() const QImage renderImage = designerSupport()->renderImageForItem(quickItem(), renderBoundingRect, renderBoundingRect.size().toSize()); - renderImage = renderImage.convertToFormat(QImage::Format_ARGB32_Premultiplied); - return renderImage; } diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp index 8c36033a46b..8a8886490c9 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstanceserver.cpp @@ -887,8 +887,10 @@ static QVector createInformationVector(const QList #include #include +#include namespace QmlDesigner { namespace Internal { @@ -53,7 +54,7 @@ void NodeInstanceSignalSpy::setObjectNodeInstance(const ObjectNodeInstance::Poin } -void NodeInstanceSignalSpy::registerObject(QObject *spiedObject, const PropertyName &prefix) +void NodeInstanceSignalSpy::registerObject(QObject *spiedObject) { if (m_registeredObjectList.contains(spiedObject)) // prevent cycles return; @@ -62,49 +63,64 @@ void NodeInstanceSignalSpy::registerObject(QObject *spiedObject, const PropertyN for (int index = QObject::staticMetaObject.propertyOffset(); index < spiedObject->metaObject()->propertyCount(); index++) { - QMetaProperty metaProperty = spiedObject->metaObject()->property(index); + QMetaProperty metaProperty = spiedObject->metaObject()->property(index); - // handle dot properties and connect the signals to the object - if (metaProperty.isReadable() - && !metaProperty.isWritable() - && QQmlMetaType::isQObject(metaProperty.userType())) { - QObject *propertyObject = QQmlMetaType::toQObject(metaProperty.read(spiedObject)); - if (propertyObject) - registerObject(propertyObject, prefix + metaProperty.name() + '.'); - } else if (metaProperty.hasNotifySignal()) { - QMetaMethod metaMethod = metaProperty.notifySignal(); - bool isConnecting = QMetaObject::connect(spiedObject, metaMethod.methodIndex(), this, methodeOffset, Qt::DirectConnection); - Q_ASSERT(isConnecting); - Q_UNUSED(isConnecting); - m_indexPropertyHash.insert(methodeOffset, prefix + metaProperty.name()); - methodeOffset++; - } + registerProperty(metaProperty, spiedObject); + registerChildObject(metaProperty, spiedObject); + } +} - // search recursive in objects - if (metaProperty.isReadable() - && metaProperty.isWritable() - && QQmlMetaType::isQObject(metaProperty.userType()) - && QLatin1String(metaProperty.name()) != QLatin1String("parent")) { - QObject *propertyObject = QQmlMetaType::toQObject(metaProperty.read(spiedObject)); - if (propertyObject) - registerObject(propertyObject, prefix + metaProperty.name() + '/'); - } +void NodeInstanceSignalSpy::registerProperty(const QMetaProperty &metaProperty, QObject *spiedObject, const PropertyName &propertyPrefix) +{ + if (metaProperty.isReadable() + && metaProperty.isWritable() + && !QQmlMetaType::isQObject(metaProperty.userType()) + && metaProperty.hasNotifySignal()) { + QMetaMethod metaMethod = metaProperty.notifySignal(); + QMetaObject::connect(spiedObject, metaMethod.methodIndex(), this, methodeOffset, Qt::DirectConnection); - // search recursive in objects list - if (metaProperty.isReadable() - && QQmlMetaType::isList(metaProperty.userType())) { - QQmlListReference list(spiedObject, metaProperty.name()); + m_indexPropertyHash.insert(methodeOffset, propertyPrefix + PropertyName(metaProperty.name())); - if (list.canCount() && list.canAt()) { + registerValueType(metaProperty, spiedObject, propertyPrefix); - for (int i = 0; i < list.count(); i++) { - QObject *propertyObject = list.at(i); - if (propertyObject) - registerObject(propertyObject, prefix + metaProperty.name() + '/'); - } - } - } - } + methodeOffset++; + } +} + +void NodeInstanceSignalSpy::registerValueType(const QMetaProperty &metaProperty, QObject *spiedObject, const PropertyName &propertyPrefix) +{ + if (QQmlValueTypeFactory::valueType(metaProperty.userType())) { + QQmlValueType *valueType = QQmlValueTypeFactory::valueType(metaProperty.userType()); + valueType->setValue(metaProperty.read(spiedObject)); + for (int index = QObject::staticMetaObject.propertyOffset(); + index < valueType->metaObject()->propertyCount(); + index++) { + QMetaProperty valueTypeMetaProperty = valueType->metaObject()->property(index); + qDebug() << "spy value property: " << propertyPrefix + PropertyName(metaProperty.name()) + "." + valueTypeMetaProperty.name(); + + m_indexPropertyHash.insert(methodeOffset, propertyPrefix + PropertyName(metaProperty.name()) + "." + valueTypeMetaProperty.name()); + } + } +} + +void NodeInstanceSignalSpy::registerChildObject(const QMetaProperty &metaProperty, QObject *spiedObject) +{ + if (metaProperty.isReadable() + && !metaProperty.isWritable() + && QQmlMetaType::isQObject(metaProperty.userType()) + && QLatin1String(metaProperty.name()) != "parent") { + QObject *childObject = QQmlMetaType::toQObject(metaProperty.read(spiedObject)); + qDebug() << "spy child property: " << childObject << metaProperty.name(); + + if (childObject) { + for (int index = QObject::staticMetaObject.propertyOffset(); + index < childObject->metaObject()->propertyCount(); + index++) { + QMetaProperty childMetaProperty = childObject->metaObject()->property(index); + registerProperty(childMetaProperty, childObject, PropertyName(metaProperty.name()) + '.'); + } + } + } } int NodeInstanceSignalSpy::qt_metacall(QMetaObject::Call call, int methodId, void **a) @@ -113,7 +129,8 @@ int NodeInstanceSignalSpy::qt_metacall(QMetaObject::Call call, int methodId, voi ObjectNodeInstance::Pointer nodeInstance = m_objectNodeInstance.toStrongRef(); if (nodeInstance && nodeInstance->nodeInstanceServer() && nodeInstance->isValid()) { - nodeInstance->nodeInstanceServer()->notifyPropertyChange(nodeInstance->instanceId(), m_indexPropertyHash.value(methodId)); + foreach (const PropertyName &propertyName, m_indexPropertyHash.values(methodId)) + nodeInstance->nodeInstanceServer()->notifyPropertyChange(nodeInstance->instanceId(), propertyName); } } diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstancesignalspy.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstancesignalspy.h index 8c1bb7c059b..47f05a74c39 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstancesignalspy.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstancesignalspy.h @@ -54,11 +54,14 @@ public: virtual int qt_metacall(QMetaObject::Call, int, void **); protected: - void registerObject(QObject *spiedObject, const PropertyName &prefix = PropertyName()); + void registerObject(QObject *spiedObject); + void registerProperty(const QMetaProperty &metaProperty, QObject *spiedObject, const PropertyName &propertyPrefix = PropertyName()); + void registerValueType(const QMetaProperty &metaProperty, QObject *spiedObject, const PropertyName &propertyPrefix); + void registerChildObject(const QMetaProperty &metaProperty, QObject *spiedObject); private: int methodeOffset; - QHash m_indexPropertyHash; + QMultiHash m_indexPropertyHash; QObjectList m_registeredObjectList; ObjectNodeInstanceWeakPointer m_objectNodeInstance; }; diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp index a008fb1b13a..8fa011a95da 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp @@ -255,6 +255,11 @@ QTransform ObjectNodeInstance::customTransform() const return QTransform(); } +QTransform ObjectNodeInstance::contentItemTransform() const +{ + return QTransform(); +} + QTransform ObjectNodeInstance::sceneTransform() const { return QTransform(); @@ -1064,6 +1069,11 @@ QObject *ObjectNodeInstance::object() const return 0; } +QQuickItem *ObjectNodeInstance::contentItem() const +{ + return 0; +} + bool ObjectNodeInstance::hasContent() const { return false; @@ -1210,7 +1220,12 @@ ObjectNodeInstance::Pointer ObjectNodeInstance::parentInstance() const QRectF ObjectNodeInstance::boundingRect() const { - return QRect(); + return QRectF(); +} + +QRectF ObjectNodeInstance::contentItemBoundingBox() const +{ + return QRectF(); } QPointF ObjectNodeInstance::position() const diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h index ce87af12783..7576640d216 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h @@ -44,6 +44,7 @@ class QQmlContext; class QQmlEngine; class QQmlProperty; class QQmlAbstractBinding; +class QQuickItem; QT_END_NAMESPACE namespace QmlDesigner { @@ -104,12 +105,14 @@ public: virtual bool equalGraphicsItem(QGraphicsItem *item) const; virtual QRectF boundingRect() const; + virtual QRectF contentItemBoundingBox() const; virtual QPointF position() const; virtual QSizeF size() const; virtual QTransform transform() const; virtual QTransform contentTransform() const; virtual QTransform customTransform() const; + virtual QTransform contentItemTransform() const; virtual QTransform sceneTransform() const; virtual double opacity() const; @@ -153,6 +156,7 @@ public: void setResetValue(const PropertyName &propertyName, const QVariant &value); QObject *object() const; + virtual QQuickItem *contentItem() const; virtual bool hasContent() const; virtual bool isResizable() const; diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5previewnodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5previewnodeinstanceserver.cpp index df8770c68f1..8c87f45445a 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5previewnodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5previewnodeinstanceserver.cpp @@ -107,8 +107,6 @@ QImage Qt5PreviewNodeInstanceServer::renderPreviewImage() QImage previewImage = rootNodeInstance().renderPreviewImage(previewImageSize); - previewImage = previewImage.convertToFormat(QImage::Format_ARGB32_Premultiplied); - return previewImage; } diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.cpp index 12d6f39b86d..ce1d1d87cd4 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.cpp @@ -56,11 +56,24 @@ QuickItemNodeInstance::~QuickItemNodeInstance() { } +static bool isContentItem(QQuickItem *item, NodeInstanceServer *nodeInstanceServer) +{ + + return item->parentItem() + && nodeInstanceServer->hasInstanceForObject(item->parentItem()) + && nodeInstanceServer->instanceForObject(item->parentItem()).internalInstance()->contentItem() == item; +} + static QTransform transformForItem(QQuickItem *item, NodeInstanceServer *nodeInstanceServer) { + if (isContentItem(item, nodeInstanceServer)) + return QTransform(); + QTransform toParentTransform = DesignerSupport::parentTransform(item); - if (item->parentItem() && !nodeInstanceServer->hasInstanceForObject(item->parentItem())) + if (item->parentItem() && !nodeInstanceServer->hasInstanceForObject(item->parentItem())) { + return transformForItem(item->parentItem(), nodeInstanceServer) * toParentTransform; + } return toParentTransform; } @@ -109,6 +122,35 @@ QuickItemNodeInstance::Pointer QuickItemNodeInstance::create(QObject *object) return instance; } +QQuickItem *QuickItemNodeInstance::contentItem() const +{ + return m_contentItem.data(); +} + +void QuickItemNodeInstance::doComponentComplete() +{ + GraphicalNodeInstance::doComponentComplete(); + + QQmlProperty contentItemProperty(quickItem(), "contentItem", engine()); + if (contentItemProperty.isValid()) + m_contentItem = contentItemProperty.read().value(); +} + +QRectF QuickItemNodeInstance::contentItemBoundingBox() const +{ + if (contentItem()) { + QTransform contentItemTransform = DesignerSupport::parentTransform(contentItem()); + return contentItemTransform.mapRect(contentItem()->boundingRect()); + } + + return QRectF(); +} + +QTransform QuickItemNodeInstance::contentItemTransform() const +{ + return DesignerSupport::parentTransform(contentItem()); +} + bool QuickItemNodeInstance::isQuickItem() const { diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.h index f978e769a24..1896036c68b 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickitemnodeinstance.h @@ -50,7 +50,12 @@ public: static Pointer create(QObject *objectToBeWrapped); + virtual QQuickItem *contentItem() const; + + QRectF contentItemBoundingBox() const Q_DECL_OVERRIDE; + QTransform transform() const Q_DECL_OVERRIDE; + QTransform contentItemTransform() const Q_DECL_OVERRIDE; QObject *parent() const Q_DECL_OVERRIDE; @@ -61,6 +66,8 @@ public: bool isMovable() const Q_DECL_OVERRIDE; bool isQuickItem() const Q_DECL_OVERRIDE; + void doComponentComplete(); + protected: QuickItemNodeInstance(QQuickItem*); QQuickItem *quickItem() const; @@ -68,6 +75,7 @@ protected: void setResizable(bool resizable); private: //variables + QPointer m_contentItem; bool m_isResizable; bool m_isMovable; }; diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickwindownodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickwindownodeinstance.cpp index 07645ff281f..82834da7dd7 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickwindownodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quickwindownodeinstance.cpp @@ -88,7 +88,6 @@ QuickWindowNodeInstance::Pointer QuickWindowNodeInstance::create(QObject *object QQuickItemPrivate *privateItem = static_cast(QObjectPrivate::get(quickWindow->contentItem())); if (privateItem->window) { - qDebug() << "removing from window"; if (!privateItem->parentItem) QQuickWindowPrivate::get(privateItem->window)->parentlessItems.remove(quickWindow->contentItem()); privateItem->derefWindow(); diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp index be1dde6e3a9..a40019c5794 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.cpp @@ -315,6 +315,11 @@ QRectF ServerNodeInstance::boundingRect() const return boundingRect; } +QRectF ServerNodeInstance::contentItemBoundingRect() const +{ + return m_nodeInstance->contentItemBoundingBox(); +} + void ServerNodeInstance::setPropertyVariant(const PropertyName &name, const QVariant &value) { m_nodeInstance->setPropertyVariant(name, value); @@ -515,6 +520,11 @@ QTransform ServerNodeInstance::contentTransform() const return m_nodeInstance->contentTransform(); } +QTransform ServerNodeInstance::contentItemTransform() const +{ + return m_nodeInstance->contentItemTransform(); +} + double ServerNodeInstance::rotation() const { return m_nodeInstance->rotation(); @@ -631,11 +641,6 @@ qint32 ServerNodeInstance::instanceId() const } } -QObject* ServerNodeInstance::testHandle() const -{ - return internalObject(); -} - QList ServerNodeInstance::stateInstances() const { return m_nodeInstance->stateInstances(); diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.h b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.h index 84fdee61190..bb11386bb8f 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.h +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/servernodeinstance.h @@ -105,12 +105,14 @@ public: bool equalGraphicsItem(QGraphicsItem *item) const; QRectF boundingRect() const; + QRectF contentItemBoundingRect() const; QPointF position() const; QSizeF size() const; QTransform transform() const; QTransform customTransform() const; QTransform sceneTransform() const; QTransform contentTransform() const; + QTransform contentItemTransform() const; double rotation() const; double scale() const; QList transformations() const; @@ -156,7 +158,6 @@ public: QString id() const; qint32 instanceId() const; - QObject* testHandle() const; QSharedPointer internalInstance() const; QList stateInstances() const; diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppet.pri b/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppet.pri index 13ab169f72b..003098c1b0a 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppet.pri +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppet.pri @@ -23,7 +23,7 @@ QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH) include($$QT_BREAKPAD_ROOT_PATH/qtbreakpad.pri) } -SOURCES += $$PWD/main.cpp +SOURCES += $$PWD/qml2puppetmain.cpp RESOURCES += $$PWD/../qmlpuppet.qrc DEFINES -= QT_NO_CAST_FROM_ASCII diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/main.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppetmain.cpp similarity index 90% rename from share/qtcreator/qml/qmlpuppet/qml2puppet/main.cpp rename to share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppetmain.cpp index 343b90265a2..b2e2318f718 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/main.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/qml2puppetmain.cpp @@ -47,6 +47,10 @@ int main(int argc, char *argv[]) { + // Since we always render text into an FBO, we need to globally disable + // subpixel antialiasing and instead use gray. + qputenv("QSG_DISTANCEFIELD_ANTIALIASING", "gray"); + QApplication application(argc, argv); QCoreApplication::setOrganizationName("QtProject"); @@ -78,8 +82,10 @@ int main(int argc, char *argv[]) return 0; } - if (application.arguments().count() != 4) + if (application.arguments().count() < 4) { + qDebug() << "Wrong argument count: " << application.arguments().count(); return -1; + } diff --git a/share/qtcreator/qml/qmlpuppet/qmlpuppet/qmlpuppet.pri b/share/qtcreator/qml/qmlpuppet/qmlpuppet/qmlpuppet.pri index 1155dbf423c..4ca63d75652 100644 --- a/share/qtcreator/qml/qmlpuppet/qmlpuppet/qmlpuppet.pri +++ b/share/qtcreator/qml/qmlpuppet/qmlpuppet/qmlpuppet.pri @@ -17,7 +17,7 @@ include (../commands/commands.pri) include (../container/container.pri) include (../interfaces/interfaces.pri) -SOURCES += $$PWD/main.cpp +SOURCES += $$PWD/qmlpuppetmain.cpp RESOURCES += $$PWD/../qmlpuppet.qrc DEFINES -= QT_NO_CAST_FROM_ASCII diff --git a/share/qtcreator/qml/qmlpuppet/qmlpuppet/main.cpp b/share/qtcreator/qml/qmlpuppet/qmlpuppet/qmlpuppetmain.cpp similarity index 98% rename from share/qtcreator/qml/qmlpuppet/qmlpuppet/main.cpp rename to share/qtcreator/qml/qmlpuppet/qmlpuppet/qmlpuppetmain.cpp index 9a8db51744c..fef87177b7d 100644 --- a/share/qtcreator/qml/qmlpuppet/qmlpuppet/main.cpp +++ b/share/qtcreator/qml/qmlpuppet/qmlpuppet/qmlpuppetmain.cpp @@ -64,7 +64,7 @@ int main(int argc, char *argv[]) return 0; } - if (application.arguments().count() != 4) + if (application.arguments().count() < 4) return -1; #ifdef ENABLE_QT_BREAKPAD diff --git a/share/qtcreator/qmldesigner/propertyeditor/QtQuick/QtObjectPane.qml b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/QtObjectPane.qml new file mode 100644 index 00000000000..1d66c9d36d8 --- /dev/null +++ b/share/qtcreator/qmldesigner/propertyeditor/QtQuick/QtObjectPane.qml @@ -0,0 +1,95 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +import QtQuick 1.0 +import Bauhaus 1.0 +import HelperWidgets 1.0 + +PropertyFrame { + id: frame; + x: 0 + y: 0 + + ExpressionEditor { + id: expressionEdit + } + layout: QVBoxLayout { + topMargin: 0; + bottomMargin: 0; + leftMargin: 0; + rightMargin: 0; + spacing: 0; + + Type { + } + + HorizontalWhiteLine { + maximumHeight: 4; + styleSheet: "QLineEdit {border: 2px solid #707070; min-height: 0px; max-height: 0px;}"; + } + + HorizontalWhiteLine { + } + + ScrollArea { + styleSheetFile: ":/qmldesigner/scrollbar.css"; + widgetResizable: true; + + finished: finishedNotify; + + horizontalScrollBarPolicy: "Qt::ScrollBarAlwaysOff"; + id: standardPane; + QFrame { + //minimumHeight: 1100 + id: properyEditorStandard + layout: QVBoxLayout { + topMargin: 0; + bottomMargin: 0; + leftMargin: 0; + rightMargin: 0; + spacing: 0; + + WidgetLoader { + id: specificsTwo; + baseUrl: globalBaseUrl; + qmlData: specificQmlData; + } + + WidgetLoader { + id: specificsOne; + source: specificsUrl; + } + + QScrollArea { + } + } // layout + } //QWidget + } //QScrollArea + } +} diff --git a/share/qtcreator/translations/qtcreator_zh_CN.ts b/share/qtcreator/translations/qtcreator_zh_CN.ts index aaef6f86fd0..4013b77d831 100644 --- a/share/qtcreator/translations/qtcreator_zh_CN.ts +++ b/share/qtcreator/translations/qtcreator_zh_CN.ts @@ -14434,12 +14434,12 @@ Preselects a desktop Qt for building the application if available. %1 Debug Name of a debug build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 调试 + %1 Debug %1 Release Name of a release build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 发布 + %1 Release <No tool chain selected> @@ -22774,7 +22774,7 @@ S60 emulator run configuration default display name, %1 is base pro-File name untitled File path suggestion for a new project. If you choose to translate it, make sure it is a valid path name without blanks and using only ascii chars. - 未命名 + untitled @@ -27898,12 +27898,12 @@ Did you start Qemu? %1 Debug Debug build configuration. We recommend not translating it. - %1 调试 + %1 Debug %1 Release Release build configuration. We recommend not translating it. - %1 发布 + %1 Release @@ -40001,12 +40001,12 @@ Check if the phone is connected and App TRK is running. %1 Debug Name of a debug build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 调试 + %1 Debug %1 Release Name of a release build configuration to be created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 发布 + %1 Release diff --git a/share/qtcreator/translations/qtcreator_zh_TW.ts b/share/qtcreator/translations/qtcreator_zh_TW.ts index 00ddeae2ff1..2483833d5ae 100644 --- a/share/qtcreator/translations/qtcreator_zh_TW.ts +++ b/share/qtcreator/translations/qtcreator_zh_TW.ts @@ -4,22 +4,18 @@ Application - Failed to load core: %1 載入 core 檔失敗:%1 - Unable to send command line arguments to the already running instance. It appears to be not responding. Do you want to start a new instance of Creator? 無法傳送命令列參數到正在執行中的實體。該實體似乎無法回應。您要重新啟動一個 Creator 的實體嗎? - Could not send message 無法傳送訊息 - Could not find 'Core.pluginspec' in %1 在 %1 中找不到 'Core.pluginspec' @@ -27,12 +23,10 @@ BINEditor::Internal::BinEditorPlugin - &Undo 復原(&U) - &Redo 重做(&R) @@ -40,46 +34,34 @@ BookmarkDialog - Add Bookmark 新增書籤 - Bookmark: 書籤: - + + - New Folder 新資料夾 - - - - - Bookmarks 書籤 - Delete Folder 刪除資料夾 - Rename Folder 重新命名資料夾 - Add in folder: 新增到資料夾: @@ -87,23 +69,18 @@ BookmarkManager - Bookmarks 書籤 - Remove 移除 - Deleting a folder also removes its content.<br>Do you want to continue? 刪除資料夾會同時移除它的內容。<br>您確定要繼續嗎? - - New Folder 新資料夾 @@ -111,42 +88,34 @@ BookmarkWidget - Delete Folder 刪除資料夾 - Rename Folder 重新命名資料夾 - Show Bookmark 顯示書籤 - Show Bookmark as New Page 在新頁面顯示書籤 - Delete Bookmark 刪除書籤 - Rename Bookmark 重新命名書籤 - Add 新增 - Remove 移除 @@ -154,28 +123,22 @@ Bookmarks::Internal::BookmarkView - - Bookmarks 書籤 - Move Up 向上移動 - Move Down 向下移動 - &Remove 移除(&R) - Remove All 全部移除 @@ -183,63 +146,50 @@ Bookmarks::Internal::BookmarksPlugin - &Bookmarks 書籤(&B) - - Toggle Bookmark 切換書籤 - Ctrl+M Ctrl+M - Meta+M Meta+M - Previous Bookmark 前一個書籤 - Ctrl+, Ctrl+, - Meta+, Meta+, - Next Bookmark 下一個書籤 - Ctrl+. Ctrl+. - Meta+. Meta+. - Previous Bookmark in Document 文件中的前一個書籤 - Next Bookmark in Document 文件中的下一個書籤 @@ -247,17 +197,14 @@ CMakeProjectManager::Internal::CMakeBuildConfigurationFactory - Build 建置 - New Configuration 新設置 - New configuration name: 新設置名稱: @@ -265,22 +212,18 @@ CMakeProjectManager::Internal::CMakeBuildSettingsWidget - Run cmake 執行 cmake - Reconfigure project: 重新設置專案: - &Change 變更(&C) - Build directory: 建置目錄: @@ -288,7 +231,6 @@ CMakeProjectManager::Internal::CMakeOpenProjectWizard - CMake Wizard CMake 精靈 @@ -296,52 +238,42 @@ CMakeProjectManager::Internal::CMakeRunConfigurationWidget - Arguments: 參數: - Select Working Directory 選擇工作目錄 - Reset to default 重置為預設值 - Working directory: 工作目錄: - Run in Terminal 在終端機中執行 - Run Environment 執行時的環境變數 - Base environment for this runconfiguration: 本次執行設置的基本環境變數: - Clean Environment 清理環境變數 - System Environment 系統環境變數 - Build Environment 建置環境變數 @@ -349,12 +281,10 @@ CMakeProjectManager::Internal::InSourceBuildPage - Qt Creator has detected an <b>in-source-build in %1</b> which prevents shadow builds. Qt Creator will not allow you to change the build directory. If you want a shadow build, clean your source directory and re-open the project. Qt Creator在<b>%1</b>中偵測到先前做過<b>直接在源碼中建置</b>,因此無法進行分離建置(shadow build)。Qt Creator將不會允許您變更建置目錄。如果你想要進行分離建置,請清除源碼中的編譯後再重新開啟此專案。 - Build Location 建置路徑 @@ -378,18 +308,14 @@ 路徑 (%1) 不是有效的 cmake。 - Arguments: 參數: - Generator: 建立器: - - Run CMake 執行 CMake @@ -398,32 +324,26 @@ 目錄 %1 已存在一份足夠新的 cbp 檔。您可以在此傳送特殊參數,或是變更所使用的工具鍊,然後重新執行 CMake。或者您也可以直接結束此精靈。 - The directory %1 already contains a cbp file, which is recent enough. You can pass special arguments and rerun CMake. Or simply finish the wizard directly. - The directory %1 does not contain a cbp file. Qt Creator needs to create this file by running CMake. Some projects require command line arguments to the initial CMake call. 目錄 %1 中沒有 cbp 檔。Qt Creator 需要執行 CMake 以建立此檔案。某些專案需要命令列參數來初始化 CMake 的呼叫。 - The directory %1 contains an outdated .cbp file. Qt Creator needs to update this file by running CMake. If you want to add additional command line arguments, add them below. Note that CMake remembers command line arguments from the previous runs. 目錄 %1 包含了一個過期的 .cbp 檔。Qt Creator需要執行 CMake 以更新此檔案。如果您想新增額外的命令列參數,請新增在下面。注意 CMake 會記住上次執行時的命令列參數。 - The directory %1 specified in a build-configuration, does not contain a cbp file. Qt Creator needs to recreate this file, by running CMake. Some projects require command line arguments to the initial CMake call. Note that CMake remembers command line arguments from the previous runs. 在建置設置中指定的目錄 %1 中未包含 cbp 檔案。Qt Creator 需要執行 CMake 以重新建立此檔案。某些專案需要命令列參數來初始化 CMake 的呼叫。如果您想新增額外的命令列參數,請新增在下面。注意 CMake 會記住上次執行時的命令列參數。 - Qt Creator needs to run CMake in the new build directory. Some projects require command line arguments to the initial CMake call. Qt Creator 需要在新的建置目錄下執行 CMake。某些專案需要命令列參數來初始化 CMake 的呼叫。 - Refreshing cbp file in %1. 正在刷新 %1 中的 cbp 檔案。 @@ -436,12 +356,10 @@ Unix 建立器 (%1) - No generator selected. 沒有選擇建立器。 - CMake exited with errors. Please check CMake output. CMake 發生錯誤而離開。請檢查 cmake 的輸出。 @@ -450,7 +368,6 @@ NMake 建立器(%1) - No valid cmake executable specified. 沒有指定有效的 cmake 執行檔。 @@ -458,12 +375,10 @@ CMakeProjectManager::Internal::CMakeSettingsPage - CMake CMake - Executable: 執行檔: @@ -471,23 +386,19 @@ CMakeProjectManager::Internal::MakeStepConfigWidget - Additional arguments: 額外的參數: - Targets: 目標: - Make CMakeProjectManager::MakeStepConfigWidget display name. Make - <b>No build configuration found on this target.</b> @@ -499,22 +410,18 @@ CMakeProjectManager::Internal::ShadowBuildPage - Please enter the directory in which you want to build your project. 請輸入您想建置專案的目錄。 - Please enter the directory in which you want to build your project. Qt Creator recommends to not use the source directory for building. This ensures that the source directory remains clean and enables multiple builds with different settings. 請輸入您想建置專案的目錄。Qt Creator 建議您不要直接用源碼的目錄來做建置。這樣可以保持源碼目錄的乾淨,並且可以讓您用不同的設定進行多個建置。 - Build directory: 建置目錄: - Build Location 建置路徑 @@ -522,12 +429,10 @@ CPlusPlus::OverviewModel - <Select Symbol> <選擇符號> - <No Symbols> <沒有符號> @@ -535,62 +440,50 @@ CodePaster::CodepasterPlugin - &Code Pasting 貼上代碼(&C) - Paste Snippet... 貼上代碼片段... - Alt+C,Alt+P Alt+C,Alt+P - Meta+C,Meta+P - Paste Clipboard... 貼上剪貼簿內容... - Fetch Snippet... 取得代碼片段... - Alt+C,Alt+F Alt+C,Alt+F - Meta+C,Meta+F - Fetch from URL... - Fetch from URL - Enter URL: - Empty snippet received for "%1". 接收到 "%1" 的空片段。 @@ -598,17 +491,14 @@ CodePaster::PasteSelectDialog - Refresh 刷新 - Waiting for items 等待項目 - This protocol does not support listing 此協定不支援列表 @@ -616,7 +506,6 @@ CodePaster::SettingsPage - General 一般 @@ -624,12 +513,10 @@ ContentWindow - Open Link 開啟連結 - Open Link as New Page 在新頁面開啟連結 @@ -637,40 +524,30 @@ Core::BaseFileWizard - - - - File Generation Failure 產生檔案失敗 - Existing files 已存在的檔案 - Failed to open an editor for '%1'. 為 '%1' 開啟編輯器時失敗。 - [read only] [唯讀] - [folder] [資料夾] - [symbolic link] [符號連結] - The project directory %1 contains files which cannot be overwritten: %2. 專案目錄 %1 存在無法被覆蓋的檔案: @@ -680,208 +557,162 @@ Core::EditorManager - - Revert to Saved 回復到已儲存的狀態 - - - Close 關閉 - - Close All 全部關閉 - - - Close Others 關閉其他項目 - Revert File to Saved 回復檔案到已儲存的狀態 - Ctrl+F4 Ctrl+F4 - Ctrl+W Ctrl+W - Ctrl+Shift+W Ctrl+Shift+W - Alt+Tab Alt+Tab - Ctrl+Tab Ctrl+Tab - Alt+Shift+Tab Alt+Shift+Tab - Ctrl+Shift+Tab Ctrl+Shift+Tab - Ctrl+Alt+Left Ctrl+Alt+Left - Alt+Left Alt+Left - Ctrl+Alt+Right Ctrl+Alt+Right - Alt+Right Alt+Right - Split 分割 - Meta+E,2 - Ctrl+E,2 - Split Side by Side 左右分割 - Meta+E,3 - Ctrl+E,3 - Remove Current Split 移除目前的分割 - Meta+E,0 - Ctrl+E,0 - Remove All Splits 移除所有的分割 - Meta+E,1 - Ctrl+E,1 - Meta+E,o - Ctrl+E,o - Save %1 &As... 另存 %1 為 (&A)... - Opening File 開啟檔案 - Qt Creator Qt Creator - <b>Warning:</b> This file was not opened in %1 yet. <b>警告:</b> 檔案在 %1 中尚未開啟。 - Open 開啟 - <b>Warning:</b> You are changing a read-only file. <b>警告:</b> 您正在變更一個唯讀檔。 - Next Open Document in History 歷史紀錄中下一個開啟文件 - Previous Open Document in History 歷史紀錄中前一個開啟文件 - Go Back 返回 - Go Forward 前進 @@ -910,7 +741,6 @@ %1,1 - Go to Next Split 移動到下一個分割 @@ -919,120 +749,94 @@ %1,o - Ad&vanced 高級(&V) - Full path of the current document including file name. 目前文件的檔名,包含完整路徑。 - Full path of the current document excluding file name. 目前文件的檔名,不包含完整路徑。 - X-coordinate of the current editor's upper left corner, relative to screen. 目前編輯器相對於螢幕而言的左上角 X 軸座標。 - Y-coordinate of the current editor's upper left corner, relative to screen. 目前編輯器相對於螢幕而言的左上角 Y 軸座標。 - Close "%1" 關閉 "%1" - Close Editor 關閉編輯器 - Close All Except "%1" 除了 "%1" 以外全部關閉 - Close Other Editors 關閉其他編輯器 - - - File Error 檔案錯誤 - - Cannot Open File 無法開啟檔案 - Cannot open the file for editing with SCC. 無法使用 SCC 開啟檔案以編輯。 - Cannot Set Permissions 無法設置權限 - Cannot set permissions to writable. 無法設置檔案權限為可寫入。 - Cannot open the file for editing with VCS. 無法使用 VCS 開啟檔案以編輯。 - Make Writable 設為可寫入 - &Save %1 儲存 %1(&S) - Revert %1 to Saved 回復 %1 到已儲存的狀態 - Close %1 關閉 %1 - Close All Except %1 除了 %1 以外全部關閉 - You will lose your current changes if you proceed reverting %1. 若您進行回復 %1 的動作,您將失去您目前的變更。 - Proceed 進行 - Cancel 取消 @@ -1040,7 +844,6 @@ Core::Internal::EditMode - Edit 編輯 @@ -1048,125 +851,101 @@ Core::Internal::GeneralSettings - General 一般 - <System Language> <系統語言> - Restart required 需要重新啟動 - The language change will take effect after a restart of Qt Creator. 語言的變更會在重新啟動 Qt Creator 後生效。 - Variables 變數 - Terminal: 終端機: - ? ? - When files are externally modified: 當檔案被外部程式變更時: - User Interface 使用者界面 - Color: 顏色: - Language: 語言: - System 系統 - External file browser: 外部檔案瀏覽器: - Always Ask 總是詢問 - Reload All Unchanged Editors 重新載入所有未變更的編輯器 - Ignore Modifications 忽略變更 - Reset 重置 - Reset to default. Color 重置為預設值。 - Reset to default. Terminal 重置為預設值。 - Reset to default. File Browser 重置為預設值。 - Automatically create temporary copies of modified files. If Qt Creator is restarted after a crash or power failure, it asks whether to recover the auto-saved content. 自動為變更的檔案建立暫存備份。如果 Qt Creator 在崩潰或停電後重啟,它會詢問是否要回復上次暫存的內容。 - Auto-save modified files 自動儲存變更的檔案 - Interval: 間隔: - min unit for minutes @@ -1175,245 +954,195 @@ Core::Internal::MainWindow - Qt Creator Qt Creator - Exit Full Screen - - Enter Full Screen - &File 檔案(&F) - &Edit 編輯(&E) - &Tools 工具(&T) - &Window 視窗(&W) - &Help 說明(&H) - &New File or Project... 新增檔案或專案(&N)... - &Open File or Project... 開啟檔案或專案(&O)... - Open File &With... 開啟方式(&W)... - Recent &Files 最近使用的檔案(&F) - &Save 儲存(&S) - Save 儲存 - Save &As... 另存新檔(&A)... - - Ctrl+Shift+S Ctrl+Shift+S - Save As... 另存新檔... - Save A&ll 全部儲存(&L) - &Print... 列印(&P)... - E&xit 離開(&X) - Ctrl+Q Ctrl+Q - &Undo 復原(&U) - Undo 復原 - &Redo 重做(&R) - Redo 重做 - Cu&t 剪下(&T) - &Copy 複製(&C) - &Paste 貼上(&P) - Select &All 全部選取(&A) - &Go to Line... 跳到行號(&G)... - Ctrl+L Ctrl+L - &Options... 選項(&O)... - Ctrl+, Ctrl+, - Minimize 最小化 - Ctrl+M Ctrl+M - Zoom 縮放 - Show Sidebar 顯示邊欄 - Ctrl+0 Ctrl+0 - Alt+0 Alt+0 - Full Screen 全螢幕 - Ctrl+Shift+F11 Ctrl+Shift+F11 - Ctrl+Meta+F - &Views 檢視(&V) - About &Qt Creator 關於 Qt Creator(&Q) - About &Qt Creator... 關於 Qt Creator(&Q)... - About &Plugins... 關於外掛程式(&P)... - New Title of dialog 新增 - Settings... 設定... @@ -1421,7 +1150,6 @@ Core::Internal::MessageOutputWindow - General Messages 一般訊息 @@ -1429,12 +1157,10 @@ Core::Internal::NavigationSubWidget - Split 分割 - Close 關閉 @@ -1442,49 +1168,38 @@ Core::Internal::NewDialog - New Project 新專案 - Choose a template: 選擇一個樣本: - &Choose... 選擇(&C)... - Projects 專案 - Files and Classes 檔案與類別 - - All Templates 所有樣本 - - %1 Templates %1 樣本 - Platform independent 與平台無相依性 - Supported Platforms 支援的平台 @@ -1492,8 +1207,6 @@ Core::Internal::OpenEditorsWidget - - Open Documents 開啟文件 @@ -1501,8 +1214,6 @@ Core::Internal::OpenEditorsWindow - - * * @@ -1510,17 +1221,14 @@ Core::Internal::OpenWithDialog - Open file '%1' with: 開啟檔案 '%1' 的方式: - Open File With... 開啟方式... - Open file extension with: 開啟此副檔名的方式: @@ -1528,58 +1236,46 @@ Core::Internal::OutputPaneManager - Output 輸出 - Clear 清除 - Next Item 下一項 - Previous Item 前一項 - - Maximize Output Pane 最大化輸出窗格 - Shift+F6 Shift+F6 - F6 F6 - Ctrl+9 Ctrl+9 - Alt+9 Alt+9 - Minimize Output Pane 最小化輸出窗格 - Output &Panes 輸出窗格(&P) @@ -1587,37 +1283,30 @@ Core::Internal::PluginDialog - Details 詳情 - Error Details 錯誤詳情 - Close 關閉 - Restart required. 需要重新啟動。 - Installed Plugins 已安裝的外掛程式 - Plugin Details of %1 %1 的外掛程式詳情 - Plugin Errors of %1 %1 的外掛程式錯誤 @@ -1625,7 +1314,6 @@ Core::Internal::ProgressView - Processes 行程 @@ -1633,40 +1321,30 @@ Core::Internal::SaveItemsDialog - Do not Save 不要儲存 - - Save All 全部儲存 - - Save 儲存 - - Save Selected 儲存選取的項目 - Save Changes 儲存變更 - The following files have unsaved changes: 以下檔案有未儲存的變更: - Automatically save all files before building 建置前自動儲存所有檔案 @@ -1674,38 +1352,30 @@ Core::Internal::ShortcutSettings - Keyboard 鍵盤 - Keyboard Shortcuts 鍵盤快捷鍵 - Key sequence: 按鍵順序: - Shortcut 快捷鍵 - Import Keyboard Mapping Scheme 匯入鍵盤映射機制 - - Keyboard Mapping Scheme (*.kms) 鍵盤映射機制 (*.kms) - Export Keyboard Mapping Scheme 匯出鍵盤映射機制 @@ -1713,14 +1383,10 @@ Core::Internal::SideBarWidget - - Split 分割 - - Close 關閉 @@ -1728,23 +1394,19 @@ Core::Internal::VersionDialog - About Qt Creator 關於 Qt Creator - (%1) (%1) - From revision %1<br/> This gets conditionally inserted as argument %8 into the description string. 來自版本 %1<br/> - <h3>Qt Creator %1 %8</h3>Based on Qt %2 (%3 bit)<br/><br/>Built on %4 at %5<br /><br/>%9<br/>Copyright 2008-%6 %7. All rights reserved.<br/><br/>The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.<br/> <h3>Qt Creator %1 %8</h3>基於 Qt %2 (%3 bit)<br/><br/>建置於 %5 %4 <br /><br/>%9<br/>Copyright 2008-%6 %7. 保留所有權利。<br/><br/>此程式以「目前現況」(As-is)釋出,不做任何形式的保固,包括不做設計瑕疵上的保固、不保證適於銷售(Merchantability),也不保證適用於任何目的等等。<br/> @@ -1752,7 +1414,6 @@ Core::ModeManager - Switch to <b>%1</b> mode 切換至 <b>%1</b> 模式 @@ -1760,13 +1421,11 @@ Core::ScriptManager - Exception at line %1: %2 %3 在 %1 行發生例外狀況:%2 %3 - Unknown error 未知的錯誤 @@ -1774,7 +1433,6 @@ Core::StandardFileWizard - New %1 新增 %1 @@ -1782,17 +1440,14 @@ Utils::ClassNameValidatingLineEdit - The class name must not contain namespace delimiters. 類別名稱不能包含命名空間分隔符。 - Please enter a class name. 請輸入類別名稱。 - The class name contains invalid characters. 類別名稱中含有無效字元。 @@ -1800,87 +1455,70 @@ Utils::ConsoleProcess - Cannot set up communication channel: %1 無法設定通訊頻道:%1 - Press <RETURN> to close this window... 按 <RETURN> 鍵來關閉此視窗... - Cannot create temporary file: %1 無法建立暫存檔:%1 - Cannot write temporary file. Disk full? 無法建立暫存檔。或許磁碟空間已滿? - Cannot create temporary directory '%1': %2 無法建立暫存資料夾 '%1':%2 - Unexpected output from helper program (%1). 從協助程式得到未預期的輸出 (%1)。 - Cannot change to working directory '%1': %2 無法變更到工作目錄 '%1':%2 - Cannot execute '%1': %2 無法執行 '%1':%2 - The process '%1' could not be started: %2 行程 '%1' 無法被啟動:%2 - Cannot obtain a handle to the inferior: %1 無法取得底層的處理:%1 - Cannot obtain exit status from inferior: %1 無法從底層取得離開狀態:%1 - Quoting error in command. 命令列發生引號錯誤。 - Debugging complex shell commands in a terminal is currently not supported. 目前不支援在終端機中對複雜的 shell 指令除錯。 - Quoting error in terminal command. 終端機命令列發生引號錯誤。 - Terminal command may not be a shell command. 終端機指令可能不是一個 shell 指令。 - Cannot start the terminal emulator '%1'. 無法啟動終端模擬器 '%1'。 - Cannot create socket '%1': %2 無法建立 socket '%1':%2 @@ -1888,37 +1526,30 @@ Utils::FileNameValidatingLineEdit - Name is empty. 名稱是空的。 - Name contains white space. 名稱包含空白。 - Invalid character '%1'. 無效的字元 '%1'。 - Invalid characters '%1'. 無效的字元 '%1'。 - Name matches MS Windows device. (%1). 符合 MS Windows 裝置的名稱。(%1)。 - File extension %1 is required: 需要副檔名 %1: - File extensions %1 are required: 需要副檔名 %1: @@ -1926,21 +1557,18 @@ Utils::FileSearch - %1: canceled. %n occurrences found in %2 files. %1:已取消。在 %2 個檔案找到了 %n 個結果。 - %1: %n occurrences found in %2 files. %1:在 %2 個檔案找到了 %n 個結果。 - %1: %n occurrences found in %2 of %3 files. %1:在 %3 個檔案中的 %2 個找到了 %n 個結果。 @@ -1950,87 +1578,70 @@ Utils::NewClassWidget - Invalid base class name 無效的基礎類別名稱 - Invalid header file name: '%1' 無效的標頭檔名稱:'%1' - Invalid source file name: '%1' 無效的源碼檔名稱:'%1' - Invalid form file name: '%1' 無效的表單檔名稱:'%1' - Inherits QObject 繼承自 QObject - None - Inherits QWidget 繼承自 QWidget - Based on QSharedData 基於 QSharedData - &Class name: 類別名稱(&C): - &Base class: 基礎類別(&B): - &Type information: 型態資訊(&T): - &Header file: 標頭檔(&H): - &Source file: 源碼檔(&S): - &Generate form: 產生表單(&G): - &Form file: 表單檔案(&F): - &Path: 路徑(&P): - Inherits QDeclarativeItem 繼承自 QDeclarativeItem @@ -2038,82 +1649,62 @@ Utils::PathChooser - Choose... 選擇... - Browse... 瀏覽... - Choose Directory 選擇目錄 - Choose Executable 選擇執行檔 - - Choose File 選擇檔案 - The path must not be empty. 路徑不能空白。 - The path '%1' expanded to an empty string. 路徑 '%1' 展開成一個空字串。 - - - The path '%1' does not exist. 路徑 '%1' 不存在。 - - Cannot execute '%1'. 無法執行 '%1'。 - The path <b>%1</b> is not a directory. 路徑 <b>'%1'</b> 不是目錄。 - The path <b>%1</b> is not a file. 路徑 <b>'%1'</b> 不是檔案。 - The path <b>%1</b> is not a executable file. 路徑 <b>%1</b> 不是可執行檔。 - Full path: <b>%1</b> 完整路徑:<b>%1<b> - - The path '%1' is not a directory. 路徑 '%1' 不是目錄。 - Path: 路徑: @@ -2121,27 +1712,22 @@ Utils::PathListEditor - Insert... 插入... - Add... 新增... - Delete Line 刪除行 - Clear 清除 - From "%1" 從 "%1" @@ -2149,42 +1735,34 @@ Utils::ProjectIntroPage - <Enter_Name> <輸入名稱> - The project already exists. 專案已存在。 - A file with that name already exists. 相同名稱的檔案已存在。 - Name: 名稱: - Create in: 建立於: - Use as default project location 做為預設的專案位置 - Introduction and Project Location 介紹與專案位置 - Project: @@ -2192,7 +1770,6 @@ Utils::ProjectNameValidatingLineEdit - Invalid character '.'. 無效字元 '.'。 @@ -2200,46 +1777,38 @@ Utils::SubmitEditorWidget - Subversion Submit Subversion 提交 - F&iles 檔案(&I) - %1 %2/%n File(s) %1 %2/%n 個檔案 - &Commit 提交(&C) - Check All Check all for submit 全部勾選 - Uncheck All Uncheck all for submit 全部取消勾選 - Descriptio&n 描述(&N) - Check a&ll 全部勾選(&L) @@ -2247,17 +1816,14 @@ Utils::WizardPage - Name: 名稱: - Path: 路徑: - Choose the Location 選擇位置 @@ -2265,17 +1831,14 @@ Utils::reloadPrompt - File Changed 檔案已變更 - The unsaved file <i>%1</i> has been changed outside Qt Creator. Do you want to reload it and discard your changes? 未儲存的檔案 <i>%1</i> 在 Qt Creator 以外被變更了。您要重新載入並丟棄您的變更嗎? - The file <i>%1</i> has changed outside Qt Creator. Do you want to reload it? 檔案 <i>%1</i> 在 Qt Creator 以外被變更了。您要重新載入嗎? @@ -2283,12 +1846,10 @@ CppEditor::Internal::ClassNamePage - Enter Class Name 輸入類別名稱 - The header and source file names will be derived from the class name 標頭檔和源碼檔名將取自類別名稱 @@ -2296,7 +1857,6 @@ CppEditor::Internal::CppClassWizard - Error while generating file contents. 產生檔案內容時發生錯誤。 @@ -2304,12 +1864,10 @@ CppEditor::Internal::CppClassWizardDialog - C++ Class Wizard C++ 類別精靈 - Details 詳情 @@ -2317,27 +1875,22 @@ CppEditor::Internal::CppPlugin - C++ Header File C++ 標頭檔 - Creates a C++ header and a source file for a new class that you can add to a C++ project. 為新類別建立一組標頭檔與源碼檔,讓您可以新增到 C++ 專案中。 - Creates a C++ source file that you can add to a C++ project. 建立 C++ 的源碼檔,讓您可以新增到 C++ 專案中。 - C++ Source File C++ 源碼檔 - Creates a C++ header file that you can add to a C++ project. 建立 C++ 的標頭檔,讓您可以新增到 C++ 專案中。 @@ -2346,57 +1899,46 @@ 跟隨游標下的符號 - Switch Between Method Declaration/Definition 在方法宣告與定義之間切換 - Shift+F2 Shift+F2 - Open Type Hierarchy 開啟型態階層 - Ctrl+Shift+T Ctrl+Shift+T - Meta+Shift+T - Rename Symbol Under Cursor 重新命名游標下的符號 - CTRL+SHIFT+R CTRL+SHIFT+R - Update Code Model 更新代碼模型 - C++ Class C++ 類別 - Find Usages 尋找使用處 - Ctrl+Shift+U Ctrl+Shift+U @@ -2404,7 +1946,6 @@ CppPreprocessor - %1: No such file or directory %1:檔案或目錄不存在 @@ -2412,7 +1953,6 @@ CppTools::Internal::CppModelManager - Parsing 剖析中 @@ -2420,18 +1960,14 @@ CppTools - Code Style 源碼樣式 - File Naming 檔案命名 - - C++ C++ @@ -2439,122 +1975,98 @@ CppTools::Internal::CompletionSettingsPage - Completion 補完 - Behavior 行為 - &Case-sensitivity: 區分大小寫(&C): - Full 全部 - None - First Letter 首字母 - Activate completion: 啟動補完功能: - Manually 手動 - When Triggered 觸發時 - Always 總是 - Insert the common prefix of available completion items. 輸入可用的補完項目的共用前置字串。 - Autocomplete common &prefix 自動補完的共用前置字串(&P) - Automatically insert semicolons and closing brackets, parentheses, curly braces, and quotes when appropriate. 在適當的時候自動插入分號、結束的括號、大括號與引號等等。 - &Automatically insert matching characters 自動插入對應的字元(&A) - When typing a matching character and there is a text selection, instead of removing the selection, surround it with the corresponding characters. 當輸入一個符號(例如括號)並且有選取的文字時,將選取區的文字自動用符號包起來。 - Surround &text selections 包住選取區的文字(&T) - Insert &space after function name 在函式名稱後插入空格(&S) - Documentation Comments 文件註解 - Automatically create a Doxygen comment upon pressing enter after a /** or /*! 在 /** 或 /*! 後面按下 Enter 時自動建立 Doxygen 的註解 - Enable Doxygen blocks 開啟 Doxygen 區塊 - Generate a <i>brief</i> command with an initial description for the corresponding declaration 對相關的宣告產生一個<i>簡易</i>的指令與初始的描述 - Generate brief description 產生簡易描述 - Add leading asterisks when continuing comments on new lines 輸入註解換行時自動加上開頭的星號 - Add leading asterisks 新增開頭的星號 @@ -2562,7 +2074,6 @@ CppTools::Internal::CppFunctionsFilter - Methods and Functions 方法與函式 @@ -2570,7 +2081,6 @@ CppTools::Internal::CppLocatorFilter - Classes and Methods 類別與方法 @@ -2578,12 +2088,10 @@ CppTools::Internal::CppToolsPlugin - &C++ C++(&C) - Switch Header/Source 切換標頭檔/源碼檔 @@ -2591,23 +2099,19 @@ Debugger - General 一般 - Locals && Expressions '&&' will appear as one (one is marking keyboard shortcut) - Debugger 除錯器 - <Encoding error> <編碼錯誤> @@ -2616,7 +2120,6 @@ 除錯小助手 - Ctrl+Shift+F11 Ctrl+Shift+F11 @@ -2624,12 +2127,10 @@ QtDumperHelper - Found an outdated version of the debugging helper library (%1); version %2 is required. 系統找到一個已過期的除錯小助手函式庫 (%1),需要的版號為 %2。 - ptrace: Operation not permitted. Could not attach to the process. Make sure no other debugger traces this process. @@ -2640,7 +2141,6 @@ For more details, see /etc/sysctl.d/10-ptrace.conf - ptrace: Operation not permitted. Could not attach to the process. Make sure no other debugger traces this process. @@ -2679,14 +2179,12 @@ For more details, see/etc/sysctl.d/10-ptrace.conf - %n known types, Qt version: %1, Qt namespace: %2 Dumper version: %3 %n 個已知類型,Qt 版本:%1,Qt 命名空間:%2 傾印器版本:%3 - <none> <無> @@ -2694,37 +2192,30 @@ For more details, see/etc/sysctl.d/10-ptrace.conf Debugger::Internal::AttachCoreDialog - Load Core File - Browse... 瀏覽... - Select Executable 選擇執行檔 - Kit: - Core file: - Select Remote Core File - Select Core File 選擇 Core 檔案 @@ -2733,7 +2224,6 @@ For more details, see/etc/sysctl.d/10-ptrace.conf 選擇 Sysroot - Select Startup Script 選擇啟動腳本 @@ -2742,7 +2232,6 @@ For more details, see/etc/sysctl.d/10-ptrace.conf 啟動除錯工具 - &Executable: 執行檔(&E): @@ -2759,7 +2248,6 @@ For more details, see/etc/sysctl.d/10-ptrace.conf Sysroot(&R): - Override &start script: 覆寫啟動腳本(&S): @@ -2807,12 +2295,10 @@ Qt Creator cannot attach to it. Debugger::Internal::AddressDialog - Select Start Address 選擇開始位址 - Enter an address: 輸入位址: @@ -2820,233 +2306,187 @@ Qt Creator cannot attach to it. Debugger::Internal::BreakHandler - Marker File: 標記檔案: - Marker Line: 標記行: - Breakpoint Number: 中斷點編號: - Breakpoint Address: 中斷點位址: - Property 屬性 - Breakpoint Type: 中斷點類型: - State: 狀態: - Requested 已請求 - Obtained 已獲得 - Internal Number: 內部編號: - File Name: 檔案名稱: - Function Name: 函式名稱: - Breakpoint on QML Signal Emit - Data at 0x%1 在 0x%1 的資料 - Data at %1 在 %1 的資料 - Enabled 已開啟 - Disabled 已關閉 - , pending ,暫停中 - Engine: 引擎: - Line Number: 行號: - Corrected Line Number: 修正行號: - Module: 模組: - Multiple Addresses: 多重位址: - Command: 指令: - Message: 訊息: - Condition: 條件: - Ignore Count: 忽略計數: - Thread Specification: 執行緒詳情: - Function 函式 - New 新增 - Insertion requested 請求插入 - Insertion proceeding 插入進行中 - Change requested 請求變更 - Change proceeding 變更進行中 - Breakpoint inserted 中斷點已插入 - Removal requested 請求移除 - Removal proceeding 移除進行中 - Dead 已死亡 - <invalid state> Invalid breakpoint state. <不正確的狀態> - Breakpoint at "%1" 在 "%1" 的中斷點 - Breakpoint by File and Line 在檔案和行號的中斷點 - Breakpoint by Function 在函式的中斷點 - Breakpoint by Address 在位址的中斷點 - Breakpoint at Function "main()" 在 "main()" 函式的中斷點 - Watchpoint at Address 在位址的監看點 - Watchpoint at Expression 在表示式的監看點 @@ -3055,67 +2495,54 @@ Qt Creator cannot attach to it. 在 QML 信號處理器的中斷點 - Breakpoint at JavaScript throw 在 JavaScript 異常的中斷點 - Unknown Breakpoint Type 未知的中斷點類型 - File 檔案 - Line 行號 - Number 編號 - Condition 條件 - Ignore 忽略 - Address 位址 - Threads 執行緒 - Breakpoint will only be hit if this condition is met. 只有當條件滿足時才會在此中斷點中斷。 - Breakpoint will only be hit after being ignored so many times. 會先略過這麼多次以後才會在此中斷點中斷。 - (all) (全部) - Breakpoint will only be hit in the specified thread(s). 此中斷點只有在指定的執行緒中才會被中斷。 @@ -3123,7 +2550,6 @@ Qt Creator cannot attach to it. Debugger::Internal::BreakWindow - Breakpoints 中斷點 @@ -3191,68 +2617,55 @@ Qt Creator cannot attach to it. Debugger::Internal::CdbOptionsPageWidget - Startup Placeholder 啟動 - Additional &arguments: 額外的參數(&A): - Debugger Paths 除錯工具路徑 - &Symbol paths: 符號路徑(&S): - S&ource paths: 源碼路徑(&O): - Break on: 中斷於: - <html><head/><body><p>Use CDB's native console instead of Qt Creator's console for console applications. The native console does not prompt on application exit. It is suitable for diagnosing cases in which the application does not start up properly in Qt Creator's console and the subsequent attach fails.</p></body></html> <html><head/><body><p>使用 CDB 的原生主控台,而不用 Qt Creator 的。原生的主控台不會在應用程式離開時提示。它適用於應用程式無法在 Qt Creator 的主控台中正確啟動時,或是除錯器無法正確掛上行程的情況。</p></body></html> - Use CDB &console 使用 CDB 主控台(&C) - Breakpoints 中斷點 - <html><head/><body><p>Attempt to correct the location of a breakpoint based on file and line number should it be in a comment or in a line for which no code is generated. The correction is based on the code model.</p></body></html> <html><head/><body><p>試著修正使用檔案或行號來指定的中斷點。有時指定的中斷點會落在註解,或是不會產生程式碼的地方。此功能可以試著用代碼模型來修正這些中斷點。</p></body></html> - Correct breakpoint location 修正中斷點位置 - Break on functions: - This is useful to catch runtime error messages, for example caused by assert(). @@ -3260,17 +2673,14 @@ Qt Creator cannot attach to it. Debugger::Internal::CdbSymbolPathListEditor - Symbol Server... 符號伺服器... - Adds the Microsoft symbol server providing symbols for operating system libraries.Requires specifying a local cache directory. 從微軟符號伺服器獲得作業系統函式庫的符號資訊。需要指定一個本地快取目錄。 - <html><head/><body><p>The debugger is not configured to use the public <a href="%1">Microsoft Symbol Server</a>. This is recommended for retrieval of the symbols of the operating system libraries.</p><p><i>Note:</i> A fast internet connection is required for this to work smoothly. Also, a delay might occur when connecting for the first time.</p><p>Would you like to set it up?</p></body></html> @@ -3279,12 +2689,10 @@ Qt Creator cannot attach to it. <html><head/><body><p> 除錯工具沒有被設置成使用公開的<a href="%1">微軟符號伺服器</a>。建議您使用符號伺服器,以便取得作業系統函式庫中的符號。</p><p><i>注意:</i>此項工作需要一個快速的網際網路連線,才能讓此工作較順暢。同時,第一次連結可能造成延遲。</p><p>您要設置符號伺服器嗎?</p></br></body></html> - Symbol Server 符號伺服器 - Do not ask again 不要再問我 @@ -3292,138 +2700,106 @@ Qt Creator cannot attach to it. Debugger::Internal::DebuggerSettings - This switches the debugger to instruction-wise operation mode. In this mode, stepping operates on single instructions and the source location view also shows the disassembled instructions. 將除錯工具切換至 「聰明指令操作」(instruction wise operation)模式。它會在單步執行時在源碼檢視中同時顯示反組譯指令。 - Debugger Properties... 除錯工具屬性... - - - - - - - Always Adjust Column Widths to Contents 總是按內容調整欄寬 - Use Alternating Row Colors 使用交替列顏色 - Debugger Font Size Follows Main Editor 除錯工具字型大小和主編輯器一致 - Show a Message Box When Receiving a Signal 當接收到信號時顯示訊息盒 - Log Time Stamps 紀錄時間戳記 - Verbose Log 詳細紀錄 - Operate by Instruction 依照指令操作 - Dereference Pointers Automatically 自動對指標解除參考(Dereference) - Show "std::" Namespace in Types 在型態中顯示 "std::" 命名空間 - Show Qt's Namespace in Types 在型態中顯示 Qt 的命名空間 - Use Debugging Helpers 使用除錯小助手 - Use Code Model 使用代碼模型 - Selecting this causes the C++ Code Model being asked for variable scope information. This might result in slightly faster debugger operation but may fail for optimized code. 選擇此選項會使用 C++ 代碼模型取得變數範圍的資訊。這可以讓除錯器操作稍微變快,但可能使源碼的最佳化失效。 - Synchronize Breakpoints 同步中斷點 - Show Application On Top - Apply Changes on Save 儲存時套用變更 - This switches the Locals&&Watchers view to automatically dereference pointers. This saves a level in the tree view, but also loses data for the now-missing intermediate level. 切換本地與監看器檢視,以便自動解除指標參考。它可以在樹狀檢視中省掉一層,但是也會遺失中間層的資料。 - Sort Members of Classes and Structs Alphabetically 按字母順序排序類別和結構的成員 - Adjust Breakpoint Locations 調整中斷點位置 - Not all source code lines generate executable code. Putting a breakpoint on such a line acts as if the breakpoint was set on the next line that generated code. Selecting 'Adjust Breakpoint Locations' shifts the red breakpoint markers in such cases to the location of the true breakpoint. 不是所有源碼行都會產生可執行的代碼。在這些行中放中斷點實際上會當成在下一個產生代碼的行號中斷。選擇「調整中斷點位置」會將這類紅色中斷點標記移動到真正中斷點的位置。 - Break on "throw" 遇到 "throw" 時中斷 - Break on "catch" 遇到 "catch" 時中斷 - Break on "qWarning" 遇到 "qWarning" 時中斷 - Break on "qFatal" 遇到 "qFatal" 時中斷 @@ -3432,22 +2808,18 @@ Qt Creator cannot attach to it. 遇到 "raise" 時中斷 - Use Dynamic Object Type for Display 使用動態物件型態來顯示 - Automatically Quit Debugger 自動離開除錯工具 - Use tooltips in main editor when debugging 除錯時在主編輯器中使用工具提示 - Checking this will enable tooltips for variable values during debugging. Since this can slow down debugging and does not provide reliable information as it does not use scope information, it is switched off by default. 勾選此選項會在除錯過程中用工具提示來顯示變數的值。它可能會減慢除錯的速度, 同時由於不使用範圍資訊,造成提供的值並不見得正確,所以此選項預設為關閉。 @@ -3468,77 +2840,62 @@ Qt Creator cannot attach to it. 除錯時在堆疊檢視中顯示位址資料 - List Source Files 列出源碼檔 - Skip Known Frames 跳過已知的框架 - Enable Reverse Debugging 開啟反向除錯 - Register For Post-Mortem Debugging 註冊崩潰後 (post-mortem) 除錯 - Reload Full Stack 重新載入完整堆疊 - Create Full Backtrace 建立完整回溯追蹤 - Checking this will enable tooltips in the locals view during debugging. 勾選此選項會在除錯時於局部變數檢視中使用工具提示。 - Break on "abort" - Use Tooltips in Locals View when Debugging - Use Tooltips in Breakpoints View when Debugging - Checking this will enable tooltips in the breakpoints view during debugging. 勾選此選項會在除錯時於中斷點檢視中使用工具提示。 - Show Address Data in Breakpoints View when Debugging - Checking this will show a column with address information in the breakpoint view during debugging. 勾選此選項會在除錯時於中斷點檢視中顯示一個位址資訊的欄位。 - Show Address Data in Stack View when Debugging - Checking this will show a column with address information in the stack view during debugging. 勾選此選項會在除錯時於堆疊檢視中顯示一個位址資訊的欄位。 @@ -3546,54 +2903,44 @@ Qt Creator cannot attach to it. Debugger::Internal::DebuggingHelperOptionPage - <html><head/><body> <p>The debugging helper is only used to produce a nice display of objects of certain types like QString or std::map in the &quot;Locals and Expressions&quot; view. It is not strictly necessary for debugging with Qt Creator. </p></body></html> <html><head/><body> <p>除錯小助手主要是提供更好的特定型態的物件顯示,如在局部變數與表示式檢視中的 QString 或 std::map 型態等。但它不是在 Qt Creator 除錯時必要的工具。</p></body></html> - Use Debugging Helper 使用除錯小助手 - Makes use of Qt Creator's code model to find out if a variable has already been assigned a value at the point the debugger interrupts. 使用 Qt Creator 的代碼模型,可以查出一個變數在除錯中斷時是否已經被指定數值。 - Use code model 使用代碼模型 - Displays names of QThread based threads. 顯示基於 QThread 的執行緒的名稱。 - Display thread names 顯示執行緒名稱 - Show 'std::' prefix for types from the standard library. - Show "std::" namespace for types - Show Qt namespace prefix for Qt types. This is only relevant if Qt was configured with '-qtnamespace'. - Show Qt's namespace for types @@ -3601,62 +2948,50 @@ Qt Creator cannot attach to it. Debugger::Internal::GdbEngine - The last waitFor...() function timed out. The state of QProcess is unchanged, and you can try calling waitFor...() again. 最近的 waitFor...() 函式發生逾時。QProcess 的狀態未改變。您可以試著再次呼叫 waitFor...()。 - An exception was triggered. 觸發了一個例外情形。 - An exception was triggered: 觸發了一個例外情形: - Library %1 loaded 函式庫 %1 已載入 - Library %1 unloaded 函式庫 %1 已卸載 - Thread group %1 created 執行緒群組 %1 已建立 - Thread %1 created 執行緒 %1 已建立 - Thread group %1 exited 執行緒群組 %1 已離開 - Thread %1 in group %2 exited 群組 %2 中的執行緒 %1 已離開 - Thread %1 selected 已選取執行緒 %1 - Setting breakpoints failed 設定中斷點失敗 - Executable Failed 執行失敗 @@ -3671,27 +3006,22 @@ Qt Creator cannot attach to it. %2 - The gdb process crashed some time after starting successfully. Gdb 行程在成功啟動一段時間後崩潰了。 - The gdb process was ended forcefully Gdb 行程被強制結束 - An error occurred when attempting to write to the gdb process. For example, the process may not be running, or it may have closed its input channel. 試著寫入 Gdb 行程時發生錯誤。可能的原因包括行程並未執行,或者行程關閉了自己的輸入通道。 - An error occurred when attempting to read from the gdb process. For example, the process may not be running. 嘗試從 Gdb 行程讀取時發生錯誤。可能的原因為行程並未執行。 - An unknown error in the gdb process occurred. Gdb 行程發生了未知的錯誤。 @@ -3704,27 +3034,22 @@ You can choose between waiting longer or abort debugging. - GDB not responding GDB 未回應 - Give GDB more time 繼續等待 GDB - Application exited with exit code %1 應用程式已離開,離開代碼 %1 - Application exited after receiving signal %1 應用程式接收到信號 %1 後退出 - Application exited normally 應用程式正常離開 @@ -3733,17 +3058,14 @@ You can choose between waiting longer or abort debugging. 正在載入 %1... - Value changed from %1 to %2. 值從 %1 變到 %2。 - Normal 正常 - Displayed 已顯示 @@ -3752,27 +3074,22 @@ You can choose between waiting longer or abort debugging. 執行檔格式 '%1' 沒有可用的 gdb 執行檔 - Cannot Read Symbols 無法讀取符號 - Cannot read symbols for module "%1". 無法為模組 "%1" 讀取符號。 - Retrieving data for stack view thread 0x%1... 正在擷取執行緒 0x%1 的堆疊檢視的資料... - Cannot read widget data: %1 無法讀取元件資料:%1 - Could not find a widget. 無法找到元件。 @@ -3781,7 +3098,6 @@ You can choose between waiting longer or abort debugging. 在除錯工具設定 (%1) 中必須指定 gdb 的絕對路徑。 - GDB I/O Error GDB I/O 錯誤 @@ -3794,79 +3110,64 @@ You can choose between waiting longer or abort debugging. gdb 行程未預期地終止 (代碼%1) - Unexpected GDB Exit GDB 未預期地離開 - Setting up inferior... 正在設定底層... - Failed to start application: 啟動應用程式失敗: - Failed to start application 啟動應用程式失敗 - Stop requested... 停止請求的操作... - Stop debugging 停止除錯 - Executable failed 執行失敗 - Executable failed: %1 執行失敗:%1 - Continuing after temporary stop... 暫停後繼續... - Running requested... 執行請求的工作中... - The gdb process failed to start. Either the invoked program "%1" is missing, or you may have insufficient permissions to invoke the program. %2 - Missing debug information for %1 Try: %2 - Stopping temporarily 暫時停止 - Processing queued commands 處理佇列中的指令中 - The gdb process has not responded to a command within %n second(s). This could mean it is stuck in an endless loop or taking longer than expected to perform the operation. You can choose between waiting longer or aborting debugging. @@ -3874,258 +3175,207 @@ You can choose between waiting longer or aborting debugging. - Process failed to start 行程啟動失敗 - Raw structure 原始結構 - There is no GDB binary available for binaries in format '%1' - Step requested... 請求單步執行... - Step by instruction requested... 請求單步執行指令... - Finish function requested... 請求完成函式... - Step next requested... 請求執行下一步... - Step next instruction requested... 請求執行下條指令... - Run to line %1 requested... 請求執行到第 %1 行... - Run to function %1 requested... 請求執行到函式 %1 ... - Immediate return from function requested... 請求立即從函式中返回... - This does not seem to be a "Debug" build. Setting breakpoints by file name and line number may fail. - Found. - Not Found. - Section %1: %2 - Warning 警告 - The gdb process could not be stopped: %1 Gdb 行程無法停止: %1 - Application process could not be stopped: %1 應用程式無法被停止: %1 - Application started 應用程式已啟動 - Application running 應用程式執行中 - Attached to stopped application 附加到已停止的應用程式 - Connecting to remote server failed: %1 連接遠端伺服器失敗: %1 - Dumper version %1, %n custom dumpers found. 傾印器版本 %1,找到 %n 個自訂傾印器。 - The debugging helper library was not found at %1. 在 %1 中找不到除錯小助手函式庫。 - Disassembler failed: %1 反組譯失敗:%1 - Failed to shut down application 關閉應用程式失敗 - - Snapshot Creation Error 建立快照發生錯誤 - Cannot create snapshot file. 無法建立快照檔案。 - Cannot create snapshot: 無法建立快照: - Finished retrieving data 取得資料完成 - The gdb process terminated. - The gdb process terminated unexpectedly (code %1) - Adapter start failed 適配器啟動失敗 - - Setting breakpoints... 正在設定中斷點... - Jumped. Stopped 已跳轉。動作已停止 - Target line hit. Stopped 到達目標行。動作已停止 - - Execution Error 執行錯誤 - - Cannot continue debugged process: 無法繼續除錯行程: - Adapter crashed 適配器崩潰 - Reading %1... 讀取 %1 中... - Stopped. 已停止。 - Cannot find debugger initialization script 無法找到除錯工具初始化的腳本 - The debugger settings point to a script file at '%1' which is not accessible. If a script file is not needed, consider clearing that entry to avoid this warning. 除錯工具的設定指向一個無法讀取的腳本 '%1'。若該腳本檔案不是必須的,您可以考慮清掉該設定來避免此項警告。 - Retrieving data for stack view... 正在取得堆疊檢視的資料... - Retrieving data for watch view (%n requests pending)... 正在取得監看檢視的資料 (%n 個請求被暫停)... - <0 items> <0 項> - <%n items> In string list @@ -4133,46 +3383,38 @@ Section %1: %2 - Debugging helpers: Qt version mismatch 除錯小助手:Qt 版本不符 - The Qt version used to build the debugging helpers (%1) does not match the Qt version used to build the debugged application (%2). This might yield incorrect results. 用於編譯除錯小助手的 Qt 版本 (%1) 與用於編譯要除錯的應用程式的 Qt 版本 (%2) 不符。 這樣可能導致不正確的結果。 - Debugging helpers not found. 找不到除錯小助手。 - Custom dumper setup: %1 自訂傾印器設定:%1 - <shadowed> Type of local variable or parameter shadowed by another variable of the same name in a nested block. 局部變數或參數被另一個區塊中相同名稱的變數給遮蔽 <被遮蔽> - <n/a> <n/a> - <anonymous union> <匿名聯合> - <no information> About variable's value <沒有資訊> @@ -4181,12 +3423,10 @@ This might yield incorrect results. Debugger::Internal::GdbOptionsPage - General 一般 - GDB timeout: GDB 逾時: @@ -4201,12 +3441,10 @@ on slow machines. In this case, the value should be increased. 在這種情況下,要增加此數值。 - sec - Skip known frames when stepping 當單步執行時跳過已知的框架 @@ -4218,7 +3456,6 @@ emission ends up directly in the slot connected to it. 允許「單步進入」將多個步驟合併到一個步驟,以減少除錯時的冗餘情況。例如,最小參考計算(atomic reference counting)代碼就會被跳過,一個發射信號的「單步進入」會直接跳到它的信號槽等等。 - Show a message box when receiving a signal 當收到信號時顯示訊息盒 @@ -4228,7 +3465,6 @@ receives a signal like SIGSEGV during debugging. 在您的應用程式除錯時,若收到系統信號,如 SIGSEGV,會立即顯示一個訊息盒。 - The number of seconds Qt Creator will wait before it terminates a non-responsive GDB process. The default value of 20 seconds should be sufficient for most applications, but there are situations when @@ -4237,7 +3473,6 @@ that on slow machines. In this case, the value should be increased. - <html><head/><body><p>Allows <i>Step Into</i> to compress several steps into one step for less noisy debugging. For example, the atomic reference counting code is skipped, and a single <i>Step Into</i> for a signal @@ -4245,18 +3480,15 @@ emission ends up directly in the slot connected to it. - Displays a message box as soon as your application receives a signal like SIGSEGV during debugging. - Adjust breakpoint locations 調整中斷點位置 - GDB allows setting breakpoints on source lines for which no code was generated. In such situations the breakpoint is shifted to the next source code line for which code was actually generated. @@ -4265,48 +3497,39 @@ markers in the source code editor. GDB 允許中斷點設定在一個不會產生代碼的地方。這種情況下,中斷點會被移到下一個會產生代碼的源碼行。這個選項會在程式源碼編輯器中顯示出中斷點標記被移動後的位置。 - Use dynamic object type for display 顯示時使用動態物件型態 - Specifies whether the dynamic or the static type of objects will be displayed. Choosing the dynamic type might be slower. - Allows or inhibits reading the user's default .gdbinit file on debugger startup. - Warn when debugging "Release" builds - Show a warning when starting the debugger on a binary with insufficient debug information. - <html><head/><body>Add common paths to locations of debug information such as <i>/usr/src/debug</i> when starting GDB.</body></html> - <html><head/><body><p>Enable stepping backwards.</p><p><b>Note:</b> This feature is very slow and unstable on the GDB side. It exhibits unpredictable behavior when going backwards over system calls and is very likely to destroy your debugging session.</p></body></html> - Attempt quick start - <html><head/><body>Postpone reading debug information as long as possible. This can result in faster startup times at the price of not being able to set breakpoints by file and number.</body></html> @@ -4315,7 +3538,6 @@ markers in the source code editor. 這個選項指定是要顯示物件的動態還是靜態型態。選擇動態型態可能會變較慢。 - Load .gdbinit file on startup 啟動時載入 gdbinit 檔 @@ -4325,22 +3547,18 @@ markers in the source code editor. 在除錯工具啟動時是否要讀取使用者預設的 .gdbinit 檔。 - The options below should be used with care. 底下的選項請小心使用。 - <html><head/><body>The options below give access to advanced or experimental functions of GDB. Enabling them may negatively impact your debugging experience.</body></html> - Use asynchronous mode to control the inferior 使用非同步模式來控制底層 - Use common locations for debug information 除錯資訊使用共用位置 @@ -4362,7 +3580,6 @@ at debugger startup. 當 raise() 被呼叫時停止 - Enable reverse debugging 開啟反向除錯 @@ -4371,17 +3588,14 @@ at debugger startup. <html><head/><body><p>這個選項會開啟反向除錯。</p><.p><b>注意:</b>這個功能會造成速度變很慢,並且在 GDB 端會變得不穩定。它在跑回系統呼叫時,行為會變得無法預測,並且可能會毀掉您的除錯工作階段。</p><body></html> - Additional Startup Commands 額外的啟動指令 - <html><head/><body><p>GDB commands entered here will be executed after GDB has been started and the debugging helpers have been initialized.</p><p>You can add commands to load further debugging helpers here, or modify existing ones.</p><p>To execute arbitrary Python scripts, use <i>python execfile('/path/to/script.py')</i>.</p></body></html> - GDB GDB @@ -4442,7 +3656,6 @@ at debugger startup. Debugger::Internal::ModulesWindow - Modules 模組 @@ -4498,17 +3711,14 @@ at debugger startup. Debugger::Internal::OutputCollector - Cannot create temporary file: %1 無法建立暫存檔:%1 - Cannot create FiFo %1: %2 無法建立 Fifo %1:%2 - Cannot open FiFo %1: %2 無法開啟 Fifo %1:%2 @@ -4516,12 +3726,10 @@ at debugger startup. Debugger::Internal::RegisterHandler - Name 名稱 - Value (Base %1) 值 (%1進位) @@ -4529,7 +3737,6 @@ at debugger startup. Debugger::Internal::RegisterWindow - Registers 暫存器 @@ -4585,37 +3792,30 @@ at debugger startup. Debugger::Internal::ScriptEngine - Error: 錯誤: - Running requested... 執行請求... - '%1' contains no identifier. '%1' 不包含識別子。 - String literal %1. 字串常數 %1。 - Cowardly refusing to evaluate expression '%1' with potential side effects. 因為有可能的副作用,因此拒絕計算表示式 '%1'。 - Stopped at %1:%2. 在 %1:%2 處停止。 - Stopped. 已停止。 @@ -4623,7 +3823,6 @@ at debugger startup. Debugger::Internal::SourceFilesWindow - Source Files 源碼檔 @@ -4643,93 +3842,70 @@ at debugger startup. Debugger::Internal::StackHandler - ... ... - <More> <更多> - Level 等級 - Function 函式 - File 檔案 - Line 行號 - Address 位址 - - Address: 位址: - - Function: 函式: - - File: 檔案: - - Line: 行號: - - From: 從: - - To: 到: - Note: - Sources for this frame are available.<br>Double-click on the file name to open an editor. - Binary debug information is not accessible for this frame. This either means the core was not compiled with debug information, or the debug information is not accessible. Note that most distributions ship debug information in separate packages. - Binary debug information is accessible for this frame. However, matching sources have not been found. Note that some distributions ship debug sources in separate packages. @@ -4737,77 +3913,62 @@ at debugger startup. Debugger::Internal::ThreadsHandler - Thread&nbsp;id: 執行緒&nbsp;代碼: - Target&nbsp;id: 目標&nbsp;代碼: - Name: 名稱: - State: 狀態: - Core: Core 檔: - Stopped&nbsp;at: 停止&nbsp;於: - ID 代碼 - Function 函式 - File 檔案 - Line 行號 - Address 位址 - Core Core 檔 - State 狀態 - Target ID 目標代碼 - Name 名稱 @@ -4815,7 +3976,6 @@ at debugger startup. Debugger::Internal::StackWindow - Stack 堆疊 @@ -4989,7 +4149,6 @@ at debugger startup. 執行緒 - Threads 執行緒 @@ -4997,13 +4156,11 @@ at debugger startup. Debugger::Internal::WatchData - <not in scope> Value of variable in Debugger Locals display for variables out of scope (stopped above initialization). <不在範圍內> - %1 <shadowed %2> Display of variables shadowed by variables of the same name in nested scopes: Variable %1 is the variable name, %2 is a simple count. %1 <遮蔽了 %2> @@ -5012,42 +4169,34 @@ at debugger startup. Debugger::Internal::WatchHandler - Expression 表示式 - Internal Type 內部型態 - Displayed Type 顯示型態 - ... <cut off> ... <以下省略> - Object Address 物件位址 - Referencing Address 參考位址 - Static Object Size - %n bytes @@ -5058,7 +4207,6 @@ at debugger startup. 大小 - Internal ID 內部代碼 @@ -5067,7 +4215,6 @@ at debugger startup. 產生 - <Edit> <編輯> @@ -5076,7 +4223,6 @@ at debugger startup. - Name 名稱 @@ -5093,34 +4239,28 @@ at debugger startup. 工具提示 - <empty> <空> - <uninitialized> <未初始化> - <invalid> <無效> - <not accessible> <無法存取> - <more than %n items> <超過 %n 個項目> - <%n items> <%n 個項目> @@ -5167,12 +4307,10 @@ at debugger startup. 八進位 - %1 Object at %2 在 %2 的 %1 物件 - %1 Object at Unknown Address 未知地址處的 %1 物件 @@ -5181,7 +4319,6 @@ at debugger startup. 監視器 - Value @@ -5189,110 +4326,86 @@ at debugger startup. Debugger::Internal::WatchModel - Root - Locals 局部 - Inspector - Expressions - Return Value 回傳值 - Tooltip 工具提示 - <Edit> <編輯> - returned value 回傳值 - Name 名稱 - Value - Type 型態 - Raw pointer 原始指標 - - Latin1 string Latin1 字串 - - UTF8 string UTF8 字串 - - Local 8bit string 本地 8 位元字串 - UTF16 string UTF16 字串 - UCS4 string UCS4 字串 - Decimal 十進位 - Hexadecimal 十六進位 - Binary 二進位 - Octal 八進位 @@ -5390,7 +4503,6 @@ at debugger startup. 局部變數於 0x%1 的記憶體佈局 - Locals and Expressions 局部變數與表示式 @@ -5522,12 +4634,10 @@ at debugger startup. DependenciesModel - Unable to Add Dependency 無法新增相依性 - This would create a circular dependency. 這會建立循環的相依性。 @@ -5551,29 +4661,24 @@ at debugger startup. 無法寫入檔案。磁碟空間是否已滿? - Designer 設計師 - Class Generation 產生類別 - Form Editor 表單編輯器 - The generated header of the form '%1' could not be found. Rebuilding the project might help. 找不到表單 "%1" 所產生的標頭檔。 重新建置此專案可能有幫助。 - The generated header '%1' could not be found in the code model. Rebuilding the project might help. 代碼模型中找不到產生的標頭 "%1"。 @@ -5583,17 +4688,14 @@ Rebuilding the project might help. Designer::Internal::FormClassWizardDialog - Qt Designer Form Class Qt 設計器表單類別 - Form Template 表單樣本 - Class Details 類別詳情 @@ -5601,17 +4703,14 @@ Rebuilding the project might help. Designer::Internal::FormClassWizardPage - %1 - Error %1 - 錯誤 - Class 類別 - Choose a Class Name 選擇類別名稱 @@ -5619,22 +4718,18 @@ Rebuilding the project might help. Designer::Internal::FormEditorPlugin - Qt Designer Form Qt 設計師表單 - Creates a Qt Designer form that you can add to a Qt Widget Project. This is useful if you already have an existing class for the UI business logic. 建立 Qt 設計師表單,讓您可以新增到 Qt 元件專案中。這在您已經有現成的使用者介面類別時很好用。 - Creates a Qt Designer form along with a matching class (C++ header and source file) for implementation purposes. You can add the form and class to an existing Qt Widget Project. 建立 Qt 設計師表單以及對應的類別檔(包括 C++ 標頭檔與源碼檔),讓您可以新增到 Qt 元件專案中直接進行實作。 - Qt Designer Form Class Qt 設計師表單類別 @@ -5642,35 +4737,26 @@ Rebuilding the project might help. Designer::Internal::FormEditorW - Widget Box 元件盒 - - Object Inspector 物件查看器 - - Property Editor 屬性編輯器 - - Action Editor 動作編輯器 - F3 F3 - F4 F4 @@ -5679,17 +4765,14 @@ Rebuilding the project might help. Meta+H - Ctrl+H Ctrl+H - Ctrl+L Ctrl+L - Meta+L Meta+L @@ -5698,98 +4781,78 @@ Rebuilding the project might help. Mega+G - Ctrl+G Ctrl+G - Meta+J Mega+J - Ctrl+J Ctrl+J - Alt+Shift+R - Switch Source/Form 切換源碼/表單 - Shift+F4 Shift+F4 - - Signals && Slots Editor 信號與信號槽編輯器 - Widget box 元件盒 - For&m Editor 表單編輯器(&M) - Edit Widgets 編輯元件 - Edit Signals/Slots 編輯信號/信號槽 - Edit Buddies 編輯夥伴 - Edit Tab Order 編輯 Tab 順序 - Meta+Shift+H - Meta+Shift+G - About Qt Designer plugins.... 關於 Qt 設計師外掛程式... - Preview in 預覽於 - Designer 設計師 - The image could not be created: %1 無法建立影像:%1 @@ -5797,12 +4860,10 @@ Rebuilding the project might help. Designer::Internal::FormTemplateWizardPage - Choose a Form Template 選擇表單樣本 - %1 - Error %1 - 錯誤 @@ -5810,12 +4871,10 @@ Rebuilding the project might help. Designer::Internal::FormWizardDialog - Qt Designer Form Qt 設計師表單 - Form Template 表單樣本 @@ -5823,31 +4882,26 @@ Rebuilding the project might help. Designer::Internal::QtCreatorIntegration - The class containing '%1' could not be found in %2. Please verify the #include-directives. 此類別包含 '%1',但是在 %2 中找不到。 請檢查是否有經由 #include 引入。 - Error finding/adding a slot. 尋找/新增信號槽時發生錯誤。 - Internal error: No project could be found for %1. 內部錯誤:找不到 %1 的專案。 - No documents matching '%1' could be found. Rebuilding the project might help. 找不到符合 '%1'的文件。 重新建置專案可能有幫助。 - Unable to add the method definition. 無法新增方法定義。 @@ -5855,57 +4909,46 @@ Rebuilding the project might help. ExtensionSystem::Internal::PluginDetailsView - Name: 名稱: - Version: 版本: - Vendor: 製造商: - Location: 位置: - Description: 描述: - Copyright: 版權: - License: 授權: - Dependencies: 相依性: - Group: 群組: - Compatibility version: 相容版本: - URL: 網址: @@ -5913,12 +4956,10 @@ Rebuilding the project might help. ExtensionSystem::Internal::PluginErrorView - State: 狀態: - Error message: 錯誤訊息: @@ -5926,12 +4967,10 @@ Rebuilding the project might help. ExtensionSystem::Internal::PluginSpecPrivate - Cannot open file %1 for reading: %2 無法開啟檔案 %1 以讀取:%2 - Error parsing file %1: %2, at line %3, column %4 剖析檔案時發生錯誤 %1:%2,於第 %3 行第 %4 欄 @@ -5939,22 +4978,18 @@ Rebuilding the project might help. ExtensionSystem::Internal::PluginView - Name 名稱 - Version 版本 - Vendor 製造商 - Load 載入 @@ -5962,82 +4997,66 @@ Rebuilding the project might help. ExtensionSystem::PluginErrorView - Invalid 無效 - Description file found, but error on read 找到描述檔,但是讀取時發生錯誤 - Read 讀取 - Description successfully read 成功讀取描述 - Resolved 已解決 - Dependencies are successfully resolved 成功解決相依性問題 - Loaded 已載入 - Library is loaded 函式庫已載入 - Initialized 已初始化 - Plugin's initialization method succeeded 外掛程式初始化成功 - Running 執行中 - Plugin successfully loaded and running 外掛程式已成功載入並執行 - Stopped 已停止 - Plugin was shut down 外掛程式已被關閉 - Deleted 已刪除 - Plugin ended its life cycle and was deleted 外掛程式結束了其生命週期並且已被刪除 @@ -6045,26 +5064,21 @@ Rebuilding the project might help. ExtensionSystem::PluginManager - Circular dependency detected: 偵測到循環的相依性: - %1(%2) depends on %1(%2) 相依於 - %1(%2) %1(%2) - - Cannot load plugin because dependency failed to load: %1(%2) Reason: %3 無法載入外掛程式,因為無法載入相依性套件:%1(%2) @@ -6074,12 +5088,10 @@ Reason: %3 FakeVim::Internal - Use Vim-style Editing 使用 Vim 風格編輯 - Read .vimrc 讀取 .vimrc @@ -6087,113 +5099,90 @@ Reason: %3 FakeVim::Internal::FakeVimHandler - Not implemented in FakeVim 在 FakeVim 中尚未實作 - %1%2% %1%2% - %1All %1所有 - - "%1" %2 %3L, %4C written "%1" %2 %3 行,%4 字元 已寫入 - "%1" %2L, %3C "%1" %2 行,%3 字元 - %n lines filtered 已過濾 %n 行 - Mark '%1' not set 未設置 '%1' 標記 - Unknown option: 未知選項: - File "%1" exists (add ! to override) 檔案 "%1" 已存在 (加上 ! 可覆寫) - Cannot open file "%1" for writing 無法開啟檔案 "%1" 以寫入 - Cannot open file "%1" for reading 無法開啟檔案 "%1" 以讀取 - %n lines %1ed %2 time %n 行 執行命令%1 %2 次 - Cannot open file %1 無法開啟檔案 %1 - Pattern not found: %1 找不到樣式:%1 - search hit BOTTOM, continuing at TOP 搜尋到底部了,繼續從頂端開始搜尋 - search hit TOP, continuing at BOTTOM 搜尋到頂端了,繼續從底部開始搜尋 - Invalid regular expression: %1 - Already at oldest change 已經處於最舊的改變了 - Already at newest change 已經處於最新的改變了 - - Unknown option: %1 未知選項:%1 - Argument must be positive: %1=%2 參數必須為正值:%1=%2 @@ -6201,127 +5190,102 @@ Reason: %3 FakeVim::Internal::FakeVimOptionPage - General 一般 - FakeVim FakeVim - Use FakeVim 使用 FakeVim - Read .vimrc 讀取 .vimrc - Vim Behavior Vim 行為 - Automatic indentation 自動縮排 - Start of line 行首 - Smart indentation 智慧縮排 - Use search dialog 使用搜尋對話框 - Expand tabulators 展開定位點 - Show position of text marks 顯示文字標記的位置 - Smart tabulators 智慧定位點 - Pass key sequences like Ctrl-S to Qt Creator core instead of interpreting them in FakeVim. This gives easier access to Qt Creator core functionality at the price of losing some features of FakeVim. 將組合鍵,如 Ctrl-S 傳送到 Qt Creator 的核心,而不是交由 FakeVim 來解譯。這樣可以讓您更容易地使用 Qt Creator 的核心功能,但是也因此會犧牲一些 FakeVim 的功能。 - Pass control key 傳遞控制鍵 - Highlight search results 突顯搜尋結果 - Incremental search 遞增式搜尋 - Shift width: 位移寬度: - Vim tabstop option Vim 的定位點選項 - Tabulator size: 定位點大小: - Backspace: 返回鍵: - Keyword characters: 關鍵字字元: - Copy Text Editor Settings 複製文字編輯器設定 - Set Qt Style 設定 Qt 風格 - Set Plain Style 設定普通風格 - Use smartcase @@ -6329,49 +5293,40 @@ Reason: %3 FakeVim::Internal::FakeVimPluginPrivate - Meta+V,Meta+V - Alt+V,Alt+V - Execute User Action #%1 執行使用者動作 #%1 - Meta+V,%1 - Alt+V,%1 - File not saved 檔案未儲存 - Saving succeeded 已成功儲存 - %n files not saved %n 個檔案未儲存 - FakeVim Information FakeVim 資訊 @@ -6379,12 +5334,10 @@ Reason: %3 FilterNameDialogClass - Add Filter Name 新增過濾器名稱 - Filter Name: 過濾器名稱: @@ -6392,37 +5345,30 @@ Reason: %3 Find::Internal::FindDialog - &Search 搜尋(&S) - Sco&pe: 範圍(&P): - Sear&ch for: 搜尋(&C): - Case sensiti&ve 區分大小寫(&V) - Whole words o&nly 比對整個單字(&N) - Use re&gular expressions 使用正規表示式(&G) - Search && &Replace 搜尋並取代(&R) @@ -6430,100 +5376,78 @@ Reason: %3 Find::Internal::FindToolBar - Find/Replace 搜尋/取代 - Enter Find String 輸入搜尋字串 - Ctrl+E Ctrl+E - Find Next 尋找下一個 - Find Previous 尋找前一個 - - Shift+Enter Shift+Enter - - Shift+Return Shift+Return - Find Next (Selected) - Ctrl+F3 Ctrl+F3 - Find Previous (Selected) - Ctrl+Shift+F3 Ctrl+Shift+F3 - Replace 取代 - - Replace && Find 取代並搜尋 - Ctrl+= Ctrl+= - Replace && Find Previous 取代並且搜尋前一個 - Replace All 全部取代 - Case Sensitive 區分大小寫 - Whole Words Only 比對整個單字 - Use Regular Expressions 使用正規表示式 @@ -6531,42 +5455,34 @@ Reason: %3 Find::Internal::FindWidget - Find 尋找 - Find: 尋找: - Replace with: 取代為: - ... ... - Replace 取代 - Replace && Find 取代並搜尋 - Replace All 全部取代 - Advanced... 進階... @@ -6574,28 +5490,22 @@ Reason: %3 Find::SearchResultWindow - Search Results 搜尋結果 - New Search 新搜尋 - - Expand All 全部展開 - %1 %2 %1 %2 - Collapse All 全部摺疊 @@ -6603,17 +5513,14 @@ Reason: %3 GenericProjectManager::Internal::GenericBuildConfigurationFactory - Build 建置 - New Configuration 新設置 - New configuration name: 新設置名稱: @@ -6621,7 +5528,6 @@ Reason: %3 GenericProjectManager::Internal::GenericBuildSettingsWidget - Build directory: 建置目錄: @@ -6634,7 +5540,6 @@ Reason: %3 <無效的工具鍊> - Generic Manager 一般管理器 @@ -6642,13 +5547,11 @@ Reason: %3 GenericProjectManager::Internal::GenericMakeStepConfigWidget - Make GenericMakestep display name. Make - Override %1: 覆蓋 %1: @@ -6656,12 +5559,10 @@ Reason: %3 GenericProjectManager::Internal::GenericProjectWizard - Import Existing Project 匯入現有專案 - Imports existing projects that do not use qmake, CMake or Autotools. This allows you to use Qt Creator as a code editor. 匯入現有不使用 qmake、CMake 或 Autotools 的專案。這能讓您使用 Qt Creator 做為源碼編輯器。 @@ -6669,37 +5570,30 @@ Reason: %3 GenericProjectManager::Internal::GenericProjectWizardDialog - Import Existing Project 匯入現有專案 - Project Name and Location 專案名稱與位置 - Project name: 專案名稱: - Location: 位置: - File Selection 檔案選擇 - Location 位置 - Files 檔案 @@ -6707,62 +5601,50 @@ Reason: %3 Git::Internal::BranchDialog - Checkout 取出 - Checkout branch? - Would you like to delete the <b>unmerged</b> branch '%1'? 您想要刪除<b>未合併的</b>分支 '%1' 嗎? - Delete Branch 刪除分支 - Would you like to delete the branch '%1'? 您要刪除分支 '%1' 嗎? - Branches 分支 - Re&fresh 刷新(&F) - &Add... 新增(&A)... - &Remove 移除(&R) - &Diff 比較(&D) - &Log 紀錄(&L) - &Checkout 取出(&C) @@ -6770,37 +5652,30 @@ Reason: %3 Git::Internal::ChangeSelectionDialog - Select a Git Commit 選擇一個 Git 提交紀錄 - Select Working Directory 選擇工作目錄 - Error 錯誤 - Selected directory is not a Git repository 選擇的目錄並非 Git 主目錄 - Working directory: 工作目錄: - Select 選擇 - Change: 變更: @@ -6808,37 +5683,30 @@ Reason: %3 Git::Internal::GitClient - Waiting for data... 等待資料中... - Git Diff Git Diff - Git Log Git Log - Invalid revision 無效的版本 - Description: 描述: - Stash Description Stash 描述 - Changes 變更 @@ -6847,7 +5715,6 @@ Reason: %3 您並未取出分支。 - Committed %n file(s). @@ -6855,185 +5722,150 @@ Reason: %3 - Cannot determine the repository for "%1". 無法決定 "%1" 的主目錄。 - Cannot parse the file output. 無法剖析檔案輸出。 - Git Diff "%1" Git Diff "%1" - Git Diff Branch "%1" Git Diff Branch "%1" - - Git Log "%1" Git Log "%1" - Cannot describe "%1". 無法描述 "%1"。 - Git Show "%1" Git Show "%1" - Git Blame "%1" Git Blame "%1" - Cannot checkout "%1" of "%2": %3 Meaning of the arguments: %1: Branch, %2: Repository, %3: Error message 無法取出 "%2" 中的 "%1":%3 - Cannot obtain log of "%1": %2 - Cannot add %n file(s) to "%1": %2 無法新增 %n 個檔案到 "%1":%2 - Cannot remove %n file(s) from "%1": %2 無法從 "%1" 移除 %n 個檔案:%2 - Cannot move from "%1" to "%2": %3 無法從 "%1" 移動到 "%2":%3 - Cannot reset "%1": %2 無法重置 "%1":%2 - Cannot reset %n file(s) in "%1": %2 無法重置 "%1" 中的 %n 個檔案:%2 - Cannot checkout "%1" of %2 in "%3": %4 Meaning of the arguments: %1: revision, %2: files, %3: repository, %4: Error message 無法取出 "%3" 中檔案 %2 的版本 "%1":%4 - Cannot find parent revisions of "%1" in "%2": %3 Failed to find parent revisions of a SHA1 for "annotate previous" 找不到 "%2" 中的 "%1" 的父版本:%3 - Cannot retrieve branch of "%1": %2 無法取得分支 "%1":%2 - Cannot retrieve top revision of "%1": %2 無法取得 "%1" 的頂端版本:%2 - Cannot describe revision "%1" in "%2": %3 無法描述版本 "%1" 於 "%2":%3 - Cannot stash in "%1": %2 無法暫存(stash)於 "%1":%2 - Cannot resolve stash message "%1" in "%2". Look-up of a stash via its descriptive message failed. 無法解析 "%2" 的暫存(stash)訊息 "%1"。 - Cannot run "git branch" in "%1": %2 無法在 "%1" 執行 "git branch":%2 - Cannot run "git remote" in "%1": %2 無法在 "%1" 執行 "git remote":%2 - Cannot run "git show" in "%1": %2 無法在 "%1" 執行 "git show":%2 - Cannot run "git clean" in "%1": %2 無法在 "%1" 執行 "git clean":%2 - There were warnings while applying "%1" to "%2": %3 套用 "%1" 到 "%2" 時發生警告: %3 - Cannot apply patch "%1" to "%2": %3 無法將修補檔 "%1" 套用到 "%2":%3 - Would you like to stash your changes? 您要暫存您的改變嗎? - Cannot obtain status: %1 無法獲得狀態:%1 - Cannot launch "%1". 無法啟動 "%1"。 - The repository "%1" is not initialized. 主目錄(Repository) "%1" 還沒有被初始化。 - Cannot retrieve last commit data of repository "%1". 無法取得主目錄 "%1" 上次提交的資料。 - Amended "%1" (%n file(s)). @@ -7041,12 +5873,10 @@ Reason: %3 - Amended "%1". 修訂了 "%1"。 - Cannot commit %n file(s): %1 @@ -7054,62 +5884,50 @@ Reason: %3 - Revert 復原 - The file has been changed. Do you want to revert it? 檔案已被修改。您要復原它嗎? - The file is not modified. 檔案沒有被變更。 - The command 'git pull --rebase' failed, aborting rebase. 指令 'git pull --rebase' 失敗,中止執行 rebase。 - Git SVN Log Git SVN 紀錄 - There are no modified files. 沒有被變更的檔案。 - Cannot restore stash "%1": %2 無法回復暫存 "%1":%2 - Cannot restore stash "%1" to branch "%2": %3 無法回復暫存 "%1" 到分支 "%2":%3 - Cannot remove stashes of "%1": %2 無法移除 "%1" 的暫存:%2 - Cannot remove stash "%1" of "%2": %3 無法移除 "%2" 的暫存 "%1":%3 - Cannot retrieve stash list of "%1": %2 無法取得 "%1" 的暫存列表:%2 - Cannot determine git version: %1 無法決定 git 的版本:%1 @@ -7117,107 +5935,86 @@ Reason: %3 Git::Internal::GitPlugin - &Git Git(&G) - Diff Current File 比較目前檔案 - Alt+G,Alt+D Alt+G,Alt+D - Log of "%1" "%1" 的紀錄 - Alt+G,Alt+L Alt+G,Alt+L - Blame for "%1" "%1" 的提交紀錄(Blame) - Blame Current File 取得目前檔案提交紀錄 - Alt+G,Alt+B Alt+G,Alt+B - Diff Diff - Status 狀態 - Clean... 清除... - Launch gitk 啟動 gitk - Remotes... 遠端... - Show... 顯示... - Patch 修補檔 - Apply from Editor 從編輯器套用 - Apply from File... 從檔案套用... - Take Snapshot... 取得快照... - Meta+G,Meta+C - Amend Last Commit... 變更最後一個提交... - Diff &Selected Files 比較選取的檔案(&S) @@ -7233,255 +6030,202 @@ Reason: %3 復原變更 - Amend %1 修訂 %1 - Git Commit Git 提交 - Closing Git Editor 關閉 Git 編輯器 - Git will not accept this commit. Do you want to continue to edit it? Git 不接受此次提交。您要繼續編輯嗎? - Repository Clean 主目錄 (Repository) 清理 - Choose Patch 選擇修補檔 - Alt+G,Alt+U Alt+G,Alt+U - Stage File for Commit 暫存檔案以提交 - Diff of "%1" "%1" 的差異比較 - Meta+G,Meta+B - Meta+G,Meta+D - Log Current File 目前檔案紀錄 - Meta+G,Meta+L - Stage "%1" for Commit 暫存 "%1" 以提交 - Alt+G,Alt+A Alt+G,Alt+A - Meta+G,Meta+A - Unstage File from Commit 從提交暫存中取出檔案 - Unstage "%1" from Commit 從提交暫存中取出 "%1" - Undo Unstaged Changes 復原未暫存的變更 - Undo Unstaged Changes for "%1" 復原 "%1" 未暫存的變更 - Undo Uncommitted Changes 復原未提交的變更 - Undo Uncommitted Changes for "%1" 復原 "%1" 未提交的變更 - Meta+G,Meta+U - Diff Current Project 比較目前專案 - Diff Project "%1" 比較專案 "%1" - Alt+G,Alt+Shift+D Alt+G,Alt+Shift+D - Meta+G,Meta+Shift+D - Meta+G,Meta+K - Clean Project... 清理專案... - Clean Project "%1"... 清理專案 "%1"... - Reset... - Launch repository browser - Apply "%1" 套用 "%1" - Create Repository... 建立主目錄... - Saves the current state of your work and resets the repository. 儲存您工作的目前狀態,並重置主目錄。 - Stashes... 暫存檔... - Subversion 子版本 - - Log 紀錄 - - Fetch 抓取 - Unable to retrieve file list 無法取得檔案列表 - The repository is clean. 主目錄已清理乾淨。 - Patches (*.patch *.diff) 修補檔 (*.patch *.diff) - Patch %1 successfully applied to %2 修補 %1 已成功套用於 %2 - Log Project 紀錄專案 - Log Project "%1" 紀錄專案 "%1" - Alt+G,Alt+K Alt+G,Alt+K - - Stash 暫存 - Saves the current state of your work. 儲存您的工作的目前狀態。 - Pull 取出 - Stash Pop 取出暫存 @@ -7490,52 +6234,42 @@ Reason: %3 還原未提交的變更... - Restores changes saved to the stash list using "Stash". 使用 "Stash" 還原儲存在暫存列表中的變更。 - Commit... 提交... - Alt+G,Alt+C Alt+G,Alt+C - Push 提交回上游 - Branches... 分支... - Commit 提交 - &Undo 復原(&U) - &Redo 重做(&R) - Another submit is currently being executed. 另一個提交正在執行中。 - Do you want to commit the change? 您要提交此變更嗎? @@ -7543,7 +6277,6 @@ Reason: %3 Git::Internal::GitSettings - The binary '%1' could not be located in the path '%2' 在路徑 '%2' 中找不到執行檔 '%1' @@ -7551,47 +6284,38 @@ Reason: %3 Git::Internal::GitSubmitPanel - General Information 一般資訊 - Repository: 主目錄: - repository 主目錄 - Branch: 分支: - branch 分支 - Commit Information 提交資訊 - Author: 作者: - Email: 電子郵件: - By&pass hooks @@ -7599,92 +6323,74 @@ Reason: %3 Git::Internal::SettingsPage - <b>Note:</b> <b>注意:</b> - Note that huge amount of commits might take some time. 注意,大量的提交可能需要花費一段時間。 - Git Git - Git Settings Git 設定 - Miscellaneous 雜項 - Timeout: 逾時: - s - Prompt on submit 提交時彈出提示 - Pull with rebase 取得檔案時執行 rebase - Set "HOME" environment variable 設定 "HOME" 環境變數 - Gitk Gitk - Arguments: 參數: - Git needs to find Perl in the environment. Git 需要在環境變數中找到 Perl。 - Log count: 紀錄計數: - Configuration 設置 - Prepend to PATH: 加在 PATH 的前面: - Repository browser - Command: 指令: @@ -7692,7 +6398,6 @@ Reason: %3 Help::Internal::CentralWidget - Print Document 列印文件 @@ -7700,57 +6405,46 @@ Reason: %3 Help::Internal::DocSettingsPage - Documentation 文件 - Add Documentation 新增文件 - Qt Help Files (*.qch) Qt 說明檔 (*.qch) - Invalid documentation file: - Namespace already registered: - Registration failed - Unable to register documentation. - Add and remove compressed help files, .qch. 新增與移除已壓縮的說明檔, .qch。 - Registered Documentation 已註冊的文件 - Add... 新增... - Remove 移除 @@ -7758,34 +6452,26 @@ Reason: %3 Help::Internal::FilterSettingsPage - - Filters 過濾器 - Unfiltered 未過濾 - - No user defined filters available or no filter selected. 沒有使用者定義的過濾器可使用,或者未選取過濾器。 - The filter "%1" will show every documentation file available, as no attributes are specified. 當沒有指定任何屬性時,過濾器 "%1" 會顯示所有可用的文件檔。 - The filter "%1" will only show documentation files that have the attribute %2 specified. 過濾器 "%1" 只會顯示包含屬性 %2 的文件檔。 - The filter "%1" will only show documentation files that have the attributes %2 specified. 過濾器 "%1" 只會顯示包含屬性 %2 的文件檔。 @@ -7800,27 +6486,22 @@ Add, modify, and remove document filters, which determine the documentation set </p></body></html> - Attributes 屬性 - 1 1 - Add 新增 - Remove 移除 - <html><body> <p> Add, modify, and remove document filters, which determine the documentation set displayed in the Help mode. The attributes are defined in the documents. Select them to display a set of relevant documentation. Note that some attributes are defined in several documents. @@ -7831,7 +6512,6 @@ Add, modify, and remove document filters, which determine the documentation set Help::Internal::HelpIndexFilter - Help Index 說明索引 @@ -7839,7 +6519,6 @@ Add, modify, and remove document filters, which determine the documentation set Help::Internal::HelpMode - Help 說明 @@ -7847,215 +6526,166 @@ Add, modify, and remove document filters, which determine the documentation set Help::Internal::HelpPlugin - Contents 內容 - Index 索引 - Search 搜尋 - Bookmarks 書籤 - - Home 首頁 - Report Bug... 回報錯誤... - Previous 前一個 - Next 下一個 - - Add Bookmark 新增書籤 - - Previous Page 前一頁 - - Next Page 下一頁 - Meta+M Meta+M - Ctrl+M Ctrl+M - Context Help 內文說明 - Technical Support 技術支援 - Activate Index in Help mode 在說明模式下啟用索引 - Meta+I - Ctrl+Shift+I - Activate Contents in Help mode 在說明模式下啟用內容 - Meta+Shift+C - Ctrl+Shift+C Ctrl+Shift+C - Activate Search in Help mode 在說明模式下啟用搜尋 - Hide Sidebar 隱藏邊列 - - Increase Font Size 增加字型大小 - - Decrease Font Size 降低字型大小 - - Reset Font Size 重置字型大小 - Meta+/ - Ctrl+Shift+/ - Activate Bookmarks in Help mode 在說明模式下啟用書籤 - Meta+B - Ctrl+Shift+B Ctrl+Shift+B - Open Pages 開啟頁面 - Activate Open Pages in Help mode 在說明模式下啟用開啟頁面 - Meta+O - Ctrl+Shift+O Ctrl+Shift+O - - Show Sidebar - Go to Help Mode 進入說明模式 - Unfiltered 未過濾 - <html><head><title>No Documentation</title></head><body><br/><center><b>%1</b><br/>No documentation available.</center></body></html> <html><head><title>沒有文件</title></head><body><br/><center><b>%1</b><br/>沒有可用文件。</center></body></html> - Close current page 關閉目前頁面 - Filtered by: 過濾方式: @@ -8063,37 +6693,30 @@ Add, modify, and remove document filters, which determine the documentation set Help::Internal::SearchWidget - Indexing 建立索引中 - Indexing Documentation... 正在建立文件索引中... - Open Link 開啟連結 - Open Link as New Page 在新頁面開啟連結 - Copy Link 複製連結 - Copy 複製 - Reload 重新載入 @@ -8101,42 +6724,34 @@ Add, modify, and remove document filters, which determine the documentation set HelpViewer - <title>about:blank</title> <title>空白頁</title> - <html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Error 404...</title></head><body><div align="center"><br><br><h1>The page could not be found</h1><br><h3>'%1'</h3></div></body> <html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>404 錯誤...</title></head><body><div align="center"><br><br><h1>找不到此頁面</h1><br><h3>'%1'</h3></div></body> - Error 404... - The page could not be found! - <li>Check that you have one or more documentation sets installed.</li> - <li>Check that you have installed the appropriate browser plug-in to support the file your loading.</li> - <li>If you try to access a public URL, make sure to have a network connection.</li> - <li>If your computer or network is protected by a firewall or proxy, make sure the application is permitted to access the network.</li> @@ -8144,17 +6759,14 @@ Add, modify, and remove document filters, which determine the documentation set IndexWindow - &Look for: 尋找(&L): - Open Link 開啟連結 - Open Link as New Page 在新頁面開啟連結 @@ -8162,7 +6774,6 @@ Add, modify, and remove document filters, which determine the documentation set Locator - Locator 定位器 @@ -8170,9 +6781,6 @@ Add, modify, and remove document filters, which determine the documentation set MyMain - - - N/A @@ -8180,12 +6788,10 @@ Add, modify, and remove document filters, which determine the documentation set Perforce::Internal::ChangeNumberDialog - Change Number 變更數值 - Change Number: 變更數值: @@ -8193,22 +6799,18 @@ Add, modify, and remove document filters, which determine the documentation set Perforce::Internal::PendingChangesDialog - P4 Pending Changes P4 未完成的變更 - Submit 提交 - Cancel 取消 - Change %1: %2 變更 %1:%2 @@ -8216,430 +6818,342 @@ Add, modify, and remove document filters, which determine the documentation set Perforce::Internal::PerforcePlugin - &Perforce Perforce(&P) - Edit 編輯 - Edit "%1" 編輯 "%1" - Alt+P,Alt+E Alt+P,Alt+E - Edit File 編輯檔案 - Add 新增 - Add "%1" 新增 "%1" - Alt+P,Alt+A Alt+P,Alt+A - Add File 新增檔案 - Delete File 刪除檔案 - Revert 復原 - Revert "%1" 復原 "%1" - Alt+P,Alt+R Alt+P,Alt+R - Revert File 復原檔案 - - Diff Current File 比較目前檔案 - Diff "%1" 比較 "%1" - Diff Current Project/Session 比較目前檔案專案/工作階段 - Diff Project "%1" 比較專案 "%1" - Alt+P,Alt+D Alt+P,Alt+D - Diff Opened Files 比較已開啟的檔案 - Opened 已開啟 - Alt+P,Alt+O Alt+P,Alt+O - Submit Project 提交專案 - Submit Project "%1" 提交專案 "%1" - Alt+P,Alt+S Alt+P,Alt+S - Pending Changes... 未完成的變更... - Update Project "%1" 更新專案 "%1" - Revert Project 復原專案 - Revert Project "%1" 復原專案 "%1" - Revert Unchanged 復原未變更的內容 - Revert Unchanged Files of Project "%1" 復原專案 %1 中所有未變更的內容 - Describe... 描述... - - Annotate Current File 目前檔案最後註記 - Annotate "%1" 最後註記 "%1" - Annotate... 最後註記... - - Filelog Current File 目前檔案的紀錄 - Filelog "%1" 檔案紀錄 "%1" - Alt+P,Alt+F Alt+P,Alt+F - Filelog... 檔案紀錄... - Update All 全部更新 - Meta+P,Meta+F - Meta+P,Meta+E - Meta+P,Meta+A - Delete... 刪除... - Delete "%1"... 刪除 "%1"... - Meta+P,Meta+R - Meta+P,Meta+D - Log Project 紀錄專案 - Log Project "%1" 紀錄專案 "%1" - Meta+P,Meta+S - Meta+P,Meta+O - Repository Log 主目錄紀錄 - Submit 提交 - &Undo 復原(&U) - &Redo 重做(&R) - - p4 revert p4 復原 - The file has been changed. Do you want to revert it? 檔案已被修改。您要復原它嗎? - Do you want to revert all changes to the project "%1"? 您想復原專案 "%1" 的所有變更嗎? - Another submit is currently executed. 另一個提交正在執行中。 - Project has no files 專案中沒有檔案 - p4 annotate p4 最後註記 - p4 annotate %1 p4 最後註記 %1 - p4 filelog p4 檔案紀錄 - p4 filelog %1 p4 檔案紀錄 %1 - The process terminated with exit code %1. 行程已終止,離開代碼 %1。 - The commit message check failed. Do you want to submit this change list? 檢查提交訊息失敗。您要提交這個變更列表嗎? - p4 submit failed: %1 p4 提交失敗:%1 - Error running "where" on %1: %2 Failed to run p4 "where" to resolve a Perforce file name to a local file system name. 在 %1 執行 "where" 指令時發生錯誤:%2 - The file is not mapped File is not managed by Perforce 檔案未映射 - Perforce repository: %1 Perforce 主目錄: %1 - Perforce: Unable to determine the repository: %1 Perforce:無法決定主目錄:%1 - The process terminated abnormally. 行程異常終止。 - Update Current Project 更新目前專案 - Diff &Selected Files 比較選取的檔案(&S) - Could not start perforce '%1'. Please check your settings in the preferences. 無法啟動 perforce '%1'。請檢查喜好設定中的設置。 - Perforce did not respond within timeout limit (%1 ms). Perforce 在逾時限制(%1 毫秒)中未回應。 - Unable to write input data to process %1: %2 無法向行程 %1 寫入資料:%2 - Perforce is not correctly configured. Perforce 未正確設置。 - p4 diff %1 指令,還是說明? p4 diff %1 - p4 describe %1 指令,還是說明? p4 describe %1 - Closing p4 Editor 正在關閉 p4 編輯器 - Do you want to submit this change list? 您要提交這個變更列表嗎? - Pending change 未完成的變更 - Could not submit the change, because your workspace was out of date. Created a pending submit instead. 無法提交變更,因為您的工作空間已經過時。已幫您建立了一個「未完成的提交」。 @@ -8647,7 +7161,6 @@ Add, modify, and remove document filters, which determine the documentation set Perforce::Internal::PerforceSubmitEditor - Perforce Submit Perforce 提交 @@ -8655,12 +7168,10 @@ Add, modify, and remove document filters, which determine the documentation set Perforce::Internal::PromptDialog - Perforce Prompt Perforce 提示 - OK 確定 @@ -8668,72 +7179,58 @@ Add, modify, and remove document filters, which determine the documentation set Perforce::Internal::SettingsPage - Perforce Perforce - Test 測試 - Configuration 設置 - Miscellaneous 雜項 - Prompt on submit 提交時彈出提示 - Timeout: 逾時: - s - Log count: 紀錄計數: - P4 command: P4 指令: - P4 client: P4 客戶端: - P4 user: P4 使用者: - P4 port: P4 連接埠: - Environment Variables 環境變數 - Automatically open files when editing 編輯時自動開啟檔案 @@ -8741,17 +7238,14 @@ Add, modify, and remove document filters, which determine the documentation set Perforce::Internal::SettingsPageWidget - Testing... 測試中... - Test succeeded (%1). 測試成功 (%1)。 - Perforce Command Perforce 指令 @@ -8759,22 +7253,18 @@ Add, modify, and remove document filters, which determine the documentation set Perforce::Internal::SubmitPanel - Submit 提交 - Change: 變更: - Client: 客戶端: - User: 使用者: @@ -8782,27 +7272,22 @@ Add, modify, and remove document filters, which determine the documentation set PluginDialog - Details 詳情 - Error Details 錯誤詳情 - Installed Plugins 已安裝的外掛程式 - Plugin Details of %1 外掛程式 %1 的詳情 - Plugin Errors of %1 外掛程式 %1 的錯誤 @@ -8810,24 +7295,18 @@ Add, modify, and remove document filters, which determine the documentation set PluginManager - - The plugin '%1' does not exist. 外掛程式 '%1' 不存在。 - Unknown option %1 未知的選項 %1 - The option %1 requires an argument. 選項 %1 需要參數。 - - Failed Plugins 發生錯誤的外掛程式 @@ -8835,82 +7314,66 @@ Add, modify, and remove document filters, which determine the documentation set PluginSpec - '%1' misses attribute '%2' '%1' 缺少屬性 '%2' - '%1' has invalid format '%1' 格式無效 - Invalid element '%1' 無效的元素 '%1' - Unexpected closing element '%1' 未預期的關閉元素 '%1' - Unexpected token 未預期的符號 - Expected element '%1' as top level element 預期的元素 '%1' 應為頂層元素 - Resolving dependencies failed because state != Read 解決相依性失敗,因為 state != Read - Could not resolve dependency '%1(%2)' 無法解決相依性 '%1(%2)' - Loading the library failed because state != Resolved 載入函式庫失敗,因為 state != Resolved - Plugin is not valid (does not derive from IPlugin) 外掛程式無效 (並非從 IPlugin 衍生) - Initializing the plugin failed because state != Loaded 外掛程式初始化失敗,因為 state != Loaded - Internal error: have no plugin instance to initialize 內部錯誤:沒有外掛程式實體可初始化 - Plugin initialization failed: %1 外掛程式初始化失敗:%1 - Cannot perform extensionsInitialized because state != Initialized 無法執行延伸功能初始化,因為 state != Initialized - Internal error: have no plugin instance to perform extensionsInitialized 內部錯誤:沒有可進行延伸功能初始化的外掛程式實體 - Internal error: have no plugin instance to perform delayedInitialize 內部錯誤:沒有可進行延遲初始化的外掛程式實體 @@ -8918,27 +7381,22 @@ Add, modify, and remove document filters, which determine the documentation set ProjectExplorer::AbstractProcessStep - Starting: "%1" %2 正在啟動:"%1" %2 - The process "%1" exited normally. 行程 "%1" 正常離開。 - The process "%1" exited with code %2. 行程 "%1" 已離開。離開代碼 %2 。 - The process "%1" crashed. 行程 "%1" 已崩潰。 - Could not start process "%1" %2 無法啟動行程 "%1" %2 @@ -8946,54 +7404,42 @@ Add, modify, and remove document filters, which determine the documentation set ProjectExplorer::BuildManager - Finished %1 of %n steps 已完成 %n 個步驟中的 %1 個 - Compile Category for compiler issues listed under 'Issues' 編譯 - Build System Category for build system issues listed under 'Issues' 建置系統 - Build/Deployment canceled 建置/佈署已取消 - Canceled build/deployment. 已取消建置/佈署。 - - - Error while building/deploying project %1 (target: %2) 建置/佈署專案 %1 時發生錯誤(目標平台:%2) - - When executing step '%1' 執行步驟 '%1' 時 - Running steps for project %1... 為專案 %1 執行步驟... - Skipping disabled step %1. 略過被關閉的步驟 %1 。 @@ -9035,48 +7481,39 @@ Add, modify, and remove document filters, which determine the documentation set ProjectExplorer::EnvironmentWidget - &Edit 編輯(&E) - &Add 新增(&A) - &Reset 重置(&R) - &Unset 取消設定(&U) - &Batch Edit... 批次編輯(&B)... - Unset <a href="%1"><b>%1</b></a> 取消設定 <a href="%1"><b>%1</b></a> - Set <a href="%1"><b>%1</b></a> to <b>%2</b> 設定 <a href="%1"><b>%1</b></a> 到 <b>%2</b> - Use <b>%1</b> %1 is "System Environment" or some such. 使用 <b>%1</b> - Use <b>%1</b> and Yup, word puzzle. The Set/Unset phrases above are appended to this. %1 is "System Environment" or some such. 使用 <b>%1</b> 與 @@ -9085,7 +7522,6 @@ Add, modify, and remove document filters, which determine the documentation set ProjectExplorer::Internal::AllProjectsFilter - Files in Any Project 任何專案中的檔案 @@ -9093,24 +7529,20 @@ Add, modify, and remove document filters, which determine the documentation set ProjectExplorer::Internal::AllProjectsFind - All Projects 所有專案 - All Projects: 所有專案: - Filter: %1 %2 過濾器:%1 %2 - Fi&le pattern: 檔案樣式(&L): @@ -9118,84 +7550,67 @@ Add, modify, and remove document filters, which determine the documentation set ProjectExplorer::Internal::BuildSettingsWidget - &Clone Selected 複製選取項目(&C) - No build settings available 沒有可用的建置設定 - Edit build configuration: 編輯建置設定: - Add 新增 - Remove 移除 - - Rename... 重新命名... - New name for build configuration <b>%1</b>: 建置設置的新名稱 <b>%1</b>: - Clone Configuration Title of a the cloned BuildConfiguration window, text of the window 複製設置 - New configuration name: 新設置名稱: - Cancel Build && Remove Build Configuration 取消建置並移除建置設置 - Do Not Remove 不要移除 - Remove Build Configuration %1? 要移除建置設置 %1 嗎? - The build configuration <b>%1</b> is currently being built. 建置設置 <b>%1</b> 正在建置中。 - Do you want to cancel the build process and remove the Build Configuration anyway? 您想要取消建置動作並移除建置設置嗎? - Remove Build Configuration? 要移除建置設置嗎? - Do you really want to delete build configuration <b>%1</b>? 您確定要刪除此建置設置 <b>%1</b> 嗎? @@ -9203,12 +7618,10 @@ Add, modify, and remove document filters, which determine the documentation set ProjectExplorer::Internal::BuildStepsPage - Build Steps 建置步驟 - Clean Steps 清除步驟 @@ -9216,8 +7629,6 @@ Add, modify, and remove document filters, which determine the documentation set ProjectExplorer::Internal::CompileOutputWindow - - Compile Output 編譯輸出 @@ -9225,7 +7636,6 @@ Add, modify, and remove document filters, which determine the documentation set ProjectExplorer::Internal::CurrentProjectFilter - Files in Current Project 目前專案中的檔案 @@ -9233,12 +7643,10 @@ Add, modify, and remove document filters, which determine the documentation set ProjectExplorer::Internal::CurrentProjectFind - Current Project 目前專案 - Project '%1': 專案 '%1': @@ -9285,25 +7693,18 @@ Add, modify, and remove document filters, which determine the documentation set ProjectExplorer::Internal::EditorSettingsPropertiesPage - Editor settings: 編輯器設定: - - Global 全域 - - Custom 自訂 - - Restore Global 回復全域 @@ -9311,22 +7712,18 @@ Add, modify, and remove document filters, which determine the documentation set ProjectExplorer::Internal::FolderNavigationWidgetFactory - File System 檔案系統 - Meta+Y - Alt+Y - Synchronize with Editor 與編輯器同步 @@ -9334,58 +7731,46 @@ Add, modify, and remove document filters, which determine the documentation set ProjectExplorer::Internal::SessionDialog - Session Manager 工作階段管理器 - &New 新增(&N) - &Rename 重新命名(&R) - C&lone 複製(&L) - &Delete 刪除(&D) - &Switch to 切換至(&S) - - New session name 新工作階段名稱 - Rename session 重新命名工作階段 - <a href="qthelp://org.qt-project.qtcreator/doc/creator-project-managing-sessions.html">What is a Session?</a> <a href="qthelp://org.qt-project.qtcreator/doc/creator-project-managing-sessions.html">什麼是工作階段?</a> - Automatically restore the last session when Qt Creator is started. Qt Creator 啟動時自動回復上次的工作階段。 - Restore last session on startup 啟動時回復上次的工作階段 @@ -9393,13 +7778,11 @@ Add, modify, and remove document filters, which determine the documentation set ProjectExplorer::Internal::ProcessStep - Custom Process Step Default ProcessStep display name 自訂行程步驟 - Custom Process Step item in combobox 自訂行程步驟 @@ -9408,7 +7791,6 @@ Add, modify, and remove document filters, which determine the documentation set ProjectExplorer::Internal::ProcessStepConfigWidget - Custom Process Step 自訂行程步驟 @@ -9416,12 +7798,10 @@ Add, modify, and remove document filters, which determine the documentation set ProjectExplorer::Internal::ProcessStepWidget - Command: 指令: - Working directory: 工作目錄: @@ -9430,7 +7810,6 @@ Add, modify, and remove document filters, which determine the documentation set 指令參數: - Arguments: 參數: @@ -9438,7 +7817,6 @@ Add, modify, and remove document filters, which determine the documentation set ProjectExplorer::Internal::ProjectExplorerSettingsPage - General 一般 @@ -9446,18 +7824,15 @@ Add, modify, and remove document filters, which determine the documentation set ProjectExplorer::Internal::ProjectFileFactory - Project File Factory ProjectExplorer::ProjectFileFactory display name. 專案檔案工廠 - Failed to open project 開啟專案失敗 - All Projects 所有專案 @@ -9465,46 +7840,37 @@ Add, modify, and remove document filters, which determine the documentation set ProjectExplorer::Internal::ProjectFileWizardExtension - <Implicitly Add> <隱式新增> - The files are implicitly added to the projects: 檔案已經隱式新增到專案中: - - - <None> No project selected <無> - Failed to add subproject '%1' to project '%2'. 新增子專案 '%1' 到專案 '%2' 失敗。 - Failed to add one or more files to project '%1' (%2). 新增檔案到專案 '%1' 失敗 (%2)。 - A version control system repository could not be created in '%1'. 在 %1 裡無法建立版本控制系統主目錄。 - Failed to add '%1' to the version control system. 新增 '%1' 到版本控制系統失敗。 @@ -9512,17 +7878,14 @@ to project '%2'. ProjectExplorer::Internal::ProjectTreeWidget - Simplify Tree 簡化樹狀圖 - Hide Generated Files 隱藏產生的檔案 - Synchronize with Editor 與編輯器同步 @@ -9530,22 +7893,18 @@ to project '%2'. ProjectExplorer::Internal::ProjectTreeWidgetFactory - Projects 專案 - Meta+X - Alt+X - Filter Tree 過濾樹狀圖 @@ -9553,27 +7912,22 @@ to project '%2'. ProjectExplorer::Internal::ProjectWizardPage - Summary 摘要 - Add as a subproject to project: 新增到專案中做為子專案: - Add to &project: 新增到專案(&P): - Files to be added: 要新增的檔案: - Files to be added in 要新增到此處的檔案 @@ -9600,103 +7954,78 @@ to project '%2'. ProjectExplorer::Internal::RunSettingsWidget - - Add 新增 - - Remove 移除 - Run configuration: 執行設置: - - Run Settings 執行設定 - Deployment 佈署 - Method: 方法: - Run 執行 - Remove Run Configuration? 要移除執行設置嗎? - Do you really want to delete the run configuration <b>%1</b>? 您確定要刪除此執行設置 <b>%1</b> 嗎? - - - - Rename... 重新命名... - New name for run configuration <b>%1</b>: 執行設置 <b>%1</b> 的新名稱: - Cancel Build && Remove Deploy Configuration 取消建置並移除佈署設置 - Do Not Remove 不要移除 - Remove Deploy Configuration %1? 要移除佈署設置 %1 嗎? - The deploy configuration <b>%1</b> is currently being built. 佈署設置 <b>%1</b> 正在建置中。 - Do you want to cancel the build process and remove the Deploy Configuration anyway? 您想要取消建置並移除佈署設置嗎? - Remove Deploy Configuration? 要移除佈署設置嗎? - Do you really want to delete deploy configuration <b>%1</b>? 您確定要刪除此佈署設置 <b>%1</b> 嗎? - New name for deploy configuration <b>%1</b>: 佈署設置 <b>%1</b> 的新名稱: @@ -9704,7 +8033,6 @@ to project '%2'. ProjectExplorer::Internal::TaskDelegate - File not found: %1 找不到檔案:%1 @@ -9712,18 +8040,14 @@ to project '%2'. ProjectExplorer::Internal::TaskWindow - - Issues 問題 - Filter by categories 依分類過濾 - Show Warnings 顯示警告 @@ -9731,7 +8055,6 @@ to project '%2'. ProjectExplorer::Internal::WizardPage - The following files will be added: @@ -9744,22 +8067,18 @@ to project '%2'. - Add to &project: 新增到專案(&P): - Add to &version control: 新增到版本控制系統(&V): - Project Management 專案管理 - Manage... 管理... @@ -9767,67 +8086,54 @@ to project '%2'. ProjectExplorer::ProjectExplorerPlugin - &Build 建置(&B) - &Debug 除錯(&D) - &Start Debugging 開始除錯(&S) - Open With 開啟方式 - Session Manager... 工作階段管理器... - New Project... 新增專案... - Ctrl+Shift+N Ctrl+Shift+N - Load Project... 載入專案... - Ctrl+Shift+O Ctrl+Shift+O - Open File 開啟檔案 - Recent P&rojects 最近使用的專案(&R) - Close Project 關閉專案 - Close Project "%1" 關閉專案 "%1" @@ -9836,291 +8142,231 @@ to project '%2'. 關閉所有專案 - Build All 全部建置 - Ctrl+Shift+B Ctrl+Shift+B - Rebuild All 全部重新建置 - Deploy All 全部佈署 - Clean All 全部清理 - Build Project 建置專案 - Build Project "%1" 建置專案 "%1" - Ctrl+B Ctrl+B - Rebuild Project 重新建置專案 - Rebuild Project "%1" 重新建置專案 "%1" - Deploy Project 佈署專案 - Deploy Project "%1" 佈署專案 "%1" - Publish Project... 發佈專案... - Publish Project "%1"... 發佈專案 "%1"... - Clean Project 清理專案 - Clean Project "%1" 清理專案 "%1" - Build Without Dependencies 建置時忽略相依性 - Rebuild Without Dependencies 重新建置時忽略相依性 - Deploy Without Dependencies 佈署時忽略相依性 - Clean Without Dependencies 清理時忽略相依性 - No active project. 沒有作用中的專案。 - The project '%1' has no active target. 專案 '%1' 沒有作用中的目標。 - The target '%1' for the project '%2' has no active run configuration. 專案 '%2' 的目標 '%1' 沒有作用中的執行設置。 - Cannot run '%1'. 無法執行 '%1'。 - Run %1 執行 %1 - - - Run 執行 - Sessions 工作階段 - Close All Projects and Editors - Ctrl+R Ctrl+R - Run Without Deployment 執行但不佈署 - Rebuild 重新建置 - Rename... 重新命名... - Set as Active Project 設為作用中的專案 - Set "%1" as Active Project - Collapse All 全部摺疊 - Open Build and Run Kit Selector... - Quick Switch Target Selector 快速切換目標選擇器 - Full build path of the current project's active build configuration. - - Failed to open project 開啟專案失敗 - Cancel Build && Unload 取消建置並卸載 - Do Not Unload 不要卸載 - Unload Project %1? 要卸載專案 %1 嗎? - The project %1 is currently being built. 專案 %1 正在建置中。 - Do you want to cancel the build process and unload the project anyway? 您要取消建置並卸載專案嗎? - Failed to Open Project - Unknown error 未知的錯誤 - Could Not Run - A build is still in progress. 仍有一個建置進行中。 - Project Editing Failed - The file %1 was renamed to %2, but the project file %3 could not be automatically changed. - Cancel Build 取消建置 - Add New... 新增檔案... - Add Existing Files... 新增現有檔案... - New Subproject... 新增子專案... - Remove File... 移除檔案... - Remove Project... Remove project from parent profile (Project explorer view); will not physically delete any files. 移除專案... - Delete File... 刪除檔案... @@ -10129,172 +8375,136 @@ to project '%2'. 開啟建置/執行目標選擇器... - Ctrl+T Ctrl+T - Full path of the current project's main file, including file name. 目前專案主要檔案的絕對路徑,包含檔案名稱。 - Full path of the current project's main file, excluding file name. 目前專案主要檔案的絕對路徑,不包含檔案名稱。 - Load Project 載入專案 - New Project Title of dialog 新增專案 - Ignore all errors? 要忽略全部的錯誤嗎? - Found some build errors in current task. Do you want to ignore them? 在目前工作中找到一些建置錯誤。 您要忽略它們嗎? - Always save files before build 建置前總是先儲存檔案 - - Clean 清除 - - - Build 建置 - - Deploy 佈署 - The project %1 is not configured, skipping it. 專案 %1 尚未設置,將跳過。 - No project loaded. 沒有載入任何專案。 - Currently building the active project. 目前正在建置作用中的專案。 - - The project %1 is not configured. 專案 %1 尚未設置。 - Project has no build settings. 專案沒有建置設定。 - No project loaded 沒有載入任何專案 - Project has no build settings 專案沒有建置設定 - Building '%1' is disabled: %2<br> 建置 '%1' 已被關閉:%2<br> - A build is in progress 仍有一個建置進行中 - Building '%1' is disabled: %2 建置 '%1' 已被關閉:%2 - Cancel Build && Close 取消建置並關閉 - Do Not Close 不要關閉 - Close Qt Creator? 要關閉 Qt Creator 嗎? - A project is currently being built. 有個專案目前正在建置中。 - Do you want to cancel the build process and close Qt Creator anyway? 您要取消建置並關閉 Qt Creator 嗎? - New File Title of dialog 新增檔案 - New Subproject Title of dialog 新增子專案 - Add Existing Files 新增現有檔案 - Could not add following files to project %1: 無法新增以下檔案到專案 %1: - Adding Files to Project Failed 新增檔案到專案失敗 @@ -10303,22 +8513,18 @@ Do you want to ignore them? 新增檔案到版本控制系統失敗 - Removing File Failed 移除檔案失敗 - Deleting File Failed 刪除檔案失敗 - Delete File 刪除檔案 - Delete %1 from file system? 要從檔案系統中刪除 %1 嗎? @@ -10341,12 +8547,10 @@ to version control (%2)? - Could not remove file %1 from project %2. 無法從專案 %2 中移除檔案 %1。 - Could not delete file %1. 無法刪除檔案 %1。 @@ -10354,57 +8558,46 @@ to version control (%2)? ProjectExplorer::SessionManager - Error while restoring session 回復工作階段時發生錯誤 - Could not restore session %1 無法回復工作階段 %1 - Failed to restore project files 回復專案檔案失敗 - Could not restore the following project files:<br><b>%1</b> 無法回復以下專案檔案:<br><b>%1</b> - Keep projects in Session 在工作階段中保持專案 - Remove projects from Session 從工作階段中移除專案 - Failed to open project 開啟專案失敗 - Session 工作階段 - Error while saving session 儲存工作階段時發生錯誤 - Could not save session to file %1 無法儲存工作階段至檔案 %1 - Untitled 未命名 @@ -10412,32 +8605,26 @@ to version control (%2)? QrcEditor - Add 新增 - Remove 移除 - Properties 屬性 - Prefix: 前置字串: - Language: 語言: - Alias: 別名: @@ -10445,12 +8632,10 @@ to version control (%2)? Qt4ProjectManager::Internal::ConsoleAppWizard - Qt Console Application Qt4 主控台應用程式 - Creates a project containing a single main.cpp file with a stub implementation. Preselects a desktop Qt for building the application if available. @@ -10462,7 +8647,6 @@ Preselects a desktop Qt for building the application if available. Qt4ProjectManager::Internal::ConsoleAppWizardDialog - This wizard generates a Qt4 console application project. The application derives from QCoreApplication and does not provide a GUI. 此精靈會產生一個 Qt4 主控台的應用程式專案。該應用程式會衍生自 QCoreApplication 而沒有圖形介面。 @@ -10470,12 +8654,10 @@ Preselects a desktop Qt for building the application if available. Qt4ProjectManager::Internal::DesignerExternalEditor - Qt Designer is not responding (%1). Qt 設計師未回應 (%1)。 - Unable to create server socket: %1 無法建立伺服器的 socket:%1 @@ -10483,12 +8665,10 @@ Preselects a desktop Qt for building the application if available. Qt4ProjectManager::Internal::EmptyProjectWizard - Empty Qt Project 空的 Qt 專案 - Creates a qmake-based project without any files. This allows you to create an application without any default classes. 建立一個基於 qmake 的空白專案,不含任何檔案。這樣可以讓您建立一個不包含任何預設類別的應用程式。 @@ -10496,7 +8676,6 @@ Preselects a desktop Qt for building the application if available. Qt4ProjectManager::Internal::EmptyProjectWizardDialog - This wizard generates an empty Qt4 project. Add files to it later on by using the other wizards. 本精靈將建立一個空的 Qt4 專案。您稍後可以使用其他精靈來新增檔案。 @@ -10504,12 +8683,10 @@ Preselects a desktop Qt for building the application if available. Qt4ProjectManager::Internal::ExternalQtEditor - Unable to start "%1" 無法啟動 "%1" - The application "%1" could not be found. 找不到應用程式 "%1"。 @@ -10517,12 +8694,10 @@ Preselects a desktop Qt for building the application if available. Qt4ProjectManager::Internal::FilesPage - Class Information 類別資訊 - Specify basic information about the classes for which you want to generate skeleton source code files. 指定您要建立的源碼檔案的基本類別資訊。 @@ -10530,12 +8705,10 @@ Preselects a desktop Qt for building the application if available. Qt4ProjectManager::Internal::GuiAppWizard - Qt Gui Application Qt 圖形介面應用程式 - Creates a Qt application for the desktop. Includes a Qt Designer-based main window. Preselects a desktop Qt for building the application if available. @@ -10547,12 +8720,10 @@ Preselects a desktop Qt for building the application if available. Qt4ProjectManager::Internal::GuiAppWizardDialog - This wizard generates a Qt4 GUI application project. The application derives by default from QApplication and includes an empty widget. 本精靈將建立一個 Qt4 圖形介面應用程式專案。此應用程式預設衍生自 QApplication 並包含一個空白的元件。 - Details 詳情 @@ -10560,12 +8731,10 @@ Preselects a desktop Qt for building the application if available. Qt4ProjectManager::Internal::LibraryWizard - C++ Library C++ 函式庫 - Creates a C++ library based on qmake. This can be used to create:<ul><li>a shared C++ library for use with <tt>QPluginLoader</tt> and runtime (Plugins)</li><li>a shared or static C++ library for use with another project at linktime</li></ul> 建立一個基於 qmake 的 C++ 函式庫。它可以用於建立:<ul><li>用於 <tt>QPluginLoader</tt> 和執行時外掛程式的共享 C++ 函式庫</li><li>在其他專案中連結時使用的動態或靜態 C++ 函式庫</li></ul> @@ -10573,32 +8742,26 @@ Preselects a desktop Qt for building the application if available. Qt4ProjectManager::Internal::LibraryWizardDialog - Shared Library 共享函式庫 - Statically Linked Library 靜態連結函式庫 - Qt 4 Plugin Qt 4 外掛程式 - Type 型態 - This wizard generates a C++ library project. 本精靈將建立一個 C++ 函式庫專案。 - Details 詳情 @@ -10610,12 +8773,10 @@ Preselects a desktop Qt for building the application if available. Qt4ProjectManager::Internal::ModulesPage - Select Required Modules 選擇需要的模組 - Select the modules you want to include in your project. The recommended modules for this project are selected by default. 選擇您要包含在專案中的模組。本專案建議使用的模組預設已經先選好了。 @@ -10627,7 +8788,6 @@ Preselects a desktop Qt for building the application if available. <a href="import">匯入現有建置</a> - Shadow Build Directory 分離建置目錄 @@ -10648,7 +8808,6 @@ Preselects a desktop Qt for building the application if available. <無效的工具鍊> - General 一般 @@ -10657,58 +8816,50 @@ Preselects a desktop Qt for building the application if available. 無效的 Qt 版本 - A build for a different project exists in %1, which will be overwritten. %1 build directory 另一個專案已經在 %1 中建置了。您的動作將會覆蓋掉該專案的建置。 - Error: 錯誤: - building in <b>%1</b> - This target cannot build this project since it does not define a Qt version. - The Qt version %1 does not support shadow builds, building might fail. - Warning: 警告: %1 Debug Name of a debug build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 除錯 + %1 Debug %1 Release Name of a release build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 發佈 + %1 Release <No tool chain selected> <沒有選擇工具鍊> - An incompatible build exists in %1, which will be overwritten. %1 build directory 在 %1 內有不相容的建置。該建置將會被覆蓋掉。 - problemLabel 問題標籤 @@ -10721,12 +8872,10 @@ Preselects a desktop Qt for building the application if available. 工具鍊: - Shadow build: 分離建置: - Build directory: 建置目錄: @@ -10738,74 +8887,58 @@ Preselects a desktop Qt for building the application if available. Qt4ProjectManager::Internal::Qt4ProjectManagerPlugin - - Run qmake 執行 qmake - - Build 建置 - Build "%1" - Rebuild 重新建置 - Clean 清除 - Build Subproject - Build Subproject "%1" - Rebuild Subproject - Rebuild Subproject "%1" - Clean Subproject - Clean Subproject "%1" - Build File - Build File "%1" - Ctrl+Alt+B @@ -10814,8 +8947,6 @@ Preselects a desktop Qt for building the application if available. 跳到游標下的檔案 - - Add Library... 新增函式庫... @@ -10831,27 +8962,22 @@ Preselects a desktop Qt for building the application if available. 無法分析 .pro 檔案。 - The .pro file '%1' is currently being parsed. - Clean Environment 清理環境變數 - System Environment 系統環境變數 - Build Environment 建置環境變數 - Qt4 Run Configuration Qt4 執行設置 @@ -10859,62 +8985,50 @@ Preselects a desktop Qt for building the application if available. Qt4ProjectManager::Internal::Qt4RunConfigurationWidget - Arguments: 參數: - Select Working Directory 選擇工作目錄 - Working directory: 工作目錄: - Run in terminal 在終端機中執行 - Base environment for this run configuration: 此執行設置的基礎環境: - Run Environment 執行時的環境變數 - Clean Environment 清理環境變數 - System Environment 系統環境變數 - Build Environment 建置環境變數 - Executable: 執行檔: - Reset to default 重置為預設 - Use debug version of frameworks (DYLD_IMAGE_SUFFIX=_debug) 使用框架的除錯版 (DYLD_IMAGE_SUFFIX=_debug) @@ -10922,13 +9036,11 @@ Preselects a desktop Qt for building the application if available. Qt4ProjectManager::MakeStep - Make Qt4 MakeStep display name. Make - Qt Creator needs a compiler set up to build. Configure a compiler in the kit options. @@ -10941,12 +9053,10 @@ Preselects a desktop Qt for building the application if available. Qt Creator 需要設置一個工具鍊才能建置。請在專案模式下設定工具鍊。 - Cannot find Makefile. Check your build settings. 找不到 Makefile。請檢查您的建置設定。 - Configuration is faulty. Check the Issues view for details. 設置錯誤。請在錯誤檢視中看詳情。 @@ -10954,22 +9064,18 @@ Preselects a desktop Qt for building the application if available. Qt4ProjectManager::MakeStepConfigWidget - Override %1: 覆蓋 %1: - Make: Make: - <b>Make:</b> %1 - <b>Make:</b> No Qt4 build configuration. @@ -10978,7 +9084,6 @@ Preselects a desktop Qt for building the application if available. 沒有 Qt4 建置設置。 - <b>Make:</b> %1 not found in the environment. <b>Make</b>:在環境中找不到 %1。 @@ -10986,7 +9091,6 @@ Preselects a desktop Qt for building the application if available. Qt4ProjectManager::Internal::MakeStepFactory - Make Make @@ -10994,38 +9098,31 @@ Preselects a desktop Qt for building the application if available. Qt4ProjectManager::QMakeStep - qmake QMakeStep default display name qmake - Configuration is faulty, please check the Issues view for details. 設置錯誤。請在錯誤檢視中看詳情。 - Configuration unchanged, skipping qmake step. 設置沒有改變,將跳過 qmake 步驟。 - No Qt version. 沒有 Qt 版本。 - Invalid Qt version. 無效的 Qt 版本。 - Requires Qt 4.7.1 or newer. 需要 Qt 4.7.1 或更新的版本。 - Library not available. <a href='compile'>Compile...</a> 函式庫無法使用。<a href='compile'>編譯...</a> @@ -11033,27 +9130,22 @@ Preselects a desktop Qt for building the application if available. Qt4ProjectManager::QMakeStepConfigWidget - QML Debugging QML 除錯 - The option will only take effect if the project is recompiled. Do you want to recompile now? 需要重新編譯專案才能使選項生效。您要現在就重新編譯嗎? - Building helpers 建置小助手 - <b>qmake:</b> No Qt version set. Cannot run qmake. <b>qmake</b>:沒有設定 Qt 版本。無法執行 qmake。 - <b>qmake:</b> %1 %2 <b>qmake</b>:%1 %2 @@ -11062,17 +9154,14 @@ Preselects a desktop Qt for building the application if available. <b>警告:</b> 工具鍊建議使用另一個 mkspec。 - Enable QML debugging: 開啟 QML 除錯: - Might make your application vulnerable. Only use in a safe environment. 可能導致應用程式易受攻擊。僅可在安全的環境下使用。 - <No Qt version> <沒有 Qt 版本> @@ -11084,37 +9173,30 @@ Preselects a desktop Qt for building the application if available. 目前專案的 Qt 版本的 bin 目錄的完整路徑。 - Full path to the host bin directory of the current project's Qt version. - Full path to the target bin directory of the current project's Qt version. You probably want %1 instead. - Update of Generated Files 更新產生的檔案 - The following files are either outdated or have been modified:<br><br>%1<br><br>Do you want Qt Creator to update the files? Any changes will be lost. 以下檔案不是過期就是被變更過了:<br><br>%1<br><br>您要 Qt Creator 更新這些檔案嗎?任何改變都將遺失。 - Failed opening project '%1': Project file does not exist 開啟專案 '%1' 失敗:專案檔不存在 - QMake QMake - Failed opening project '%1': Project already open 開啟專案 '%1' 失敗:專案已經被開啟 @@ -11122,82 +9204,66 @@ Preselects a desktop Qt for building the application if available. QtModulesInfo - Core non-GUI classes used by other modules 其他模組使用的非圖形介面核心類別 - Graphical user interface components 圖形使用者介面組件 - Classes for network programming 網路程式類別 - OpenGL support classes OpenGL 支援類別 - Classes for database integration using SQL 使用 SQL 的資料庫整合類別 - Classes for evaluating Qt Scripts 計算 Qt Scripts 類別 - Additional Qt Script components Qt Script 額外組件 - Classes for displaying the contents of SVG files 顯示 SVG 檔案內容的類別 - Classes for displaying and editing Web content 顯示和編輯網頁內容的類別 - Classes for handling XML 處理 XML 的類別 - An XQuery/XPath engine for XML and custom data models XML 和自訂資料模型的 XQuery/XPath 引擎 - Multimedia framework classes 多媒體框架類別 - Classes for low-level multimedia functionality 提供底層多媒體功能的類別 - Classes that ease porting from Qt 3 to Qt 4 協助從 Qt3 移植到 Qt4 的類別 - Tool classes for unit testing 用於單元測試的工具類別 - Classes for Inter-Process Communication using the D-Bus 用 D-Bus 進行行程間通訊的類別 @@ -11205,17 +9271,14 @@ Preselects a desktop Qt for building the application if available. Locator::ILocatorFilter - Filter Configuration 過濾器設置 - Limit to prefix 前置字串限制 - Prefix: 前置字串: @@ -11223,35 +9286,28 @@ Preselects a desktop Qt for building the application if available. Locator::Internal::DirectoryFilter - Generic Directory Filter 一般目錄過濾 - Filter Configuration 過濾器設置 - - Select Directory 選擇目錄 - %1 filter update: %n files %1 過濾器更新:%n 個檔案 - %1 filter update: 0 files %1 過濾器更新:0 個檔案 - %1 filter update: canceled %1 過濾器更新:已取消 @@ -11259,54 +9315,44 @@ Preselects a desktop Qt for building the application if available. Locator::Internal::DirectoryFilterOptions - Name: 名稱: - Specify file name filters, separated by comma. Filters may contain wildcards. 指定檔案名稱過濾器,用逗號分隔。過濾器可以包含萬用字元符。 - Prefix: 前置字串: - Limit to prefix 前置字串限制 - Remove 移除 - Directories: 目錄: - Specify a short word/abbreviation that can be used to restrict completions to files from this directory tree. To do this, you type this shortcut and a space in the Locator entry field, and then the word to search for. 指定用於限定此目錄樹裡的檔案補完功能的短單字或縮寫。 您可以在定位器的輸入位置鍵入這個縮寫和一個空格,然後輸入搜尋的單字。 - File types: 檔案型態: - Add 新增 - Edit 編輯 @@ -11314,7 +9360,6 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Locator::Internal::FileSystemFilter - Files in File System 在檔案系統中的檔案 @@ -11326,27 +9371,22 @@ To do this, you type this shortcut and a space in the Locator entry field, and t 過濾器設置 - Prefix: 前置字串: - Limit to prefix 前置字串限制 - Include hidden files 包括隱藏檔案 - Filter: 過濾器: - Add Filter Configuration @@ -11354,7 +9394,6 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Locator::Internal::OpenDocumentsFilter - Open Documents 開啟文件 @@ -11362,7 +9401,6 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Locator::Internal::LocatorFiltersFilter - Available filters 可使用的過濾器 @@ -11370,22 +9408,18 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Locator::Internal::LocatorPlugin - Ctrl+K Ctrl+K - Type to locate 輸入以定位 - Type to locate (%1) 輸入以定位(%1) - Indexing 建立索引中 @@ -11393,27 +9427,22 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Locator::Internal::LocatorWidget - Refresh 刷新 - Configure... 設置... - Locate... 定位... - Options 選項 - <type here> <在此輸入> @@ -11421,7 +9450,6 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Locator::Internal::SettingsPage - %1 (prefix: %2) %1 (前置字串:%2) @@ -11429,32 +9457,26 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Locator::Internal::SettingsWidget - Configure Filters 過濾器設置 - Add 新增 - Remove 移除 - Edit 編輯 - min - Refresh interval: 刷新間隔: @@ -11462,27 +9484,22 @@ To do this, you type this shortcut and a space in the Locator entry field, and t ResourceEditor::Internal::ResourceEditorPlugin - Qt Resource file Qt 資源檔 - Creates a Qt Resource file (.qrc) that you can add to a Qt Widget Project. 建立可以新增到 Qt 元件專案中的 Qt 資源檔 (.qrc)。 - &Undo 復原(&U) - &Redo 重做(&R) - Recheck existence of referenced files @@ -11490,27 +9507,22 @@ To do this, you type this shortcut and a space in the Locator entry field, and t ResourceEditor::Internal::ResourceEditorW - Open File 開啟檔案 - Open With 開啟方式 - Rename File... - Copy Resource Path to Clipboard - untitled 未命名 @@ -11580,62 +9592,50 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Subversion::Internal::SettingsPage - Authentication 認證 - Password: 密碼: - Subversion Subversion - Configuration 設置 - Miscellaneous 雜項 - Prompt on submit 提交時彈出提示 - Timeout: 逾時: - s - Ignore whitespace changes in annotation 忽略註記中的空格變化 - Log count: 紀錄計數: - Subversion command: Subversion 指令: - Username: 使用者名稱: @@ -11643,7 +9643,6 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Subversion::Internal::SettingsPageWidget - Subversion Command Subversion 指令 @@ -11651,272 +9650,218 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Subversion::Internal::SubversionPlugin - &Subversion Subversion (&S) - Add 新增 - Add "%1" 新增"%1" - Alt+S,Alt+A Alt+S,Alt+A - Diff Project 比較專案 - Diff Project "%1" 比較專案 "%1" - Diff Current File 比較目前檔案 - Diff "%1" 比較 "%1" - Alt+S,Alt+D Alt+S,Alt+D - Commit All Files 提交所有檔案 - Commit Current File 提交目前檔案 - Commit "%1" 提交 "%1" - Alt+S,Alt+C Alt+S,Alt+C - Filelog Current File 目前檔案的紀錄 - Filelog "%1" 檔案紀錄 "%1" - Annotate Current File 目前檔案最後註記 - Annotate "%1" 最後註記 "%1" - Describe... 描述... - Project Status 專案狀態 - Meta+S,Meta+D - Meta+S,Meta+A - Meta+S,Meta+C - Delete... 刪除... - Delete "%1"... 刪除 "%1"... - Revert... 復原... - Revert "%1"... 復原 "%1"... - Status of Project "%1" 專案 "%1" 的狀態 - Log Project 紀錄專案 - Log Project "%1" 紀錄專案 "%1" - Update Project 更新專案 - Update Project "%1" 更新專案 "%1" - Revert Repository... 復原主目錄... - Commit 提交 - &Undo 復原(&U) - &Redo 重做(&R) - Closing Subversion Editor 關閉 Subversion 編輯器 - Do you want to commit the change? 您要提交此變更嗎? - The commit message check failed. Do you want to commit the change? 提交訊息檢查失敗。您要提交變更嗎? - Revert repository 復原主目錄 - Revert failed: %1 復原失敗:%1 - The file has been changed. Do you want to revert it? 檔案已被改變。您要復原它嗎? - Another commit is currently being executed. 另一個提交正在執行中。 - Commit Project 提交專案 - Commit Project "%1" 提交專案 "%1" - Diff Repository 比較主目錄 - Repository Status 主目錄狀態 - Log Repository 主目錄紀錄 - Update Repository 更新主目錄 - Diff &Selected Files 比較選取的檔案(&S) - Revert all pending changes to the repository? 是否要復原主目錄的所有暫停的變更? - There are no modified files. 沒有被變更的檔案。 - Describe 描述 - Revision number: 版本編號: - No subversion executable specified! 沒有指定 subversion 執行檔! @@ -11924,7 +9869,6 @@ To do this, you type this shortcut and a space in the Locator entry field, and t Subversion::Internal::SubversionSubmitEditor - Subversion Submit Subversion 提交 @@ -11932,12 +9876,10 @@ To do this, you type this shortcut and a space in the Locator entry field, and t TextEditor::BaseFileFind - Search 搜尋 - List of comma separated wildcard filters 以逗號分隔的萬用字元符過濾器列表 @@ -11945,12 +9887,10 @@ To do this, you type this shortcut and a space in the Locator entry field, and t TextEditor::BaseTextDocument - untitled 未命名 - Opening file 開啟檔案中 @@ -11958,12 +9898,10 @@ To do this, you type this shortcut and a space in the Locator entry field, and t TextEditor::BaseTextEditor - Line: %1, Col: %2 行:%1,欄:%2 - Line: 9999, Col: 999 行:9999,欄:9999 @@ -11971,7 +9909,6 @@ To do this, you type this shortcut and a space in the Locator entry field, and t TextEditor::BehaviorSettingsPage - Global Settings 全域 @@ -11980,52 +9917,42 @@ To do this, you type this shortcut and a space in the Locator entry field, and t TextEditor::FontSettingsPage - Font && Colors 字型與顏色 - Copy Color Scheme 複製色彩機制 - Color scheme name: 色彩機制名稱: - %1 (copy) %1 (複製) - Delete Color Scheme 刪除色彩機制 - Are you sure you want to delete this color scheme permanently? 您確定您要永久刪除此色彩機制嗎? - Delete 刪除 - Color Scheme Changed 色彩機制已變更 - The color scheme "%1" was modified, do you want to save the changes? 色彩機制 "%1" 已變更。您要儲存此變更嗎? - Discard 丟棄 @@ -12033,29 +9960,24 @@ To do this, you type this shortcut and a space in the Locator entry field, and t TextEditor::Internal::CodecSelector - Text Encoding 文字編碼 - The following encodings are likely to fit: 以下編碼可能符合: - Select encoding for "%1".%2 為 "%1" 選擇編碼 。%2 - Reload with Encoding 根據編碼重新載入 - Save with Encoding 根據編碼儲存 @@ -12063,17 +9985,14 @@ The following encodings are likely to fit: TextEditor::Internal::FindInCurrentFile - Current File 目前檔案 - File '%1': 檔案 '%1': - File path: %1 %2 檔案路徑:'%1' @@ -12083,47 +10002,38 @@ The following encodings are likely to fit: TextEditor::Internal::FontSettingsPage - Family: 家族: - Size: 大小: - Font 字型 - Color Scheme 色彩機制 - Antialias 反鋸齒 - Copy... 複製... - Delete 刪除 - % % - Zoom: 縮放: @@ -12131,12 +10041,10 @@ The following encodings are likely to fit: TextEditor::Internal::LineNumberFilter - Line %1 行 %1 - Line in Current Document 目前文件裡的行 @@ -12144,82 +10052,66 @@ The following encodings are likely to fit: TextEditor::Internal::TextEditorPlugin - Creates a text file. The default file extension is <tt>.txt</tt>. You can specify a different extension as part of the filename. 建立文字檔案。預設的副檔名是 <tt>.txt</tt>。您可以在指定檔名時直接加副檔名。 - Text File 文字檔案 - General 一般 - Creates a scratch buffer using a temporary file. - Scratch Buffer - Triggers a completion in this scope 在此範圍內觸發自動補完 - Ctrl+Space Ctrl+Space - Meta+Space Meta+Space - Triggers a quick fix in this scope 在此範圍內觸發快速修正 - Alt+Return Alt+Return - Selected text within the current document. 目前文件中選取的文字。 - Line number of the text cursor position in current document (starts with 1). 目前文件裡游標所在位置的行號 (從 1 開始)。 - Column number of the text cursor position in current document (starts with 0). 目前文件裡游標所在位置的行號 (從 0 開始)。 - Number of lines visible in current document. 目前文件的可見行數。 - Number of columns visible in current document. 目前文件的可見欄數。 - Current document's font size in points. 目前文件的字型大小,以點為單位。 @@ -12227,27 +10119,22 @@ The following encodings are likely to fit: TextEditor::TextEditorActionHandler - &Undo 復原(&U) - &Redo 重做(&R) - Select Encoding... 選擇編碼... - Auto-&indent Selection 自動縮排選取的文字(&I) - Ctrl+I Ctrl+I @@ -12264,77 +10151,62 @@ The following encodings are likely to fit: %1+E, R - &Visualize Whitespace 標示空白(&V) - Clean Whitespace 清除空白 - Enable Text &Wrapping 開啟文字折行(&W) - Ctrl+/ Ctrl+/ - Copy &Line 複製行(&L) - Ctrl+Ins Ctrl+Ins - Delete &Line 刪除行(&L) - Fold 摺疊 - Unfold 展開 - Reset Font Size 重置字型大小 - Ctrl+0 Ctrl+0 - Go to Block Start 移至區塊開頭 - Go to Block End 移至區塊結尾 - Shift+Del Shift+Del - &Rewrap Paragraph 段落重新折行(&R) @@ -12347,382 +10219,306 @@ The following encodings are likely to fit: %1+E, %2+W - Toggle Comment &Selection 切換選取區的註釋(&S) - Cut &Line 剪下行(&L) - Ctrl+< Ctrl+< - Ctrl+> Ctrl+> - Increase Font Size 增大字型 - Ctrl++ Ctrl++ - Decrease Font Size 減小字型 - Ctrl+- Ctrl+- - Ctrl+[ Ctrl+[ - Ctrl+] Ctrl+] - Ctrl+{ Ctrl+{ - Delete Word from Cursor On 從游標處刪除文字 - Meta+E, R - Ctrl+E, R - Meta+E, Meta+V - Ctrl+E, Ctrl+V - Meta+E, Meta+W - Ctrl+E, Ctrl+W - Delete Word Camel Case from Cursor On 從游標處刪除駝峰式大小寫文字 - Delete Word up to Cursor 刪除文字到游標處 - Delete Word Camel Case up to Cursor 刪除駝峰式大小寫文字至游標處 - Toggle &Fold All 切換全部折疊(&F) - Meta+0 - Go to Block Start with Selection 移至選取區開頭 - Go to Block End with Selection 移至選取區結尾 - Ctrl+} Ctrl+} - Select Block Up 選擇區塊上移 - Ctrl+U Ctrl+U - Select Block Down 選擇區塊下移 - Move Line Up 將行上移 - Ctrl+Shift+Up Ctrl+Shift+Up - Move Line Down 將行下移 - Ctrl+Shift+Down Ctrl+Shift+Down - Copy Line Up 將行向上複製 - Ctrl+Alt+Up Ctrl+Alt+Up - Copy Line Down 將行向下複製 - Ctrl+Alt+Down Ctrl+Alt+Down - Join Lines 合併行 - Ctrl+J Ctrl+J - Insert Line Above Current Line 在目前行之前插入行 - Ctrl+Shift+Return Ctrl+Shift+Return - Insert Line Below Current Line 在目前行之後插入行 - Ctrl+Return Ctrl+Return - Uppercase Selection 大寫選擇 - Alt+Shift+U Alt+Shift+U - Meta+Shift+U - Lowercase Selection 小寫選擇 - Alt+U Alt+U - Meta+U - Paste from Clipboard History 從剪貼簿歷史紀錄貼上 - Ctrl+Shift+V Ctrl+Shift+V - Indent 縮排 - Unindent 不縮排 - Follow Symbol Under Cursor 跟隨游標下的符號 - Jump To File Under Cursor - Go to Line Start 移至行首 - Go to Line End 移至行尾 - Go to Next Line 移至下一行 - Go to Previous Line 已至前一行 - Go to Previous Character 移至前一個字元 - Go to Next Character 移至下一個字元 - Go to Previous Word 移至前一個單字 - Go to Next Word 移至下一個單字 - Go to Previous Word Camel Case 移到前一個駝峰式大小寫文字 - Go to Next Word Camel Case 移到下一個駝峰式大小寫文字 - Go to Line Start with Selection 移至行首並選取 - Go to Line End with Selection 移至行尾並選取 - Go to Next Line with Selection 移至下一行並選取 - Go to Previous Line with Selection 移至前一行並選取 - Go to Previous Character with Selection 移至前一字元並選取 - Go to Next Character with Selection 移至下一字元並選取 - Go to Previous Word with Selection 移至前一單字並選取 - Go to Next Word with Selection 移至下一單字並選取 - Go to Previous Word Camel Case with Selection 移至前一個駝峰式大小寫文字並選取 - Go to Next Word Camel Case with Selection 移至下一個駝峰式大小寫文字並選取 - <line number> <行號> @@ -12730,219 +10526,176 @@ The following encodings are likely to fit: TextEditor::TextEditorSettings - Text 文字 - Generic text. Applied to text, if no other rules matching. - Link 連結 - Links that follow symbol under cursor. - Selection 選取區 - Selected text. - Line Number 行號 - Line numbers located on the left side of the editor. - Search Result 搜尋結果 - Highlighted search results inside the editor. - Search Scope 搜尋範圍 - Section where the pattern is searched in. - Parentheses 括號 - Displayed when matching parentheses, square brackets or curly brackets are found. - Current Line 目前行 - Line where the cursor is placed in. - Current Line Number 目前行號 - Line number located on the left side of the editor where the cursor is placed in. - Occurrences 出現位置 - Occurrences of the symbol under the cursor. (Only the background will be applied.) - Unused Occurrence 未使用的出現位置 - Occurrences of unused variables. - Renaming Occurrence 重新命名出現位置 - Occurrences of a symbol that will be renamed. - Number 數字 - Number literal. - String 字串 - Character and string literals. - Type 型態 - Name of a type. - Local 本地 - Local variables. - Field 欄位 - Class' data members. - Enumeration - Applied to Enumeration Items. - Function 函式 - Name of a function. - QML item id within a QML file. - QML root Object Property - QML property of a parent item. - QML scope Object Property - Property of the same QML item. @@ -12951,27 +10704,22 @@ Applied to text, if no other rules matching. 靜態 - Virtual Method 虛擬方法 - Name of method declared as virtual. - QML Binding QML 結合 - QML item property, that allows a binding to another property. - QML Local Id QML 本地代碼 @@ -12984,213 +10732,171 @@ Applied to text, if no other rules matching. QML 範圍物件屬性 - QML State Name QML 狀態名稱 - Name of a QML state. - QML Type Name QML 型態名稱 - Name of a QML type. - QML External Id QML 外部代碼 - QML id defined in another QML file. - QML External Object Property QML 外部物件屬性 - QML property defined in another QML file. - JavaScript Scope Var JavaScript 範圍變數 - Variables defined inside the JavaScript file. - JavaScript Import JavaScript 匯入 - Name of a JavaScript import inside a QML file. - JavaScript Global Variable JavaScript 全域變數 - Variables defined outside the script. - Keyword 關鍵字 - Reserved keywords of the programming language. - Operator 運算符 - Operators. (for example operator++ operator-=) - Preprocessor 預處理器 - Preprocessor directives. - Label 標籤 - Labels for goto statements. - Comment 註解 - All style of comments except Doxygen comments. - Doxygen Comment Doxygen 註解 - Doxygen comments. - Doxygen Tag Doxygen 標籤 - Doxygen tags - Visual Whitespace 標示空白 - Whitespace Will not be applied to whitespace in comments and strings. - Disabled Code 關閉的代碼 - Code disabled by preprocessor directives. - Added Line 新增的行 - Applied to added lines in differences (in diff editor). - Removed Line 移除的行 - Applied to removed lines in differences (in diff editor). - Diff File 比較檔案 - Compared files (in diff editor). - Diff Location 比較路徑 - Location in the files where the difference is (in diff editor). - Behavior 行為 - Display 顯示 @@ -13198,32 +10904,26 @@ Will not be applied to whitespace in comments and strings. TopicChooser - Filter 過濾器 - Choose a topic for <b>%1</b>: 選擇 <b>%1</b> 的標題: - Choose Topic 選擇標題 - &Topics 標題(&T) - &Display 顯示(&D) - &Close 關閉(&C) @@ -13231,12 +10931,10 @@ Will not be applied to whitespace in comments and strings. VcsBase - Version Control 版本控制 - General 一般 @@ -13248,27 +10946,22 @@ Will not be applied to whitespace in comments and strings. VcsBase::Internal::NickNameDialog - Name 名稱 - E-mail 電子郵件 - Alias 別名 - Alias e-mail 別名電子郵件 - Nicknames 暱稱 @@ -13276,12 +10969,10 @@ Will not be applied to whitespace in comments and strings. VcsBase::SubmitFileModel - State 狀態 - File 檔案 @@ -13289,52 +10980,42 @@ Will not be applied to whitespace in comments and strings. VcsBase::VcsBaseSubmitEditor - Prompt to submit 提交時彈出提示 - Check Message 檢查訊息 - Insert Name... 插入名稱... - Submit Message Check Failed 提交訊息檢查失敗 - Executing %1 正在執行 %1 - Executing [%1] %2 正在執行 [%1] %2 - The check script '%1' crashed. 檢查腳本 '%1' 已崩潰。 - The check script '%1' could not be started: %2 檢查腳本 '%1' 無法被啟動:%2 - The check script '%1' timed out. 檢查腳本 '%1' 逾時。 - The check script returned exit code %1. 檢查腳本傳回了離開代碼 %1。 @@ -13342,7 +11023,6 @@ Will not be applied to whitespace in comments and strings. Utils::CheckableMessageBox - Do not ask again 不要再次詢問 @@ -13350,57 +11030,46 @@ Will not be applied to whitespace in comments and strings. Cvs::Internal::SettingsPage - CVS CVS - Configuration 設置 - Miscellaneous 雜項 - Prompt on submit 提交時彈出提示 - Describe all files matching commit id 描述所有檔案的符合提交代碼 - Timeout: 逾時: - s - CVS command: CVS 指令: - CVS root: CVS 根目錄: - Diff options: 比較選項: - When checked, all files touched by a commit will be displayed when clicking on a revision number in the annotation view (retrieved via commit ID). Otherwise, only the respective file will be displayed. 若是勾選此選項,點擊一個版號時,所有該版號提交時會碰到的檔案都會顯示在最後狀態註記檢視中。不然,只會顯示相關的檔案。 @@ -13408,47 +11077,38 @@ Will not be applied to whitespace in comments and strings. Designer::Internal::CppSettingsPageWidget - Form 表單 - Embedding of the UI Class 使用者介面類別嵌入方式 - Aggregation as a pointer member 以指標成員方式集成 - Aggregation 集成 - Code Generation 產生代碼 - Support for changing languages at runtime 執行期變換語言的支援 - Use Qt module name in #include-directive 在 #include-關鍵字後使用 Qt 模組名稱 - Multiple inheritance 多重繼承 - Add Qt version #ifdef for module names 在模組名稱加上 #ifdef 區別 Qt 版本 @@ -13456,27 +11116,22 @@ Will not be applied to whitespace in comments and strings. Gitorious::Internal::GitoriousHostWidget - ... ... - <New Host> <新主機> - Host 主機 - Projects 專案 - Description 描述 @@ -13484,27 +11139,22 @@ Will not be applied to whitespace in comments and strings. Gitorious::Internal::GitoriousProjectWidget - WizardPage 精靈頁面 - ... ... - Keep updating 保持更新 - Project 專案 - Description 描述 @@ -13512,57 +11162,46 @@ Will not be applied to whitespace in comments and strings. Gitorious::Internal::GitoriousRepositoryWizardPage - WizardPage 精靈頁面 - Name 名稱 - Owner 擁有者 - Description 描述 - Repository 主目錄 - Choose a repository of the project '%1'. 請為專案 '%1' 選擇一個主目錄。 - Mainline Repositories 主線使用的主目錄 - Clones 複本 - Baseline Repositories 基線使用的主目錄 - Shared Project Repositories 共享專案使用的主目錄 - Personal Repositories 個人主目錄 @@ -13570,37 +11209,30 @@ Will not be applied to whitespace in comments and strings. ProjectExplorer::Internal::ProjectExplorerSettingsPageUi - Build and Run 建置和執行 - Use jom instead of nmake 使用 jom 代替 nmake - Current directory 目前目錄 - Directory 目錄 - Projects Directory 專案目錄 - Save all files before build 在建置前儲存所有檔案 - Clear old application output on a new run 在執行前清除舊的應用程式輸出 @@ -13609,67 +11241,54 @@ Will not be applied to whitespace in comments and strings. <i>jom</i> 是 <i>nmake</i> 的替代品。它會自動將編譯工作分配給多個 CPU。最新版的執行檔可以在 <a href="ftp://ftp.qt.nokia.com/jom/">ftp://ftp.qt.nokia.com/jom/</a>取得。若是您的建置過程出現問題,請試著將它關閉。 - Always build project before deploying it 在佈署專案前一律先建置 - Always deploy project before running it 在執行專案前一律先佈署 - Word-wrap application output 對應用程式的輸出進行折行 - Open compiler output pane when building 建置時開啟編譯器輸出視窗 - Open application output pane when running 執行時開啟應用程式輸出視窗 - Ask before terminating the running application in response to clicking the stop button in Application Output. 在應用程式輸出視窗中點擊停止按鈕後,詢問是否要強行關閉應用程式。 - Always ask before stopping applications 總是在停止應用程式前先詢問 - Enabling this option ensures that the order of interleaved messages from stdout and stderr is preserved, at the cost of disabling highlighting of stderr. 開啟此選項可以確保標準輸出(stdout)和標準錯誤輸出(stderr)訊息交錯出現的順序被保留。不過代價是標準錯誤輸出的突顯效果會被關閉。 - Merge stderr and stdout 將 stderr 與 stdout 合併 - Limit application output to 限制應用程式輸出最多 - lines - Open application output pane when debugging 除錯時開啟應用程式輸出窗格 - <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://releases.qt-project.org/jom/">http://releases.qt-project.org/jom/</a>. Disable it if you experience problems with your builds. @@ -13677,132 +11296,106 @@ Will not be applied to whitespace in comments and strings. Qt4ProjectManager::Internal::ClassDefinition - Form 表單 - The header file 標頭檔 - &Sources 源碼(&S) - Widget librar&y: 元件函式庫(&Y): - Widget project &file: 元件專案檔(&F): - Widget h&eader file: 元件標頭檔(&E): - The header file has to be specified in source code. 標頭檔必須在源碼中指定。 - Widge&t source file: 元件源碼檔(&T): - Widget &base class: 元件基礎類別(&B): - QWidget QWidget - Plugin class &name: 外掛程式類別名稱(&N): - Plugin &header file: 外掛程式標頭檔(&H): - Plugin sou&rce file: 外掛程式源碼檔(&R): - Icon file: 圖示檔案: - &Link library 連結函式庫(&L) - Create s&keleton 建立框架(&K) - Include pro&ject 引入專案(&J) - &Description 描述(&D) - G&roup: 群組(&R): - &Tooltip: 工具提示(&T): - W&hat's this: 這是什麼(&H): - The widget is a &container 此元件是個容器(&C) - Property defa&ults 預設屬性(&U) - dom&XML: dom &XML: - Select Icon 選擇圖示 - Icon files (*.png *.ico *.jpg *.xpm *.tif *.svg) 圖示檔案 (*.png *.ico *.jpg *.xpm *.tif *.svg) @@ -13810,47 +11403,38 @@ Will not be applied to whitespace in comments and strings. Qt4ProjectManager::Internal::CustomWidgetPluginWizardPage - WizardPage 精靈頁面 - Plugin and Collection Class Information 外掛程式和收藏類別資訊 - Specify the properties of the plugin library and the collection class. 指定外掛程式函式庫和收藏類別的屬性。 - Collection class: 收藏類別: - Collection header file: 收藏類別標頭檔: - Collection source file: 收藏類別源碼檔: - Plugin name: 外掛程式名稱: - Resource file: 資源檔案: - icons.qrc icons.qrc @@ -13858,27 +11442,22 @@ Will not be applied to whitespace in comments and strings. Qt4ProjectManager::Internal::CustomWidgetWidgetsWizardPage - Custom Qt Widget Wizard 自訂 Qt 元件精靈 - Custom Widget List 自訂元件列表 - Widget &Classes: 元件類別(&C): - Specify the list of custom widgets and their properties. 指定自訂元件列表與它們的屬性。 - ... ... @@ -13886,37 +11465,30 @@ Will not be applied to whitespace in comments and strings. TextEditor::Internal::ColorSchemeEdit - Bold 粗體 - Italic 斜體 - Background: 背景: - Foreground: 前景: - Erase background 清除背景 - x x - Erase foreground 清除前景 @@ -13924,7 +11496,6 @@ Will not be applied to whitespace in comments and strings. Utils::DetailsButton - Details 詳情 @@ -13932,57 +11503,46 @@ Will not be applied to whitespace in comments and strings. OpenWith::Editors - Plain Text Editor 純文字編輯器 - Binary Editor 二進位編輯器 - C++ Editor C++ 編輯器 - .pro File Editor .pro 檔案編輯器 - .files Editor .files 編輯器 - QMLJS Editor QMLJS 編輯器 - Qt Designer Qt 設計師 - Qt Linguist Qt 語言家 - Resource Editor 資源編輯器 - Image Viewer 影像檢視器 - GLSL Editor GLSL 編輯器 @@ -13990,12 +11550,10 @@ Will not be applied to whitespace in comments and strings. Core::Internal::SettingsDialog - Preferences 喜好設定 - Options 選項 @@ -14003,17 +11561,14 @@ Will not be applied to whitespace in comments and strings. CodePaster::CodePasterProtocol - No Server defined in the CodePaster preferences. 在 CodePaster 喜好設定中沒有定義伺服器。 - No Server defined in the CodePaster options. 在 CodePaster 選項中沒有定義伺服器。 - No such paste 沒有相關貼上內容 @@ -14021,17 +11576,14 @@ Will not be applied to whitespace in comments and strings. CodePaster::CodePasterSettingsPage - CodePaster CodePaster - <i>Note: Specify the host name for the CodePaster service without any protocol prepended (e.g. codepaster.mycompany.com).</i> <i>注意:請指定 CodePaster 服務的主機名稱,但不要加上前面的協定(例如: codepaster.mycompany.com)。</i> - Server: 伺服器: @@ -14039,7 +11591,6 @@ Will not be applied to whitespace in comments and strings. CppTools::Internal::CppCurrentDocumentFilter - Methods in Current Document 目前文件中的方法 @@ -14047,7 +11598,6 @@ Will not be applied to whitespace in comments and strings. CppTools::Internal::CppFileSettingsWidget - /************************************************************************** ** Qt Creator license header template ** Special keywords: %USER% %DATE% %YEAR% @@ -14064,12 +11614,10 @@ Will not be applied to whitespace in comments and strings. - Edit... 編輯... - Choose Location for New License Template File 為新的版權許可樣本檔案選擇一個位置 @@ -14077,18 +11625,14 @@ Will not be applied to whitespace in comments and strings. CppTools::Internal::CppFindReferences - C++ Usages: C++ 用法: - - Searching 搜尋中 - C++ Macro Usages: C++ Marco 用法: @@ -14096,12 +11640,10 @@ Will not be applied to whitespace in comments and strings. Cvs::Internal::CheckoutWizard - Checks out a CVS repository and tries to load the contained project. 從 CVS 主目錄中取出,並試著載入裡面包含的專案。 - CVS Checkout CVS 取出 @@ -14109,17 +11651,14 @@ Will not be applied to whitespace in comments and strings. Cvs::Internal::CheckoutWizardPage - Location 位置 - Specify repository and path. 請指定主目錄與路徑。 - Repository: 主目錄: @@ -14127,328 +11666,262 @@ Will not be applied to whitespace in comments and strings. Cvs::Internal::CvsPlugin - Parsing of the log output failed 剖析紀錄輸出失敗 - &CVS CVS(&C) - Add 新增 - Add "%1" 新增 "%1" - Alt+C,Alt+A Alt+C,Alt+A - Diff Project 比較專案 - Diff Project "%1" 比較專案 "%1" - Diff Current File 比較目前檔案 - Diff "%1" 比較 "%1" - Alt+C,Alt+D Alt+C,Alt+D - Commit All Files 提交所有檔案 - Commit Current File 提交目前檔案 - Commit "%1" 提交 "%1" - Alt+C,Alt+C Alt+C,Alt+C - Filelog Current File 目前檔案的紀錄 - Cannot find repository for '%1' 找不到 '%1' 的主目錄 - Meta+C,Meta+D - Filelog "%1" 檔案紀錄 "%1" - Annotate Current File 目前檔案最後註記 - Annotate "%1" 最後註記 "%1" - Meta+C,Meta+A - Meta+C,Meta+C - Delete... 刪除... - Delete "%1"... 刪除 "%1"... - Revert... 復原... - Revert "%1"... 復原 "%1"... - Edit 編輯 - Edit "%1" 編輯 "%1" - - Unedit 未編輯 - Unedit "%1" 未編輯 "%1" - Unedit Repository 未編輯主目錄 - Project Status 專案狀態 - Status of Project "%1" 專案 "%1" 的狀態 - Log Project 紀錄專案 - Log Project "%1" 紀錄專案 "%1" - Update Project 更新專案 - Update Project "%1" 更新專案 "%1" - Commit Project 提交專案 - Commit Project "%1" 提交專案 "%1" - Diff Repository 比較主目錄 - Repository Status 主目錄狀態 - Repository Log 主目錄紀錄 - Update Repository 更新主目錄 - Revert Repository... 復原主目錄... - Commit 提交 - Diff &Selected Files 比較選取的檔案(&S) - &Undo 復原(&U) - &Redo 重做(&R) - Closing CVS Editor 關閉 CVS 編輯器 - Do you want to commit the change? 您要提交此變更嗎? - The commit message check failed. Do you want to commit the change? 提交訊息檢查失敗。您要提交變更嗎? - The files do not differ. 這些檔案沒有不同。 - Revert repository 復原主目錄 - Revert all pending changes to the repository? 是否要復原主目錄的所有暫停的變更? - Revert failed: %1 復原失敗:%1 - The file has been changed. Do you want to revert it? 檔案已被修改。您要復原它嗎? - Another commit is currently being executed. 另一個提交正在被執行中。 - There are no modified files. 沒有被改變的檔案。 - Would you like to discard your changes to the repository '%1'? 您要丟棄您對主目錄 '%1' 的變更嗎? - Would you like to discard your changes to the file '%1'? 您要丟棄您對檔案 '%1' 的變更嗎? - Project status 專案狀態 - Repository status 主目錄狀態 - The initial revision %1 cannot be described. 初始版本 %1 無法被描述。 - Could not find commits of id '%1' on %2. 無法在 %2 找到代碼為 '%1' 的提交。 - No cvs executable specified! 未指定 cvs 的執行檔! @@ -14456,17 +11929,14 @@ Will not be applied to whitespace in comments and strings. Cvs::Internal::CvsSubmitEditor - Added 已新增 - Removed 已移除 - Modified 已變更 @@ -14474,7 +11944,6 @@ Will not be applied to whitespace in comments and strings. Cvs::Internal::SettingsPageWidget - CVS Command CVS 指令 @@ -14526,7 +11995,6 @@ Will not be applied to whitespace in comments and strings. Designer::FormWindowEditor - untitled 未命名 @@ -14534,12 +12002,10 @@ Will not be applied to whitespace in comments and strings. Git::Internal::CloneWizard - Clones a Git repository and tries to load the contained project. 複製一個 Git 主目錄,並試著載入裡面包含的專案。 - Git Repository Clone Git 主目錄複製 @@ -14547,27 +12013,22 @@ Will not be applied to whitespace in comments and strings. Git::CloneWizardPage - Location 位置 - Specify repository URL, checkout directory and path. 請指定主目錄網址、取出目錄與路徑。 - Clone URL: 複製網址: - Delete master branch 刪除 master 分支 - Delete the master branch after checking out the repository. 取出主目錄時刪除 master 分支。 @@ -14575,17 +12036,14 @@ Will not be applied to whitespace in comments and strings. Gitorious::Internal::Gitorious - Error parsing reply from '%1': %2 剖析 '%1' 的回應時發生錯誤:%2 - Request failed for '%1': %2 為 '%1' 請求失敗:%2 - Open source projects that use Git. 使用 Git 的開放源碼專案。 @@ -14593,12 +12051,10 @@ Will not be applied to whitespace in comments and strings. Gitorious::Internal::GitoriousCloneWizard - Clones a Gitorious repository and tries to load the contained project. 複製一個 Gitorious 主目錄,並試著載入裡面包含的專案。 - Gitorious Repository Clone Gitorious 主目錄複製 @@ -14606,12 +12062,10 @@ Will not be applied to whitespace in comments and strings. Gitorious::Internal::GitoriousHostWizardPage - Host 主機 - Select a host. 選擇一個主機。 @@ -14619,12 +12073,10 @@ Will not be applied to whitespace in comments and strings. Gitorious::Internal::GitoriousProjectWizardPage - Project 專案 - Choose a project from '%1' 從 '%1' 選擇一個專案 @@ -14636,163 +12088,130 @@ Will not be applied to whitespace in comments and strings. 一般設定 - General 一般 - Import Bookmarks 匯入書籤 - - Files (*.xbel) 檔案 (*.xbel) - Cannot import bookmarks. 無法匯入書籤。 - Save File 儲存檔案 - Form 表單 - Font 字型 - Family: 家族: - Style: 樣式: - Size: 大小: - Startup 啟動 - On context help: 上下文相關說明: - Show Side-by-Side if Possible 可以的話並排顯示 - Always Show Side-by-Side 總是並排顯示 - Always Start Full Help 總是啟動完整的說明 - Always Show Help in External Window 總是在外部視窗顯示說明 - On help start: 說明開始時: - Show My Home Page 顯示我的首頁 - Show a Blank Page 顯示空白頁 - Show My Tabs from Last Session 顯示前一次工作階段的開啟的分頁 - Home page: 首頁: - Use &Current Page 使用目前頁面(&C) - Use &Blank Page 使用空白頁(&B) - Reset to default 重置為預設值 - Reset 重置 - Help Bookmarks 說明書籤 - Import... 匯入... - Export... 匯出... - Behaviour 行為 - Switch to editor context after last help page is closed. 最後一個說明頁面關閉後切換到編輯模式。 - Return to editor on closing the last page 最後一頁關閉時返回編輯器 - Note: This setting takes effect only if the HTML file does not use a style sheet. @@ -14800,12 +12219,10 @@ Will not be applied to whitespace in comments and strings. Help::Internal::XbelReader - The file is not an XBEL version 1.0 file. 此檔案不是 XBEL 1.0 檔案。 - Unknown title 未知標題 @@ -14813,22 +12230,18 @@ Will not be applied to whitespace in comments and strings. ProjectExplorer::ApplicationLauncher - Failed to start program. Path or permissions wrong? 啟動程式失敗。路徑或者權限是否有錯誤? - The program has unexpectedly finished. 程式未預期終止。 - Some error has occurred while running the program. 執行程式時發生了一些錯誤。 - Cannot retrieve debugging output. 無法取得除錯輸出。 @@ -14838,7 +12251,6 @@ Will not be applied to whitespace in comments and strings. ProjectExplorer::Internal::LocalApplicationRunControlFactory - Run 執行 @@ -14846,21 +12258,18 @@ Will not be applied to whitespace in comments and strings. ProjectExplorer::Internal::LocalApplicationRunControl - No executable specified. 沒有指定執行檔。 - Starting %1... %1 啟動中... - %1 exited with code %2 %1 已離開,離開代碼為 %2 @@ -14870,22 +12279,18 @@ Will not be applied to whitespace in comments and strings. ProjectExplorer::DebuggingHelperLibrary - The target directory %1 could not be created. 目標目錄 %1 無法被建立。 - The existing file %1 could not be removed. 現有檔案 %1 無法被移除。 - The file %1 could not be copied to %2. 檔案 %1 無法被複製到 %2 。 - The debugger helpers could not be built in any of the directories: - %1 @@ -14896,12 +12301,10 @@ Reason: %2 理由:%2 - GDB helper GDB 小助手 - %1 not found in PATH %1 在 PATH 中找不到 @@ -14911,7 +12314,6 @@ Reason: %2 ProjectExplorer::Internal::ProjectWelcomePage - Develop 開發 @@ -14919,17 +12321,14 @@ Reason: %2 Qt4ProjectManager::Internal::ClassList - <New class> <新類別> - Confirm Delete 確認刪除 - Delete class %1 from list? 是否從列表中刪除類別 %1? @@ -14937,12 +12336,10 @@ Reason: %2 Qt4ProjectManager::Internal::CustomWidgetWizard - Qt Custom Designer Widget Qt 設計師自訂元件 - Creates a Qt Custom Designer Widget or a Custom Widget Collection. 建立 Qt 設計師自訂元件,或是一個自訂元件收藏。 @@ -14950,17 +12347,14 @@ Reason: %2 Qt4ProjectManager::Internal::CustomWidgetWizardDialog - This wizard generates a Qt4 Designer Custom Widget or a Qt4 Designer Custom Widget Collection project. 此精靈將產生一個 Qt4 設計師自訂元件,或是 Qt4 設計師自訂元件收藏的專案。 - Custom Widgets 自訂元件 - Plugin Details 外掛程式詳情 @@ -14968,7 +12362,6 @@ Reason: %2 Qt4ProjectManager::Internal::PluginGenerator - Creating multiple widget libraries (%1, %2) in one project (%3) is not supported. 不支援在一個專案中 (%3) 建立多個元件函式庫 (%1, %2)。 @@ -15076,56 +12469,45 @@ S60 emulator run configuration default display name, %1 is base pro-File name使用 Qt 版本 "%1" - Qmake based build - New Configuration 新設置 - New configuration name: 新設置名稱: - - %1 Debug Debug build configuration. We recommend not translating it. - %1 除錯 + %1 Debug - - %1 Release Release build configuration. We recommend not translating it. - %1 發佈 + %1 Release - Debug Name of a debug build configuration to created by a project wizard. We recommend not translating it. - 除錯 + Debug - Release Name of a release build configuration to be created by a project wizard. We recommend not translating it. - 發佈 + Release Subversion::Internal::CheckoutWizard - Checks out a Subversion repository and tries to load the contained project. 從 Subversion 主目錄中取出,並試著載入裡面包含的專案。 - Subversion Checkout Subversion 取出 @@ -15133,17 +12515,14 @@ S60 emulator run configuration default display name, %1 is base pro-File name Subversion::Internal::CheckoutWizardPage - Location 位置 - Specify repository URL, checkout directory and path. 請指定主目錄網址、取出目錄與路徑。 - Repository: 主目錄: @@ -15151,7 +12530,6 @@ S60 emulator run configuration default display name, %1 is base pro-File name TextEditor::Internal::ColorScheme - Not a color scheme file. 不是一個色彩機制檔。 @@ -15159,7 +12537,6 @@ S60 emulator run configuration default display name, %1 is base pro-File name TextEditor::Internal::FontSettings - Customized 自訂 @@ -15167,27 +12544,22 @@ S60 emulator run configuration default display name, %1 is base pro-File name VcsBase::BaseCheckoutWizard - Cannot Open Project 無法開啟專案 - Failed to open project in '%1'. 開啟專案 '%1' 失敗。 - Could not find any project files matching (%1) in the directory '%2'. 在目錄 '%2' 中找不到任何專案檔案符合 (%1)。 - The Project Explorer is not available. 專案瀏覽器無法使用。 - '%1' does not exist. '%1' 不存在。 @@ -15195,27 +12567,22 @@ S60 emulator run configuration default display name, %1 is base pro-File name VcsBase::ProcessCheckoutJob - Unable to start %1: %2 無法啟動 %1:%2 - The process terminated with exit code %1. 行程已終止,離開代碼 %1。 - The process returned exit code %1. 行程傳回了離開代碼 %1。 - The process terminated in an abnormal way. 行程異常終止。 - Stopping... 正在停止... @@ -15223,27 +12590,22 @@ S60 emulator run configuration default display name, %1 is base pro-File name VcsBase::Internal::CheckoutProgressWizardPage - Checkout 取出 - No job running, please abort. 沒有工作正在執行,請中斷。 - Checkout started... 開始取出... - Failed. 失敗。 - Succeeded. 成功。 @@ -15251,28 +12613,23 @@ S60 emulator run configuration default display name, %1 is base pro-File name VcsBase::VcsBaseOutputWindow - Open "%1" 開啟 "%1" - Clear 清除 - Version Control 版本控制 - Executing: %1 %2 執行:%1 %2 - Executing in %1: %2 %3 正在 %1 中執行:%2 %3 @@ -15282,7 +12639,6 @@ S60 emulator run configuration default display name, %1 is base pro-File name Welcome::Internal::CommunityWelcomePage - News && Support 新聞與支持 @@ -15290,262 +12646,210 @@ S60 emulator run configuration default display name, %1 is base pro-File name MimeType - CMake Project file CMake 專案檔案 - C Source file C 源碼檔 - C Header file C 標頭檔 - C++ Header file C++ 標頭檔 - C++ header C++ 標頭 - C++ Source file C++ 源碼檔 - C++ source code C++ 源碼 - Objective-C source code Objective-C 源碼 - CVS submit template CVS 提交樣本 - Qt Designer file Qt 設計師檔案 - Generic Qt Creator Project file 一般 Qt Creator 專案檔 - Generic Project Files 一般專案檔 - Generic Project Include Paths 一般專案引入路徑 - Generic Project Configuration File 一般專案設置檔 - Perforce submit template Perforce 提交樣本 - QML file QML 檔案 - Qt Project file Qt 專案檔 - Qt Project include file Qt 專案引入檔 - message catalog 訊息目錄 - Qt Script file Qt 腳本檔 - Automake based Makefile 基於 Makefile 的 Automake 專案 - ClearCase submit template - GLSL Shader file GLSL 著色器檔 - GLSL Fragment Shader file GLSL 片段著色器檔 - GLSL/ES Fragment Shader file GLSL/ES 片段著色器檔 - GLSL Vertex Shader file GLSL 頂點著色器檔 - GLSL/ES Vertex Shader file GLSL/ES 頂點著色器檔 - GLSL/ES Geometry Shader file GLSL/ES 幾何著色器檔 - BMP image BMP 影像 - GIF image GIF 影像 - ICO image ICO 影像 - JPEG image JPEG 影像 - MNG video MNG 影片 - PBM image PBM 影像 - PGM image PGM 影像 - PNG image PNG 影像 - PPM image PPM 影像 - SVG image SVG 影像 - TIFF image TIFF 影像 - XBM image XBM 影像 - XPM image XPM 影像 - JSON file JSON 檔 - QML Project file QML 專案檔 - Qt Project feature file Qt 專案特徵檔 - Qt Resource file Qt 資源檔 - Subversion submit template Subversion 提交樣本 - Qt Creator task list file Qt Creator 工作列表檔 - Plain text document 純文字文件 - XML document XML 文件 - Assembler 組譯器 - Qt Creator Generic Assembler Qt Creator 通用組譯器 - Differences between files 檔案之間的差異 @@ -15593,57 +12897,42 @@ S60 emulator run configuration default display name, %1 is base pro-File name QmlParser - Unclosed string at end of line 在行尾有未關閉的字串 - - Illegal unicode escape sequence 不合法的 unicode 脫逸序列 - - Illegal syntax for exponential number 指數的語法無效 - Unterminated regular expression literal 正規表示式未結束 - Invalid regular expression flag '%0' 無效的正規表示式旗標 '%0' - - Unterminated regular expression backslash sequence 正規表示式的反斜線序列未結束 - Unterminated regular expression class 正規表示式類別未結束 - Unexpected token `%1' 未預期的符號 `%1' - - Expected token `%1' 預期的符號 `%1' - - Syntax error 語法錯誤 @@ -15651,42 +12940,34 @@ S60 emulator run configuration default display name, %1 is base pro-File name Mercurial::Internal::MercurialCommitPanel - General Information 一般資訊 - Repository: 主目錄: - repository 主目錄 - Branch: 分支: - branch 分支 - Commit Information 提交資訊 - Author: 作者: - Email: 電子郵件: @@ -15694,77 +12975,62 @@ S60 emulator run configuration default display name, %1 is base pro-File name Mercurial::Internal::OptionsPage - Form 表單 - Configuration 設置 - Command: 指令: - User 使用者 - Username to use by default on commit. 提交時預設使用的使用者名稱。 - Default username: 預設使用者名稱: - Email to use by default on commit. 提交時預設使用的電子郵件地址。 - Miscellaneous 雜項 - Timeout: 逾時: - s - Prompt on submit 提交時彈出提示 - Mercurial Mercurial - Log count: 紀錄計數: - Default email: 預設電子郵件: - The number of recent commit logs to show, choose 0 to see all entries. 要顯示的最近提交的紀錄數。選擇 0 表示看全部的紀錄。 @@ -15772,17 +13038,14 @@ S60 emulator run configuration default display name, %1 is base pro-File name Mercurial::Internal::RevertDialog - Revert 復原 - Specify a revision other than the default? 要指定一個版本,而不是用預設值嗎? - Revision: 版本: @@ -15790,27 +13053,22 @@ S60 emulator run configuration default display name, %1 is base pro-File name Mercurial::Internal::SrcDestDialog - Dialog 對話框 - Local filesystem: 本地檔案系統: - e.g. https://[user[:pass]@]host[:port]/[path] 例如:https://[使用者名稱[:密碼]@]主機名[:連接埠]/[路徑] - Default Location 預設位置 - Specify URL: 指定網址: @@ -15818,62 +13076,50 @@ S60 emulator run configuration default display name, %1 is base pro-File name Qt4ProjectManager::Internal::TestWizardPage - WizardPage 精靈頁面 - Class name: 類別名稱: - Type: 型態: - Test 測試 - Benchmark 性能測試 - File: 檔案: - Generate initialization and cleanup code 產生初始化和清除代碼 - Test slot: 測試槽: - Requires QApplication 需要 QApplication - Use a test data set 使用測試資料集 - Specify basic information about the test class for which you want to generate skeleton source code file. 請輸入您要建立的源碼檔案的測試類別資訊。 - Test Class Information 測試類別資訊 @@ -15881,32 +13127,26 @@ S60 emulator run configuration default display name, %1 is base pro-File name CMakeProjectManager::Internal::CMakeRunConfiguration - Run CMake target 執行 CMake 目標 - Clean Environment 清除環境變數 - System Environment 系統環境變數 - Build Environment 建置環境變數 - The executable is not built by the current build configuration 這個可執行檔不是使用目前的建置設置製作出來的 - (disabled) (已關閉) @@ -15914,22 +13154,18 @@ S60 emulator run configuration default display name, %1 is base pro-File name Core - Qt Qt - Environment 環境 - All Files (*) 所有檔案 (*) - Clear Menu 清除選單 @@ -15937,7 +13173,6 @@ S60 emulator run configuration default display name, %1 is base pro-File name CodePaster - Code Pasting 貼上代碼 @@ -15945,7 +13180,6 @@ S60 emulator run configuration default display name, %1 is base pro-File name Debugger::Internal::CdbOptionsPage - CDB CDB @@ -15953,7 +13187,6 @@ S60 emulator run configuration default display name, %1 is base pro-File name Help - Help 說明 @@ -15961,12 +13194,10 @@ S60 emulator run configuration default display name, %1 is base pro-File name Mercurial::Internal::CloneWizard - Clones a Mercurial repository and tries to load the contained project. 複製一個 Mercurial 主目錄,並試著載入裡面包含的專案。 - Mercurial Clone Mercurial 複製 @@ -15974,17 +13205,14 @@ S60 emulator run configuration default display name, %1 is base pro-File name Mercurial::Internal::CloneWizardPage - Location 位置 - Specify repository URL, checkout directory and path. 請指定主目錄網址、取出目錄與路徑。 - Clone URL: 複製網址: @@ -15992,7 +13220,6 @@ S60 emulator run configuration default display name, %1 is base pro-File name Mercurial::Internal::CommitEditor - Commit Editor 提交編輯器 @@ -16000,22 +13227,18 @@ S60 emulator run configuration default display name, %1 is base pro-File name Mercurial::Internal::MercurialClient - Unable to find parent revisions of %1 in %2: %3 無法在 %2 找到 %1 的父版本:%3 - Cannot parse output: %1 無法剖析輸出:%1 - Hg incoming %1 Hg 傳入 %1 - Hg outgoing %1 Hg 傳出 %1 @@ -16023,7 +13246,6 @@ S60 emulator run configuration default display name, %1 is base pro-File name Mercurial::Internal::MercurialControl - Mercurial Mercurial @@ -16031,222 +13253,178 @@ S60 emulator run configuration default display name, %1 is base pro-File name Mercurial::Internal::MercurialPlugin - Mercurial Mercurial - Annotate Current File 目前檔案最後註記 - Annotate "%1" 最後註記 "%1" - Diff Current File 比較目前檔案 - Diff "%1" 比較 "%1" - Alt+H,Alt+D Alt+H,Alt+D - Meta+H,Meta+D - Log Current File 目前檔案紀錄 - Log "%1" "%1" 的紀錄 - Alt+H,Alt+L Alt+H,Alt+L - Meta+H,Meta+L - Status Current File 目前檔案的狀態 - Status "%1" "%1" 的狀態 - Alt+H,Alt+S Alt+H,Alt+S - Meta+H,Meta+S - Add 新增 - Add "%1" 新增 "%1" - Delete... 刪除... - Delete "%1"... 刪除 "%1"... - Revert Current File... 復原目前檔案... - Revert "%1"... 復原 "%1"... - Diff 比較 - Log 紀錄 - Revert... 復原... - Status 狀態 - Pull... 取出... - Push... 提交回上游... - Update... 更新... - Import... 匯入... - Incoming... 傳入... - Outgoing... 傳出... - Commit... 提交... - Alt+H,Alt+C Alt+H,Alt+C - Meta+H,Meta+C - Create Repository... 建立主目錄... - Pull Source 取出源碼 - Push Destination 提交目標回上游 - Update 更新 - Incoming Source 傳入來源 - Commit 提交 - Diff &Selected Files 比較選取的檔案(&S) - &Undo 復原(&U) - &Redo 重做(&R) - There are no changes to commit. 沒有變更可提交。 @@ -16255,27 +13433,22 @@ S60 emulator run configuration default display name, %1 is base pro-File name無法為提交編輯器產生暫存檔。 - Unable to create an editor for the commit. 無法為提交建立編輯器。 - Commit changes for "%1". 提交 "%1" 的變更。 - Do you want to commit the changes? 您要提交此變更嗎? - Close Commit Editor 關閉提交編輯器 - Message check failed. Do you want to proceed? 訊息檢查失敗。您要繼續嗎? @@ -16283,7 +13456,6 @@ S60 emulator run configuration default display name, %1 is base pro-File name Mercurial::Internal::OptionsPageWidget - Mercurial Command Mercurial 指令 @@ -16291,43 +13463,35 @@ S60 emulator run configuration default display name, %1 is base pro-File name Perforce::Internal::PerforceChecker - No executable specified 未指定執行檔 - "%1" timed out after %2ms. 在 %2 毫秒後 "%1" 逾時。 - Unable to launch "%1": %2 無法啟動 "%1":%2 - "%1" crashed. "%1" 已崩潰。 - "%1" terminated with exit code %2: %3 "%1" 已中止。離開代碼 %2:%3 - The client does not seem to contain any mapped files. 客戶端似乎不存在任何映射檔。 - Unable to determine the client root. Unable to determine root of the p4 client installation 無法決定客戶端的根目錄。 - The repository "%1" does not exist. 主目錄 "%1" 不存在。 @@ -16335,21 +13499,18 @@ S60 emulator run configuration default display name, %1 is base pro-File name ProjectExplorer::BaseProjectWizardDialog - Location 位置 - untitled File path suggestion for a new project. If you choose to translate it, make sure it is a valid path name without blanks and using only ascii chars. - 未命名 + untitled ProjectExplorer::Internal::DependenciesModel - <No other projects in this session> <工作階段中沒有其他專案> @@ -16357,42 +13518,34 @@ S60 emulator run configuration default display name, %1 is base pro-File name ProjectExplorer - Build & Run 建置並執行 - Other Project 其他專案 - Applications 應用程式 - Libraries 函式庫 - Non-Qt Project 非 Qt 專案 - Import Project 匯入專案 - Qt Application Qt 應用程式 - Devices @@ -16400,7 +13553,6 @@ S60 emulator run configuration default display name, %1 is base pro-File name Qt4ProjectManager - Qt Versions Qt 版本 @@ -16412,12 +13564,10 @@ S60 emulator run configuration default display name, %1 is base pro-File name TextEditor - Text Editor 文字編輯器 - Translate this string 翻譯這個字串 @@ -16425,128 +13575,103 @@ S60 emulator run configuration default display name, %1 is base pro-File name Git::Internal::StashDialog - Stashes 暫存檔 - Name 名稱 - Branch 分支 - Message 訊息 - Delete... 刪除... - Show 顯示 - Restore... 還原... - Refresh 刷新 - <No repository> <沒有主目錄> - Repository: %1 主目錄:%1 - Do you want to delete all stashes? 您要刪除所有的暫存檔嗎? - Do you want to delete %n stash(es)? 您要刪除這 %n 個暫存檔嗎? - Delete All... 全部刪除... - Restore to Branch... Restore a git stash to new branch to be created 還原到分支... - - Delete Stashes 刪除暫存檔 - Repository Modified 主目錄已變更 - %1 cannot be restored since the repository is modified. You can choose between stashing the changes or discarding them. %1 無法還原,因為主目錄已被變更。 您可以選擇要暫存或是丟棄變更。 - Stash 暫存 - Discard 丟棄 - Restore Stash to Branch 還原暫存內容到分支 - Branch: 分支: - Stash Restore 暫存還原 - Would you like to restore %1? 您要還原 %1 嗎? - Error restoring %1 還原 %1 時出錯 @@ -16554,7 +13679,6 @@ You can choose between stashing the changes or discarding them. ProjectExplorer::Internal::DoubleTabWidget - DoubleTabWidget 雙標籤元件 @@ -16562,17 +13686,14 @@ You can choose between stashing the changes or discarding them. ProjectExplorer::Internal::TargetSettingsWidget - TargetSettingsWidget 目標設定元件 - Add Kit - Manage Kits... @@ -16580,42 +13701,34 @@ You can choose between stashing the changes or discarding them. QmlDesigner::Internal::SettingsPage - Form 表單 - Snapping 快照 - Qt Quick Designer Qt Quick 設計器 - Snap margin: 快照邊緣: - Item spacing: 項目間隔: - Canvas 畫布 - Width 寬度 - Height 高度 @@ -16662,37 +13775,30 @@ You can choose between stashing the changes or discarding them. VcsBase::CleanDialog - The directory %1 could not be deleted. 目錄 %1 無法被刪除。 - The file %1 could not be deleted. 檔案 '%1' 無法被刪除。 - There were errors when cleaning the repository %1: 清除主目錄 %1 時發生錯誤: - Delete... 刪除... - Name 名稱 - Repository: %1 主目錄:%1 - %n bytes, last modified %1 @@ -16703,19 +13809,16 @@ You can choose between stashing the changes or discarding them. %1 位元組,上次變更 %2 - Delete 刪除 - Do you want to delete %n files? 您要刪除這 %n 個檔案嗎? - Cleaning %1 清理 %1 中 @@ -16723,7 +13826,6 @@ You can choose between stashing the changes or discarding them. ExtensionSystem::PluginDetailsView - None @@ -16731,14 +13833,10 @@ You can choose between stashing the changes or discarding them. ExtensionSystem::PluginView - - - Load on Startup 啟動時載入 - Utilities 工具 @@ -16746,7 +13844,6 @@ You can choose between stashing the changes or discarding them. QmlJS::Check - 'int' or 'real' 'int' 或 'real' @@ -16754,12 +13851,10 @@ You can choose between stashing the changes or discarding them. QmlJS::Link - file or directory not found 找不到檔案或路徑 - QML module not found Import paths: @@ -16776,7 +13871,6 @@ For qmlproject projects, use the importPaths property to add import paths. - QML module contains C++ plugins, currently reading type information... QML 模組包含 C++ 外掛程式,目前正在讀取型態資訊... @@ -16784,7 +13878,6 @@ For qmlproject projects, use the importPaths property to add import paths. Utils::FileWizardDialog - Location 位置 @@ -16792,12 +13885,10 @@ For qmlproject projects, use the importPaths property to add import paths. Utils::FilterLineEdit - Filter 過濾器 - Clear text 清除文字 @@ -16805,32 +13896,26 @@ For qmlproject projects, use the importPaths property to add import paths. Utils::fileDeletedPrompt - File has been removed 檔案已經被移除 - The file %1 has been removed outside Qt Creator. Do you want to save it under a different name, or close the editor? 檔案 %1 已經在 Qt Creator 外被移除。您要另存為其他名稱,還是要關閉編輯器? - The file %1 was removed. Do you want to save it under a different name, or close the editor? 檔案 %1 已經被移除。您要將它以另一個名稱儲存,還是直接關閉編輯器? - &Close 關閉(&C) - Save &as... 另存為(&A)... - &Save 儲存(&S) @@ -16838,7 +13923,6 @@ For qmlproject projects, use the importPaths property to add import paths. Utils::UnixTools - <table border=1 cellspacing=0 cellpadding=3><tr><th>Variable</th><th>Expands to</th></tr><tr><td>%d</td><td>directory of current file</td></tr><tr><td>%f</td><td>file name (with full path)</td></tr><tr><td>%n</td><td>file name (without path)</td></tr><tr><td>%%</td><td>%</td></tr></table> <table border=1 cellspacing=0 cellpadding=3><tr><th>變數</th><th>展開為</th></tr><tr><td>%d</td><td>目前檔案所在目錄</td></tr><tr><td>%f</td><td>檔名 (包含完整路徑)</td></tr><tr><td>%n</td><td>檔名 (不含路徑)</td></tr><tr><td>%%</td><td>%</td></tr></table> @@ -16846,7 +13930,6 @@ For qmlproject projects, use the importPaths property to add import paths. Utils::LinearProgressWidget - ... ... @@ -16854,127 +13937,102 @@ For qmlproject projects, use the importPaths property to add import paths. BINEditor::BinEditor - Memory at 0x%1 記憶體於 0x%1 - Decimal&nbsp;unsigned&nbsp;value: 十進位&nbsp;無號&nbsp;數值: - Decimal&nbsp;signed&nbsp;value: 十進位&nbsp;有號&nbsp;數值: - Previous&nbsp;decimal&nbsp;unsigned&nbsp;value: 前一個&nbsp;十進位&nbsp;無號&nbsp;數值: - Previous&nbsp;decimal&nbsp;signed&nbsp;value: 前一個&nbsp;十進位&nbsp;有號&nbsp;數值: - %1-bit&nbsp;Integer&nbsp;Type %1-位元&nbsp;整數&nbsp;類型 - Little Endian 低位元優先 - Big Endian 高位元優先 - Binary&nbsp;value: 二進位&nbsp;數值: - Octal&nbsp;value: 八進位&nbsp;數值: - Previous&nbsp;binary&nbsp;value: 前一個&nbsp;二進位&nbsp;數值: - Previous&nbsp;octal&nbsp;value: 前一個&nbsp;八進位&nbsp;數值: - <i>double</i>&nbsp;value: <i>雙倍精確度<i>&nbsp;數值: - Previous <i>double</i>&nbsp;value: 前一個<i>雙倍精確度</i>&nbsp;數值: - <i>float</i>&nbsp;value: <i>浮點</i>&nbsp;數值: - Previous <i>float</i>&nbsp;value: 前一個<i>浮點</i>&nbsp;數值: - Copying Failed 複製失敗 - You cannot copy more than 4 MB of binary data. 您不能複製超過 4 MB 的二進位資料。 - Copy Selection as ASCII Characters 複製選取區為 ASCII 字元 - Copy Selection as Hex Values 複製選取區為十六進位值 - Set Data Breakpoint on Selection - Jump to Address in This Window 在目前視窗中跳轉到位址 - Jump to Address in New Window 在新視窗中跳轉到位址 - Jump to Address 0x%1 in This Window 在目前視窗中跳轉到位址 0x%1 - Jump to Address 0x%1 in New Window 在新視窗中跳轉到位址 0x%1 @@ -16982,7 +14040,6 @@ For qmlproject projects, use the importPaths property to add import paths. CMakeProjectManager::Internal::CMakeTarget - Desktop CMake Default target display name 桌面 @@ -16991,7 +14048,6 @@ For qmlproject projects, use the importPaths property to add import paths. CMakeProjectManager::Internal::MakeStepFactory - Make Display name for CMakeProjectManager::MakeStep id. Make @@ -17000,12 +14056,10 @@ For qmlproject projects, use the importPaths property to add import paths. Core::CommandMappings - Command 指令 - Label 標籤 @@ -17013,7 +14067,6 @@ For qmlproject projects, use the importPaths property to add import paths. Core::DesignMode - Design 設計 @@ -17021,7 +14074,6 @@ For qmlproject projects, use the importPaths property to add import paths. Core::Internal::SystemEditor - Could not open url %1. 無法開啟網址 %1。 @@ -17029,27 +14081,22 @@ For qmlproject projects, use the importPaths property to add import paths. Core::EditorToolBar - Split 分割 - Copy Full Path to Clipboard 複製完整路徑到剪貼簿 - Remove Split 移除分割 - Make Writable 設為可寫入 - File is writable 檔案可寫入 @@ -17057,12 +14104,10 @@ For qmlproject projects, use the importPaths property to add import paths. CodePaster::PasteView - <Comment> <註解> - Paste 貼上 @@ -17070,7 +14115,6 @@ For qmlproject projects, use the importPaths property to add import paths. CppEditor - C++ C++ @@ -17078,177 +14122,142 @@ For qmlproject projects, use the importPaths property to add import paths. VCS - CVS Commit Editor CVS 提交編輯器 - CVS Command Log Editor CVS 指令紀錄編輯器 - CVS File Log Editor CVS 檔案紀錄編輯器 - CVS Annotation Editor CVS 最後狀態註記編輯器 - CVS Diff Editor CVS 比較編輯器 - Git Command Log Editor Git 指令紀錄編輯器 - Git File Log Editor Git 檔案紀錄編輯器 - Git Annotation Editor Git 最後狀態註記編輯器 - Git Diff Editor Git 比較編輯器 - Git Submit Editor Git 提交編輯器 - Mercurial Command Log Editor Mercurial 指令紀錄編輯器 - Mercurial File Log Editor Mercurial 檔案紀錄編輯器 - Mercurial Annotation Editor Mercurial 最後狀態註記編輯器 - Mercurial Diff Editor Mercurial 比較編輯器 - Mercurial Commit Log Editor Mercurial 提交紀錄編輯器 - Perforce.SubmitEditor Perforce 提交編輯器 - Perforce CommandLog Editor Perforce 指令紀錄編輯器 - Perforce Log Editor Perforce 紀錄編輯器 - Perforce Diff Editor Perforce 比較編輯器 - Perforce Annotation Editor Perforce 最後狀態註記編輯器 - Subversion Commit Editor Subversion 提交編輯器 - Subversion Command Log Editor Subversion 指令紀錄編輯器 - Subversion File Log Editor Subversion 檔案紀錄編輯器 - Subversion Annotation Editor Subversion 最後狀態註記編輯器 - Subversion Diff Editor Subversion 比較編輯器 - Bazaar Command Log Editor Bazaar 指令紀錄編輯器 - Bazaar File Log Editor Bazaar 檔案紀錄編輯器 - Bazaar Annotation Editor Bazaar 最後狀態註記編輯器 - Bazaar Diff Editor Bazaar 比較編輯器 - Bazaar Commit Log Editor Bazaar 提交紀錄編輯器 - ClearCase Check In Editor - ClearCase Command Log Editor - ClearCase File Log Editor - ClearCase Annotation Editor - ClearCase Diff Editor @@ -17256,7 +14265,6 @@ For qmlproject projects, use the importPaths property to add import paths. Cvs::Internal::CvsEditor - Annotate revision "%1" 註記版本 "%1" @@ -17264,12 +14272,10 @@ For qmlproject projects, use the importPaths property to add import paths. Debugger::Internal::SnapshotHandler - Name 名稱 - File 檔案 @@ -17277,7 +14283,6 @@ For qmlproject projects, use the importPaths property to add import paths. Debugger::Internal::SnapshotWindow - Snapshots 快照 @@ -17293,12 +14298,10 @@ For qmlproject projects, use the importPaths property to add import paths. Designer::Internal::FormEditorFactory - This file can only be edited in <b>Design</b> mode. 此檔案只能在<b>設計</b>模式中編輯。 - Switch mode 切換模式 @@ -17306,7 +14309,6 @@ For qmlproject projects, use the importPaths property to add import paths. Designer::Internal::FormFileWizardDialog - Location 位置 @@ -17314,28 +14316,22 @@ For qmlproject projects, use the importPaths property to add import paths. FakeVim::Internal::FakeVimExCommandsPage - - Ex Command Mapping Ex 指令映射 - FakeVim FakeVim - Ex Trigger Expression Ex 觸發表示式 - Regular expression: 正規表示式: - Ex Command Ex 命令 @@ -17343,27 +14339,22 @@ For qmlproject projects, use the importPaths property to add import paths. Find::FindPlugin - &Find/Replace 搜尋/取代(&F) - Advanced Find 進階搜尋 - Open Advanced Find... 開啟進階搜尋... - Advanced... 進階... - Ctrl+Shift+F Ctrl+Shift+F @@ -17371,32 +14362,26 @@ For qmlproject projects, use the importPaths property to add import paths. GenericProjectManager::Internal::GenericMakeStep - Make Make - Qt Creator needs a compiler set up to build. Configure a compiler in the kit options. - Configuration is faulty. Check the Issues view for details. 設置錯誤。請在錯誤檢視中看詳情。 - Override %1: 覆蓋 %1: - Make arguments: Make 參數: - Targets: 目標: @@ -17404,12 +14389,10 @@ For qmlproject projects, use the importPaths property to add import paths. Git::Internal::GitEditor - Blame %1 "%1" 的提交紀錄 - Blame parent revision %1 父版本 %1 的提交紀錄 @@ -17417,40 +14400,30 @@ For qmlproject projects, use the importPaths property to add import paths. Help::Internal::HelpViewer - Open Link 開啟連結 - - Open Link as New Page 在新頁面開啟連結 - Copy Link 複製連結 - Copy 複製 - Reload 重新載入 - - - Error loading: %1 - Unknown or unsupported Content! @@ -17458,7 +14431,6 @@ For qmlproject projects, use the importPaths property to add import paths. Help::Internal::OpenPagesModel - (Untitled) (未命名) @@ -17466,12 +14438,10 @@ For qmlproject projects, use the importPaths property to add import paths. Help::Internal::OpenPagesWidget - Close %1 關閉 %1 - Close All Except %1 除了 %1 以外全部關閉 @@ -17479,12 +14449,10 @@ For qmlproject projects, use the importPaths property to add import paths. Mercurial::Internal::MercurialEditor - Annotate %1 最後註記 %1 - Annotate parent revision %1 父版本 %1 最後修訂 @@ -17492,7 +14460,6 @@ For qmlproject projects, use the importPaths property to add import paths. Perforce::Internal::PerforceEditor - Annotate change list "%1" 註記變更列表 "%1" @@ -17500,26 +14467,20 @@ For qmlproject projects, use the importPaths property to add import paths. ProjectExplorer::BuildConfiguration - - Build Display name of the build build step list. Used as part of the labels in the project window. 建置 - - Clean Display name of the clean build step list. Used as part of the labels in the project window. 清除 - System Environment 系統環境變數 - Clean Environment 清除環境變數 @@ -17527,12 +14488,10 @@ For qmlproject projects, use the importPaths property to add import paths. ProjectExplorer::BuildEnvironmentWidget - Clear system environment 清除系統環境變數 - Build Environment 建置環境變數 @@ -17540,7 +14499,6 @@ For qmlproject projects, use the importPaths property to add import paths. BuildSettingsPanelFactory - Build Settings 建置設定 @@ -17548,7 +14506,6 @@ For qmlproject projects, use the importPaths property to add import paths. BuildSettingsPanel - Build Settings 建置設定 @@ -17556,228 +14513,179 @@ For qmlproject projects, use the importPaths property to add import paths. ProjectExplorer::CustomWizard - Details Default short title for custom wizard page to be shown in the progress pane of the wizard. 詳情 - Creates a plain C project using qmake, not using the Qt library. 使用 qmake 建立純 C 語言的專案,不使用 Qt 的函式庫。 - - - - Non-Qt Project 非 Qt 專案 - Creates a plain C project using CMake, not using the Qt library. 使用 CMake 建立純 C 語言的專案,不使用 Qt 的函式庫。 - Plain C Project (CMake Build) 純 C 專案 (CMake 建置) - Creates a plain C++ project using qmake, not using the Qt library. 使用 QMake 建立一個純 C++ 語言的專案,不使用 Qt 的函式庫。 - Creates a plain C++ project using CMake, not using the Qt library. 使用 CMake 建立一個純 C++ 語言的專案,不使用 Qt 的函式庫。 - Plain C++ Project (CMake Build) 純 C++ 專案 (CMake Build) - Creates a C++ plugin that makes it possible to offer extensions that can be loaded dynamically into applications using the QDeclarativeEngine class. 建立一個 C++ 外掛程式,讓您可以在應用程式中使用 QDeclarativeEngine 類別來動態載入延伸功能。 - Custom QML Extension Plugin 自訂 QML 延伸外掛程式 - Custom QML Extension Plugin Parameters 自訂 QML 延伸外掛程式的參數 - Object Class-name: 物件類別名稱: - URI: URI: - The project name and the object class-name cannot be the same. 專案名稱和物件類別名稱不能相同。 - Creates a custom Qt Creator plugin. 建立一個自訂的 Qt Creator 外掛程式。 - URL: URL: - Plain C Project 純 C 語言專案 - Creates an application descriptor file. - Application descriptor - - BlackBerry - Creates a Qt Gui application for BlackBerry. - BlackBerry Qt Gui Application - Creates an Qt5 application descriptor file. - Qt5 Application descriptor - Creates an experimental Qt5 Gui application for BlackBerry 10. You need an own Qt5 build for BlackBerry 10 since Qt5 is not provided in the current BlackBerry 10 NDK and is not included in DevAlpha devices. - BlackBerry Qt5 Gui Application - Creates an experimental Qt Quick 2 application for BlackBerry 10. You need an own Qt5 build for BlackBerry 10 since Qt5 is not provided in the current BlackBerry 10 NDK and is not included in DevAlpha devices. - BlackBerry Qt Quick 2 Application - Creates a Qt Quick application for BlackBerry. - BlackBerry Qt Quick Application - Plain C++ Project 純 C++ 語言專案 - - Libraries 函式庫 - Qt Creator Plugin Qt Creator 外掛程式 - Plugin Information 外掛程式資訊 - Plugin name: 外掛程式名稱: - Vendor name: 廠商名稱: - Copyright: 版權: - License: 授權: - Description: 描述: - Qt Creator sources: Qt Creator 源碼: - Qt Creator build: Qt Creator 建置: - Deploy into: 佈署到: - Qt Creator build Qt Creator 建置 - Local user settings 本地使用者設定 @@ -17785,7 +14693,6 @@ For qmlproject projects, use the importPaths property to add import paths. ProjectExplorer::Internal::CustomWizardPage - Path: 路徑: @@ -17793,7 +14700,6 @@ For qmlproject projects, use the importPaths property to add import paths. DependenciesPanel - Dependencies 相依性 @@ -17801,7 +14707,6 @@ For qmlproject projects, use the importPaths property to add import paths. DependenciesPanelFactory - Dependencies 相依性 @@ -17813,7 +14718,6 @@ For qmlproject projects, use the importPaths property to add import paths.編輯器設定 - Editor @@ -17825,7 +14729,6 @@ For qmlproject projects, use the importPaths property to add import paths.編輯器設定 - Editor @@ -17833,37 +14736,30 @@ For qmlproject projects, use the importPaths property to add import paths. ProjectExplorer::Internal::FolderNavigationWidget - Open 開啟 - Open "%1" 開啟 "%1" - Open with 開啟方式 - Open Parent Folder 開啟父資料夾 - Choose Folder... 選擇資料夾... - Choose Folder 選擇資料夾 - Find in this directory... 在這個目錄中尋找... @@ -17871,7 +14767,6 @@ For qmlproject projects, use the importPaths property to add import paths. ProjectExplorer::Internal::MiniProjectTargetSelector - Project 專案 @@ -17880,72 +14775,58 @@ For qmlproject projects, use the importPaths property to add import paths.目標 - Build 建置 - Kit - Deploy 佈署 - Run 執行 - Unconfigured 未設置 - <b>Project:</b> %1 <b>專案:</b> %1 - <b>Target:</b> %1 <b>目標:</b> %1 - <b>Build:</b> %1 <b>建置:</b> %1 - <b>Deploy:</b> %1 <b>佈署:</b> %1 - <b>Run:</b> %1 <b>執行:</b> %1 - %1 %1 - <html><nobr>%1</html> <html><nobr>%1</html> - Project: <b>%1</b><br/> 專案:<b>%1</b><br/> - Kit: <b>%1</b><br/> @@ -17954,22 +14835,18 @@ For qmlproject projects, use the importPaths property to add import paths.目標:<b>%1</b><br/> - Build: <b>%1</b><br/> 建置:<b>%1</b><br/> - Deploy: <b>%1</b><br/> 佈署:<b>%1</b><br/> - Run: <b>%1</b><br/> 執行:<b>%1</b><br/> - <style type=text/css>a:link {color: rgb(128, 128, 255, 240);}</style>The project <b>%1</b> is not yet configured<br/><br/>You can configure it in the <a href="projectmode">Projects mode</a><br/> <style type=text/css>a:link {color: rgb(128, 128, 255, 240);}</style>專案 <b>%1</b> 尚未設置。<br/><br/>您可以在<a href="projectmode">專案模式</a>中設置。<br/> @@ -17977,7 +14854,6 @@ For qmlproject projects, use the importPaths property to add import paths. ProjectExplorer::ProjectConfiguration - Clone of %1 %1 的複本 @@ -17989,7 +14865,6 @@ For qmlproject projects, use the importPaths property to add import paths.目標 - Build & Run 建置並執行 @@ -18005,37 +14880,30 @@ For qmlproject projects, use the importPaths property to add import paths.取消建置並移除目標 - No kit defined in this project. - Cancel Build && Remove Kit - Do Not Remove 不要移除 - Remove Kit %1? - The kit <b>%1</b> is currently being built. - Do you want to cancel the build process and remove the Kit anyway? - Do you really want to remove the "%1" kit? @@ -18053,7 +14921,6 @@ For qmlproject projects, use the importPaths property to add import paths.您要取消建置並移除目標嗎? - Qt Creator Qt Creator @@ -18067,7 +14934,6 @@ For qmlproject projects, use the importPaths property to add import paths. GenericProjectManager::GenericTarget - Desktop Generic desktop target display name 桌面 @@ -18076,7 +14942,6 @@ For qmlproject projects, use the importPaths property to add import paths. Qt4ProjectManager::Internal::Qt4Target - Desktop Qt4 Desktop target display name 桌面 @@ -18092,13 +14957,11 @@ For qmlproject projects, use the importPaths property to add import paths.Symbian 裝置 - Maemo Emulator Qt4 Maemo Emulator target display name Maemo 模擬器 - Maemo Device Qt4 Maemo Device target display name Maemo 裝置 @@ -18107,7 +14970,6 @@ For qmlproject projects, use the importPaths property to add import paths. QmlProjectManager::QmlTarget - QML Viewer QML Viewer target display name QML 檢視器 @@ -18116,7 +14978,6 @@ For qmlproject projects, use the importPaths property to add import paths. QmlDesigner::ComponentView - whole document 整個文件 @@ -18124,22 +14985,18 @@ For qmlproject projects, use the importPaths property to add import paths. QmlDesigner::DesignDocumentController - -New Form- -新表單- - Cannot save to file "%1": permission denied. 無法儲存至檔案 "%1":權限不足。 - Parent folder "%1" for file "%2" does not exist. 檔案 "%2" 的父資料夾 "%1" 不存在。 - Error 錯誤 @@ -18147,22 +15004,18 @@ For qmlproject projects, use the importPaths property to add import paths. QmlDesigner::XUIFileDialog - Open File 開啟檔案 - Save File 儲存檔案 - Declarative UI files (*.qml) Declarative UI 檔案(*.qml) - All files (*) 所有檔案 (*) @@ -18170,34 +15023,26 @@ For qmlproject projects, use the importPaths property to add import paths. QmlDesigner::NavigatorTreeModel - Unknown item: %1 未知的項目:%1 - - - Invalid Id 無效的代碼 - %1 is an invalid id %1 是個無效的代碼 - %1 already exists %1 已存在 - Warning 警告 - Reparenting the component %1 here will cause the component %2 to be deleted. Do you want to proceed? 在此重新定義組件 %1 的父組件將會導致組件 %2 被刪除。您確定要進行嗎? @@ -18205,28 +15050,23 @@ For qmlproject projects, use the importPaths property to add import paths. QmlDesigner::NavigatorWidget - Navigator Title of navigator view 導覽器 - Become first sibling of parent (CTRL + Left) 成為父節點的第一個兄弟節點 (CTRL + Left) - Become child of first sibling (CTRL + Right) 成為第一個兄弟節點的子節點 (CTRL + Right) - Move down (CTRL + Down) 下移(CTRL + Down) - Move up (CTRL + Up) 上移(CTRL + Up) @@ -18234,7 +15074,6 @@ For qmlproject projects, use the importPaths property to add import paths. QmlDesigner::PluginManager - About Plugins 關於外掛程式 @@ -18242,27 +15081,22 @@ For qmlproject projects, use the importPaths property to add import paths. WidgetPluginManager - Failed to create instance. 建立實體失敗。 - Not a QmlDesigner plugin. 不是一個 QmlDesigner 的外掛程式。 - Failed to create instance of file '%1': %2 無法為檔案 '%1' 建立實體:%2 - Failed to create instance of file '%1'. 無法為檔案 '%1' 建立實體。 - File '%1' is not a QmlDesigner plugin. 檔案 '%1' 不是一個 QmlDesigner 的外掛程式。 @@ -18270,7 +15104,6 @@ For qmlproject projects, use the importPaths property to add import paths. FileWidget - Open File 開啟檔案 @@ -18278,7 +15111,6 @@ For qmlproject projects, use the importPaths property to add import paths. QmlDesigner::StatesEditorWidget - States Title of Editor widget 狀態 @@ -18287,7 +15119,6 @@ For qmlproject projects, use the importPaths property to add import paths. QmlDesigner::Internal::ModelPrivate - invalid type 無效的型態 @@ -18295,27 +15126,22 @@ For qmlproject projects, use the importPaths property to add import paths. QmlDesigner::RewriterView - Error parsing 剖析錯誤 - Internal error 內部錯誤 - "%1" "%1" - line %1 行 %1 - column %1 欄 %1 @@ -18323,17 +15149,14 @@ For qmlproject projects, use the importPaths property to add import paths. QmlDesigner::Internal::DocumentWarningWidget - <a href="goToError">Go to error</a> <a href="goToError">前往錯誤</a> - %3 (%1:%2) %3 (%1:%2) - Internal error (%1) 內部錯誤 (%1) @@ -18341,107 +15164,86 @@ For qmlproject projects, use the importPaths property to add import paths. QmlDesigner::Internal::DesignModeWidget - &Undo 復原(&U) - &Redo 重做(&R) - Delete 刪除 - Delete "%1" 刪除 "%1" - Cu&t 剪下(&T) - Cut "%1" 剪下 "%1" - &Copy 複製(&C) - Copy "%1" 複製 "%1" - &Paste 貼上(&P) - Paste "%1" 貼上 "%1" - Select &All 全部選取(&A) - Select All "%1" 全部選取 "%1" - Toggle Full Screen 切換到全螢幕 - &Restore Default View 重置到預設檢視(&R) - &Go into Component 進入組件(&G) - Toggle &Left Sidebar 切換左邊欄(&L) - Toggle &Right Sidebar 切換右邊欄(&R) - Projects 專案 - File System 檔案系統 - Open Documents 開啟的文檔 - Qt Quick emulation layer crashed Qt Quick 模擬層已崩潰 @@ -18449,37 +15251,30 @@ For qmlproject projects, use the importPaths property to add import paths. QmlDesigner::Internal::BauhausPlugin - Switch Text/Design 切換文字/設計 - Save %1 As... 另存 %1 為... - &Save %1 儲存 %1(&S) - Revert %1 to Saved 回復 %1 到已儲存的狀態 - Close %1 關閉 %1 - Close All Except %1 除了 %1 以外全部關閉 - Close Others 關閉其他項目 @@ -18487,57 +15282,46 @@ For qmlproject projects, use the importPaths property to add import paths. QmlJSEditor::Internal::QmlJSEditorPlugin - Creates a QML file. 建立一個 QML 檔案。 - QML File QML 檔案 - Creates a JavaScript file. 建立一個 JavaScript 檔。 - JS File JS 檔 - Rename Symbol Under Cursor 重新命名游標下的符號 - Ctrl+Shift+R Ctrl+Shift+R - Run Checks 執行檢查 - Ctrl+Shift+C Ctrl+Shift+C - Reformat File 重新格式化檔案 - QML QML - QML Analysis QML 分析 @@ -18546,17 +15330,14 @@ For qmlproject projects, use the importPaths property to add import paths.跟隨游標下的符號 - Find Usages 尋找使用的地方 - Ctrl+Shift+U Ctrl+Shift+U - Show Qt Quick Toolbar 顯示 Qt Quick 工具列 @@ -18564,17 +15345,14 @@ For qmlproject projects, use the importPaths property to add import paths. QmlJSEditor::Internal::HoverHandler - Library at %1 在 %1 的函式庫 - Dumped plugins successfully. 成功傾印外掛程式。 - Read typeinfo files successfully. 成功讀取型態資訊檔。 @@ -18582,32 +15360,26 @@ For qmlproject projects, use the importPaths property to add import paths. QmlProjectManager::QmlProject - Error while loading project file %1. 載入專案檔案 %1 時發生錯誤。 - QML project: %1 QML 專案:%1 - Warning while loading project file %1. 載入專案檔案 %1 時發生警告。 - File '%1' does not exist or is not readable. 檔案 '%1' 不存在,或是檔案無法讀取。 - Device type is not desktop. - No Qt version set in kit. @@ -18615,12 +15387,10 @@ For qmlproject projects, use the importPaths property to add import paths. QmlProjectManager::Internal::QmlProjectApplicationWizardDialog - New Qt Quick UI Project 新增 Qt Quick 使用者介面專案 - This wizard generates a Qt Quick UI project. 此精靈將產生一個 Qt Quick 使用者介面的專案。 @@ -18628,12 +15398,10 @@ For qmlproject projects, use the importPaths property to add import paths. QmlProjectManager::Internal::QmlProjectApplicationWizard - Qt Quick UI Qt Quick UI - Creates a Qt Quick UI project with a single QML file that contains the main view. You can review Qt Quick UI projects in the QML Viewer and you need not build them. You do not need to have the development environment installed on your computer to create and run this type of projects. @@ -18649,12 +15417,10 @@ Requires <b>Qt 4.7.4</b> or newer. QmlProjectManager::Internal::Manager - Failed opening project '%1': Project already open 開啟專案 '%1' 失敗:專案已開啟 - Failed opening project '%1': Project file is not a file 開啟專案 '%1' 失敗:專案檔本身不是個檔案 @@ -18666,18 +15432,15 @@ Requires <b>Qt 4.7.4</b> or newer. 找不到 qmlviewer 或 qmlobserver。 - No qmlviewer or qmlscene found. - QML Scene QMLRunConfiguration display name. - QML Viewer QMLRunConfiguration display name. QML 檢視器 @@ -18686,7 +15449,6 @@ Requires <b>Qt 4.7.4</b> or newer. QmlManager - <Current File> <目前檔案> @@ -18698,12 +15460,10 @@ Requires <b>Qt 4.7.4</b> or newer. 執行 QML 腳本 - QML Viewer QML 檢視器 - QML Scene @@ -18711,7 +15471,6 @@ Requires <b>Qt 4.7.4</b> or newer. Qt4ProjectManager::Internal::QMakeStepFactory - qmake qmake @@ -18838,37 +15597,30 @@ Requires <b>Qt 4.7.4</b> or newer. Qt4ProjectManager::Qt4Project - Evaluating 計算中 - No Qt version set in kit. - The .pro file '%1' does not exist. - The .pro file '%1' is not part of the project. - The .pro file '%1' could not be parsed. - Debug 除錯 - Release 發佈 @@ -18876,62 +15628,50 @@ Requires <b>Qt 4.7.4</b> or newer. QtVersion - No qmake path set 沒有設定 qmake 路徑 - qmake does not exist or is not executable qmake 不存在或無法執行 - Qt version has no name 沒有設定 Qt 版本名稱 - <unknown> <未知> - System 系統 - Qt %1 in PATH (%2) Qt %1 在 PATH (%2) - Qt %1 (%2) Qt %1 (%2) - Qt version is not properly installed, please run make install Qt 沒有被正確安裝,請執行 make install - Could not determine the path to the binaries of the Qt installation, maybe the qmake path is wrong? 無法決定 Qt 安裝版的路徑。也許是 qmake 的路徑設定有錯誤? - The default mkspec symlink is broken. 預設的 mkspec 符號連結有誤。 - ABI detection failed: Make sure to use a matching compiler when building. - Non-installed -prefix build - for internal development only. @@ -18940,14 +15680,10 @@ Requires <b>Qt 4.7.4</b> or newer. ABI 偵測失敗:請確認使用的工具鍊是否正確。 - - No qmlscene installed. - - No qmlviewer installed. 沒有安裝 qmlviewer。 @@ -18960,7 +15696,6 @@ Requires <b>Qt 4.7.4</b> or newer. 找不到 SBS。 - Desktop Qt Version is meant for the desktop 桌面 @@ -18971,13 +15706,11 @@ Requires <b>Qt 4.7.4</b> or newer. Symbian - Maemo Qt Version is meant for Maemo5 Maemo - Harmattan Qt Version is meant for Harmattan Harmattan @@ -18988,41 +15721,34 @@ Requires <b>Qt 4.7.4</b> or newer. MeeGo - Qt Simulator Qt Version is meant for Qt Simulator Qt 模擬器 - Cannot determine the installation path for Qt version '%1'. 無法決定 Qt 版本 '%1' 的安裝路徑。 - Building helper(s) with toolchain '%1'... 正在使用工具鍊 '%1' 建置小助手... - Build failed. 建置失敗。 - Build succeeded. 建置成功。 - Qt for WinCE Qt Version is meant for WinCE WinCE 版 Qt - Embedded Linux Qt Version is used for embedded Linux development 嵌入式 Linux @@ -19031,13 +15757,10 @@ Requires <b>Qt 4.7.4</b> or newer. Qt4ProjectManager::Internal::BaseQt4ProjectWizardDialog - - Modules 模組 - Kits @@ -19064,12 +15787,10 @@ Requires <b>Qt 4.7.4</b> or newer. Qt4ProjectManager::Internal::TestWizard - Qt Unit Test Qt 單元測試 - Creates a QTestLib-based unit test for a feature or a class. Unit tests allow you to verify that the code is fit for use and that there are no regressions. 為某個功能或類別建立一個基於 QTestLib 的單元測試。單元測試讓您可以驗證程式碼是合適的,並且沒有倒退問題。 @@ -19077,12 +15798,10 @@ Requires <b>Qt 4.7.4</b> or newer. Qt4ProjectManager::Internal::TestWizardDialog - This wizard generates a Qt unit test consisting of a single source file with a test class. 此精靈會產生一個 Qt 單元測試,其中包括一個含有測試類別的源碼檔。 - Details 詳情 @@ -19090,7 +15809,6 @@ Requires <b>Qt 4.7.4</b> or newer. Subversion::Internal::SubversionEditor - Annotate revision "%1" 註記版本 "%1" @@ -19098,77 +15816,62 @@ Requires <b>Qt 4.7.4</b> or newer. VcsBase::VcsBasePlugin - Version Control 版本控制 - The file '%1' could not be deleted. 檔案 '%1' 無法被刪除。 - Choose Repository Directory 請選擇主目錄的存放目錄 - The directory '%1' is already managed by a version control system (%2). Would you like to specify another directory? 目錄 '%1' 已經被一個版本控制系統所控制 (%2)。您要指定另一個目錄嗎? - Repository already under version control 此目錄已有版本控制 - Repository Created 主目錄建立成功 - Repository Creation Failed 主目錄建立失敗 - Error: Executable timed out after %1s. 錯誤:執行檔在 %1 秒後逾時。 - There is no patch-command configured in the common 'Version Control' settings. 在「版本控制」設定中沒有設定修補指令。 - Unable to launch '%1': %2 無法啟動 '%1':%2 - A timeout occurred running '%1' 執行 '%1' 發生逾時 - '%1' crashed. '%1' 已崩潰。 - '%1' failed (exit code %2). '%1' 失敗 (離開代碼 %2)。 - A version control repository has been created in %1. 已在 %1 建立版本控制系統主目錄。 - A version control repository could not be created in %1. 無法在 %1 建立版本控制系統主目錄。 @@ -19176,12 +15879,10 @@ Requires <b>Qt 4.7.4</b> or newer. Utils::FancyMainWindow - Locked 已鎖定 - Reset to Default Layout 重置為預設佈局 @@ -19189,29 +15890,24 @@ Requires <b>Qt 4.7.4</b> or newer. SshKeyGenerator - Error generating key: %1 產生金鑰時發生錯誤:%1 - Password for Private Key 私密金鑰密碼 - It is recommended that you secure your private key with a password, which you can enter below. 建議您使用密碼保護您的私密金鑰。 您可以在下面輸入您的密碼。 - Encrypt Key File 加密金鑰檔 - Do Not Encrypt Key File 不要加密金鑰檔 @@ -19219,27 +15915,22 @@ with a password, which you can enter below. CodePaster::FileShareProtocol - Cannot open %1: %2 無法開啟 %1:%2 - %1 does not appear to be a paster file. %1 似乎不是一個貼上檔案。 - Error in %1 at %2: %3 檔案 %1 在 %2 發生錯誤:%3 - Please configure a path. 請設置一個路徑。 - Pasted: %1 已貼上:%1 @@ -19247,7 +15938,6 @@ with a password, which you can enter below. CodePaster::FileShareProtocolSettingsPage - Fileshare 檔案共享 @@ -19255,12 +15945,10 @@ with a password, which you can enter below. CodePaster::Protocol - %1 - Configuration Error %1 - 設置錯誤 - Settings... 設定... @@ -19268,12 +15956,10 @@ with a password, which you can enter below. ProjectExplorer::Internal::SessionNameInputDialog - Enter the name of the session: 輸入工作階段的名稱: - Switch to 切換至 @@ -19281,12 +15967,10 @@ with a password, which you can enter below. QmlJSEditor::Internal::QmlJSPreviewRunner - Failed to preview Qt Quick file 預覽 Qt Quick 檔案失敗 - Could not preview Qt Quick (QML) file. Reason: %1 無法預覽 Qt Quick (QML) 檔案。原因: @@ -19296,72 +15980,58 @@ with a password, which you can enter below. Debugger::Internal::PdbEngine - Running requested... 執行請求... - Unable to start pdb '%1': %2 無法啟動 pdb '%1':%2 - Adapter start failed 適配器啟動失敗 - Python Error Python 錯誤 - '%1' contains no identifier '%1' 不包含識別字 - String literal %1 字串常數 %1 - Cowardly refusing to evaluate expression '%1' with potential side effects 表達式 "%1" 有潛在的副作用所以無法計算其值 - Pdb I/O Error Pdb I/O 錯誤 - The Pdb process failed to start. Either the invoked program '%1' is missing, or you may have insufficient permissions to invoke the program. Pdb 行程啟動失敗。可能是要啟動的程式 '%1' 不見了,或是您沒有足夠的權限執行此程式。 - The Pdb process crashed some time after starting successfully. Pdb 行程在正常啟動一段時間後崩潰。 - The last waitFor...() function timed out. The state of QProcess is unchanged, and you can try calling waitFor...() again. 最近的 waitFor...() 函式發生逾時。QProcess 的狀態未改變。您可以試著再次呼叫 waitFor...()。 - An error occurred when attempting to write to the Pdb process. For example, the process may not be running, or it may have closed its input channel. 試著寫入 Pdb 行程時發生錯誤。可能的原因包括行程並未執行,或者行程關閉了自己的輸入通道。 - An error occurred when attempting to read from the Pdb process. For example, the process may not be running. 嘗試從 Pdb 行程讀取時發生錯誤。可能的原因為行程並未執行。 - An unknown error in the Pdb process occurred. Pdb 行程發生了未知的錯誤。 @@ -19369,12 +16039,10 @@ with a password, which you can enter below. ProjectExplorer::Internal::TargetSelector - Run 執行 - Build 建置 @@ -19382,24 +16050,18 @@ with a password, which you can enter below. QmlDesigner::PropertyEditor - Properties 屬性 - - - Invalid Id 無效的代碼 - %1 is an invalid id %1 是個無效的代碼 - %1 already exists %1 已存在 @@ -19422,24 +16084,20 @@ with a password, which you can enter below. Qt4ProjectManager::QtVersion - The Qt version is invalid: %1 %1: Reason for being invalid Qt 版本不正確:%1 - The qmake command "%1" was not found or is not executable. %1: Path to qmake executable 找不到 qmake 指令 "%1",或該指令無法執行。 - Qmake does not support build directories below the source directory. Qmake 不支援在源碼目錄下使用建置目錄。 - The build directory needs to be at the same level as the source directory. 建置目錄必須和源碼目錄為同一層的目錄。 @@ -19447,124 +16105,98 @@ with a password, which you can enter below. CppTools::QuickFix - - Rewrite Using %1 使用 %1 重寫 - Swap Operands 交換操作元 - Rewrite Condition Using || 使用 || 重寫條件 - Split Declaration 分割宣告 - Add Curly Braces 新增大括號 - - Move Declaration out of Condition 將宣告移到條件之外 - Split if Statement 分割 if 敘述 - Enclose in %1(...) (Qt %2) 封裝在 %1(...) (Qt %2) - Enclose in %1(...) 封裝在 %1(...) - Convert to String Literal 轉換為字串常數 - Convert to Character Literal and Enclose in QLatin1Char(...) 轉換為字元常數並封裝在 Qlatin1Char(...) 中 - Convert to Character Literal 轉換為字元常數 - Add #include %1 新增 #include %1 - Switch with Previous Parameter 用前一個參數切換 - Switch with Next Parameter 用下一個參數切換 - Mark as Translatable 標記為可翻譯 - Convert to Objective-C String Literal 轉換為 Objective-C 字串常數 - Convert to Hexadecimal 轉換為十六進位 - Convert to Octal 轉換為八進位 - Convert to Decimal 轉換為十進位 - Add Local Declaration 新增本地宣告 - Convert to Camel Case 轉換為駝峰命名法 - Complete Switch Statement 完成 Switch 語句 - #include Header File #include 標頭檔 @@ -19572,7 +16204,6 @@ with a password, which you can enter below. GenericProjectManager::Internal::Manager - Failed opening project '%1': Project already open 開啟專案 '%1' 失敗:專案已經被開啟 @@ -19580,32 +16211,26 @@ with a password, which you can enter below. QmlDesigner::FormEditorWidget - Snap to guides (E) 導引快照(E) - Show bounding rectangles and stripes for empty items (Press Key A) 空白的項目顯示外圍矩形與條紋 (按鍵 A) - Only select items with content (S) 僅選擇有內容的項目 (S) - width 寬度 - height 高度 - Reset view (R) 重置檢視 (R) @@ -19613,7 +16238,6 @@ with a password, which you can enter below. QmlDesigner::InvalidArgumentException - Failed to create item of type %1 建立型態 %1 的項目失敗 @@ -19621,19 +16245,16 @@ with a password, which you can enter below. InvalidIdException - Only alphanumeric characters and underscore allowed. Ids must begin with a lowercase letter. 只允許字母數字和底線。 代碼必須以小寫字母開頭。 - Ids have to be unique. 代碼必須唯一。 - Invalid Id: %1 %2 無效的代碼:%1 @@ -19643,7 +16264,6 @@ Ids must begin with a lowercase letter. QmlDesigner::QmlModelView - Invalid Id 無效的代碼 @@ -19651,17 +16271,14 @@ Ids must begin with a lowercase letter. ContextPaneTextWidget - Text 文字 - Style 風格 - ... ... @@ -19669,32 +16286,26 @@ Ids must begin with a lowercase letter. BorderImageSpecifics - Source 來源 - BorderImage 邊界圖片 - Left 左端 - Right 右端 - Top 頂部 - Bottom 底部 @@ -19702,7 +16313,6 @@ Ids must begin with a lowercase letter. emptyPane - None or multiple items selected. 沒有選取或選取了多個項目。 @@ -19710,7 +16320,6 @@ Ids must begin with a lowercase letter. ExpressionEditor - Expression 表示式 @@ -19718,28 +16327,22 @@ Ids must begin with a lowercase letter. Extended - Effect 效果 - - Blur Radius: 模糊半徑: - Pixel Size: 像素大小: - x Offset: x 位移: - y Offset: y 位移: @@ -19747,12 +16350,10 @@ Ids must begin with a lowercase letter. ExtendedFunctionButton - Reset 重置 - Set Expression 設定表示式 @@ -19760,23 +16361,18 @@ Ids must begin with a lowercase letter. FontGroupBox - - Font 字型 - Size 大小 - Font style 字型風格 - Style 風格 @@ -19784,32 +16380,26 @@ Ids must begin with a lowercase letter. Geometry - Geometry 座標 - Position 位置 - Size 大小 - Width 寬度 - Height 高度 - Lock aspect ratio 鎖定外觀比例 @@ -19817,22 +16407,18 @@ Ids must begin with a lowercase letter. ImageSpecifics - Image 影像 - Source 來源 - Fill mode 填充模式 - Source size 來源尺寸 @@ -19840,42 +16426,26 @@ Ids must begin with a lowercase letter. Layout - Layout 佈局 - Anchors 定錨點 - Set anchors 設定定錨點 - Setting anchors in states is not supported. 不支援在狀態內設定定錨點。 - - - - - - Target 目標 - - - - - - Margin 邊緣 @@ -19883,17 +16453,14 @@ Ids must begin with a lowercase letter. Modifiers - Manipulation 操作 - Rotation 旋轉 - z z @@ -19901,27 +16468,22 @@ Ids must begin with a lowercase letter. RectangleColorGroupBox - Colors 顏色 - Stops 停止點 - Gradient stops 漸層停止點 - Rectangle 矩形 - Border 邊框 @@ -19929,27 +16491,22 @@ Ids must begin with a lowercase letter. RectangleSpecifics - Rectangle 矩形 - Border width 邊框寬度 - Border has to be solid to change width 邊框必須是實線才能改變寬度 - Border 邊框 - Radius 半徑 @@ -19957,27 +16514,22 @@ Ids must begin with a lowercase letter. StandardTextColorGroupBox - Color 顏色 - Text 文字 - Style 風格 - Selection 選擇 - Selected 已選擇 @@ -19985,18 +16537,14 @@ Ids must begin with a lowercase letter. StandardTextGroupBox - - Text 文字 - Wrap mode 折行模式 - Alignment 對齊方式 @@ -20008,23 +16556,18 @@ Ids must begin with a lowercase letter. Switches - Special properties 特殊屬性 - - Layout 佈局 - Advanced properties 進階屬性 - Advanced 進階 @@ -20032,12 +16575,10 @@ Ids must begin with a lowercase letter. TextEditSpecifics - Text Edit 文字編輯 - Format 格式 @@ -20045,52 +16586,42 @@ Ids must begin with a lowercase letter. TextInputGroupBox - Text Input 文字輸入 - Input mask 輸入遮罩 - Echo mode 回音模式 - Pass. char 密碼字元 - Character displayed when users enter passwords. 使用者輸入密碼時顯示的字元。 - Read only 唯讀 - Cursor visible 游標可見 - Active focus on press 按下後啟動焦點 - Auto scroll 自動捲軸 - Flags 旗標 @@ -20098,67 +16629,54 @@ Ids must begin with a lowercase letter. Transformation - Transformation 變形 - Origin 原始 - Top 頂端 - Top left 左上 - Top right 右上 - Left 左側 - Center 中央 - Right 右側 - Bottom left 左下 - Bottom right 右下 - Bottom 底端 - Scale 縮放比例 - Rotation 旋轉 @@ -20166,13 +16684,10 @@ Ids must begin with a lowercase letter. Type - - Type 型態 - Id 代碼 @@ -20180,33 +16695,26 @@ Ids must begin with a lowercase letter. Visibility - - Visibility 可見度 - Visible 可見 - isVisible 可見的 - Smooth 平滑 - Clip 剪貼 - Opacity 不透明度 @@ -20214,42 +16722,34 @@ Ids must begin with a lowercase letter. WebViewSpecifics - WebView 網頁檢視 - URL 網址 - Pref Width 預設寬度 - Preferred Width 預設寬度 - Pref Height 預設高度 - Preferred Height 預設高度 - Scale 縮放比例 - Contents Scale 內容比例 @@ -20257,8 +16757,6 @@ Ids must begin with a lowercase letter. Core::HelpManager - - Unfiltered 未過濾 @@ -20266,12 +16764,10 @@ Ids must begin with a lowercase letter. FakeVim::Internal::FakeVimHandler::Private - [New] [新增] - Not an editor command: %1 不是一個編輯器命令:%1 @@ -20279,37 +16775,30 @@ Ids must begin with a lowercase letter. ContextPaneWidgetBorderImage - Form 表單 - Stretch vertically. Scales the image to fit to the available area. 垂直延伸。調整圖片大小以便適合可用的區域。 - Repeat vertically. Tiles the image until there is no more space. May crop the last image. 垂直重複顯示圖片,直到沒有空間為止。有可能會截斷最後一張圖片。 - Round. Like Repeat, but scales the images down to ensure that the last image is not cropped. 環繞。類似重複,但會縮小圖像以確保最後一塊圖像不會被裁剪。 - Repeat horizontally. Tiles the image until there is no more space. May crop the last image. 水平重複顯示圖片,直到沒有空間為止。有可能會截斷最後一張圖片。 - Stretch horizontally. Scales the image to fit to the available area. 水平延伸。調整圖片大小以便適合可用的區域。 - 10 x 10 10 x 10 @@ -20317,42 +16806,34 @@ Ids must begin with a lowercase letter. ContextPaneWidgetImage - Form 表單 - The image is scaled to fit 圖像被縮放到合適大小 - The image is stretched horizontally and tiled vertically 圖像被水平延伸並垂直平鋪 - The image is stretched vertically and tiled horizontally 圖像被垂直延伸並水平平鋪 - The image is duplicated horizontally and vertically 影像在水平和垂直方向上被複製 - The image is scaled uniformly to fit without cropping 影像被一致地縮放到合適大小,沒有裁剪 - The image is scaled uniformly to fill, cropping if necessary 影像被一致地縮放到合適大小,如果需要會被裁剪 - 10 x 10 10 x 10 @@ -20360,27 +16841,22 @@ Ids must begin with a lowercase letter. ContextPaneWidgetRectangle - Form 表單 - Gradient 漸層 - Color 顏色 - ... ... - Border 邊框 @@ -20388,82 +16864,66 @@ Ids must begin with a lowercase letter. EasingContextPane - Dialog 對話框 - Play simulation 執行模擬器 - Easing 動畫速度(Easing) - Type of easing curve 動畫速度曲線(Easing Curve)型態 - Subtype 子型態 - Acceleration or deceleration of easing curve 動畫速度曲線的加速或減速 - Duration 持續時間 - Duration of animation 動畫持續時間 - INVALID 無效 - ms 毫秒 - Amplitude 振幅 - Amplitude of elastic and bounce easing curves 彈跳的動畫速度曲線振幅 - Period 週期 - Easing period of an elastic curve 彈跳曲線的動畫週期 - Overshoot 迴力 - Easing overshoot for a back curve 迴力曲線的動畫速度 @@ -20471,12 +16931,10 @@ Ids must begin with a lowercase letter. ClassView::Internal::NavigationWidget - Form 表單 - Show Subprojects 顯示子專案 @@ -20488,32 +16946,26 @@ Ids must begin with a lowercase letter. 過濾器設置 - Prefix: 前置字串: - Limit to prefix 前置字串限制 - Add 新增 - Remove 移除 - Double-click to edit item. 雙擊以編輯項目。 - Edit Filter Configuration @@ -20521,32 +16973,26 @@ Ids must begin with a lowercase letter. ImageViewer::Internal::ImageViewerToolbar - Zoom In 放大 - Zoom Out 縮小 - Show Background 顯示背景 - Show Outline 顯示外框 - Fit to Screen 適合螢幕 - Original Size 原始大小 @@ -20554,32 +17000,26 @@ Ids must begin with a lowercase letter. QmlJSEditor::Internal::QuickToolBarSettingsPage - Form 表單 - Qt Quick Toolbars Qt Quick 工具列 - Always show Qt Quick Toolbar 總是顯示 Qt Quick 工具列 - If enabled, the toolbar will remain pinned to an absolute position. 若開啟此選項,則工具列將被釘在固定位置。 - Pin Qt Quick Toolbar 釘住 Qt Quick 工具列 - Qt Quick ToolBar Qt Quick 工具列 @@ -20587,37 +17027,30 @@ Ids must begin with a lowercase letter. Qt4ProjectManager::Internal::LibraryDetailsWidget - Library: 函式庫: - Library file: 函式庫檔案: - Include path: 包含路徑: - Platform 平台 - Linux Linux - Mac Mac - Windows Windows @@ -20626,57 +17059,46 @@ Ids must begin with a lowercase letter. Symbian - Linkage: 連結: - Dynamic 動態 - Static 靜態 - Mac: Mac: - Library 函式庫 - Framework 框架 - Windows: Windows: - Library inside "debug" or "release" subfolder debug 或 release 子目錄下的函式庫 - Add "d" suffix for debug version 為 debug 版本新增 "d" 作為後置字串 - Remove "d" suffix for release version 移除 release 版本中的 "d" 後置字串 - Package: 套件: @@ -20684,27 +17106,22 @@ Ids must begin with a lowercase letter. QmlEditorWidgets::ContextPaneWidget - Hides this toolbar. 隱藏此工具列。 - Pin Toolbar 釘住工具列 - Show Always 總是顯示 - Unpins the toolbar and moves it to the default position. 解除工具列定位並移動到預設位置。 - Hides this toolbar. This toolbar can be permanently disabled in the options page or in the context menu. 隱藏此工具列。該工具列可在選項頁面或內文選單中永久停用。 @@ -20712,8 +17129,6 @@ Ids must begin with a lowercase letter. QmlEditorWidgets::ContextPaneWidgetImage - - double click for preview 雙擊以預覽 @@ -20721,7 +17136,6 @@ Ids must begin with a lowercase letter. QmlEditorWidgets::FileWidget - Open File 開啟檔案 @@ -20729,12 +17143,10 @@ Ids must begin with a lowercase letter. QmlJS::Bind - expected two numbers separated by a dot 兩個數字應該由點分隔 - package import requires a version number 匯入套件需要版本號 @@ -20742,56 +17154,46 @@ Ids must begin with a lowercase letter. ProjectExplorer::BuildableHelperLibrary - Cannot start process: %1 無法啟動行程:%1 - Timeout after %1s. %1 秒後逾時。 - The process crashed. 行程已崩潰。 - The process returned exit code %1: %2 行程傳回了離開代碼 %1: %2 - Error running '%1' in %2: %3 在 %2 執行 '%1' 發生錯誤:%3 - Building helper '%1' in %2 在 %2 建置小助手 '%1' - Running %1 %2... 正在執行 %1 %2... - - Running %1 %2 ... 正在執行%1 %2 ... - %1 not found in PATH 在 PATH 中找不到 %1 @@ -20801,47 +17203,38 @@ Ids must begin with a lowercase letter. Utils::SynchronousProcess - The command '%1' finished successfully. 指令 '%1' 已成功完成。 - The command '%1' terminated with exit code %2. 指令 '%1' 已結束,離開代碼 %2。 - The command '%1' terminated abnormally. 指令 '%1' 異常結束。 - The command '%1' could not be started. 指令 '%1' 無法啟動。 - The command '%1' did not respond within the timeout limit (%2 ms). 指令 '%1' 在時限 (%2毫秒) 內未回應。 - Process not Responding 行程無回應 - The process is not responding. 行程無回應。 - The process '%1' is not responding. 行程 '%1' 無回應。 - Would you like to terminate it? 您要結束它嗎? @@ -20849,7 +17242,6 @@ Ids must begin with a lowercase letter. ClassView::Internal::NavigationWidgetFactory - Class View 類別檢視 @@ -20857,18 +17249,15 @@ Ids must begin with a lowercase letter. CMakeProjectManager::Internal::MakeStep - Make Default display name for the cmake make step. Make - Qt Creator needs a compiler set up to build. Configure a compiler in the kit options. - Configuration is faulty. Check the Issues view for details. 設置錯誤。請在錯誤檢視中看詳情。 @@ -20876,7 +17265,6 @@ Ids must begin with a lowercase letter. Core::Internal::CommandComboBox - Activate %1 Pane 啟用 %1 窗格 @@ -20884,17 +17272,14 @@ Ids must begin with a lowercase letter. Core::NavigationWidget - Activate %1 Pane 啟用 %1 窗格 - Hide Sidebar 隱藏邊列 - Show Sidebar 顯示邊列 @@ -20902,7 +17287,6 @@ Ids must begin with a lowercase letter. SshConnection - Server and client capabilities don't match. Client list was: %1. Server list was %2. 伺服器端和客戶端參數不符。客戶端是:%1。 @@ -20912,12 +17296,10 @@ Server list was %2. CodePaster::NetworkProtocol - Checking connection 正在檢查連線 - Connecting to %1... 正在連線到 %1... @@ -20925,7 +17307,6 @@ Server list was %2. CheckUndefinedSymbols - Expected a namespace-name 預期應為命名空間名稱 @@ -20933,7 +17314,6 @@ Server list was %2. CppEditor::InsertDeclOperation - Add %1 Declaration 新增 %1 宣告 @@ -20941,7 +17321,6 @@ Server list was %2. CppEditor::InsertDefOperation - Add Definition in %1 在 %1 新增定義 @@ -20949,17 +17328,14 @@ Server list was %2. CppEditor::Internal::CppTypeHierarchyWidget - No type hierarchy available 沒有可用的型態階層 - Bases 基底 - Derived 衍生 @@ -20967,7 +17343,6 @@ Server list was %2. CppEditor::Internal::CppTypeHierarchyFactory - Type Hierarchy 型態階層 @@ -20975,42 +17350,34 @@ Server list was %2. CppTools::Internal::SymbolsFindFilter - C++ Symbols C++ 符號 - Searching 搜尋中 - C++ Symbols: C++ 符號: - Classes 類別 - Methods 方法 - Enums 列舉 - Declarations 宣告 - Scope: %1 Types: %2 Flags: %3 @@ -21019,17 +17386,14 @@ Flags: %3 旗標:%3 - All 所有 - Projects 專案 - , , @@ -21037,37 +17401,30 @@ Flags: %3 CppTools::Internal::SymbolsFindFilterConfigWidget - Types: 型態: - Classes 類別 - Methods 方法 - Enums 列舉 - Declarations 宣告 - Projects only 只有專案 - All files 所有檔案 @@ -21075,57 +17432,46 @@ Flags: %3 Debugger::Internal::BreakpointDialog - File name and line number 檔名與行號 - Function name 函式名 - Break on memory address 在記憶體位址中斷 - Break when C++ exception is thrown 當 C++ 丟出例外狀況時中斷 - Break when C++ exception is caught 當抓到 C++ 例外狀況時中斷 - Break when function "main" starts 當 "main" 函式開始時中斷 - Break when a new process is forked 當複製出一個新行程時中斷 - Break when a new process is executed 當一個新行程被執行時中斷 - Break when a system call is executed 當一個系統呼叫被執行時中斷 - Break on data access at fixed address 當特定位址的資料被存取時中斷 - Break on data access at address given by expression 當表示式所表達的位址裡的資料被存取時中斷 @@ -21134,12 +17480,10 @@ Flags: %3 在 QML 信號處理器中斷 - Break when JavaScript exception is thrown 當 JavaScript 丟出例外狀況時中斷 - Specifying the module (base name of the library or executable) for function or file type breakpoints can significantly speed up debugger start-up times (CDB, LLDB). @@ -21153,77 +17497,62 @@ GDB allows for specifying a sequence of commands separated by the delimiter &apo GDB 允許使用 '\n' 來區隔多個指令序列。 - <html><head/><body><p>Determines how the path is specified when setting breakpoints:</p><ul><li><i>Use Engine Default</i>: Preferred setting of the debugger engine.</li><li><i>Use Full Path</i>: Pass full path, avoiding ambiguities should files of the same name exist in several modules. This is the engine default for CDB and LLDB.</li><li><i>Use File Name</i>: Pass the file name only. This is useful when using a source tree whose location does not match the one used when building the modules. It is the engine default for GDB as using full paths can be slow with this engine.</li></ul></body></html> <html><head/><body><p>設定中斷點時要如何指定路徑:</p><ul><li><i>使用引擎預設值</i>:使用除錯引擎的預設設定。</li><li><i>使用絕對路徑</i>:傳遞絕對路徑,以避免在幾個模組中有同名的檔案存在。這是 CDB 和 LLDB 使用的預設值。</li><li><i>使用檔案名稱</i>:只傳遞檔案名稱。這將在使用源碼樹狀結構,但是位置和建置模組時使用的路徑不同時很有用。這是 GDB 的預設值,因為使用絕對路徑的話會讓 GDB 變慢。</li></ul></body></html> - Edit Breakpoint Properties 編輯中斷點屬性 - Basic 基本 - Break on QML signal emit - Breakpoint &type: 中斷點型態(&T): - &File name: 檔案名稱(&F): - &Line number: 行號(&L): - &Enabled: 已開啟(&E): - &Address: 位址(&A): - Fun&ction: 函式(&C): - Advanced 進階 - T&racepoint only: 只有追蹤點(&R): - &One shot only: - Pat&h: 路徑(&H): - &Module: 模組(&M): @@ -21232,53 +17561,43 @@ GDB 允許使用 '\n' 來區隔多個指令序列。 指令(&C): - Use Engine Default 使用引擎預設值 - Use Full Path 使用完整路徑 - Use File Name 使用檔案名稱 - Debugger commands to be executed when the breakpoint is hit. This feature is only available for GDB. - &Commands: - C&ondition: 條件(&O): - &Ignore count: 忽略次數(&I): - &Thread specification: 執行緒指定(&T): - &Expression: 表示式(&E): - &Message: 訊息(&M): @@ -21306,77 +17625,62 @@ This feature is only available for GDB. CDB 除錯引擎無法用 core 檔來除錯。 - The console process '%1' could not be started. 無法啟動主控台行程 '%1'。 - Debugger Error 除錯工具錯誤 - There is no CDB executable specified. 沒有指定 CDB 可執行檔。 - CDB crashed CDB 已崩潰 - CDB exited (%1) CDB 已離開 (%1) - Unable to add expression 無法新增表示式 - Interrupting is not possible in remote sessions. 無法在遠端工作階段內中斷。 - Trace point %1 (%2) in thread %3 triggered. 追蹤點 %1 (%2) 在執行緒 %3 中被觸發。 - Conditional breakpoint %1 (%2) in thread %3 triggered, examining expression '%4'. 條件中斷點 %1 (%2) 在執行緒 %3 中被觸發,檢驗表示式 '%4'。 - Malformed stop response received. 接收到不正確的停止回應。 - Switching to main thread... 切換到主執行緒中... - Value %1 obtained from evaluating the condition of breakpoint %2, stopping. 計算中斷點 %2 的條件時取得了數值 %1,將停止。 - Value 0 obtained from evaluating the condition of breakpoint %1, continuing. 計算中斷點 %1 的條件時取得了數值 0,將繼續。 - "Select Widget to Watch": Please stop the application first. 「選擇要監看的元件」:請先停止應用程式。 - "Select Widget to Watch": Not supported in state '%1'. 「選擇要監看的元件」:在狀態 '%1' 時不支援。 @@ -21384,32 +17688,26 @@ This feature is only available for GDB. Debugger::Internal::CacheDirectoryDialog - Select Local Cache Folder 選擇本地快取資料夾 - Path: 路徑: - Already Exists 已存在 - A file named '%1' already exists. 名為 '%1' 的檔案已存在。 - Cannot Create 無法建立 - The folder '%1' could not be created. 資料夾 '%1' 無法被建立。 @@ -21417,17 +17715,14 @@ This feature is only available for GDB. Debugger::DebuggerEnginePrivate - Attempting to interrupt. 嘗試中斷中。 - Debug Information - Debugger Test 除錯工具測試 @@ -21435,175 +17730,136 @@ This feature is only available for GDB. Debugger::DebuggerEngine - Launching 正在啟動 - - This debugger cannot handle user input. 這個除錯工具無法處理使用者的輸入。 - Data breakpoint %1 (%2) at %3 triggered. 資料中斷點 %1 (%2) 在 %3 被觸發。 - Internal data breakpoint %1 at %2 triggered. 內部資料中斷點 %1 在 %2 被觸發。 - Data breakpoint %1 (%2) at %3 in thread %4 triggered. 資料中斷點 %1 (%2) 在執行緒 %4 的 %3 被觸發。 - Internal data breakpoint %1 at %2 in thread %3 triggered. 內部資料中斷點 %1 在執行緒 %3 的 %2 被觸發。 - Data breakpoint %1 (%2) at 0x%3 triggered. 資料中斷點 %1 (%2) 在 0x%3 被觸發。 - Internal data breakpoint %1 at 0x%2 triggered. 內部資料中斷點 %1 在 0x%2 被觸發。 - Data breakpoint %1 (%2) at 0x%3 in thread %4 triggered. 資料中斷點 %1 (%2) 在執行緒 %4 的 0x%3 被觸發。 - Internal data breakpoint %1 at 0x%2 in thread %3 triggered. 內部資料中斷點 %1 在執行緒 %3 的 0x%2 被觸發。 - Stopped at breakpoint %1 (%2) in thread %3. 停止在執行緒 %3 的中斷點 %1 (%2)。 - Stopped at internal breakpoint %1 in thread %2. 停止在執行緒 %2 的內部中斷點 %1。 - - - - Stopped. 已停止。 - Setup failed. 設定失敗。 - Loading finished. 載入完成。 - Run failed. 執行失敗。 - - - Running. 執行中。 - Run requested... 請求執行... - Stopped: "%1" 已停止:"%1" - Stopped: %1 (Signal %2). 已停止:%1 (信號 %2)。 - Stopped in thread %1 by: %2. 停止在執行緒 %1。理由:%2。 - Interrupted. 已中斷。 - <Unknown> name <未知> - <Unknown> meaning <未知> - <p>The inferior stopped because it received a signal from the Operating System.<p><table><tr><td>Signal name : </td><td>%1</td></tr><tr><td>Signal meaning : </td><td>%2</td></tr></table> <p>底層由於接收到作業系統的信號而停止。<p><table><tr><td>信號名稱: </td><td>%1</td></tr><tr><td>信號意義:</td><td>%2</td></tr></table> - Signal received 接收到信號 - <p>The inferior stopped because it triggered an exception.<p>%1 <p>底層由於觸發了例外狀況而停止。<p>%1 - Exception Triggered 觸發例外狀況 - Taking notice of pid %1 注意行程代碼 %1 - Run to Address 0x%1 執行到位址 0x%1 - Run to Line %1 執行到行 %1 - Jump to Address 0x%1 跳到位址 0x%1 - Jump to Line %1 跳到行 %1 @@ -21611,27 +17867,22 @@ This feature is only available for GDB. Debugger::DebuggerPlugin - Debug 除錯 - Option '%1' is missing the parameter. 選項 '%1' 缺少參數。 - Only one executable allowed! 只允許一個執行檔! - The parameter '%1' of option '%2' does not match the pattern <handle>:<pid>. 選項 '%2' 的參數 '%1' 不符合格式 <handle>:<pid>。 - Invalid debugger option: %1 無效的除錯選項: %1 @@ -21640,7 +17891,6 @@ This feature is only available for GDB. 應用程式需要除錯工具引擎 "%1",但是被關閉了。 - Some breakpoints cannot be handled by the debugger languages currently active, and will be ignored. 有某些中斷點無法被目前除錯工具作用中的語言處理,因此將會被忽略。 @@ -21669,12 +17919,10 @@ Details: %3 警告 - Install &Debug Information - Tries to install missing debug information. @@ -21682,45 +17930,38 @@ Details: %3 Debugger::DebuggerRunControl - Debugger 除錯工具 - No executable specified. 沒有指定執行檔。 - Debugging starts 除錯開始 - Debugging has failed 除錯失敗 - Debugging has finished 除錯已結束 - A debugging session is still in progress. Terminating the session in the current state can leave the target in an inconsistent state. Would you still like to terminate it? 一個除錯工作階段正在執行中。在目前狀態下強行結束工作階段可能會導致目標平台成為不同步的狀態。您確定要結束嗎? - Close Debugging Session 關閉除錯工作階段 @@ -21761,27 +18002,22 @@ Setting breakpoints by file name and line number may fail. Debugger::Internal::RemoteGdbProcess - Connection failure: %1. 連線失敗:%1。 - Could not create FIFO. 無法建立 FIFO。 - Application output reader unexpectedly finished. 應用程式輸出讀取器意外結束。 - Remote GDB failed to start. 遠端 gdb 啟動失敗。 - Remote GDB crashed. 遠端 gdb 已崩潰。 @@ -21833,12 +18069,10 @@ Setting breakpoints by file name and line number may fail. Debugger::Internal::DebuggerPane - Clear Contents 清除內容 - Save Contents 儲存內容 @@ -21846,7 +18080,6 @@ Setting breakpoints by file name and line number may fail. Debugger::Internal::InputPane - Type Ctrl-<Return> to execute a line. 按下 Ctrl-<Return> 執行一行。 @@ -21854,17 +18087,14 @@ Setting breakpoints by file name and line number may fail. Debugger::Internal::LogWindow - Debugger Log 除錯工具紀錄 - Command: 指令: - Log File 紀錄檔 @@ -21934,12 +18164,10 @@ Setting breakpoints by file name and line number may fail. 全名 - Internal Name - Full Name @@ -21947,7 +18175,6 @@ Setting breakpoints by file name and line number may fail. Git::Internal::SettingsPageWidget - Set the environment variable HOME to '%1' (%2). This causes msysgit to look for the SSH-keys in that location @@ -21958,17 +18185,14 @@ instead of its installation directory when run outside git bash. 而不是在安裝目錄搜尋。 - not currently set 目前尚未設定 - currently set to '%1' 目前設定到 '%1' - Git Repository Browser Command @@ -21976,12 +18200,10 @@ instead of its installation directory when run outside git bash. Help::Internal::ExternalHelpWindow - Show Sidebar 顯示邊列 - Qt Creator Offline Help Qt Creator 離線說明 @@ -21989,37 +18211,30 @@ instead of its installation directory when run outside git bash. EditorManager - Next Open Document in History 歷史紀錄中下一個開啟的檔案 - Previous Open Document in History 歷史紀錄中前一個開啟的檔案 - Go Back 返回 - Go Forward 前進 - Split 分割 - Split Side by Side 左右分割 - Close Document 關閉文件 @@ -22027,7 +18242,6 @@ instead of its installation directory when run outside git bash. Help::Internal::OpenPagesManager - Copy Full Path to Clipboard 複製完整路徑到剪貼簿 @@ -22035,7 +18249,6 @@ instead of its installation directory when run outside git bash. Help::Internal::RemoteHelpFilter - Web Search 搜尋網頁 @@ -22043,72 +18256,58 @@ instead of its installation directory when run outside git bash. ImageViewer::Internal::ImageViewerActionHandler - Zoom In 放大 - Ctrl++ Ctrl++ - Zoom Out 縮小 - Ctrl+- Ctrl+- - Original Size 原始大小 - Ctrl+0 Ctrl+0 - Meta+0 - Fit To Screen 適合螢幕 - Ctrl+= Ctrl+= - Switch Background 切換背景 - Switch Outline 切換大綱 - Toggle Animation - Ctrl+[ Ctrl+[ - Ctrl+] Ctrl+] @@ -22116,53 +18315,43 @@ instead of its installation directory when run outside git bash. ProjectExplorer::Internal::BuildStepListWidget - %1 Steps %1 is the name returned by BuildStepList::displayName 共 %1 步 - No %1 Steps 沒有 %1 步驟 - Add %1 Step 新增 %1 步驟 - Move Up 上移 - Disable 關閉 - Move Down 下移 - Remove Item 移除項目 - Removing Step failed 刪除步驟失敗 - Cannot remove build step while building 無法在建置時移除建置步驟 - No Build Steps 沒有建置步驟 @@ -22170,25 +18359,21 @@ instead of its installation directory when run outside git bash. ProjectExplorer::Internal::CopyTaskHandler - error: Task is of type: error 錯誤: - warning: Task is of type: warning 警告: - &Copy Name of the action triggering the copytaskhandler 複製(&C) - Copy task to clipboard 將工作複製到剪貼簿 @@ -22196,14 +18381,11 @@ instead of its installation directory when run outside git bash. ProjectExplorer::DeployConfiguration - - Deploy Display name of the deploy build step list. Used as part of the labels in the project window. 佈署 - Deploy locally Default DeployConfiguration display name @@ -22217,7 +18399,6 @@ instead of its installation directory when run outside git bash. ProjectExplorer::DeployConfigurationFactory - Deploy Configuration Display name of the default deploy configuration 佈署設置 @@ -22226,38 +18407,31 @@ instead of its installation directory when run outside git bash. ProjectExplorer::RunControl - Application Still Running 應用程式仍然執行中 - PID %1 行程代碼 %1 - Invalid Invalid process handle. 無效 - <html><head/><body><center><i>%1</i> is still running.<center/><center>Force it to quit?</center></body></html> <html><head/><body><center><i>%1</i> 仍然在執行中。<center/><center>要強制關閉它嗎?</center></body></html> - Force Quit 強制關閉 - Keep Running 保持執行 - Do not ask again 不要再次詢問 @@ -22265,12 +18439,10 @@ instead of its installation directory when run outside git bash. ProjectExplorer::Internal::ShowInEditorTaskHandler - &Show in Editor 在編輯器中顯示(&S) - Show task location in an editor. 在編輯器中顯示工作位置。 @@ -22278,12 +18450,10 @@ instead of its installation directory when run outside git bash. ProjectExplorer::Internal::ShowOutputTaskHandler - Show &Output 顯示輸出(&O) - Show output generating this issue. 顯示產生此問題的輸出。 @@ -22291,12 +18461,10 @@ instead of its installation directory when run outside git bash. ProjectExplorer::UserFileHandler - No deployment 目前無佈署 - Deploy to Maemo device 佈署至 Maemo 裝置 @@ -22308,12 +18476,10 @@ instead of its installation directory when run outside git bash. ProjectExplorer::Internal::VcsAnnotateTaskHandler - &Annotate 最後註記(&A) - Annotate using version control system 使用版本控制系統做最後狀態註記 @@ -22325,7 +18491,6 @@ instead of its installation directory when run outside git bash. 將組件移到分離的檔案中 - Move Component into Separate File @@ -22333,17 +18498,14 @@ instead of its installation directory when run outside git bash. QmlJSEditor::Internal::ComponentNameDialog - Choose a path 選擇路徑 - Invalid component name 組件名稱不合法 - Invalid path 無效的路徑 @@ -22352,12 +18514,10 @@ instead of its installation directory when run outside git bash. 對話框 - Component name: 組件名稱: - Path: 路徑: @@ -22366,7 +18526,6 @@ instead of its installation directory when run outside git bash. 選擇... - Move Component into Separate File @@ -22374,12 +18533,10 @@ instead of its installation directory when run outside git bash. QmlJSEditor::FindReferences - QML/JS Usages: QML/JS 用法: - Searching 搜尋中 @@ -22387,7 +18544,6 @@ instead of its installation directory when run outside git bash. QmlJSEditor::Internal::QmlJSOutlineWidget - Show All Bindings 顯示所有綁定 @@ -22399,7 +18555,6 @@ instead of its installation directory when run outside git bash. 分割初始器 - Split Initializer @@ -22459,22 +18614,18 @@ instead of its installation directory when run outside git bash. Qt4ProjectManager::Internal::AddLibraryWizard - Add Library 新增函式庫 - Type 型態 - Details 詳情 - Summary 摘要 @@ -22482,56 +18633,46 @@ instead of its installation directory when run outside git bash. Qt4ProjectManager::Internal::LibraryTypePage - Library Type 函式庫型態 - Choose the type of the library to link to 選擇要連結的函式庫類型 - System library 系統函式庫 - Links to a system library. Neither the path to the library nor the path to its includes is added to the .pro file. 連結到系統函式庫。 無論是函式庫的路徑還是函式庫的標頭檔都尚未被新增到 .pro 檔案中。 - System package 系統套件 - Links to a system library using pkg-config. 使用 pkg-config 連結到系統函式庫。 - External library 外部函式庫 - Links to a library that is not located in your build tree. Adds the library and include paths to the .pro file. 連結到不在您的建置樹狀結構中的函式庫。 請新增該函式庫並在 .pro 檔中加入引入路徑。 - Internal library 內部函式庫 - Links to a library that is located in your build tree. Adds the library and include paths to the .pro file. 連結到在您的建置樹狀結構中的函式庫。 @@ -22541,42 +18682,34 @@ Adds the library and include paths to the .pro file. Qt4ProjectManager::Internal::DetailsPage - System Library 系統函式庫 - Specify the library to link to 指定要連結的函式庫 - System Package 系統套件 - Specify the package to link to 指定要連結的套件 - External Library 外部函式庫 - Specify the library to link to and the includes path 指定要連結的函式庫與引入路徑 - Internal Library 內部函式庫 - Choose the project file of the library to link to 選擇要連結的函式庫的專案檔 @@ -22584,12 +18717,10 @@ Adds the library and include paths to the .pro file. Qt4ProjectManager::Internal::SummaryPage - Summary 摘要 - The following snippet will be added to the<br><b>%1</b> file: 以下的片段將會被加入<br><b>%1</b> 檔: @@ -22597,32 +18728,26 @@ Adds the library and include paths to the .pro file. Qt4ProjectManager::Internal::LibraryDetailsController - Linkage: 連結: - %1 Dynamic %1 動態 - %1 Static %1 靜態 - Mac: Mac: - %1 Framework %1 框架 - %1 Library %1 函式庫 @@ -22630,27 +18755,22 @@ Adds the library and include paths to the .pro file. Qt4ProjectManager::QmlDumpTool - Only available for Qt for Desktop and Qt for Qt Simulator. 僅限 Qt 桌面版或者 Qt 模擬器版本使用。 - Only available for Qt 4.7.1 or newer. 僅限 Qt 4.7.1 或更新版使用。 - Not needed. 不需要。 - Private headers are missing for this Qt version. 這個 Qt 版本的私有標頭檔遺失。 - qmldump qmldump @@ -22658,7 +18778,6 @@ Adds the library and include paths to the .pro file. ProjectExplorer::QmlDumpTool - qmldump could not be built in any of the directories: - %1 @@ -22672,7 +18791,6 @@ Reason: %2 QmlDumpBuildTask - Building helper 建置小助手 @@ -22680,22 +18798,18 @@ Reason: %2 Qt4ProjectManager::QmlObserverTool - Only available for Qt for Desktop or Qt for Qt Simulator. 僅限 Qt 桌面版或者 Qt 模擬器版本使用。 - Only available for Qt 4.7.1 or newer. 僅限 Qt 4.7.1 或更新版使用。 - Not needed. 不需要。 - QMLObserver QMLObserver @@ -22703,12 +18817,10 @@ Reason: %2 ProjectExplorer::QmlObserverTool - The target directory %1 could not be created. 目標目錄 %1 無法被建立。 - QMLObserver could not be built in any of the directories: - %1 @@ -23024,8 +19136,6 @@ Reason: %2 Qt4ProjectManager::AbstractMobileApp - - Could not open template file '%1'. 無法開啟樣本檔 '%1'。 @@ -23033,12 +19143,10 @@ Reason: %2 MobileAppWizard - Mobile Qt Application 行動 Qt 應用程式 - Creates a Qt application optimized for mobile devices with a Qt Designer-based main window. Preselects Qt for Simulator and mobile targets if available. @@ -23050,22 +19158,18 @@ Preselects Qt for Simulator and mobile targets if available. Qt4ProjectManager::Internal::QtQuickApp - The QML import path '%1' cannot be found. 找不到 QML 匯入路徑 '%1'。 - The QML module '%1' cannot be found. 找不到 QML 模組 '%1'。 - Invalid '%1' entry in '%2' of module '%3'. 模組 '%3' 在 '%2' 的 '%1' 入口無效。 - No .pro file for plugin '%1' can be found. 找不到外掛程式 '%1' 對應的 .pro 檔案。 @@ -23073,17 +19177,14 @@ Preselects Qt for Simulator and mobile targets if available. Qt4ProjectManager::Internal::QtQuickAppWizardDialog - New Qt Quick Application 新增 Qt Quick 應用程式 - This wizard generates a Qt Quick application project. 這個精靈將產生一個 Qt Quick 應用程式專案。 - Select existing QML file 選擇現有的 QML 檔案 @@ -23091,7 +19192,6 @@ Preselects Qt for Simulator and mobile targets if available. Qt4ProjectManager::Internal::QtQuickAppWizard - Creates a Qt Quick application project that can contain both QML and C++ code and includes a QDeclarativeView. @@ -23108,24 +19208,20 @@ Preselects Qt for Simulator and mobile targets if available. Symbian 的 Qt Quick 應用程式 - Qt Quick 1 Application (Built-in Elements) - The built-in elements in the QtQuick 1 namespace allow you to write cross-platform applications with a custom look and feel. Requires <b>Qt 4.7.0</b> or newer. - Qt Quick 2 Application (Built-in Elements) - Creates a Qt Quick application project that can contain both QML and C++ code and includes a QQuickView. The built-in elements in the QtQuick 2 namespace allow you to write cross-platform applications with a custom look and feel. @@ -23134,24 +19230,20 @@ Requires <b>Qt 5.0</b> or newer. - Qt Quick Application for MeeGo Harmattan MeeGo Harmattan 的 Qt Quick 應用程式 - The Qt Quick Components for MeeGo Harmattan are a set of ready-made components that are designed with specific native appearance for the MeeGo Harmattan platform. Requires <b>Qt 4.7.4</b> or newer, and the component set installed for your Qt version. - Qt Quick Application (from Existing QML File) Qt Quick 應用程式 (從現有的 QML 檔) - Creates a deployable Qt Quick application from existing QML files. All files and directories that reside in the same directory as the main .qml file are deployed. You can modify the contents of the directory any time before deploying. Requires <b>Qt 4.7.0</b> or newer. @@ -23161,12 +19253,10 @@ Requires <b>Qt 4.7.0</b> or newer. TaskList::Internal::StopMonitoringHandler - Stop Monitoring 停止監看 - Stop monitoring task files. 停止監看工作檔案。 @@ -23174,12 +19264,10 @@ Requires <b>Qt 4.7.0</b> or newer. TaskList::Internal::TaskFileFactory - Task file reader 工作檔讀取器 - File Error 檔案錯誤 @@ -23187,12 +19275,10 @@ Requires <b>Qt 4.7.0</b> or newer. TaskList::TaskListPlugin - Cannot open task file %1: %2 無法開啟工作檔案 %1:%2 - My Tasks Category under which tasklist tasks are listed in Issues view 我的工作 @@ -23201,37 +19287,30 @@ Requires <b>Qt 4.7.0</b> or newer. TextEditor::HighlighterSettingsPage - Generic Highlighter 一般突顯器 - Download Definitions... 下載定義... - Autodetect 自動偵測 - Autodetect Definitions 自動偵測定義 - No pre-installed definitions could be found. 找不到預安裝的定義。 - Error connecting to server. 連線到伺服器時發生錯誤。 - Not possible to retrieve data. 無法取得資料。 @@ -23239,62 +19318,50 @@ Requires <b>Qt 4.7.0</b> or newer. TextEditor::Internal::ManageDefinitionsDialog - Name 名稱 - Installed 已安裝 - Available 可使用 - Download Definitions 下載定義 - Download Information 下載資訊 - There is already one download in progress. Please wait until it is finished. 目前已經有一個下載正在進行中。請等待它完成。 - Dialog 對話框 - Definitions 定義 - Select All 全部選取 - Clear Selection 清除選擇 - Invert Selection 反向選擇 - Download Selected Definitions 下載已選取的定義 @@ -23302,34 +19369,28 @@ Requires <b>Qt 4.7.0</b> or newer. TextEditor::Internal::Manager - Registering definitions 正在註冊定義 - Downloading definitions 正在下載定義 - Error downloading selected definition(s). 下載選取的定義時發生錯誤。 - Error downloading one or more definitions. 下載一個或多個定義時發生錯誤。 - Please check the directory's access rights. 請檢查目錄存取權限。 - Download Error 下載錯誤 @@ -23337,17 +19398,14 @@ Please check the directory's access rights. TextEditor::Internal::OutlineWidgetStack - No outline available 沒有可用大綱 - Synchronize with Editor 與編輯器同步 - Filter tree 過濾樹狀圖 @@ -23355,7 +19413,6 @@ Please check the directory's access rights. TextEditor::Internal::OutlineFactory - Outline 大綱 @@ -23363,12 +19420,10 @@ Please check the directory's access rights. TextEditor::Internal::PlainTextEditorFactory - A highlight definition was not found for this file. Would you like to try to find one? 找不到此檔案的突顯定義。您要試著找找看嗎? - Show highlighter options... 顯示突顯選項... @@ -23376,42 +19431,34 @@ Please check the directory's access rights. Bazaar::Internal::BazaarCommitPanel - General Information 一般資訊 - Branch: 分支: - Local commit 本地提交 - Commit Information 提交資訊 - Author: 作者: - Email: 電子郵件: - Fixed bugs: 已修復的錯誤: - Perform a local commit in a bound branch. Local commits are not pushed to the master branch until a normal commit is performed. 執行本地提交到一個受限的分支。 @@ -23421,81 +19468,66 @@ Local commits are not pushed to the master branch until a normal commit is perfo Bazaar::Internal::CloneOptionsPanel - Options 選項 - Use existing directory 使用現有的目錄 - Stacked 已堆疊 - Standalone 獨立的 - Bind new branch to source location 綁定新的分支到源碼位置 - Switch checkout 切換分支 - Hardlink 硬式連結 - No working-tree 沒有工作樹 - Revision: 版本: - By default, branch will fail if the target directory exists, but does not already have a control directory. This flag will allow branch to proceed. 預設情況下,如果目標資料夾存在,但裡面沒有控制目錄,則分支將會失敗。 開啟這個旗標會讓這種分支動作進行下去。 - Create a stacked branch referring to the source branch. The new branch will depend on the availability of the source branch for all operations. 建立 stacked 分支來指向源分支. 新的分支將會自動判斷源分支的權限來確定可用性. - Do not use a shared repository, even if available. 即使可以使用,也不要使用共享主目錄。 - Switch the checkout in the current directory to the new branch. 將目前目錄切換到新的分支。 - Hard-link working tree files where possible. 如果可以,用硬式連結來連接工作樹下的檔案。 - Create a branch without a working-tree. 建立一個沒有工作樹的分支。 @@ -23503,77 +19535,62 @@ The new branch will depend on the availability of the source branch for all oper Bazaar::Internal::OptionsPage - Form 表單 - Configuration 設置 - Command: 指令: - User 使用者 - Username to use by default on commit. 提交時預設使用的使用者名稱。 - Default username: 預設使用者名稱: - Email to use by default on commit. 提交時預設使用的電子郵件地址。 - Default email: 預設電子郵件: - Miscellaneous 雜項 - Log count: 紀錄計數: - Timeout: 逾時: - s - Prompt on submit 提交時彈出提示 - Bazaar Bazaar - The number of recent commit logs to show. Choose 0 to see all entries. 要顯示的最近提交的紀錄數。選擇 0 表示看全部的紀錄。 @@ -23581,100 +19598,81 @@ The new branch will depend on the availability of the source branch for all oper Bazaar::Internal::PullOrPushDialog - Dialog 對話框 - Branch Location 分支位置 - Default location 預設位置 - Local filesystem: 本地檔案系統: - Specify URL: 指定網址: - Options 選項 - Remember specified location as default 記住指定的位置做為預設位置 - Overwrite 覆寫 - Use existing directory 使用現有的目錄 - Create prefix 建立前置字串 - Revision: 版本: - Local 本地 - Pull Source 取出源碼 - Push Destination 提交目標回上游 - For example: https://[user[:pass]@]host[:port]/[path] 例如:https://[使用者名稱[:密碼]@]主機名[:連接埠]/[路徑] - Ignore differences between branches and overwrite unconditionally. 忽略分支間的差異,無條件寫入。 - By default, push will fail if the target directory exists, but does not already have a control directory. This flag will allow push to proceed. 預設情況下,如果目標資料夾存在,但裡面沒有控制目錄,則提交回上游的動作將會失敗。 開啟這個旗標會讓這個動作進行下去。 - Create the path leading up to the branch if it does not already exist. 如果不存在,則建立一個路徑到分支。 - Perform a local pull in a bound branch. Local pulls are not applied to the master branch. 執行本地取出 (pull) 到一個受限的分支。 @@ -23684,17 +19682,14 @@ Local pulls are not applied to the master branch. Bazaar::Internal::RevertDialog - Revert 還原 - Specify a revision other than the default? 要指定一個版本而不使用預設版本嗎? - Revision: 版本: @@ -23702,62 +19697,50 @@ Local pulls are not applied to the master branch. Core::Internal::ExternalToolConfig - Form 表單 - Add tool 新增工具 - Add 新增 - Remove tool 移除工具 - Remove 移除 - Revert tool to default 還原為預設工具 - Reset 重置 - Description: 描述: - Executable: 執行檔: - Arguments: 參數: - Working directory: 工作目錄: - <html><head/><body> <p>What to do with the executable's standard output. <ul><li>Ignore: Do nothing with it</li><li>Show in pane: Show it in the general output pane</li><li>Replace selection: Replace the current selection in the current document with it</li></ul></p></body></html> @@ -23768,27 +19751,22 @@ Local pulls are not applied to the master branch. - Output: 輸出: - Ignore 忽略 - Show in Pane 顯示在窗格中 - Replace Selection 取代選擇 - <html><head><body> <p >What to do with the executable's standard error output.</p> <ul><li>Ignore: Do nothing with it</li> @@ -23803,37 +19781,30 @@ Local pulls are not applied to the master branch. </ul></body></html> - Error output: 錯誤輸出: - Text to pass to the executable via standard input. Leave empty if the executable should not receive any input. 文字傳遞給通過標準輸入可執行檔案,留空此項如果可執行檔不會收到任何輸入. - Input: 輸入: - If the tool modifies the current document, set this flag to ensure that the document is saved before running the tool and is reloaded after the tool finished. 如果工具變更了目前的文檔,設置這個旗幟保證文檔在工具執行前被儲存並且在工具執行後自動重載文檔。 - Modifies current document 變更目前的文件 - Add Tool 新增工具 - Add Category 新增類別 @@ -23841,7 +19812,6 @@ Local pulls are not applied to the master branch. Core::VariableChooser - Insert variable 插入變數 @@ -23864,42 +19834,34 @@ Local pulls are not applied to the master branch. Macros::Internal::MacroOptionsWidget - Form 表單 - Preferences 喜好設定 - Name 名稱 - Description 描述 - Shortcut 快捷鍵 - Remove 移除 - Macro 巨集 - Description: 描述: @@ -23907,17 +19869,14 @@ Local pulls are not applied to the master branch. Macros::Internal::SaveDialog - Save Macro 儲存巨集 - Name: 名稱: - Description: 描述: @@ -23925,22 +19884,18 @@ Local pulls are not applied to the master branch. ProjectExplorer::Internal::PublishingWizardSelectionDialog - Publishing Wizard Selection 選擇發佈精靈 - Available Wizards: 可用精靈: - Start Wizard 開啟精靈 - Publishing is currently not possible for project '%1'. 目前無法發布專案 '%1'。 @@ -23994,14 +19949,12 @@ Local pulls are not applied to the master branch. QmlJS::TypeDescriptionReader - Errors while loading qmltypes from %1: %2 從 %1 載入 qmltype 時發生錯誤: %2 - Warnings while loading qmltypes from %1: %2 從 %1 載入 qmltype 時發生警告: @@ -24011,29 +19964,23 @@ Local pulls are not applied to the master branch. Utils::EnvironmentModel - <UNSET> <未設定> - Variable 變數 - Value - - <VARIABLE> Name when inserting a new variable <變數> - <VALUE> Value when inserting a new variable <值> @@ -24042,7 +19989,6 @@ Local pulls are not applied to the master branch. Utils::IpAddressLineEdit - The IP address is not valid. 不是一個合法的 IP 位址。 @@ -24050,7 +19996,6 @@ Local pulls are not applied to the master branch. Utils::QtcProcess - Error in command line. 命令列發生錯誤。 @@ -24207,58 +20152,46 @@ Local pulls are not applied to the master branch. Valgrind::XmlProtocol::ErrorListModel - - No errors found 沒有找到錯誤 - What 什麼 - Location 位置 - File 檔案 - Line 行號 - Unique 唯一 - Thread ID 執行緒代碼 - Kind 種類 - Leaked Blocks 洩漏的區塊 - Leaked Bytes 洩露的位元組 - Helgrind Thread ID Helgrind 執行緒代碼 @@ -24266,22 +20199,18 @@ Local pulls are not applied to the master branch. Valgrind::XmlProtocol - Function: 函式: - Location: 位置: - Instruction pointer: 指令指標: - Object: 物件: @@ -24289,68 +20218,54 @@ Local pulls are not applied to the master branch. Valgrind::XmlProtocol::Parser - - Could not parse hex number from "%1" (%2) 無法剖析從"%1" (%2) 來的十六進位數 - trying to read element text although current position is not start of element 嘗試著閱讀文本但是目前的位置不是文本元素的開頭 - Unexpected child element while reading element text 閱讀文本元素時遇到無法預期的子元素 - Unexpected token type %1 未預料到的類型 `%1' - Could not parse protocol version from "%1" 無法處理protocol版本從"%1" - XmlProtocol version %1 not supported (supported version: 4) XmlProtocol 版本%1 不被支持(支持版本: 4) - Valgrind tool "%1" not supported Valgrind 工具 "%1" 尚不支援 - Unknown memcheck error kind "%1" 未知記憶體檢測錯誤種類 "%1" - Unknown helgrind error kind "%1" 未知的 helgrind 錯誤種類 "%1" - Unknown ptrcheck error kind "%1" 未知的 ptrcheck 錯誤種類 "%1" - Could not parse error kind, tool not yet set. 無法剖析錯誤種類,工具尚未設置。 - Unknown state "%1" 未知的狀態 "%1" - Unexpected exception caught during parsing. 剖析時抓取到未預期的例外狀況。 @@ -24358,37 +20273,30 @@ Local pulls are not applied to the master branch. Valgrind::XmlProtocol::StackModel - Description 描述 - Instruction Pointer 指令指標 - Object 物件 - Function 函式 - Directory 目錄 - File 檔案 - Line 行號 @@ -24396,7 +20304,6 @@ Local pulls are not applied to the master branch. Analyzer - Analyzer 分析器 @@ -24404,7 +20311,6 @@ Local pulls are not applied to the master branch. Analyzer::Internal::AnalyzerMode - Analyze 分析 @@ -24412,19 +20318,16 @@ Local pulls are not applied to the master branch. Analyzer::AnalyzerManager - Tool "%1" started... 工具 "%1" 已啟動... - Tool "%1" finished, %n issues were found. 工具 "%1" 已完成,找到了 %n 個狀況。 - Tool "%1" finished, no issues were found. 工具 "%1" 已完成,沒有找到任何狀況。 @@ -24432,7 +20335,6 @@ Local pulls are not applied to the master branch. Analyzer::Internal::AnalyzerPlugin - Analyzer Category under which Analyzer tasks are listed in Issues view 分析器 @@ -24441,12 +20343,10 @@ Local pulls are not applied to the master branch. Analyzer::Internal::AnalyzerRunConfigWidget - Analyzer settings: 分析器設定: - Analyzer Settings 分析器設定 @@ -24454,12 +20354,10 @@ Local pulls are not applied to the master branch. Analyzer::Internal::AnalyzerRunControlFactory - Analyzer 分析器 - No analyzer tool selected @@ -24471,7 +20369,6 @@ Local pulls are not applied to the master branch. (遠端) - (External) @@ -24479,7 +20376,6 @@ Local pulls are not applied to the master branch. Bazaar::Internal::BazaarControl - Bazaar Bazaar @@ -24487,12 +20383,10 @@ Local pulls are not applied to the master branch. Bazaar::Internal::BazaarEditor - Annotate %1 最後註記 %1 - Annotate parent revision %1 父版本 %1 最後註記 @@ -24500,192 +20394,154 @@ Local pulls are not applied to the master branch. Bazaar::Internal::BazaarPlugin - Bazaar Bazaar - Annotate Current File 目前檔案最後註記 - Annotate "%1" 最後註記 "%1" - Diff Current File 比較目前檔案 - Diff "%1" 比較 "%1" - ALT+Z,Alt+D ALT+Z,Alt+D - Meta+Z,Meta+D - Log Current File 目前檔案紀錄 - Log "%1" "%1" 的紀錄 - ALT+Z,Alt+L ALT+Z,Alt+L - Meta+Z,Meta+L - Status Current File 目前檔案的狀態 - Status "%1" "%1" 的狀態 - ALT+Z,Alt+S ALT+Z,Alt+S - Meta+Z,Meta+S - Add 新增 - Add "%1" 新增 "%1" - Delete... 刪除... - Delete "%1"... 刪除 "%1"... - Revert Current File... 復原目前檔案... - Revert "%1"... 復原 "%1"... - Diff 比較 - Log 紀錄 - Revert... 復原... - Status 狀態 - Pull... 取出... - Push... 提交回上游... - Update... 更新... - Commit... 提交... - ALT+Z,Alt+C ALT+Z,Alt+C - Meta+Z,Meta+C - Create Repository... 建立主目錄... - Update 更新 - Commit 提交 - Diff &Selected Files 比較選取的檔案(&S) - &Undo 復原(&U) - &Redo 重做(&R) - There are no changes to commit. 沒有變更可提交。 @@ -24694,32 +20550,26 @@ Local pulls are not applied to the master branch. 無法為提交編輯器產生暫存檔。 - Unable to create an editor for the commit. 無法為提交建立編輯器。 - Unable to create a commit editor. 無法建立提交編輯器。 - Commit changes for "%1". 為 "%1" 提交變更。 - Close Commit Editor 關閉提交編輯器 - Do you want to commit the changes? 您要提交此變更嗎? - Message check failed. Do you want to proceed? 訊息檢查失敗。您要繼續嗎? @@ -24727,12 +20577,10 @@ Local pulls are not applied to the master branch. Bazaar::Internal::CloneWizard - Clones a Bazaar branch and tries to load the contained project. 複製一個 Bazaar 分支,並試著載入裡面包含的專案。 - Bazaar Clone (Or Branch) Bazaar 複製 (或分支) @@ -24740,17 +20588,14 @@ Local pulls are not applied to the master branch. Bazaar::Internal::CloneWizardPage - Location 位置 - Specify repository URL, clone directory and path. 請指定主目錄網址、複製目錄與路徑。 - Clone URL: 複製網址: @@ -24758,7 +20603,6 @@ Local pulls are not applied to the master branch. Bazaar::Internal::CommitEditor - Commit Editor 提交編輯器 @@ -24766,7 +20610,6 @@ Local pulls are not applied to the master branch. Bazaar::Internal::OptionsPageWidget - Bazaar Command Bazaar 指令 @@ -24774,8 +20617,6 @@ Local pulls are not applied to the master branch. CMakeProjectManager::Internal::CMakeManager - - Run CMake 執行 CMake @@ -24783,32 +20624,26 @@ Local pulls are not applied to the master branch. Core::Internal::ExternalToolModel - Uncategorized 未分類 - Tools that will appear directly under the External Tools menu. 會直接顯示在額外工具選單中的工具。 - New Category 新類別 - New Tool 新工具 - This tool prints a line of useful text 此工具可以列印一行有用的文字 - Useful text Sample external tool text 有用的文字 @@ -24817,83 +20652,62 @@ Local pulls are not applied to the master branch. Core::Internal::ExternalTool - Creates qm translation files that can be used by an application from the translator's ts files 從翻譯者翻譯好的 ts 檔產生給應用程式使用的 qm 檔 - Release Translations (lrelease) 釋出翻譯 (lrelease) - - Linguist 語言家 - Synchronizes translator's ts files with the program code 將給翻譯者翻譯用的 ts 檔案與程式源碼同步 - Update Translations (lupdate) 更新翻譯 (lupdate) - Opens the current file in Notepad 用記事本開啟目前檔案 - Edit with Notepad 使用記事本編輯 - - - - Text 文字 - Runs the current QML file with qmlviewer 使用 qmlviewer 執行目前 QML檔案 - Preview (qmlviewer) 預覽 (qmlviewer) - Qt Quick Qt Quick - Sorts the selected text 對選取的文字排序 - Sort Selection 排序選取 - - Opens the current file in vi 在 vi 中開啟目前檔案 - - Edit with vi 使用 vi 進行編輯 @@ -24901,19 +20715,16 @@ Local pulls are not applied to the master branch. Core::Internal::ExternalToolRunner - Could not find executable for '%1' (expanded '%2') 找不到 '%1' 的執行檔 (展開'%2') - Starting external tool '%1' %2 啟動外部工具 '%1' %2 - '%1' finished '%1' 已完成 @@ -24921,22 +20732,18 @@ Local pulls are not applied to the master branch. Core::ExternalToolManager - Configure... 設置... - &External 外部(&E) - Error while parsing external tool %1: %2 剖析外部工具時發生錯誤 %1:%2 - Error: External tool in %1 has duplicate id 錯誤:在 %1 的外部工具有重複的代碼 @@ -24948,67 +20755,54 @@ Local pulls are not applied to the master branch. 魔術標頭檔 - Add Magic Header - Error 錯誤 - Not a valid byte pattern. 不是一個有效的位元組樣式。 - Dialog 對話框 - Value: 值: - Type 型態 - String 字串 - Byte 位元組 - Use Recommended 使用建議 - Start range: 開始範圍: - End range: 結束範圍: - Priority: 優先等級: - <i>Note: Wide range values might impact Qt Creator's performance when opening files.</i> <i>注意:取值範圍太大可能影響到 Qt Creator 開啟檔案的效能。</i> @@ -25016,32 +20810,26 @@ Local pulls are not applied to the master branch. Core::Internal::MimeTypeSettingsModel - MIME Type MIME 型態 - Handler 處理器 - Undefined 未定義 - Invalid MIME Type 無效 MIME 型態 - Conflicting pattern(s) will be discarded. 發生衝突的樣式將被丟棄。 - %n pattern(s) already in use. %n 個樣式已在使用中。 @@ -25051,28 +20839,22 @@ Local pulls are not applied to the master branch. Core::Internal::MimeTypeSettingsPrivate - - Error 錯誤 - No MIME type selected. 沒有選中任何 MIME 型態。 - No magic header selected. 沒有選取任何魔術標頭檔。 - MIME Types MIME 型態 - Changes will take effect in the next time you start Qt Creator. 這些變更將在下次啟動 Qt Creator 時生效。 @@ -25080,7 +20862,6 @@ Local pulls are not applied to the master branch. Core::Internal::MimeTypeSettings - MIME Types MIME 型態 @@ -25088,7 +20869,6 @@ Local pulls are not applied to the master branch. Core::Internal::ToolSettings - External Tools 外部工具 @@ -25096,43 +20876,36 @@ Local pulls are not applied to the master branch. Core::VcsManager - Version Control 版本控制 - Would you like to remove this file from the version control system (%1)? Note: This might remove the local file. 您要從版本控制系統 (%1) 中移除此檔案嗎? 注意:這樣也會將本地端的檔案一起移除。 - Add to Version Control 新增至版本控制系統 - Add the file %1 to version control (%2)? - Add the files %1 to version control (%2)? - Adding to Version Control Failed 新增檔案到版本控制系統失敗 - Could not add the file %1 to version control (%2) @@ -25140,7 +20913,6 @@ to version control (%2) - Could not add the following files to version control (%1) %2 @@ -25149,17 +20921,14 @@ to version control (%2) CppEditor::Internal::CPPEditorWidget - Sort Alphabetically 按字母排序 - &Refactor 重構(&R) - Unused variable 未使用的變數 @@ -25171,7 +20940,6 @@ to version control (%2) 產生遺失的 Q_PROPERTY 成員... - Generate Missing Q_PROPERTY Members... @@ -25179,12 +20947,10 @@ to version control (%2) CppEditor::Internal::CppOutlineTreeView - Expand All 全部展開 - Collapse All 全部摺疊 @@ -25192,7 +20958,6 @@ to version control (%2) CppEditor::Internal::CppSnippetProvider - C++ C++ @@ -25200,22 +20965,18 @@ to version control (%2) Debugger::Internal::MultiBreakPointsDialog - Edit Breakpoint Properties 編輯中斷點屬性 - &Condition: 條件(&C): - &Ignore count: 忽略次數(&I): - &Thread specification: 執行緒指定(&T): @@ -25227,17 +20988,14 @@ to version control (%2) <html><body><p>遠端CDB 需要讀取匹配的 Qt Creator CDB 外掛程式(<code>%1</code> or <code>%2</code>, respectively).</p><p>複製到遠端機器然後設置環境變數<code>%3</code> 指向這個資料夾.</p><p>啟動遠端CDB 作為 <code>%4 &lt;執行檔&gt;</code> 來使用TCP/IP 作為通信協議.</p><p>輸入連接參數如:</p><pre>%5</pre></body></html> - <html><body><p>The remote CDB needs to load the matching Qt Creator CDB extension (<code>%1</code> or <code>%2</code>, respectively).</p><p>Copy it onto the remote machine and set the environment variable <code>%3</code> to point to its folder.</p><p>Launch the remote CDB as <code>%4 &lt;executable&gt;</code> to use TCP/IP as communication protocol.</p><p>Enter the connection parameters as:</p><pre>%5</pre></body></html> - Start a CDB Remote Session 啟動一個 CDB 遠端工作階段 - &Connection: 連線(&C): @@ -25245,12 +21003,10 @@ to version control (%2) Debugger::Internal::DebuggerMainWindowPrivate - Memory... 記憶體... - Debugger Toolbar 除錯器工具列 @@ -25258,97 +21014,76 @@ to version control (%2) Debugger::Internal::DebuggerPluginPrivate - No function selected. 沒有選擇函式。 - Running to function "%1". 執行至函式 "%1"。 - - - Process %1 行程 %1 - Attaching to local process %1. 掛接到本地行程 %1。 - Remote: "%1" 遠端:"%1" - Attaching to remote server %1. 掛接到遠端伺服器 %1。 - - Core file "%1" Core 檔案 "%1" - Attaching to core file %1. 掛接到 core 檔 %1。 - Crashed process %1 已崩潰的行程 %1 - Attaching to crashed process %1 掛接到已崩潰的行程 %1 - Warning 警告 - 0x%1 hit Message tracepoint: Address hit. 碰到 0x%1 - %1:%2 %3() hit Message tracepoint: %1 file, %2 line %3 function hit. 碰到 %1:%2 %3() - Add Message Tracepoint 新增訊息追蹤點 - Message: 訊息: - Executable file "%1" 可執行檔 "%1" - Debugging file %1. 除錯檔案 %1。 - Cannot attach to process with PID 0 無法掛接代碼為 0 的行程 @@ -25369,47 +21104,38 @@ to version control (%2) 找不到遠端行程 "%1" 的 ABI。 - Remove Breakpoint %1 移除中斷點 %1 - Disable Breakpoint %1 關閉中斷點 %1 - Enable Breakpoint %1 開啟中斷點 %1 - Edit Breakpoint %1... 編輯中斷點 %1... - Set Breakpoint at 0x%1 在 0x%1 處設置中斷點 - Set Message Tracepoint at 0x%1... 在 0x%1 處設置訊息追蹤點... - Start '%1' and break at function 'main()' 啟動 '%1' 然後在'main()'函式處中斷 - Save Debugger Log 儲存除錯工具紀錄 - User commands are not accepted in the current state. 在目前狀態下不能使用命令。 @@ -25434,32 +21160,26 @@ to version control (%2) 除錯工具無法載入除錯小助手函式庫。 - Debugger finished. 除錯完成。 - Set Breakpoint at Line %1 在第 %1 行設定中斷點 - Set Message Tracepoint at Line %1... 在第 %1 行設定訊息追蹤點... - Disassemble Function "%1" 反組譯函式 "%1" - Starting debugger "%1" for ABI "%2"... 為 ABI "%2" 啟動除錯工具 "%1"... - Continue 繼續 @@ -25468,62 +21188,50 @@ to version control (%2) 離開除錯工具 - Interrupt 中斷 - Debugger is Busy 除錯工具忙碌中 - Abort Debugging 中止除錯 - Aborts debugging and resets the debugger to the initial state. 中止除錯並重置除錯工具到初始狀態。 - Step Over 單步跳過 - Step Into 單步進入 - Step Out 單步跳出 - Run to Line 執行到行號 - Run to Selected Function 執行到選擇的函式 - Immediately Return From Inner Function 從內部函式立即返回 - Jump to Line 跳到指定行 - Toggle Breakpoint 切換中斷點 @@ -25532,38 +21240,30 @@ to version control (%2) 新增到監視視窗 - Reverse Direction 反轉方向 - Move to Called Frame 移動到被呼叫的框架 - Move to Calling Frame 移動到呼叫者的框架 - Error evaluating command line arguments: %1 計算命令列參數時發生錯誤:%1 - - Start Debugging 開始除錯 - Start Debugging Without Deployment 不佈署而開始除錯 - Start and Debug External Application... 啟動並除錯外部應用程式... @@ -25576,7 +21276,6 @@ to version control (%2) 掛接到執行中的本地端應用程式... - Load Core File... 讀取 core 檔案... @@ -25585,12 +21284,10 @@ to version control (%2) 啟動並且除錯遠端應用程式... - Attach to Remote Debug Server... 掛接到遠端除錯伺服器... - Start Remote Debug Server Attached to Process... 啟動掛接到行程的遠端除錯伺服器... @@ -25599,22 +21296,18 @@ to version control (%2) 掛接到執行中的遠端行程... - Attach to QML Port... 掛接到 QML 連接埠... - Attach to Remote CDB Session... 掛接到遠端的 CDB 工作階段... - Detach Debugger 脫離除錯工具 - Start Gdbserver 啟動 Gdbserver @@ -25623,169 +21316,135 @@ to version control (%2) 掛接到遠端行程 - Interrupt Debugger 中斷除錯工具 - Stop Debugger 停止除錯 - Process Already Under Debugger Control 行程已在除錯器的控制之下 - The process %1 is already under the control of a debugger. Qt Creator cannot attach to it. 行程 %1 已在除錯器的控制之下。Qt Creator 無法再掛上去。 - Ctrl+Y - F5 F5 - - Add Expression Evaluator - Select 選擇 - Zoom 縮放 - Attach to Running Application... - Attach to Running Application - Shift+Ctrl+Y - Shift+F5 Shift+F5 - Reset Debugger 重置除錯工具 - Ctrl+Shift+O Ctrl+Shift+O - F10 F10 - Ctrl+Shift+I - F11 F11 - Ctrl+Shift+T Ctrl+Shift+T - Shift+F11 Shift+F11 - Shift+F8 Shift+F8 - Ctrl+F10 Ctrl+F10 - Ctrl+F6 Ctrl+F6 - F12 F12 - F8 F8 - F9 F9 - Threads: 執行緒: - Symbol 符號 - Address 位址 - Code 代碼 - Section 區段 - Name 名稱 - Symbols in "%1" "%1" 中的符號 @@ -25808,77 +21467,62 @@ Qt Creator cannot attach to it. Debugger::Internal::DebuggerSourcePathMappingWidget - <new source> <新來源> - <new target> <新目標> - Source path 來源路徑 - Target path 目標路徑 - Add 新增 - Add Qt sources... 新增 Qt 來源... - Remove 移除 - Source Paths Mapping 來源路徑映射 - <html><head/><body><p>Mappings of source file folders to be used in the debugger can be entered here.</p><p>This is useful when using a copy of the source tree at a location different from the one at which the modules where built, for example, while doing remote debugging.</body></html> <html><head/><body><p>除錯工具使用的映射源資料夾在這裡輸入.</p><p>這在來源檔案和建置模組路徑不一致是非常有用, 比如, 在遠端除錯的時候.</body></html> - Add a mapping for Qt's source folders when using an unpatched version of Qt. 新增一個Qt源資料夾的映射檔使用沒打過補丁版本的Qt. - The source path contained in the debug information of the executable as reported by the debugger 源路徑中的可執行檔案的除錯訊息中所報告的除錯工具 - &Source path: 來源路徑(&S): - The actual location of the source tree on the local machine 在本地機器上源碼樹的真實位置 - &Target path: 目標路徑(&T): - Qt Sources Qt 源碼 @@ -25897,7 +21541,6 @@ Qt Creator cannot attach to it. DebuggerEngine - Debugging complex command lines is currently not supported on Windows. 目前不支援在 Windows 中對複雜的命令列除錯。 @@ -25922,8 +21565,6 @@ Qt Creator cannot attach to it. Debugger::Internal::IPCEngineHost - - Fatal engine shutdown. Incompatible binary or IPC error. 嚴重的引擎錯誤關閉。不相容的二進位檔或 IPC 錯誤。 @@ -25931,17 +21572,14 @@ Qt Creator cannot attach to it. Debugger::Internal::LldbEngineHost - qtcreator-lldb failed to start: %1 qtcreator-lldb 無法啟動:%1 - Fatal engine shutdown. Consult debugger log for details. 嚴重的引擎錯誤關閉。詳情請查看除錯工具紀錄。 - SSH connection error: %1 SSH 連線錯誤:%1 @@ -25949,7 +21587,6 @@ Qt Creator cannot attach to it. Debugger::Internal::LldbOptionsPage - LLDB LLDB @@ -25957,17 +21594,14 @@ Qt Creator cannot attach to it. Debugger::Internal::MemoryAgent - Memory at 0x%1 記憶體在 0x%1 - No Memory Viewer Available 沒有可用的記憶體檢視器 - The memory contents cannot be shown as no viewer plugin for binary data has been loaded. 因為沒有載入二進制資料檢視器外掛程式,因此無法顯示記憶體內容。 @@ -25975,17 +21609,14 @@ Qt Creator cannot attach to it. Debugger::Internal::QmlCppEngine - The slave debugging engine required for combined QML/C++-Debugging could not be created: %1 從屬除錯引擎需要整合QML/C++-除錯無法被建立: %1 - C++ debugger activated 已啟用 C++ 除錯工具 - QML debugger activated 已啟用 QML 除錯工具 @@ -25993,68 +21624,54 @@ Qt Creator cannot attach to it. Debugger::Internal::QmlEngine - - Qt Creator Qt Creator - Could not connect to the in-process QML debugger. Do you want to retry? 無法連線到進行中的 QML 除錯工具。 您要再重試嗎? - Could not connect to the in-process QML debugger. %1 無法連線到進行中的 QML 除錯工具。 %1 - QML Debugger: Remote host closed connection. QML 除錯工具:遠端主機關閉了連線。 - QML Debugger: Could not connect to service '%1'. QML 除錯工具:無法連線到服務 '%1'。 - - JS Source for %1 %1 的 JS 源碼 - Run to line %1 (%2) requested... - Context: 內文: - Starting %1 %2 正在啟動 %1 %2 - No application output received in time - Failed to start application 應用程式啟動失敗 - Application startup failed: %1 應用程式啟動失敗:%1 @@ -26067,7 +21684,6 @@ Do you want to retry? 已停止。 - QML Debugger disconnected. QML 除錯工具已斷線。 @@ -26102,22 +21718,18 @@ Do you want to retry? Git::Internal::BaseGitDiffArgumentsWidget - Use the patience algorithm for calculating the differences. 使用 patience 演算法來計算差異。 - Patience Patience - Ignore whitespace only changes. 忽略只有空白的變更。 - Ignore Whitespace 忽略空白 @@ -26125,37 +21737,30 @@ Do you want to retry? Git::Internal::GitShowArgumentsWidget - oneline 一行 - short - medium - full 完整 - fuller 更完整 - email 電子郵件 - raw 原始 @@ -26163,22 +21768,18 @@ Do you want to retry? Git::Internal::GitBlameArgumentsWidget - Hide the date of a change from the output. 在輸出隱藏變更日期。 - Omit Date 省略日期 - Ignore whitespace only changes. 忽略只有空白的變更。 - Ignore Whitespace 忽略空白 @@ -26186,7 +21787,6 @@ Do you want to retry? GLSLEditor - GLSL GLSL @@ -26194,48 +21794,39 @@ Do you want to retry? GLSLEditor::Internal::GLSLEditorPlugin - GLSL GLSL sub-menu in the Tools menu GLSL - Creates a fragment shader in the OpenGL/ES 2.0 Shading Language (GLSL/ES). Fragment shaders generate the final pixel colors for triangles, points and lines rendered with OpenGL. 使用 OpenGL/ES 2.0 著色語言 (GLSL/ES) 來建立片段著色器。片段著色器生成的三角形,點與線的最終像素顏色都是 OpenGL 渲染的。 - Fragment Shader (OpenGL/ES 2.0) 片段著色器 (OpenGL/ES 2.0) - Creates a vertex shader in the OpenGL/ES 2.0 Shading Language (GLSL/ES). Vertex shaders transform the positions, normals and texture co-ordinates of triangles, points and lines rendered with OpenGL. 使用 OpenGL/ES 2.0 著色語言 (GLSL/ES) 來建立頂點著色器。頂點著色器生成的三角形,點與線的最終像素顏色都是 OpenGL 渲染的。 - Vertex Shader (OpenGL/ES 2.0) 頂點著色器 (OpenGL/ES 2.0) - Creates a fragment shader in the Desktop OpenGL Shading Language (GLSL). Fragment shaders generate the final pixel colors for triangles, points and lines rendered with OpenGL. 使用桌面 OpenGL 著色語言 (GLSL)來建立一個片段著色器。片段著色器生成的三角形,點與線的最終像素顏色都是OpenGL渲染的。 - Fragment Shader (Desktop OpenGL) 片段著色器 (Desktop OpenGL) - Creates a vertex shader in the Desktop OpenGL Shading Language (GLSL). Vertex shaders transform the positions, normals and texture co-ordinates of triangles, points and lines rendered with OpenGL. 使用桌面 OpenGL 著色語言 (GLSL)來建立一個頂點著色器。頂點著色器生成的三角形,點與線的最終像素顏色都是OpenGL渲染的。 - Vertex Shader (Desktop OpenGL) 頂點著色器 (Desktop OpenGL) @@ -26243,7 +21834,6 @@ Do you want to retry? GLSLEditor::GLSLFileWizard - New %1 新增 %1 @@ -26251,7 +21841,6 @@ Do you want to retry? Macros::Internal::MacroLocatorFilter - Macros 巨集 @@ -26259,22 +21848,18 @@ Do you want to retry? Macros::MacroManager - Playing Macro 播放巨集 - An error occurred while replaying the macro, execution stopped. 重新播放巨集時發生錯誤,執行停止。 - Macro mode. Type "%1" to stop recording and "%2" to play it 巨集模式。類型 "%1" 停止錄製,"%2" 播放 - Stop Recording Macro 停止錄製巨集 @@ -26282,57 +21867,46 @@ Do you want to retry? Macros::Internal::MacrosPlugin - &Macros 巨集(&M) - Record Macro 錄製巨集 - Ctrl+( Ctrl+( - Alt+( Alt+( - Stop Recording Macro 停止錄製巨集 - Ctrl+) Ctrl+) - Alt+) Alt+) - Play Last Macro 播放上次的巨集 - Alt+R Alt+R - Meta+R - Save Last Macro 儲存上次的巨集 @@ -26340,8 +21914,6 @@ Do you want to retry? ProjectExplorer::Internal::GccToolChainFactory - - GCC GCC @@ -26349,12 +21921,10 @@ Do you want to retry? ProjectExplorer::Internal::GccToolChainConfigWidget - &Compiler path: 編譯器路徑(&C): - &ABI: &ABI: @@ -26362,8 +21932,6 @@ Do you want to retry? ProjectExplorer::Internal::MingwToolChainFactory - - MinGW MinGW @@ -26371,8 +21939,6 @@ Do you want to retry? ProjectExplorer::Internal::LinuxIccToolChainFactory - - Linux ICC Linux ICC @@ -26380,8 +21946,6 @@ Do you want to retry? ProjectExplorer::Internal::MsvcToolChainFactory - - MSVC MSVC @@ -26405,7 +21969,6 @@ Do you want to retry? ProjectExplorer::Internal::MsvcToolChainConfigWidget - Initialization: 初始化: @@ -26421,7 +21984,6 @@ Do you want to retry? ProjectExplorer::ProjectsMode - Projects 專案 @@ -26429,7 +21991,6 @@ Do you want to retry? ProjectExplorer::ToolChain - Clone of %1 %1 的複本 @@ -26457,7 +22018,6 @@ Do you want to retry? 重置 - Name: 名稱: @@ -26465,48 +22025,38 @@ Do you want to retry? ProjectExplorer::Internal::ToolChainModel - Auto-detected 自動偵測 - Manual 手動 - <nobr><b>ABI:</b> %1 <nobr><b>ABI:</b> %1 - not up-to-date 不是最新 - Name 名稱 - Type 型態 - - Duplicate Compilers Detected - The following compiler was already configured:<br>&nbsp;%1<br>It was not configured again. - The following compilers were already configured:<br>&nbsp;%1<br>They were not configured again. @@ -26534,23 +22084,18 @@ Do you want to retry? 工具鍊 - - Compilers - Add 新增 - Clone 複製 - Remove 移除 @@ -26558,25 +22103,21 @@ Do you want to retry? QmlDesigner::ItemLibraryWidget - Library Title of library view 函式庫 - Items Title of library items view 項目 - Resources Title of library resources view 資源 - <Filter> Library search input hint text <過濾器> @@ -26585,23 +22126,19 @@ Do you want to retry? QmlDesigner::StatesEditorModel - base state Implicit default state 基本狀態 - Invalid state name 無效狀態名稱 - The empty string as a name is reserved for the base state. 空字串是為基本狀態保留的名稱。 - Name already used in another state 此名稱已經被其他狀態使用 @@ -26609,7 +22146,6 @@ Do you want to retry? QmlDesigner::StatesEditorView - base state 基本狀態 @@ -26617,17 +22153,14 @@ Do you want to retry? JsFileOptionsPage - Options 選項 - Stateless library 無狀態函式庫 - Usually each QML component instance has a unique copy of imported JavaScript libraries. Indicating that a library is stateless means that a single instance will be shared among @@ -26642,7 +22175,6 @@ QML component instance objects and properties directly. QmlJSEditor::JsFileWizard - New %1 新增 %1 @@ -26650,17 +22182,14 @@ QML component instance objects and properties directly. QmlJSEditor::QmlJSTextEditorWidget - Show Qt Quick ToolBar 顯示 Qt Quick 工具列 - Unused variable 未使用的變數 - Refactoring 重構中 @@ -26668,12 +22197,10 @@ QML component instance objects and properties directly. QmlJSEditor::Internal::QmlJSOutlineTreeView - Expand All 全部展開 - Collapse All 全部摺疊 @@ -26681,7 +22208,6 @@ QML component instance objects and properties directly. QmlJSEditor::Internal::QmlJSSnippetProvider - QML QML @@ -26708,7 +22234,6 @@ QML component instance objects and properties directly. QmlJSTools::Internal::FunctionFilter - Methods and Functions 方法和函式 @@ -26716,7 +22241,6 @@ QML component instance objects and properties directly. QmlJSTools::Internal::ModelManager - Indexing 建索引中 @@ -26724,7 +22248,6 @@ QML component instance objects and properties directly. QmlJSTools::Internal::PluginDumper - QML module does not contain information about components contained in plugins Module path: %1 @@ -26735,7 +22258,6 @@ See "Using QML Modules with Plugins" in the documentation. 在文檔中查看 "Using QML Modules with Plugins" . - Automatic type dump of QML module failed. Errors: %1 @@ -26746,7 +22268,6 @@ Errors: - Automatic type dump of QML module failed. First 10 lines or errors: @@ -26759,26 +22280,22 @@ Check 'General Messages' output pane for details. Check 'General Messages' output pane for details. - Warnings while parsing qmltypes information of %1: %2 分析qml類型%1訊息時發生警告: %2 - Errors while reading typeinfo files: 讀取類型訊息檔案發生錯誤: - Could not locate the helper application for dumping type information from C++ plugins. Please build the qmldump application on the Qt version options page. 無法定位助手應用來從C++外掛程式類型轉儲. 請在Qt 版本頁面建置 qmldump應用. - Failed to parse '%1'. Error: %2 剖析 '%1' 失敗。 @@ -26796,22 +22313,18 @@ Error: %2 Qt 版本: - Arguments: 參數: - Main QML file: 主要 QML 檔案: - Run Environment 執行環境 - System Environment 系統環境變數 @@ -26823,27 +22336,22 @@ Error: %2 Qt4ProjectManager::QmlDebuggingLibrary - Only available for Qt 4.7.1 or newer. 僅限 Qt 4.7.1 或更新版使用。 - Not needed. 不需要。 - QML Debugging QML 除錯 - The target directory %1 could not be created. 目標目錄 %1 無法被建立。 - QML Debugging library could not be built in any of the directories: - %1 @@ -27238,12 +22746,12 @@ Your application will also be rejected by Nokia Store QA if you choose an unrele %1 Debug Name of a debug build configuration to created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 除錯 + %1 Debug %1 Release Name of a release build configuration to be created by a project wizard, %1 being the Qt version name. We recommend not translating it. - %1 發佈 + %1 Release @@ -27353,7 +22861,6 @@ Your application will also be rejected by Nokia Store QA if you choose an unrele Qt 版本 - Mobile Options 行動裝置選項 @@ -27362,17 +22869,14 @@ Your application will also be rejected by Nokia Store QA if you choose an unrele Symbian 特定 - Targets 目標 - Maemo5 And MeeGo Specific 指定 Maemo5 和 Meego - Harmattan Specific 指定 Harmattan @@ -27380,17 +22884,14 @@ Your application will also be rejected by Nokia Store QA if you choose an unrele Qt4ProjectManager::Internal::Html5AppWizardDialog - New HTML5 Application 新的 HTML5 應用程式 - This wizard generates a HTML5 application project. 本精靈將產生 HTML5 應用程式專案。 - HTML Options HTML 選項 @@ -27398,12 +22899,10 @@ Your application will also be rejected by Nokia Store QA if you choose an unrele Qt4ProjectManager::Internal::Html5AppWizard - HTML5 Application HTML5 應用程式 - Creates an HTML5 application project that can contain both HTML5 and C++ code and includes a WebKit view. You can build the application and deploy it on desktop and mobile target platforms. @@ -27421,7 +22920,6 @@ You can build the application and deploy it on desktop and mobile target platfor Qt4ProjectManager::Internal::Html5AppWizardOptionsPage - Select HTML File 選擇 HTML 檔案 @@ -27429,27 +22927,22 @@ You can build the application and deploy it on desktop and mobile target platfor Qt4ProjectManager::Internal::MobileAppWizardGenericOptionsPage - Automatically Rotate Orientation 自動旋轉方向 - Lock to Landscape Orientation 鎖定在橫向 - Lock to Portrait Orientation 鎖定在縱向 - WizardPage 精靈頁面 - Orientation behavior: 方向行為: @@ -27457,12 +22950,10 @@ You can build the application and deploy it on desktop and mobile target platfor Qt4ProjectManager::Internal::MobileAppWizardMaemoOptionsPage - WizardPage 精靈頁面 - Application icon (64x64): 應用程式圖示(64x64): @@ -27470,27 +22961,22 @@ You can build the application and deploy it on desktop and mobile target platfor Qt4ProjectManager::Internal::SubdirsProjectWizard - Subdirs Project 子目錄專案 - Creates a qmake-based subdirs project. This allows you to group your projects in a tree structure. 建立基於 qmake 的子目錄專案,讓您可以將您的專案組織在一個樹狀結構中。 - Done && Add Subproject 完成並新增子專案 - Finish && Add Subproject 完成並新增子專案 - New Subproject Title of dialog 新增子專案 @@ -27499,7 +22985,6 @@ You can build the application and deploy it on desktop and mobile target platfor Qt4ProjectManager::Internal::SubdirsProjectWizardDialog - This wizard generates a Qt4 subdirs project. Add subprojects to it later on by using the other wizards. 本精靈將產生一個 Qt4 子目錄專案。您稍後可以用其它的精靈來新增子專案到這裡。 @@ -27516,43 +23001,35 @@ You can build the application and deploy it on desktop and mobile target platfor Qt Creator 可以為專案 <b>%1</b> 設置以下目標: - <span style=" font-weight:600;">No valid kits found.</span> - Please add a kit in the <a href="buildandrun">options</a> or via the maintenance tool of the SDK. - Select Kits for Your Project - Kit Selection - %1 - temporary - Qt Creator can use the following kits for project <b>%1</b>: %1: Project name - No Build Found 沒有找到建置 - No build found in %1 matching project %2. 在 %1 沒有找到符合專案 %2 的建置。 @@ -27560,42 +23037,34 @@ You can build the application and deploy it on desktop and mobile target platfor TextEditor::BaseTextEditorWidget - CTRL+D CTRL+D - Print Document 列印文件 - File Error 檔案錯誤 - <b>Error:</b> Could not decode "%1" with "%2"-encoding. Editing not possible. <b>錯誤:</b> 無法用 "%2"-編碼來解碼 "%1"。無法編輯。 - Select Encoding 選擇編碼 - Delete UTF-8 BOM on Save - Add UTF-8 BOM on Save - The text is too large to be displayed (%1 MB). 文字過大,無法顯示(%1 MB)。 @@ -27603,7 +23072,6 @@ You can build the application and deploy it on desktop and mobile target platfor TextEditor::Internal::PlainTextSnippetProvider - Text 文字 @@ -27611,28 +23079,22 @@ You can build the application and deploy it on desktop and mobile target platfor TextEditor::Internal::SnippetsTableModel - - Error 錯誤 - Not a valid trigger. 不是一個有效的觸發。 - Trigger 觸發 - Trigger Variant 觸發變異 - Error reverting snippet. 回復片段時發生錯誤。 @@ -27640,22 +23102,18 @@ You can build the application and deploy it on desktop and mobile target platfor TextEditor::Internal::SnippetsSettingsPagePrivate - Snippets 片段 - Error While Saving Snippet Collection 儲存片段收藏時發生錯誤 - Error 錯誤 - No snippet selected. 沒有選取片段。 @@ -27663,17 +23121,14 @@ You can build the application and deploy it on desktop and mobile target platfor VcsBase::VcsBaseClient - Unable to start process '%1': %2 無法啟動行程 '%1':%2 - Timed out after %1s waiting for the process %2 to finish. 等待行程 %2 完成,%1 秒後逾時。 - Working... 工作中... @@ -27681,62 +23136,50 @@ You can build the application and deploy it on desktop and mobile target platfor VcsBase::VcsBaseEditorWidget - Annotate "%1" 最後註記 "%1" - Copy "%1" 複製 "%1" - Describe change %1 描述改變 %1 - Send to CodePaster... 發送至 CodePaster... - Apply Chunk... 套用區塊... - Revert Chunk... 回復區塊... - Unable to Paste 無法貼上 - Code pasting services are not available. 代碼貼上服務無法使用。 - Revert Chunk 回復區塊 - Apply Chunk 套用區塊 - Would you like to revert the chunk? 您要回復此區塊嗎? - Would you like to apply the chunk? 您要套用此區塊嗎? @@ -27803,7 +23246,6 @@ You can build the application and deploy it on desktop and mobile target platfor Macros - Macros 巨集 @@ -27811,48 +23253,34 @@ You can build the application and deploy it on desktop and mobile target platfor AnchorButtons - Set top anchor 設置頂部錨點 - - - - - - - Setting anchors in states is not supported. 不支援在狀態中設定錨點。 - Set bottom anchor 設置底部錨點 - Set left anchor 設置左側錨點 - Set right anchor 設置右側錨點 - Fill to parent - Set vertical anchor 設定垂直錨點 - Set horizontal anchor 設定水平錨點 @@ -27860,27 +23288,22 @@ You can build the application and deploy it on desktop and mobile target platfor ColorGroupBox - Color editor 顏色編輯器 - Hue 色調 - Saturation 飽和度 - Brightness 亮度 - Alpha Alpha 值 @@ -27888,32 +23311,26 @@ You can build the application and deploy it on desktop and mobile target platfor ColorTypeButtons - Solid color 純色 - Solid color (only editable in base state) 純色 (僅在基礎狀態下可編輯) - Gradient 漸層 - Gradient (only editable in base state) 漸層 (僅在基礎狀態下可編輯) - Transparent 透明 - Transparent (only editable in base state) 透明 (僅在基礎狀態下可編輯) @@ -27921,139 +23338,114 @@ You can build the application and deploy it on desktop and mobile target platfor CppTools::Internal::CppCodeStyleSettingsPage - Form 表單 - General 一般 - Content 內容 - Indent 縮排 - "public", "protected" and "private" within class body 在類別內的 "public", "protected" 和 "private" - Declarations relative to "public", "protected" and "private" 和 "public", "protected" 與 "private" 相關的宣告 - Statements within method body 在方法主體中的敘述 - Statements within blocks 在區塊中的敘述 - Declarations within "namespace" definition 在命名空間定義內 的宣告 - Braces 括號 - Indent Braces 縮排括號 - Class declarations 類別宣告 - Namespace declarations 命名空間宣告 - Enum declarations 列舉宣告 - Method declarations 方法宣告 - Blocks 區塊 - "switch" "switch" - Indent within "switch" 在 "switch" 內縮排 - "case" or "default" "case" 或 "default" - Statements relative to "case" or "default" 與 "case" 或 "default" 相關的敘述 - Blocks relative to "case" or "default" 與 "case" 或 "default" 相關的區塊 - "break" statement relative to "case" or "default" 與 "case" 或 "default" 相關的 "break" 敘述 - Alignment 對齊方式 - Align 對齊 - <html><head/><body> Enables alignment to tokens after =, += etc. When the option is disabled, regular continuation line indentation will be used.<br> <br> @@ -28084,18 +23476,15 @@ a = a + </body></html> - Align after assignments 分配後對齊 - Add extra padding to conditions if they would align to the next line 如果需要對齊下一行啟用空白填充 - <html><head/><body> Adds an extra level of indentation to multiline conditions in the switch, if, while and foreach statements if they would otherwise have the same or less indentation than a nested statement. @@ -28118,27 +23507,22 @@ if (a && Git::Internal::BranchAddDialog - Dialog 對話框 - Branch Name: 分支名稱: - CheckBox 勾選盒 - Track remote branch '%1' 追蹤遠端分支 '%1' - Track local branch '%1' 追蹤本地分支 '%1' @@ -28146,17 +23530,14 @@ if (a && Git::Internal::RemoteAdditionDialog - Add Remote 新增遠端 - Name: 名稱: - URL: 網址: @@ -28164,42 +23545,34 @@ if (a && Git::Internal::RemoteDialog - Remotes 遠端 - Re&fresh 刷新(&F) - &Add... 新增(&A)... - F&etch 抓取(&E) - &Remove 移除(&R) - Delete Remote 移除遠端 - Would you like to delete the remote "%1"? 您要刪除遠端 "%1" 嗎? - &Push 提交回上游(&P) @@ -28207,27 +23580,22 @@ if (a && QmlProfiler::Internal::QmlProfilerAttachDialog - QML Profiler QML 效能分析器 - &Host: 主機(&H): - localhost localhost - &Port: 連接埠(&P): - Sys&root: Sysroot(&R): @@ -28235,57 +23603,46 @@ if (a && QtSupport::Internal::DebuggingHelper - Used to extract QML type information from library-based plugins. 用於從基於函式庫的外掛程式中展開 QML 型態資訊。 - QML Dump: QML 傾印: - A modified version of qmlviewer with support for QML/JS debugging. 變更過的 qmlviewer 版本,支援 QML/JS 除錯。 - QML Observer: QML 觀察者: - Build 建置 - QML Debugging Library: QML 除錯函式庫: - Helps showing content of Qt types. Only used in older versions of GDB. 協助顯示 Qt 型態的內容。只能用在較舊版本的 GDB 上。 - GDB Helper: GDB 小助手: - Show compiler output of last build. 顯示最後一次建置的編譯輸出。 - Show Log 顯示紀錄 - Build All 全部建置 @@ -28294,7 +23651,6 @@ if (a && 工具鍊: - Compiler: @@ -28302,17 +23658,14 @@ if (a && QtSupport::Internal::QtVersionInfo - Version name: 版本名稱: - qmake location: qmake 位置: - Edit 編輯 @@ -28320,27 +23673,22 @@ if (a && QtSupport::Internal::QtVersionManager - Name 名稱 - qmake Location qmake 位置 - Remove 移除 - Clean up 清理 - Add... 新增... @@ -28348,22 +23696,18 @@ if (a && Valgrind::Internal::SuppressionDialog - Suppression File: Suppression 檔案: - Suppression: - Select Suppression File 選擇Suppression 檔案 - Save Suppression 儲存Suppression @@ -28371,87 +23715,70 @@ if (a && Valgrind::Internal::ValgrindConfigWidget - Generic Settings 一般設定 - Valgrind executable: Valgrind 執行檔: - Valgrind Command Valgrind 指令 - Valgrind Suppression Files - Valgrind Suppression File (*.supp);;All Files (*) Valgrind 設置檔案 (*.supp);;所有檔案 (*) - Memory Analysis Options 記憶體分析選項 - Backtrace frame count: 回溯框架數: - Suppression files: Suppression 檔案: - Add... 新增... - Remove 移除 - Track origins of uninitialized memory 追蹤未初始化記憶體的原始 - Profiling Options 分析設置選項 - Limits the amount of results the profiler gives you. A lower limit will likely increase performance. 限制分析器輸出結果數量.限制的越低,性能越高. - Result view: Minimum event cost: 結果視圖: 最小專案花費: - % % - Show additional information for events in tooltips 在工具提示中顯示事件的額外資訊 - <html><head/><body> <p>Does full cache simulation.</p> <p>By default, only instruction read accesses will be counted ("Ir").</p> @@ -28476,12 +23803,10 @@ With cache simulation, further event counters are enabled: </body></html> - Enable cache simulation 開啟快取模擬 - <html><head/><body> <p>Do branch prediction simulation.</p> <p>Further event counters are enabled: </p> @@ -28498,27 +23823,22 @@ With cache simulation, further event counters are enabled: "Bi"/"Bim")</li></ul></body></html> - Enable branch prediction simulation 開啟分支預測模擬 - Collect information for system call times. 蒐集系統調用時間的訊息. - Collect system call time 收集系統呼叫時間 - Collect the number of global bus events that are executed. The event type "Ge" is used for these events. 蒐集執行全局總線事件的數量.事件類型"Ge"被用做此類事件. - Collect global bus events 收集全域匯流排事件 @@ -28527,7 +23847,6 @@ With cache simulation, further event counters are enabled: 可視化:最小事件花費: - Visualization: Minimum event cost: @@ -28535,17 +23854,14 @@ With cache simulation, further event counters are enabled: VcsBase::VcsConfigurationPage - Configuration 設置 - Please configure <b>%1</b> now. 請現在設置 <b>%1</b>。 - Configure... 設置... @@ -28553,68 +23869,54 @@ With cache simulation, further event counters are enabled: Utils::FileUtils - Refusing to remove root directory. 拒絕移除根目錄。 - Refusing to remove your home directory. 拒絕移除您的家目錄。 - Failed to remove directory '%1'. 移除目錄 '%1' 失敗。 - Failed to remove file '%1'. 移除檔案 '%1' 失敗。 - Failed to create directory '%1'. 無法建立目錄 '%1'。 - Could not copy file '%1' to '%2'. 無法將檔案 '%1' 複製到 '%2'。 - Cannot open %1 for reading: %2 無法開啟 %1 來讀取:%2 - Cannot read %1: %2 無法讀取 %1:%2 - - File Error 檔案錯誤 - Cannot write file %1. Disk full? 無法寫入檔案 %1。磁碟空間是否已滿? - Cannot overwrite file %1: %2 無法覆寫檔案 %1:%2 - Cannot create file %1: %2 無法建立檔案 %1:%2 - Cannot create temporary file in %1: %2 無法於 %1 建立暫存檔:%2 @@ -28622,44 +23924,34 @@ With cache simulation, further event counters are enabled: Analyzer::AnalyzerManagerPrivate - &Analyze 分析(&A) - Start 啟動 - Stop 停止 - Analyzer Toolbar 分析器工具列 - - Debug 除錯 - - Release 發佈 - Run %1 in %2 Mode? 要用 %2 模式執行 %1 嗎? - <html><head/><body><p>You are trying to run the tool "%1" on an application in %2 mode. The tool is designed to be used in %3 mode.</p><p>Debug and Release mode run-time characteristics differ significantly, analytical findings for one mode may or may not be relevant for the other.</p><p>Do you want to continue and run the tool in %2 mode?</p></body></html> @@ -28668,17 +23960,14 @@ With cache simulation, further event counters are enabled: <html><head/><body><p>你嘗試執行工具'%1' 在應用程式中使用%2 模式. 工具是被設計成執行在%3 模式下.</p><p>你還想繼續執行在%2 模式下嗎?</p></body></html> - &Do not ask again 不要再詢問(&D) - An analysis is still in progress. 有一個分析正在進行中。 - No analyzer tool selected. 沒有選取任何分析器工具。 @@ -28686,12 +23975,10 @@ With cache simulation, further event counters are enabled: Bazaar::Internal::BazaarDiffParameterWidget - Ignore whitespace 忽略空白 - Ignore blank lines 忽略空白行 @@ -28699,12 +23986,10 @@ With cache simulation, further event counters are enabled: CMakeProjectManager::Internal::CMakeEditor - Changes to cmake files are shown in the project tree after building. 建置之後在專案樹中顯示 cmake 檔的變化。 - Build now 現在建置 @@ -28712,12 +23997,10 @@ With cache simulation, further event counters are enabled: Core::Internal::PromptOverwriteDialog - Overwrite Existing Files 覆寫現有檔案 - The following files already exist in the folder %1. Would you like to overwrite them? @@ -28729,7 +24012,6 @@ Would you like to overwrite them? Core::InfoBarDisplay - Close 關閉 @@ -28737,7 +24019,6 @@ Would you like to overwrite them? Core::OutputWindow - Additional output omitted 省略額外的輸出 @@ -28747,23 +24028,19 @@ Would you like to overwrite them? CppTools::CppToolsSettings - Global Settings 全域 - Qt Qt - GNU GNU - Old Creator 舊的 Creator @@ -28771,12 +24048,10 @@ Would you like to overwrite them? Cvs::Internal::CvsDiffParameterWidget - Ignore whitespace 忽略空白 - Ignore blank lines 忽略空白行 @@ -28784,7 +24059,6 @@ Would you like to overwrite them? Debugger::Internal::DebuggerToolTipWidget - Previous 前一個 @@ -28792,12 +24066,10 @@ Would you like to overwrite them? Debugger::Internal::RegisterMemoryView - Memory at Register '%1' (0x%2) 在暫存器 '%1' 的記憶體 (0x%2) - Register '%1' 暫存器 '%1' @@ -28805,17 +24077,14 @@ Would you like to overwrite them? FakeVim::Internal::FakeVimUserCommandsModel - Action 動作 - Command 指令 - User command #%1 使用者指令 #%1 @@ -28823,12 +24092,10 @@ Would you like to overwrite them? FakeVim::Internal::FakeVimUserCommandsPage - User Command Mapping 使用者指令映射 - FakeVim FakeVim @@ -28836,17 +24103,14 @@ Would you like to overwrite them? GenericProjectManager::Internal::FilesSelectionWizardPage - Hide files matching: 隱藏符合條件的檔案: - Apply Filter 套用過濾器 - Generating file list... %1 @@ -28858,7 +24122,6 @@ Would you like to overwrite them? GenericProjectManager::Internal::GenericProjectPlugin - Edit Files... 編輯檔案... @@ -28866,22 +24129,18 @@ Would you like to overwrite them? GenericProjectManager::Internal::SelectableFilesDialog - Edit Files 編輯檔案 - Hide files matching: 隱藏符合條件的檔案: - Apply Filter 套用過濾器 - Generating file list... %1 @@ -28890,7 +24149,6 @@ Would you like to overwrite them? %1 - Not showing %n files that are outside of the base directory. These files are preserved. @@ -28902,7 +24160,6 @@ These files are preserved. Git::Internal::BranchModel - Local Branches 本地分支 @@ -28910,17 +24167,14 @@ These files are preserved. ImageViewer::Internal::ImageViewer - Cannot open image file %1. 無法開啟影像檔 %1。 - Play Animation - Pause Animation @@ -28928,12 +24182,10 @@ These files are preserved. Mercurial::Internal::MercurialDiffParameterWidget - Ignore whitespace 忽略空白 - Ignore blank lines 忽略空白行 @@ -28941,7 +24193,6 @@ These files are preserved. Perforce::Internal::PerforceDiffParameterWidget - Ignore whitespace 忽略空白 @@ -28949,7 +24200,6 @@ These files are preserved. ProjectExplorer::AbiWidget - <custom> <自訂> @@ -28957,48 +24207,38 @@ These files are preserved. ProjectExplorer::Internal::AppOutputPane - Attach debugger to this process 掛接除錯工具到此行程 - Attach debugger to %1 掛接除錯工具到 %1 - - Stop 停止 - Close Tab 關閉分頁 - Close All Tabs 關閉所有分頁 - Close Other Tabs 關閉其他分頁 - Re-run this run-configuration 重新執行此執行設置 - Application Output 應用程式輸出 - Application Output Window 應用程式輸出視窗 @@ -29010,7 +24250,6 @@ These files are preserved. 代碼風格設定 - Code Style @@ -29022,7 +24261,6 @@ These files are preserved. 代碼風格設定 - Code Style @@ -29030,13 +24268,11 @@ These files are preserved. ProjectExplorer::EditorConfiguration - Project Settings 專案 - Project %1 Settings, %1 is a language (C++ or QML) 專案 %1 @@ -29045,8 +24281,6 @@ These files are preserved. ProjectExplorer::Internal::ClangToolChainFactory - - Clang Clang @@ -29054,7 +24288,6 @@ These files are preserved. QmlDesigner::ComponentAction - Edit sub components defined in this file 編輯這個檔案中定義的子組件 @@ -29062,22 +24295,18 @@ These files are preserved. QmlDesigner::NodeInstanceServerProxy - Cannot Start QML Puppet Executable 無法啟動 QML Puppet 執行檔 - The executable of the QML Puppet process (%1) cannot be started. Please check your installation. QML Puppet is a process which runs in the background to render the items. 可執行檔QML 替身程序(%1) 無法啟動. 請檢查你的安裝. QML 替身程序是執行在後台來檢查專案的. - Cannot Find QML Puppet Executable 找不到 QML Puppet 執行檔 - The executable of the QML Puppet process (%1) cannot be found. Please check your installation. QML Puppet is a process which runs in the background to render the items. 可執行檔QML 替身程序(%1) 無法被找到. 請檢查你的安裝. QML 替身程序是執行在後台來檢查專案的. @@ -29085,112 +24314,90 @@ These files are preserved. QmlDesigner::ModelNodeContextMenu - Selection 選擇 - Select parent: %1 選擇父節點: %1 - Select: %1 選擇:%1 - Stack (z) 堆疊 (z) - To Front 到前面 - To Back 到後面 - Raise 提升 - Lower 降低 - Reset z property 重置 z 屬性 - Edit 編輯 - Reset Position 重置位置 - Reset Size 重置大小 - Visibility 可見度 - Anchors 錨點 - Fill 填充 - Reset 重置 - Layout 佈局 - Layout in Row 列佈局 - Layout in Column 欄佈局 - Layout in Grid 網格佈局 - Layout in Flow 流程佈局 - Go into Component 進入組件 @@ -29245,12 +24452,10 @@ These files are preserved. QmlJSTools - Code Style 代碼風格 - Qt Quick Qt Quick @@ -29258,12 +24463,10 @@ These files are preserved. QmlJSTools::Internal::QmlJSToolsPlugin - &QML/JS QML/JS(&Q) - Reset Code Model 重置代碼模型 @@ -29271,18 +24474,15 @@ These files are preserved. QmlJSTools::QmlJSToolsSettings - Global Settings 全域 - Qt Qt - Old Creator 舊的 Creator @@ -29290,7 +24490,6 @@ These files are preserved. QmlProfiler::Internal::QmlProfilerEngine - QML Profiler QML 效能分析器 @@ -29301,17 +24500,14 @@ These files are preserved. 請使用停止按鈕. - No executable file to launch. 沒有可執行檔來啟動。 - Qt Creator Qt Creator - Could not connect to the in-process QML debugger: %1 %1 is detailed error message @@ -29322,37 +24518,26 @@ These files are preserved. QmlProfiler::Internal::QmlProfilerTool - - - - QML Profiler QML 效能分析器 - The QML Profiler can be used to find performance bottlenecks in applications using QML. QML 效能分析器可以用於找到使用 QML 應用程式的效能瓶頸。 - QML Profiler Options QML 效能分析器選項 - - Load QML Trace 載入 QML 追蹤 - - Save QML Trace 儲存 QML 追蹤 - Application finished before loading profiled data. Please use the stop button instead. @@ -29382,7 +24567,6 @@ Please use the stop button instead. 重置縮放 - The QML profiler requires Qt 4.7.4 or newer. The Qt version configured in your active build configuration is too old. Do you want to continue? @@ -29403,33 +24587,26 @@ Do you want to continue? JavaScript - %1 s %1 秒 - Elapsed: %1 已經過:%1 - - QML traces (*%1) QML 追蹤 (*%1) - Discard data 丟棄資料 - Disable profiling 關閉效能分析 - Enable profiling 開啟效能分析 @@ -29447,26 +24624,22 @@ Do you want to retry? QmlProfiler::Internal::RemoteLinuxQmlProfilerRunner - Gathering ports failed: %1 - Not enough free ports on device for analyzing. 裝置上可用於分析的連接埠不夠。 - Starting remote process... 啟動遠端行程... - Failure running remote process. @@ -29509,14 +24682,12 @@ Do you want to retry? QmlProjectManager::Internal::QmlProjectRunControl - Starting %1 %2 正在啟動 %1 %2 - %1 exited with code %2 %1 已離開,離開代碼 %2 @@ -29526,7 +24697,6 @@ Do you want to retry? QmlProjectManager::Internal::QmlProjectRunControlFactory - Run 執行 @@ -29773,7 +24943,6 @@ Previous Qt versions have limitations in building suitable SIS files. Qt4ProjectManager::Qt4BuildConfiguration - Parsing the .pro file 正在剖析 .pro 檔 @@ -29781,12 +24950,10 @@ Previous Qt versions have limitations in building suitable SIS files. Qt4ProjectManager::Qt4ProFileNode - Error while parsing file %1. Giving up. 剖析檔案 %1 時發生錯誤。準備放棄。 - Could not find .pro file for sub dir '%1' in '%2' 在 '%2' 的子目錄 '%1' 中找不到 .pro 檔 @@ -29794,17 +24961,14 @@ Previous Qt versions have limitations in building suitable SIS files. Qt4ProjectManager::Internal::QtQuickComponentSetOptionsPage - Select QML File 選擇 QML 檔案 - Select Existing QML file 選擇現有的 QML 檔 - All files and directories that reside in the same directory as the main QML file are deployed. You can modify the contents of the directory any time before deploying. 資料夾內所有檔案包括主 QML 檔案已經佈署。 你可以在佈署之前的任何時間變更資料夾裡的內容. @@ -29812,47 +24976,38 @@ Previous Qt versions have limitations in building suitable SIS files. BaseQtVersion - The compiler '%1' (%2) cannot produce code for the Qt version '%3' (%4). - Name: 名稱: - Invalid Qt version 無效的 Qt 版本 - ABI: ABI: - Source: 來源: - mkspec: mkspec: - qmake: qmake: - Default: 預設: - Version: 版本: @@ -29860,7 +25015,6 @@ Previous Qt versions have limitations in building suitable SIS files. QtSupport::Internal::GettingStartedWelcomePage - Getting Started 入門 @@ -29868,17 +25022,14 @@ Previous Qt versions have limitations in building suitable SIS files. QtSupport::Internal::QtOptionsPageWidget - <specify a name> <指定一個名稱> - Auto-detected 自動偵測 - Manual 手動 @@ -29887,12 +25038,10 @@ Previous Qt versions have limitations in building suitable SIS files. 移除無效的 Qt 版本 - Do you want to remove all invalid Qt Versions?<br><ul><li>%1</li></ul><br>will be removed. 您要移除所有無效的 Qt 版本嗎?<br><ul><li>%1</li></ul><br>將會被刪除。 - Qt version %1 for %2 %2 的 Qt 版本 %1 @@ -29905,23 +25054,18 @@ Previous Qt versions have limitations in building suitable SIS files. 因為缺少工具鍊,所以不是所有的目標平台都能被支援。 - The following ABIs are currently not supported:<ul><li>%1</li></ul> 目前不支援以下的 ABI:<ul><li>%1</li></ul> - Building helpers 建置小助手 - Debugging Helper Build Log for '%1' '%1' 的除錯小助手建置紀錄 - - Select a qmake executable 選擇一個 qmake 執行檔 @@ -29934,71 +25078,51 @@ Previous Qt versions have limitations in building suitable SIS files. 選取的 qt 版本必須是給相同的目標平台使用。 - Remove Invalid Qt Versions - No compiler can produce code for this Qt version. Please define one or more compilers. - Not all possible target environments can be supported due to missing compilers. - Qt known - This Qt version was already registered as "%1". - Incompatible Qt Versions - The Qt version selected must be for the same target. - Helpers: None available 小助手:沒有可用的項目 - Helpers: %1. %1 is list of tool names. 小助手:%1。 - - - - <i>Not yet built.</i> <i>尚未建置。</i> - - - - <i>Not needed.</i> <i>不需要。</i> - - - <i>Cannot be compiled.</i> <i>無法編譯。</i> @@ -30025,12 +25149,10 @@ Previous Qt versions have limitations in building suitable SIS files. <沒有設定目標路徑> - Local File Path 本地檔案路徑 - Remote Directory 遠端目錄 @@ -30038,7 +25160,6 @@ Previous Qt versions have limitations in building suitable SIS files. RemoteLinux::GenericLinuxDeviceConfigurationWizard - New Generic Linux Device Configuration Setup 新的通用型 Linux 裝置設定 @@ -30046,12 +25167,10 @@ Previous Qt versions have limitations in building suitable SIS files. RemoteLinux::GenericLinuxDeviceConfigurationWizardSetupPage - Connection Data 連線資料 - Generic Linux Device 通用 Linux 裝置 @@ -30059,12 +25178,10 @@ Previous Qt versions have limitations in building suitable SIS files. RemoteLinux::GenericLinuxDeviceConfigurationWizardFinalPage - Setup Finished 設定完成 - The new device configuration will now be created. In addition, device connectivity will be tested. 將建立新的裝置設置。 @@ -30089,12 +25206,10 @@ In addition, device connectivity will be tested. RemoteLinux::Internal::MaemoGlobal - SDK Connectivity SDK 連接性 - Mad Developer Mad 開發者 @@ -30102,7 +25217,6 @@ In addition, device connectivity will be tested. RemoteLinux::Internal::MaemoPackageCreationFactory - Create Debian Package 建立 Debian 套件 @@ -30114,27 +25228,22 @@ In addition, device connectivity will be tested. RemoteLinux::PublicKeyDeploymentDialog - Choose Public Key File 選擇公開金鑰檔 - Public Key Files (*.pub);;All Files (*) 公開金鑰檔 (*.pub);;所有檔案 (*) - Deploying... 佈署中... - Deployment finished successfully. 佈署成功完成。 - Close 關閉 @@ -30175,28 +25284,23 @@ In addition, device connectivity will be tested. 無法剖析 .pro 檔案。 - The .pro file '%1' is being parsed. - No active build configuration. 沒有作用中的建置設置。 - Don't know what to run. 不知道要執行什麼。 - %1 (on Remote Device) %1 is the name of a project which is being run on remote Linux %1 (在遠端裝置上) - Run on Remote Device Remote Linux run configuration default display name 在遠端裝置上執行 @@ -30207,12 +25311,10 @@ In addition, device connectivity will be tested. 在遠端裝置上執行 - Clean Environment 清除環境變數 - System Environment 系統環境變數 @@ -30220,7 +25322,6 @@ In addition, device connectivity will be tested. RemoteLinux::Internal::RemoteLinuxRunConfigurationFactory - (on Remote Generic Linux Host) (在遠端通用Linux主機) @@ -30228,7 +25329,6 @@ In addition, device connectivity will be tested. RemoteLinux::RemoteLinuxRunConfigurationWidget - Fetch Device Environment 抓取裝置環境 @@ -30245,67 +25345,54 @@ In addition, device connectivity will be tested. 裝置設置: - Executable on host: 主機上的執行檔: - Executable on device: 裝置上的執行檔: - Use this command instead 用這個指令代替 - Alternate executable on device: 裝置上的備用執行檔: - Arguments: 參數: - <default> <預設> - Working directory: 工作目錄: - Base environment for this run configuration: 執行設置的基礎環境: - Clean Environment 清除環境變數 - System Environment 系統環境變數 - Cancel Fetch Operation 取消抓取操作 - Device Error 裝置錯誤 - Fetching environment failed: %1 抓取環境失敗:%1 @@ -30328,7 +25415,6 @@ In addition, device connectivity will be tested. RemoteLinux::Internal::RemoteLinuxRunControlFactory - Run on remote Linux device 在遠端 Linux 裝置上執行 @@ -30336,7 +25422,6 @@ In addition, device connectivity will be tested. Subversion::Internal::SubversionDiffParameterWidget - Ignore whitespace 忽略空白 @@ -30344,7 +25429,6 @@ In addition, device connectivity will be tested. TextEditor::FunctionHintProposalWidget - %1 of %2 %1/%2 @@ -30352,7 +25436,6 @@ In addition, device connectivity will be tested. TextEditor::Internal::SnippetsCollection - Cannot create user snippet directory %1 無法建立使用者片段目錄 %1 @@ -30360,12 +25443,10 @@ In addition, device connectivity will be tested. Valgrind::Internal::CallgrindEngine - Profiling 效能分析中 - Profiling %1 分析 %1 的效能中 @@ -30375,17 +25456,14 @@ In addition, device connectivity will be tested. Valgrind::Internal::CallgrindTool - Valgrind Function Profiler Valgrind 函式效能分析器 - Valgrind Profile uses the "callgrind" tool to record function calls when a program runs. 當程序執行時,Valgrind 分析器使用了"callgrind" 工具來記錄功能調用. - Profile Costs of this Function and its Callees 分析此項功能和被調用者的花銷 @@ -30393,87 +25471,70 @@ In addition, device connectivity will be tested. Valgrind::Internal::CallgrindToolPrivate - Callers 呼叫者 - Functions 函式 - Callees 被呼叫者 - Visualization 視覺化 - Request the dumping of profile information. This will update the callgrind visualization. 需要清理資料訊息.這將更新callgrind的可視化. - Reset all event counters. 重置專案計數器. - Pause event logging. No events are counted which will speed up program execution during profiling. 暫停專案記錄日誌. 在分析時沒有專案被計數將會加速程序的執行. - Go back one step in history. This will select the previously selected item. 在歷史中返回一步.這將選中之前選過的項. - Go forward one step in history. 在歷史中向前一步. - Selects which events from the profiling data are shown and visualized. 選擇分析數據時顯示哪項並且圖形化. - Absolute Costs 絕對花費 - Show costs as absolute numbers. 顯示花費的確切數字. - Relative Costs 相關花費 - Show costs relative to total inclusive cost. 顯示總花費中的相關花費. - Relative Costs to Parent 父級的相關花費 - Show costs relative to parent functions inclusive cost. 顯示父級相關的包容性花費. - Cost Format 花費格式 @@ -30482,57 +25543,46 @@ In addition, device connectivity will be tested. 循環檢測 - Enable cycle detection to properly handle recursive or circular function calls. 開啟循環檢測來正確把握遞歸或循環功能的調用. - This removes template parameter lists when displaying function names. - Show Project Costs Only 僅顯示專案花費 - Show only profiling info that originated from this project source. 僅顯示本專案源碼的分析訊息. - Filter... 過濾器... - Profiling aborted. 分析中斷。 - Parsing finished, no data. 剖析完成,沒有資料。 - Parsing finished, total cost of %1 reported. 分析完成, 報告總花費%1 . - Parsing failed. 剖析失敗。 - Select this Function in the Analyzer Output 在分析器輸出中選擇此項功能 - Populating... 填充... @@ -30540,7 +25590,6 @@ In addition, device connectivity will be tested. Valgrind::Internal::Visualisation - All functions with an inclusive cost ratio higher than %1 (%2 are hidden) 所有功能包含一個成本比%1高的 (%2 被隱藏) @@ -30548,12 +25597,10 @@ In addition, device connectivity will be tested. Valgrind::Internal::MemcheckEngine - Analyzing Memory 記憶體分析中 - Analyzing memory of %1 %1 的記憶體分析中 @@ -30563,12 +25610,10 @@ In addition, device connectivity will be tested. Valgrind::Internal - %1 in %2 於 %2 中的 %1 - in %1 於 %1 @@ -30576,12 +25621,10 @@ In addition, device connectivity will be tested. Valgrind::Internal::MemcheckErrorView - Copy Selection 複製選擇 - Suppress Error 防止錯誤 @@ -30589,82 +25632,66 @@ In addition, device connectivity will be tested. Valgrind::Internal::MemcheckTool - External Errors 外部錯誤 - Show issues originating outside currently opened projects. 一些情況發生在目前開啟專案的外部. - Suppressions - These suppression files were used in the last memory analyzer run. 這些suppression 檔案被前一次記憶體分析所使用. - Definite Memory Leaks 明顯記憶體溢出 - Possible Memory Leaks 可能記憶體溢出 - Use of Uninitialized Memory 使用了未初始化的記憶體 - Invalid Calls to "free()" 無效調用"free()" - Valgrind Memory Analyzer Valgrind 記憶體分析器 - Valgrind Analyze Memory uses the "memcheck" tool to find memory leaks Valgrind 分析記憶體使用"memcheck" 工具來搜尋記憶體洩漏 - Memory Issues 記憶體問題 - Go to previous leak. 移到前一個洩漏。 - Go to next leak. 移到下一個洩漏。 - Error Filter 錯誤過濾 - Internal Error 內部錯誤 - Error occurred parsing valgrind output: %1 剖析 valgrind 輸出時發生錯誤:%1 @@ -30672,22 +25699,18 @@ In addition, device connectivity will be tested. Valgrind::Callgrind::CallModel - Callee 被呼叫者 - Caller 呼叫者 - Cost 花費 - Calls 呼叫 @@ -30695,42 +25718,34 @@ In addition, device connectivity will be tested. Valgrind::Callgrind::CallgrindController - Previous command has not yet finished. 之前的命令還沒有完成. - Dumping profile data... 轉儲設置檔案數據... - Resetting event counters... 重置專案計數器... - Pausing instrumentation... 暫停儀器... - Unpausing instrumentation... 不要暫停儀器... - Callgrind dumped profiling info Callgrind 清理分析訊息 - Callgrind unpaused. Callgrind 反暫停. - Downloading remote profile data... 下載遠端設置數據... @@ -30738,97 +25753,76 @@ In addition, device connectivity will be tested. Valgrind::Callgrind::DataModel - Function: 函式: - File: 檔案: - Object: 物件: - Called: 已呼叫: - %n time(s) %n 次 - Events 事件 - Self costs 自身花費 - - (%) (%) - Incl. costs 其中的花費 - - %1 %1 - - (%1%) (%1%) - %1 cost spent in a given function excluding costs from called functions. 在給定的功能函式中有 %1 花費,不包括調用的花費. - %1 cost spent in a given function including costs from called functions. 在給定的功能函式中有 %1 花費,包括調用的花費. - Function 函式 - Location 位置 - Called 已呼叫 - Self Cost: %1 自身花費:%1 - Incl. Cost: %1 其中花費: %1 @@ -30836,12 +25830,10 @@ In addition, device connectivity will be tested. Valgrind::Callgrind::Function - %1 in %2 於 %2 中的 %1 - %1:%2 in %3 於 %3 中的 %1:%2 @@ -30849,73 +25841,58 @@ In addition, device connectivity will be tested. Valgrind::Callgrind::ParseData - Last-level 最後等級 - - Instruction 指令 - Cache 快取 - Conditional branches 條件分支 - Indirect branches 間接分支 - level %1 等級 %1 - read 讀取 - write 寫入 - mispredicted 錯誤預測 - executed 已執行 - miss 失誤 - access 存取 - Line: 行號: - Position: 位置: @@ -30923,7 +25900,6 @@ In addition, device connectivity will be tested. Valgrind::Callgrind::CallgrindRunner - Parsing Profile Data... 正在剖析效能分析資料... @@ -30950,7 +25926,6 @@ In addition, device connectivity will be tested. Valgrind::RemoteValgrindProcess - Could not determine remote PID. 無法決定遠端的行程代碼。 @@ -30958,50 +25933,42 @@ In addition, device connectivity will be tested. Valgrind::Internal::ValgrindEngine - Valgrind options: %1 Valgrind 選項:%1 - Working directory: %1 工作目錄:%1 - Command-line arguments: %1 命令列參數:%1 - ** Analyzing finished ** ** 分析已完成 ** - ** Error: "%1" could not be started: %2 ** ** 錯誤:"%1" 無法被啟動:%2 ** - ** Error: no valgrind executable set ** ** 錯誤: 沒有設定 valgrind 的執行檔 ** - ** Process Terminated ** ** 行程已終結 ** - Application Output 應用程式輸出 @@ -31009,7 +25976,6 @@ In addition, device connectivity will be tested. VcsBase::Internal::CommonSettingsWidget - Command used for reverting diff chunks 回復差異區塊的指令 @@ -31017,12 +25983,10 @@ In addition, device connectivity will be tested. Welcome::Internal::WelcomeMode - Welcome 歡迎 - New Project 新專案 @@ -31065,12 +26029,10 @@ In addition, device connectivity will be tested. QmlDesigner::TextToModelMerger error message - No import statements found 沒有找到匯入的敘述 - Unsupported QtQuick version @@ -31078,22 +26040,18 @@ In addition, device connectivity will be tested. QmlProjectManager::QmlProjectPlugin - Open Qt Versions 開啟 Qt 版本 - QML Observer Missing - QML Observer could not be found for this Qt version. - QML Observer is used to offer debugging features for Qt Quick UI projects in the Qt 4.7 series. To compile QML Observer, go to the Qt Versions page, select the current Qt version, and click Build in the Helpers section. @@ -31103,7 +26061,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Valgrind::Internal::ValgrindBaseSettings - Valgrind Valgrind @@ -31111,7 +26068,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi text - text 文字 @@ -31119,7 +26075,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi textedit - text edit 文字編輯 @@ -31127,7 +26082,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi textinput - text 文字 @@ -31154,57 +26108,46 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi FlickableGroupBox - Flickable 可搖動 - Content size 內容大小 - Flick direction 搖動方向 - Flickable direction 搖動方向 - Behavior 行為 - Bounds behavior 邊界行為 - Interactive 互動 - Max. velocity 最大速度 - Maximum flick velocity 最大搖動速度 - Deceleration 減速 - Flick deceleration 搖動減速 @@ -31212,13 +26155,10 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi FlowSpecifics - - Flow 流程 - Spacing 間距 @@ -31226,27 +26166,22 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi GridSpecifics - Grid - Columns - Rows - Flow 流程 - Spacing 間距 @@ -31254,117 +26189,94 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi GridViewSpecifics - Grid View 格狀檢視 - Cache 快取 - Cache buffer 快取暫存區 - Cell height 儲存格高度 - Cell width 儲存格寬度 - Flow 流程 - Navigation wraps 導航躍遷 - Determines whether the grid wraps key navigation. 決定框架的按鍵導航. - Snap mode 頁面模式 - Determines how the view scrolling will settle following a drag or flick. 決定視圖如何滾動,拖拽或是輕擊. - Grid View Highlight 網格檢視突顯 - Range 範圍 - Highlight range 突顯範圍 - Move duration 移動持續時間 - Move animation duration of the highlight delegate. 高亮代表移動動畫的持續時間. - Move speed 移動速度 - Move animation speed of the highlight delegate. 高亮代表移動動畫的速度. - Preferred begin 預設起始 - Preferred highlight begin - must be smaller than Preferred end. 首選高亮起始-必須比首選結束數值要小. - Preferred end 預設結束 - Preferred highlight end - must be larger than Preferred begin. 首選高亮結束-必須比首選起始數值要大. - Follows current 跟隨目前 - Determines whether the highlight is managed by the view. 決定高亮是否需要由視圖來管理. @@ -31372,7 +26284,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi LineEdit - Translate this string 翻譯這個字串 @@ -31380,142 +26291,114 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi ListViewSpecifics - List View 列表檢視 - Cache 快取 - Cache buffer 快取暫存區 - Navigation wraps 導航躍遷 - Determines whether the grid wraps key navigation. 決定框架的按鍵導航. - Orientation 方向 - Orientation of the list. 列表方向。 - Snap mode 頁面模式 - Determines how the view scrolling will settle following a drag or flick. 決定視圖如何滾動,拖拽還是輕點. - Spacing 間距 - Spacing between items. 項目之間的間距。 - List View Highlight 列表檢視突顯 - Range 範圍 - Highlight range 突顯範圍 - Move duration 移動持續時間 - Move animation duration of the highlight delegate. 高亮代表移動動畫的持續時間. - Move speed 移動速度 - Move animation speed of the highlight delegate. 高亮代表移動動畫的速度. - Resize duration 調整大小持續時間 - Resize animation duration of the highlight delegate. 調整高亮代表的動畫移動. - Resize speed 調整大小速度 - Resize animation speed of the highlight delegate. 調整高亮代表的動畫速度. - Preferred begin 預設起始 - Preferred highlight begin - must be smaller than Preferred end. 首選高亮起始-必須比首選結束數值要小. - Preferred end 預設結束 - Preferred highlight end - must be larger than Preferred begin. 首選高亮結束-必須比首選起始數值要大. - Follows current 跟隨目前 - Determines whether the highlight is managed by the view. 決定高亮是否需要由視圖來管理. @@ -31523,29 +26406,22 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi MouseAreaSpecifics - MouseArea 滑鼠區域 - Enabled 已開啟 - - This property holds whether the item accepts mouse events. 這項屬性決定這項是否接受鼠標事件. - Hover Enabled 開啟置於其上 - - This property holds whether hover events are handled. 這項屬性決定這項是否處理鼠標懸停事件事件. @@ -31553,93 +26429,74 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi PathViewSpecifics - Path View 路徑檢視 - Drag margin 拖曳邊界 - Flick deceleration 搖動減速 - - Follows current 跟隨目前 - A user cannot drag or flick a PathView that is not interactive. 使用者不可以拖拽或點擊一個不是交互式類型的路徑視圖. - Offset 位移 - Specifies how far along the path the items are from their initial positions. This is a real number that ranges from 0.0 to the count of items in the model. 指定項最遠離初始位置的路徑.這是一個浮點數,範圍從0.0到模型中項的數量. - Item count 項目計數 - pathItemCount: number of items visible on the path at any one time. pathItemCount: 任何時間內可見項的數量. - Path View Highlight 路徑檢視突顯 - Highlight range 突顯範圍 - Move duration 移動持續時間 - Move animation duration of the highlight delegate. 高亮代表移動動畫的持續時間. - Preferred begin 預設起始 - Preferred highlight begin - must be smaller than Preferred end. 首選高亮起始-必須比首選結束數值要小. - Preferred end 預設結束 - Preferred highlight end - must be larger than Preferred begin. 首選高亮結束-必須比首選起始數值要大. - Determines whether the highlight is managed by the view. 決定高亮是否需要由視圖來管理. @@ -31647,12 +26504,10 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi RowSpecifics - Row - Spacing 間距 @@ -31667,12 +26522,10 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi RemoteLinux::CreateTarStepWidget - Tarball creation not possible. 無法建立 Tarball 歸檔。 - Create tarball: 建立 tarball 歸檔: @@ -31680,17 +26533,14 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi ExtensionSystem::Internal::PluginErrorOverview - Qt Creator - Plugin loader messages Qt Creator - 外掛程式載入器訊息 - The following plugins have errors and cannot be loaded: 以下外掛程式有錯誤,無法被載入: - Details: 詳情: @@ -31698,27 +26548,22 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi MainView - Painting 繪製中 - Compiling 編譯中 - Creating 建立中 - Binding 綁定中 - Handling Signal 信號處理中 @@ -31726,22 +26571,18 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi RangeDetails - Duration: 持續時間: - Details: 詳情: - Location: 位置: - Binding loop detected 偵測到綁定迴圈 @@ -31749,7 +26590,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi LinksBar - Qt Creator Qt Creator @@ -31757,7 +26597,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi ExtensionSystem::Internal::PluginErrorOverviewPrivate - Continue 繼續 @@ -31827,12 +26666,10 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Utils::TextFileFormat - Out of memory. 記憶體不足。 - An encoding error was encountered. 發生了一個編碼錯誤。 @@ -31840,52 +26677,42 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Bazaar::Internal::BazaarLogParameterWidget - Verbose 詳細 - Show files changed in each revision 顯示每個版本間變更的檔案 - Forward 向前 - Show from oldest to newest 從最舊到最新顯示 - Include merges 包含合併 - Show merged revisions 顯示合併版本 - Detailed 詳細 - Moderately short 略短 - One line 一行 - GNU ChangeLog GNU 變更紀錄 @@ -31893,12 +26720,10 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Core::Internal - Launching a file browser failed 啟動檔案瀏覽器失敗 - Unable to start the file manager: %1 @@ -31911,7 +26736,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi - '%1' returned the following error: %2 @@ -31920,52 +26744,42 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi %2 - Settings... 設定... - Launching Windows Explorer Failed 啟動 Windows Explorer 失敗 - Could not find explorer.exe in path to launch Windows Explorer. 在路徑中找不到 explorer.exe,無法啟動 Windows Explorer。 - Show in Explorer 在 Explorer 中顯示 - Show in Finder 在搜尋器中顯示 - Show Containing Folder 顯示包含資料夾 - Open Command Prompt Here 在此開啟指令提示 - Open Terminal Here 在此開啟終端機 - Deleting File Failed 刪除檔案失敗 - Could not delete file %1. 無法刪除檔案 %1。 @@ -31973,7 +26787,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi BaseFileWizard - Unable to create the directory %1. 無法建立資料夾 %1。 @@ -32007,32 +26820,26 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Debugger::Internal::CdbBreakEventWidget - C++ exception C++ 例外 - Thread creation 執行緒建置 - Thread exit 執行緒離開 - Load module: 載入模組: - Unload module: 卸載模組: - Output: 輸出: @@ -32040,22 +26847,18 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Debugger::Internal::QScriptDebuggerClient - <p>An uncaught exception occurred:</p><p>%1</p> <p>發生了一個未被捕捉到的例外狀況:</p><p>%1</p> - <p>An uncaught exception occurred in '%1':</p><p>%2</p> <p>在 '%1' 發生了一個未被捕捉到的例外狀況:</p><p>%2</p> - Uncaught Exception 未捕捉到的例外 - No Local Variables @@ -32063,32 +26866,26 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Find::IFindFilter - Case sensitive 區分大小寫 - Whole words 比對整個單字 - Regular expressions 正規表示式 - Flags: %1 旗標:%1 - None - , , @@ -32096,70 +26893,56 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Find::Internal::SearchResultWidget - Search was canceled. - - Cancel 取消 - Repeat the search with same parameters 用相同的參數重複搜尋 - Search again 再次搜尋 - Replace with: 取代為: - Replace all occurrences 取代所有出現位置 - Replace 取代 - This change cannot be undone. 這項變將無法復原。 - Do not warn again 不要再次警告 - The search resulted in more than %n items, do you still want to continue? - Continue 繼續 - No matches found. 找不到相符的。 - %n matches found. 找到 %n 個相符的。 @@ -32200,102 +26983,86 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Madde::Internal::MaddeDeviceTester - Checking for Qt libraries... 檢查 Qt 函式庫... - SSH connection error: %1 SSH連線錯誤:%1 - Error checking for Qt libraries: %1 檢查 Qt 函式庫時發生錯誤:%1 - Error checking for Qt libraries. 檢查 Qt 函式庫時發生錯誤。 - Checking for connectivity support... 檢查連線支援... - Error checking for connectivity tool: %1 檢查連線工具失敗:%1 - Error checking for connectivity tool. 檢查連線工具失敗。 - Connectivity tool not installed on device. Deployment currently not possible. 連線工具未安裝在裝置上。現在無法佈署。 - Please switch the device to developer mode via Settings -> Security. 請在「設定」─「安全性」處將裝置設為開發者模式。 - Connectivity tool present. 目前有連線工具。 - Checking for QML tooling support... 檢查 QML 工具支援... - Error checking for QML tooling support: %1 檢查 QML 工具支援時發生錯誤:%1 - Error checking for QML tooling support. 檢查 QML 工具支援時發生錯誤。 - Missing directory '%1'. You will not be able to do QML debugging on this device. 遺失資料夾 '%1'。您將無法在這台裝置上使用 QML 除錯。 - QML tooling support present. 目前的 QML 工具支援。 - No Qt packages installed. 沒有安裝 Qt 套件。 @@ -32314,12 +27081,10 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Madde::Internal::MaemoUploadAndInstallPackageStep - No Debian package creation step found. 找不到建立 Debian 套件的步驟。 - Deploy Debian package via SFTP upload 透過 SFTP 來佈署 Debian 套件 @@ -32346,7 +27111,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi 無法佈署:您打算佈署到 Qemu,但是此版本的 Qt 並未開啟此功能。 - Missing build configuration. 遺失建置設置。 @@ -32354,7 +27118,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Madde::Internal::MaemoMountAndInstallPackageService - Package installed. 套件已安裝。 @@ -32362,7 +27125,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Madde::Internal::MaemoMountAndCopyFilesService - All files copied. 所有檔案已複製。 @@ -32370,12 +27132,10 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Madde::Internal::MaemoInstallPackageViaMountStep - No Debian package creation step found. 找不到建立 Debian 套件的步驟。 - Deploy package via UTFS mount 透過 UTFS 掛載來佈署套件 @@ -32383,7 +27143,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Madde::Internal::MaemoCopyFilesViaMountStep - Deploy files via UTFS mount 透過 UTFS 掛載來佈署檔案 @@ -32391,54 +27150,42 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Madde::Internal::MaemoDeployConfigurationWidget - - Project File Update Failed 專案檔案更新失敗 - - Could not update the project file. 無法更新專案檔。 - Choose Icon (will be scaled to %1x%1 pixels, if necessary) 選擇圖示 (如果需要會縮放到 %1x%1 像素) - Invalid Icon 無效的圖示 - Unable to read image 無法讀取影像 - Failed to Save Icon 無法儲存圖示 - Could not save icon to '%1'. 無法儲存圖示到 '%1'。 - Form 表單 - Add Desktop File 新增桌面檔案 - Add Launcher Icon... 新增啟動圖示 ... @@ -32446,7 +27193,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Madde::Internal::MaemoDeploymentMounter - Connection failed: %1 連線失敗:%1 @@ -32454,27 +27200,22 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Madde::Internal::MaemoDeviceConfigWizardStartPage - General Information 一般資訊 - MeeGo Device MeeGo 裝置 - %1 Device - WizardPage 精靈頁面 - The name to identify this configuration: 用於辨認此設置的名稱: @@ -32483,27 +27224,22 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi 執行在裝置上的系統: - The kind of device: 裝置種類: - Emulator 模擬器 - Hardware Device 硬體裝置 - The device's host name or IP address: 裝置的主機名稱或 IP 位址: - The SSH server port: SSH 伺服器連接埠: @@ -32511,7 +27247,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Madde::Internal::MaemoDeviceConfigWizardPreviousKeySetupCheckPage - Device Status Check 裝置狀態檢查 @@ -32519,37 +27254,30 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Madde::Internal::MaemoDeviceConfigWizardReuseKeysCheckPage - Existing Keys Check 現有金鑰檢查 - WizardPage 精靈頁面 - Do you want to re-use an existing pair of keys or should a new one be created? 您要重新使用現有的金鑰配對,還是建立新的? - Re-use existing keys 重複使用現有金鑰 - File containing the public key: 包含公開金鑰的檔案: - File containing the private key: 包含私密金鑰的檔案: - Create new keys 建立新金鑰 @@ -32557,29 +27285,22 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Madde::Internal::MaemoDeviceConfigWizardKeyCreationPage - Key Creation 金鑰建立 - - - Cannot Create Keys 無法建立金鑰 - The path you have entered is not a directory. 您輸入的路徑不是一個目錄。 - The directory you have entered does not exist and cannot be created. 您輸入的目錄不存在也無法被建立。 - Creating keys... @@ -32588,37 +27309,30 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi 建立金鑰中... - Key creation failed: %1 金鑰建立失敗:%1 - Done. 已完成。 - Could Not Save Key File 無法儲存金鑰檔案 - WizardPage 精靈頁面 - Qt Creator will now generate a new pair of keys. Please enter the directory to save the key files in and then press "Create Keys". Qt Creator 將會生成金鑰. 請輸入生成檔案存放的目錄名稱然後點擊"生成金鑰". - Directory: 目錄: - Create Keys 建立金鑰 @@ -32626,7 +27340,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Madde::Internal::MaemoDeviceConfigWizardKeyDeploymentPage - Key Deployment 金鑰佈署 @@ -32635,37 +27348,30 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi 佈署中... - Deploying... 佈署中... - Key Deployment Failure 金鑰佈署失敗 - Key Deployment Success 金鑰佈署成功 - The key was successfully deployed. You may now close the "%1" application and continue. 金鑰已成功佈署。您現在可以關閉 "%1" 應用程式然後繼續。 - Done. 已完成。 - WizardPage 精靈頁面 - To deploy the public key to your device, please execute the following steps: <ul> <li>Connect the device to your computer (unless you plan to connect via WLAN).</li> @@ -32684,17 +27390,14 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi - Device address: 裝置位址: - Password: 密碼: - Deploy Key 佈署金鑰 @@ -32702,7 +27405,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Madde::Internal::MaemoDeviceConfigWizardFinalPage - The new device configuration will now be created. 新裝置設置將會被建立。 @@ -32710,7 +27412,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Madde::Internal::MaemoDeviceConfigWizard - New Device Configuration Setup 新裝置設置設定 @@ -32718,7 +27419,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Madde::Internal::AbstractMaemoInstallPackageToSysrootWidget - Cannot deploy to sysroot: No packaging step found. 無法佈署到 sysroot:找不到打包的步驟。 @@ -32730,22 +27430,18 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi 無法在沒有建置設置的狀況下安裝 sysroot。 - Cannot install package to sysroot without packaging step. 無法在沒有打包步驟的狀況下安裝套件到 sysroot。 - Cannot install package to sysroot without a Qt version. 無法在沒有 Qt 版本的狀況下安裝套件到 sysroot。 - Installing package to sysroot... 正在安裝套件至 sysroot... - Installation to sysroot failed, continuing anyway. 安裝到 sysroot 失敗,依然繼續。 @@ -32753,7 +27449,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Madde::Internal::MaemoInstallDebianPackageToSysrootStep - Install Debian package to sysroot 安裝 Debian 套件到sysroot @@ -32768,29 +27463,24 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Madde::Internal::MaemoCopyToSysrootStep - Cannot copy to sysroot without build configuration. 無法在沒有建置設置的情況下複製到 sysroot。 - Cannot copy to sysroot without valid Qt version. 無法在沒有有效的 Qt 版本的情況下複製到 sysroot。 - Copying files to sysroot... 正在複製檔案至 sysroot... - Sysroot installation failed: %1 Continuing anyway. Sysroot 安裝失敗:%1 仍然繼續。 - Copy files to sysroot 複製檔案到 sysroot @@ -32798,7 +27488,6 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Madde::Internal::MaemoMakeInstallToSysrootStep - Copy files to sysroot 複製檔案到 sysroot @@ -32806,52 +27495,42 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Madde::Internal::AbstractMaemoPackageCreationStep - Package up to date. 套件已更新。 - Package created. 套件已建立。 - Packaging failed: No Qt version. 打包失敗:沒有 Qt 版本。 - No Qt4 build configuration 沒有 Qt4 建置設置 - Creating package file... 正在建立套件檔... - Package Creation: Running command '%1'. 套件建立:執行指令 '%1'。 - Packaging failed: Could not start command '%1'. Reason: %2 打包失敗:無法啟動命令 '%1'。原因:%2 - Packaging Error: Command '%1' failed. 打包錯誤:指令 '%1' 失敗。 - Reason: %1 原因:%1 - Exit code: %1 離開代碼:%1 @@ -32859,59 +27538,48 @@ To compile QML Observer, go to the Qt Versions page, select the current Qt versi Madde::Internal::MaemoDebianPackageCreationStep - Create Debian Package 建立 Debian 套件 - Packaging failed: Could not get package name. 打包失敗:無法取得套件名稱。 - Packaging failed: Could not move package files from '%1' to '%2'. 打包失敗:無法將套件檔從 %1 移動到 %2。 - Your project name contains characters not allowed in Debian packages. They must only use lower-case letters, numbers, '-', '+' and '.'. We will try to work around that, but you may experience problems. 你的工程可能包含有Deb包不允許的字元集.必須使用小寫字母,數字,'-',或者'.'. - Packaging failed: Foreign debian directory detected. You are not using a shadow build and there is a debian directory in your project root ('%1'). Qt Creator will not overwrite that directory. Please remove it or use the shadow build feature. 打包失敗: 檢測到外部 debian目錄. 你沒有使用影子建置並且在你的專案根目錄('%1')下有個debian的目錄. Qt Creator不會覆蓋那個目錄. 請你刪除他或者使用影子建置. - Packaging failed: Could not remove directory '%1': %2 打包失敗: 無法刪除目錄'%1': %2 - Could not create Debian directory '%1'. 無法建立Debian目錄'%1'. - Could not read manifest file '%1': %2. 無法讀取清單檔案'%1': %2. - Could not write manifest file '%1': %2. 無法寫入清單檔案'%1': %2. - Could not copy file '%1' to '%2'. 無法複製檔案'%1'到'%2'. - Error: Could not create file '%1'. 錯誤:無法建立檔案 '%1'。 @@ -32930,119 +27598,94 @@ We will try to work around that, but you may experience problems. Madde::Internal::MaemoPackageCreationWidget - Size should be %1x%2 pixels 大小應為 %1x%2 像素 - No Version Available. 沒有可用的版本。 - Could not read icon 無法讀取圖示 - Images 影像 - Choose Image (will be scaled to %1x%2 pixels if necessary) 選擇影像 (如果需要會縮放到%1x%2 像素 ) - Could Not Set New Icon 無法設定新圖示 - - - File Error 檔案錯誤 - Could not set project name. 無法設定專案名稱。 - Could not set package name for project manager. 無法為專案管理器設定套件名稱。 - Could not set project description. 無法設定專案描述。 - <b>Create Package:</b> <b>建立套件:</b> - Could Not Set Version Number 無法設定版號 - Package name: 套件名稱: - Package version: 套件版本: - Major: 主版本: - Minor: 次版本: - Patch: 修補號: - Short package description: 簡短的套件描述: - Name to be displayed in Package Manager: 在套件管理員裡顯示的名稱: - Icon to be displayed in Package Manager: 在套件管理員裡顯示的圖示: - Adapt Debian file: 插入 Debian 檔案: - Edit... 編輯... - Edit spec file 編輯 spec 檔 @@ -33050,7 +27693,6 @@ We will try to work around that, but you may experience problems. Madde::Internal::MaemoDebianPackageInstaller - Installation failed: You tried to downgrade a package, which is not allowed. 安裝失敗:您試圖降級套件,不過這是不允許的。 @@ -33058,17 +27700,14 @@ We will try to work around that, but you may experience problems. Madde::Internal::MaemoPublishedProjectModel - Include in package 包含在套件內 - Include 包含 - Do not include 不要包含 @@ -33076,199 +27715,152 @@ We will try to work around that, but you may experience problems. Madde::Internal::MaemoPublisherFremantleFree - Canceled. 已取消。 - Publishing canceled by user. 發佈被使用者取消。 - The project is missing some information important to publishing: 專案遺失了一些發佈需要的重要資訊: - Publishing failed: Missing project information. 發佈失敗:遺失專案訊息。 - Error removing temporary directory: %1 移除暫存目錄時發生錯誤:%1 - - - - Publishing failed: Could not create source package. 發佈失敗:無法產生源碼套件。 - Error: Could not create temporary directory. 錯誤:無法建立暫存目錄。 - Error: Could not copy project directory. 錯誤:無法複製專案目錄。 - Error: Could not fix newlines. 錯誤:無法修復新行。 - - Publishing failed: Could not create package. 發佈失敗:無法建立套件。 - Removing left-over temporary directory... 移除遺留下來的暫存目錄中... - Setting up temporary directory... 設定暫存目錄中... - Cleaning up temporary directory... 清除暫存目錄中... - Failed to create directory '%1'. 建立目錄 '%1' 失敗。 - Could not set execute permissions for rules file: %1 無法設定規則檔的執行權限:%1 - Could not copy file '%1' to '%2': %3. 無法複製檔案 '%1' 到 '%2':%3。 - Make distclean failed: %1 - Error: Failed to start dpkg-buildpackage. 錯誤:無法開始 dpkg-buildpackage。 - Error: dpkg-buildpackage did not succeed. 錯誤:dpkg-buildpackage 沒有成功。 - Package creation failed. 套件建立失敗。 - Done. 已完成。 - Packaging finished successfully. The following files were created: 打包成功完成。建立了以下檔案: - No Qt version set. 沒有設定 Qt 版本。 - Building source package... 建置源碼套件中... - Starting scp... 啟動 scp... - Uploading file %1... 上傳檔案 %1 中... - SSH error: %1 SSH 錯誤:%1 - - - - - Upload failed. 上傳失敗。 - - Error uploading file: %1. 上傳檔案錯誤:%1。 - - Error uploading file. 上傳檔案錯誤。 - All files uploaded. 所有檔案已上傳。 - Upload succeeded. You should shortly receive an email informing you about the outcome of the build process. 上傳成功。您不久將收到一封電子郵件,通知您關於建置行程的輸出。 - Cannot open file for reading: %1. 無法開啟並讀取檔案:%1。 - Cannot read file: %1 無法讀取檔案:%1 - The package description is empty. You must set one in Projects -> Run -> Create Package -> Details. 套件描述為空白的。您必須先在「專案」─「執行」─「建立套件」─「詳情」中設定。 - The package description is '%1', which is probably not what you want. Please change it in Projects -> Run -> Create Package -> Details. 套件描述為 '%1',可能不是您想要的。您必須先在「專案」─「執行」─「建立套件」─「詳情」中設定。 - You have not set an icon for the package manager. The icon must be set in Projects -> Run -> Create Package -> Details. 您尚未設定套件管理員中使用的圖示。圖示要在「專案」─「執行」─「建立套件」─「詳情」中設定。 @@ -33276,57 +27868,46 @@ We will try to work around that, but you may experience problems. Madde::Internal::MaemoPublishingUploadSettingsPageFremantleFree - Publishing to Fremantle's "Extras-devel/free" Repository 發佈到 Fremantle 的 "Extras-devel/free" 主目錄 - Upload options 上傳選項 - Choose a private key file 選擇一個私密金鑰檔 - WizardPage 精靈頁面 - Upload Settings 上傳設定 - Garage account name: Garage 帳號名稱: - <a href="https://garage.maemo.org/account/register.php">Get an account</a> <a href="https://garage.maemo.org/account/register.php">取得帳號</a> - <a href="https://garage.maemo.org/extras-assistant/index.php">Request upload rights</a> <a href="https://garage.maemo.org/extras-assistant/index.php">請求上傳權限</a> - Private key file: 私密金鑰檔: - Server address: 伺服器位址: - Target directory on server: 在伺服器上的目標目錄: @@ -33334,12 +27915,10 @@ We will try to work around that, but you may experience problems. Madde::Internal::MaemoPublishingWizardFactoryFremantleFree - Publish for "Fremantle Extras-devel free" repository 發佈到 "Fremantle Extras-devel free" 主目錄 - This wizard will create a source archive and optionally upload it to a build server, where the project will be compiled and packaged and then moved to the "Extras-devel free" repository, from where users can install it onto their N900 devices. For the upload functionality, an account at garage.maemo.org is required. 本精靈將建立來源檔案歸檔包並且選擇是否上傳到建置伺服器, 在那裡專案將被編譯和打包然後移動到"Extras-devel free" 分支, 在那裡,使用者可以安裝它到N900 裝置上. 如果需要上傳, 那麼你需要一個garage.maemo.org 的帳號. @@ -33347,22 +27926,18 @@ We will try to work around that, but you may experience problems. Madde::Internal::MaemoPublishingWizardFremantleFree - Publishing to Fremantle's "Extras-devel free" Repository 發佈到 Fremantle 的 "Extras-devel free" 主目錄 - Build Settings 建置設定 - Upload Settings 上傳設定 - Result 結果 @@ -33370,34 +27945,26 @@ We will try to work around that, but you may experience problems. Madde::Internal::MaemoQemuManager - - Start MeeGo Emulator 啟動 MeeGo 模擬器 - Qemu has been shut down, because you removed the corresponding Qt version. Qemu 已經被關閉,因為您移除了相對應的 Qt 版本。 - Qemu finished with error: Exit code was %1. Qemu 在有錯誤的情況下結束:離開代碼 %1。 - - Qemu error Qemu 錯誤 - Qemu failed to start: %1 Qemu 啟動失敗:%1 - Stop MeeGo Emulator 停止 MeeGo 模擬器 @@ -33405,17 +27972,14 @@ We will try to work around that, but you may experience problems. Madde::Internal::MaemoRemoteCopyFacility - Connection failed: %1 連線失敗:%1 - Error: Copy command failed. 錯誤:複製指令失敗。 - Copying file '%1' to directory '%2' on the device... 正在拷貝檔案 '%1' 至裝置上的目錄 '%2'... @@ -33423,77 +27987,62 @@ We will try to work around that, but you may experience problems. Madde::Internal::MaemoRemoteMounter - No directories to mount 沒有目錄可掛載 - No directories to unmount 沒有目錄可卸載 - Could not execute unmount request. 無法執行卸載請求。 - Failure unmounting: %1 卸載失敗:%1 - Finished unmounting. 卸載完成。 - - stderr was: '%1' stderr為:'%1' - Error: Not enough free ports on device to fulfill all mount requests. 錯誤:沒有足夠的連接埠來讓裝置完成所有的掛載請求。 - Starting remote UTFS clients... 正在啟動遠端 UTFS 客戶端... - Mount operation succeeded. 掛載操作成功。 - Failure running UTFS client: %1 執行 UTFS 客戶端失敗:%1 - Starting UTFS servers... 正在啟動 UTFS 伺服器... - stderr was: %1 stderr為:%1 - Error running UTFS server: %1 執行 UTFS 伺服器時出錯:%1 - Timeout waiting for UTFS servers to connect. 等待 UTFS 伺服器連線逾時。 @@ -33501,12 +28050,10 @@ stderr為:%1 Madde::Internal::MaemoRemoteMountsModel - Local directory 本地目錄 - Remote mount point 遠端掛載點 @@ -33514,7 +28061,6 @@ stderr為:%1 Madde::Internal::MaemoRunConfiguration - Not enough free ports on the device. 裝置上沒有足夠的連接埠。 @@ -33522,23 +28068,18 @@ stderr為:%1 Madde::Internal::MaemoRunConfigurationWidget - - Choose directory to mount 選擇要掛載的目錄 - No local directories to be mounted on the device. 沒有本地目錄被掛載到裝置。 - One local directory to be mounted on the device. 一個本地目錄將被掛載到裝置。 - %n local directories to be mounted on the device. Note: Only mountCount>1 will occur here as 0, 1 are handled above. @@ -33546,7 +28087,6 @@ stderr為:%1 - WARNING: You want to mount %1 directories, but your device has only %n free ports.<br>You will not be able to run this configuration. 警告:您要掛載 %1 個目錄,但是您的裝置上只剩 %n 個連接埠可使用。<br> @@ -33554,7 +28094,6 @@ stderr為:%1 - WARNING: You want to mount %1 directories, but only %n ports on the device will be available in debug mode. <br>You will not be able to debug your application with this configuration. 警告:您要掛載 %1 個目錄,但是您的裝置上的除錯模式只剩 %n 個連接埠可使用。<br> @@ -33565,7 +28104,6 @@ stderr為:%1 Madde::Internal::MaemoRunControlFactory - Run on device 在裝置上執行 @@ -33573,27 +28111,22 @@ stderr為:%1 Madde::Internal::MaemoQemuCrashDialog - Qemu error Qemu 錯誤 - Qemu crashed. Qemu 已崩潰。 - Click here to change the OpenGL mode. 點擊這裡來改變 OpenGL 模式。 - You have configured Qemu to use OpenGL hardware acceleration, which might not be supported by your system. You could try using software rendering instead. 您已設定讓 Qemu 去使用 OpenGL 硬體加速,但是您的系統有可能不支援。您可以改用軟體成像。 - Qemu is currently configured to auto-detect the OpenGL mode, which is known to not work in some cases. You might want to use software rendering instead. Qemu 被設置為自動偵測 OpenGL 模式,有些情況會無法運作。您可以改用軟體成像。 @@ -33601,7 +28134,6 @@ stderr為:%1 Madde::Internal::MaemoQemuSettingsPage - MeeGo Qemu Settings MeeGo Qemu 設定 @@ -33654,17 +28186,14 @@ stderr為:%1 Madde::Internal::Qt4MaemoDeployConfigurationFactory - Copy Files to Maemo5 Device 複製檔案到 Maemo5 裝置 - Build Debian Package and Install to Maemo5 Device 建置 Debian 套件並安裝到 Maemo5 裝置上 - Build Debian Package and Install to Harmattan Device 建置 Debian 套件並安裝到 Harmattan 裝置上 @@ -33754,22 +28283,18 @@ Do you want to add them to the project?</html> ProjectExplorer::SettingsAccessor - Using Old Project Settings File 使用舊的專案設定檔 - <html><head/><body><p>A versioned backup of the .user settings file will be used, because the non-versioned file was created by an incompatible newer version of Qt Creator.</p><p>Project settings changes made since the last time this version of Qt Creator was used with this project are ignored, and changes made now will <b>not</b> be propagated to the newer version.</p></body></html> <html><head/><body><p>一個.user 設置的備用檔案將會被使用,因為新版 Qt Creator產生了一個沒有版本號的檔案.</p><p>專案設置改變自從最近一次這個版本的Qt Creator 被用做這個專案, 現在產生的改變 <b>不會</b> 影響到新版本.</p></body></html> - Project Settings File from a different Environment? 要使用不同環境的專案設定檔嗎? - Qt Creator has found a .user settings file which was created for another development setup, maybe originating from another machine. The .user settings files contain environment specific settings. They should not be copied to a different environment. @@ -33782,12 +28307,10 @@ Do you still want to load the settings file? 您仍然要載入這個設定檔嗎? - Unsupported Shared Settings File 不支援共享設定檔 - The version of your .shared file is not yet supported by this Qt Creator version. Only settings that are still compatible will be taken into account. Do you want to continue? @@ -33803,7 +28326,6 @@ If you choose not to continue Qt Creator will not try to load the .shared file.< QmlJSEditor - Qt Quick @@ -33830,72 +28352,58 @@ Qt Creator 知道一個相似的URI. Qt4ProjectManager::Qt4PriFileNode - Headers 標頭 - Sources 源碼 - Forms 表單 - Resources 資源 - QML QML - Other files 其他檔案 - Cannot Open File 無法開啟檔案 - Cannot open the file for editing with VCS. 無法使用 VCS 開啟檔案以編輯。 - Cannot Set Permissions 無法設定權限 - Cannot set permissions to writable. 無法設定檔案成為可寫入。 - There are unsaved changes for project file %1. 專案檔 %1 中還有未儲存的變更。 - Failed! 失敗! - Could not write project file %1. 無法寫入專案檔 %1。 - File Error 檔案錯誤 @@ -33903,22 +28411,18 @@ Qt Creator 知道一個相似的URI. Qt4ProjectManager::Internal::PngIconScaler - Wrong Icon Size 錯誤的圖示大小 - The icon needs to be %1x%2 pixels big, but is not. Do you want Qt Creator to scale it? 圖示必須要 %1x%2 像素大,但現在不是。您希望 Qt Creator 調整它的大小嗎? - File Error 檔案錯誤 - Could not copy icon file: %1 無法複製圖示檔案:%1 @@ -33926,41 +28430,34 @@ Qt Creator 知道一個相似的URI. RemoteLinux::AbstractRemoteLinuxDeployService - No deployment action necessary. Skipping. 不需要執行佈署。將跳過。 - No device configuration set. 沒有設定裝置設置。 - Connecting to device... 正在連線到裝置... - Could not connect to host: %1 無法連線到主機:%1 - Did the emulator fail to start? 模擬器啟動失敗了嗎? - Is the device connected and set up for network access? 裝置已連線,並且設定好網路連線了嗎? - Connection error: %1 連線錯誤:%1 @@ -33968,22 +28465,18 @@ Is the device connected and set up for network access? RemoteLinux::AbstractRemoteLinuxDeployStep - Cannot deploy: %1 無法佈署:%1 - User requests deployment to stop; cleaning up. 使用者要求停止佈署;清理中。 - Deploy step failed. 佈署步驟失敗。 - Deploy step finished. 佈署步驟完成。 @@ -33991,17 +28484,14 @@ Is the device connected and set up for network access? RemoteLinux::AbstractUploadAndInstallPackageService - Successfully uploaded package file. 上傳套件檔成功。 - Installing package to device... 正在安裝套件到裝置上... - Package installed. 套件已安裝。 @@ -34009,48 +28499,38 @@ Is the device connected and set up for network access? RemoteLinux::GenericDirectUploadService - SFTP initialization failed: %1 SFTP 初始化失敗:%1 - Upload of file '%1' failed. The server said: '%2'. 上傳檔案 '%1' 失敗。伺服器回應:'%2'。 - If '%1' is currently running on the remote host, you might need to stop it first. 若是 '%1' 目前正在遠端主機上執行,您可能需要先將它停止。 - - Failed to upload file '%1'. 上傳檔案 '%1' 失敗。 - Failed to set executable flag. - Failed to upload file '%1': Could not open for reading. 無法上傳檔案 '%1':無法開啟並讀取。 - All files successfully deployed. 所有檔案均已佈署成功。 - Warning: No remote path set for local file '%1'. Skipping upload. 警告:沒有為本地檔案 '%1' 設定遠端路徑。將跳過上傳。 - Uploading file '%1'... 上傳檔案 '%1' 中... @@ -34058,12 +28538,10 @@ Is the device connected and set up for network access? RemoteLinux::Internal::ConfigWidget - Incremental deployment 遞增佈署 - Command line: 命令列: @@ -34071,7 +28549,6 @@ Is the device connected and set up for network access? RemoteLinux::GenericDirectUploadStep - Upload files via SFTP 通過 SFTP 上傳檔案 @@ -34079,7 +28556,6 @@ Is the device connected and set up for network access? RemoteLinux::GenericLinuxDeviceConfigurationFactory - Generic Linux Device 通用 Linux 裝置 @@ -34169,17 +28645,14 @@ Is the device connected and set up for network access? RemoteLinux::LinuxDeviceTestDialog - Close 關閉 - Device test finished successfully. 裝置測試已成功完成。 - Device test failed. 裝置測試失敗。 @@ -34187,43 +28660,36 @@ Is the device connected and set up for network access? RemoteLinux::GenericLinuxDeviceTester - Connecting to host... 連線到主機... - SSH connection failure: %1 SSH 連線失敗:%1 - uname failed: %1 uname 失敗:%1 - uname failed. uname 失敗。 - Checking if specified ports are available... 檢查指定的連接埠是否可用... - Error gathering ports: %1 收集連接埠發生錯誤:%1 - The following specified ports are currently in use: %1 以下指定連接埠現正使用中:%1 @@ -34233,27 +28699,22 @@ Is the device connected and set up for network access? RemoteLinux::Internal::PackageUploader - Preparing SFTP connection... 準備建立 SFTP 連線... - Connection failed: %1 連線失敗:%1 - SFTP error: %1 SFTP 錯誤:%1 - Package upload failed: Could not open file. 套件上傳失敗:無法開啟檔案。 - Failed to upload package: %2 上傳套件失敗:%2 @@ -34261,27 +28722,22 @@ Is the device connected and set up for network access? RemoteLinux::Internal::ProFilesUpdateDialog - Updateable Project Files 可更新的專案檔 - Maemo Deployment Issue Maemo 佈署事件 - The project files listed below do not contain deployment information, which means the respective targets cannot be deployed to and/or run on a device. Qt Creator will add the missing information to these files if you check the respective rows below. 以下列出的專案檔案不包含佈署訊息, 意味著各自的目標無法在裝置上佈署或者執行. 如果你在下面選擇了目標,Qt Creator會新增丟失的訊息到這些檔案中去. - &Check all 全部勾選(&C) - &Uncheck All 全部取消勾選(&U) @@ -34338,7 +28794,6 @@ Continuing anyway. RemoteLinux::GenericRemoteLinuxCustomCommandDeploymentStep - Run custom remote command 執行自訂的遠端指令 @@ -34346,32 +28801,26 @@ Continuing anyway. RemoteLinux::RemoteLinuxCustomCommandDeployService - No command line given. 沒有指定命令列。 - Starting remote command '%1'... 啟動遠端指令 '%1'...... - Remote process failed to start. 遠端行程啟動失敗。 - Remote process was killed by a signal. 遠端行程被信號強行終結。 - Remote process finished with exit code %1. 遠端行程完成,離開代碼 '%1'。 - Remote command finished successfully. 遠端指令成功完成。 @@ -34379,7 +28828,6 @@ Continuing anyway. RemoteLinux - Deploy to Remote Linux Host 佈署到遠端 Linux 主機 @@ -34399,17 +28847,14 @@ Continuing anyway. RemoteLinux::Internal::RemoteLinuxEnvironmentReader - Connection error: %1 連線錯誤:%1 - Error running remote process: %1 執行遠端行程時發生錯誤:%1 - Remote stderr was: '%1' @@ -34419,12 +28864,10 @@ Remote stderr was: '%1' RemoteLinux::AbstractRemoteLinuxPackageInstaller - Connection failure: %1 連線失敗:%1 - Installing package failed. 安裝套件失敗。 @@ -34559,17 +29002,14 @@ Remote error output was: %1 RemoteLinux::SshKeyDeployer - Public key error: %1 公開金鑰錯誤:%1 - Connection failed: %1 連線失敗:%1 - Key deployment failed: %1. 佈署金鑰失敗:%1。 @@ -34644,64 +29084,50 @@ Remote error output was: %1 RemoteLinux::TarPackageCreationStep - Packaging finished successfully. 打包已順利完成。 - Packaging failed. 打包失敗。 - Creating tarball... 建立 tarball 歸檔中... - Tarball up to date, skipping packaging. Tarball 歸檔已更新。將跳過打包。 - Error: tar file %1 cannot be opened (%2). 錯誤:tar 檔案 %1 無法被開啟 (%2)。 - No remote path specified for file '%1', skipping. 沒有指定檔案 '%1' 的遠端路徑。將跳過。 - - Error writing tar file '%1': %2. 寫入 tar 檔案 '%1' 時發生錯誤:%2。 - - Error reading file '%1': %2. 讀取檔案 '%1' 時發生錯誤:%2。 - Adding file '%1' to tarball... 新增檔案 '%1' 到 tarball 歸檔中... - Cannot add file '%1' to tar-archive: path too long. 無法新增檔案 '%1' 到 tar 歸檔:路徑太長。 - Error writing tar file '%1': %2 寫入 tar 檔案 '%1' 時發生錯誤:%2 - Create tarball 建立 tarball 歸檔 @@ -34713,7 +29139,6 @@ Remote error output was: %1 (預設) - %1 (default) @@ -34721,12 +29146,10 @@ Remote error output was: %1 RemoteLinux::UploadAndInstallTarPackageStep - No tarball creation step found. 找不到 tarball 建立步驟。 - Deploy tarball via SFTP upload 透過 SFTP 來佈署 tarball 歸檔 @@ -34734,27 +29157,22 @@ Remote error output was: %1 TextEditor::Internal::CodeStyleDialog - Edit Code Style 編輯代碼風格 - Code style name: 代碼風格名稱: - You cannot save changes to a built-in code style. Copy it first to create your own version. 您不能儲存內建代碼風格的變更。請先複製以建立您自己的版本。 - Copy Built-in Code Style 複製內建代碼風格 - %1 (Copy) %1 (複製) @@ -34762,49 +29180,38 @@ Remote error output was: %1 TextEditor::CodeStyleSelectorWidget - Copy Code Style 複製代碼風格 - Code style name: 代碼風格名稱: - %1 (Copy) %1 (複製) - Delete Code Style 刪除代碼風格 - Are you sure you want to delete this code style permanently? 您確定要永久刪除這個代碼風格嗎? - Delete 刪除 - - Import Code Style 匯入代碼風格 - - Code styles (*.xml);;All files (*) 代碼風格 (*.xml);;所有檔案(*) - Cannot import code style from %1 @@ -34813,17 +29220,14 @@ Remote error output was: %1 無法匯入代碼風格 - Export Code Style 匯出代碼風格 - %1 [proxy: %2] %1 [代理:%2] - %1 [built-in] %1 [內建] @@ -34831,17 +29235,14 @@ Remote error output was: %1 TextEditor::FindInFiles - Files on File System 在檔案系統中的檔案 - Directory '%1': 目錄 '%1': - Path: %1 Filter: %2 %3 @@ -34851,22 +29252,18 @@ Filter: %2 %3 - Director&y: 目錄(&Y): - &Browse... 瀏覽(&B)... - Fi&le pattern: 檔案樣式(&L): - Directory to search 要搜尋的目錄 @@ -34874,22 +29271,18 @@ Filter: %2 UpdateInfo::Internal::UpdateInfoPlugin - Could not determine location of maintenance tool. Please check your installation if you did not enable this plugin manually. 無法決定維護工具所在位置。請檢查您的安裝,確定您是否沒有手動開啟此外掛程式的支援。 - Could not find maintenance tool at '%1'. Check your installation. 在 '%1' 找不到維護工具。請檢查您的安裝。 - Start Updater 啟動更新工具 - Update 更新 @@ -34897,7 +29290,6 @@ Filter: %2 TextEditor::CodeStyleEditor - Edit preview contents to see how the current settings are applied to custom code snippets. Changes in the preview do not affect the current settings. 編輯預覽內容來查看目前的設定如何套用到自訂代碼片段。在預覽中的變更並不會影響目前的設定。 @@ -34905,7 +29297,6 @@ Filter: %2 VcsCommand - '%1' failed (exit code %2). @@ -34914,7 +29305,6 @@ Filter: %2 - '%1' completed (exit code %2). @@ -34926,12 +29316,10 @@ Filter: %2 VcsBase::Command - Error: VCS timed out after %1s. 錯誤:VCS 在 %1 秒後逾時。 - Unable to start process, binary is empty 無法啟動行程,執行檔為空 @@ -34990,62 +29378,50 @@ Filter: %2 Core::Internal::CommandMappings - Command Mappings 指令映射 - Command 指令 - Label 標籤 - Target 目標 - Reset all to default 重置所有為預設值 - Reset All 全部重置 - Import... 匯入... - Export... 匯出... - Target Identifier 目標識別字 - Target: 目標: - Reset to default 重置為預設 - Reset 重置 @@ -35053,67 +29429,54 @@ Filter: %2 Core::Internal::MimeTypeSettingsPage - Form 表單 - Registered MIME Types 已註冊的 MIME 型態 - Reset all to default. 重置所有為預設值。 - Reset All 全部重置 - Details 詳情 - Patterns: 樣式: - Magic Header 魔術標頭 - Type 型態 - Range 範圍 - Priority 優先權 - Add... 新增... - Edit... 編輯... - Remove 移除 @@ -35121,12 +29484,10 @@ Filter: %2 Core::Internal::VariableChooser - Variables 變數 - Select a variable to insert. 選擇要插入的變數。 @@ -35134,28 +29495,23 @@ Filter: %2 CodePaster::Internal::FileShareProtocolSettingsWidget - Form 表單 - The fileshare-based paster protocol allows for sharing code snippets using simple files on a shared network drive. Files are never deleted. 以檔案共享為基底的剪貼協定允許在一個共享網路磁碟上分享代碼片段。 檔案永遠不會被刪除。 - &Path: 路徑(&P): - &Display: 顯示(&D): - entries 條目 @@ -35163,22 +29519,18 @@ Filter: %2 CodePaster::Internal::PasteBinComSettingsWidget - Form 表單 - <a href="http://pastebin.com">pastebin.com</a> allows for sending posts to custom subdomains (eg. creator.pastebin.com). Fill in the desired prefix. <a href="http://pastebin.com">pastebin.com</a> 允許傳送主題到自定義子域名,(比如. creator.pastebin.com). 輸入你希望的前綴. - Server prefix: 伺服器前置字串: - <i>Note: The plugin will use this for posting as well as fetching.</i> <i>注意:外掛程式將會使用此項來發佈與抓取。</i> @@ -35186,12 +29538,10 @@ Filter: %2 CodePaster::Internal::PasteSelectDialog - Protocol: 協定: - Paste: 貼上: @@ -35199,37 +29549,30 @@ Filter: %2 CodePaster::Internal::ViewDialog - Send to Codepaster 傳送至 CodePaster - Protocol: 協定: - &Username: 使用者名稱(&U): - <Username> <使用者名稱> - &Description: 描述(&D): - <Description> <描述> - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -35242,17 +29585,14 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">&lt;意見&gt;</p></body></html> - Parts to Send to Server 傳送到伺服器的部分 - Patch 1 Patch 1 - Patch 2 Patch 2 @@ -35260,22 +29600,18 @@ p, li { white-space: pre-wrap; } CodePaster::Internal::SettingsPage - Display Output pane after sending a post 發送後顯示輸出窗格 - Copy-paste URL to clipboard 複製/貼上網址到剪貼簿 - Username: 使用者名稱: - Default protocol: 預設協定: @@ -35283,22 +29619,18 @@ p, li { white-space: pre-wrap; } CppTools::Internal::CppFileSettingsPage - Header suffix: 標頭檔後置字串: - Source suffix: 源碼檔後置字串: - Lower case file names 小寫檔名 - License template: 授權樣本: @@ -35306,12 +29638,10 @@ p, li { white-space: pre-wrap; } Debugger::Internal::AttachToQmlPortDialog - Start Debugger 啟動除錯工具 - Kit: @@ -35320,7 +29650,6 @@ p, li { white-space: pre-wrap; } 主機(&H): - &Port: 連接埠(&P): @@ -35332,102 +29661,82 @@ p, li { white-space: pre-wrap; } Debugger::Internal::CommonOptionsPage - Behavior 行為 - Use alternating row colors in debug views 在除錯檢視中使用交替行顏色 - Change the font size in the debugger views when the font size in the main editor changes. 當主編輯器的字體改變時,在除錯工具中監視器中自動調整字體大小. - Debugger font size follows main editor 除錯工具字體和主編輯器一致 - Use tooltips in main editor while debugging 當除錯時在主編輯器中啟用工具提示 - Populate the source file view automatically. This might slow down debugger startup considerably. 自動填充來源檔案視圖.這將延緩除錯工具的啟動. - Populate source file view automatically 自動顯示來源檔案視圖 - Close temporary buffers on debugger exit 在除錯工具退出時關閉臨時緩衝區 - Switch to previous mode on debugger exit 在除錯工具退出時切換到前一個模式 - Register Qt Creator for debugging crashed applications. 註冊 Qt Creator 來除錯崩潰的應用. - Use Qt Creator for post-mortem debugging 使用 Qt Creator 進行崩潰後(post-mortem)除錯 - Maximum stack depth: 最大堆疊深度: - <unlimited> <無限制> - Bring Qt Creator to foreground when application interrupts - Show QML object tree in Locals & Expressions when connected and not stepping. - Show QML object tree - Enable a full file path in breakpoints by default also for the GDB - Breakpoints full path by default - Stop when %1() is called - Always add a breakpoint on the <i>%1()</i> function. @@ -35435,12 +29744,10 @@ p, li { white-space: pre-wrap; } Debugger::Internal::LldbOptionsPageWidget - Enable LLDB 開啟 LLDB - Use GDB Python dumpers 使用 GDB python dumpers @@ -35448,32 +29755,26 @@ p, li { white-space: pre-wrap; } Debugger::Internal::StartRemoteEngineDialog - Start Remote Engine 啟動遠端引擎 - &Host: 主機(&H): - &Username: 使用者名稱(&U): - &Password: 密碼(&P): - &Engine path: 引擎路徑(&E): - &Inferior path: 底層路徑(&I): @@ -35481,22 +29782,18 @@ p, li { white-space: pre-wrap; } Madde::Internal::MaemoDeviceConfigWizardCheckPreviousKeySetupPage - WizardPage 精靈頁面 - Has a passwordless (key-based) login already been set up for this device? 此裝置是否已經設定使用金鑰登入而不需要密碼? - Yes, and the private key is located at 是的,私密金鑰檔的位置在 - No @@ -35504,17 +29801,14 @@ p, li { white-space: pre-wrap; } Madde::Internal::MaemoPublishingWizardPageFremantleFree - WizardPage 精靈頁面 - Choose build configuration: 選擇建置設置: - Only create source package, do not upload 只建立源碼套件,不要上傳 @@ -35522,12 +29816,10 @@ p, li { white-space: pre-wrap; } Madde::Internal::MaemoPublishingFileSelectionDialog - Choose Package Contents 選擇套件內容 - <b>Please select the files you want to be included in the source tarball.</b> <b>請選擇您要包含在源碼 tarball 歸檔中的檔案。</b> @@ -35537,12 +29829,10 @@ p, li { white-space: pre-wrap; } Madde::Internal::MaemoPublishingResultPageFremantleFree - WizardPage 精靈頁面 - Progress 進度 @@ -35550,27 +29840,22 @@ p, li { white-space: pre-wrap; } Madde::Internal::MaemoQemuSettingsWidget - Form 表單 - OpenGL Mode OpenGL 模式 - &Hardware acceleration 硬體加速(&H) - &Software rendering 軟體成像(&S) - &Auto-detect 自動偵測(&A) @@ -35578,12 +29863,10 @@ p, li { white-space: pre-wrap; } ProjectExplorer::Internal::CodeStyleSettingsPropertiesPage - Form 表單 - Language: 語言: @@ -35591,72 +29874,58 @@ p, li { white-space: pre-wrap; } QmlDesigner::Internal::BehaviorDialog - Dialog 對話框 - Type: 型態: - ID: 代碼: - Property name: 屬性名稱: - Animation 動畫 - SpringFollow 彈性跟隨 - Settings 設定 - Duration: 持續時間: - Curve: 曲線: - easeNone 緩慢(easeNone) - Source: 來源: - Velocity: 速率: - Spring: 彈性: - Damping: 阻尼: @@ -35664,22 +29933,18 @@ p, li { white-space: pre-wrap; } SelectionRangeDetails - Selection 選擇 - Start 啟動 - End 結束 - Duration 持續時間 @@ -35687,12 +29952,10 @@ p, li { white-space: pre-wrap; } Qt4ProjectManager::Internal::MakeStep - Make arguments: Make 參數: - Override %1: 覆寫 %1: @@ -35700,32 +29963,26 @@ p, li { white-space: pre-wrap; } Qt4ProjectManager::Internal::QMakeStep - qmake build configuration: qmake 建置設置: - Debug 除錯 - Release 發佈 - Additional arguments: 額外的參數: - Link QML debugging library: 連結 QML 除錯函式庫: - Effective qmake call: 有效的 qmake 呼叫: @@ -35740,52 +29997,42 @@ p, li { white-space: pre-wrap; } Qt4ProjectManager::Internal::Html5AppWizardSourcesPage - WizardPage 精靈頁面 - Main HTML File 主 HTML 檔案 - Generate an index.html file 產生一個 index.html 檔案 - Import an existing .html file 匯入現有的 .html 檔案 - Load a URL 載入網址 - http:// http:// - Note: Unless you chose to load a URL, all files and directories that reside in the same directory as the main HTML file are deployed. You can modify the contents of the directory any time before deploying. 注意:除非你選擇讀取一個URL,所有在同意目錄下的檔案和資料夾,主要HTML檔案將被佈署。你可以在佈署之前的任何時間變更內容資料夾。 - Touch optimized navigation 觸摸導航 - Enable touch optimized navigation 開啟觸摸導航 - Touch optimized navigation will make the HTML page flickable and enlarge the area of touch sensitive elements. If you use a JavaScript framework which optimizes the touch interaction, leave the checkbox unchecked. Touch optimized navigation 將會使得 HTML 頁面上的元素具有動感. 如果你使用JavaScript 框架來優化觸摸互動, 那麼不要選擇此項. @@ -35793,22 +30040,18 @@ p, li { white-space: pre-wrap; } Qt4ProjectManager::Internal::MobileAppWizardHarmattanOptionsPage - WizardPage 精靈頁面 - Application icon (80x80): 應用程式圖示 (80x80): - Generate code to speed up the launching on the device. 生成代碼來加速裝置上的執行速度. - Make application boostable 使應用程式啟動穩定 @@ -35835,7 +30078,6 @@ p, li { white-space: pre-wrap; } Qt4ProjectManager::Internal::MobileLibraryWizardOptionPage - WizardPage 精靈頁面 @@ -35844,7 +30086,6 @@ p, li { white-space: pre-wrap; } 目標 UID3: - Plugin's directory name: 外掛程式目錄名稱: @@ -35856,7 +30097,6 @@ p, li { white-space: pre-wrap; } QtSupport::Internal::ShowBuildLog - Debugging Helper Build Log 除錯小助手建置紀錄 @@ -35864,77 +30104,62 @@ p, li { white-space: pre-wrap; } RemoteLinux::GenericLinuxDeviceConfigurationWidget - Form 表單 - Authentication type: 認證型態: - Password 密碼 - &Key 金鑰(&K) - &Host name: 主機名稱(&H): - IP or host name of the device 裝置的 IP 或主機名稱 - &SSH port: SSH 連接埠(&S): - Free ports: 可用連接埠: - You can enter lists and ranges like this: 1024,1026-1028,1030 您可以輸入列表或範圍,例如:1024,1026-1028,1030 - Timeout: 逾時: - s - &Username: 使用者名稱(&U): - &Password: 密碼(&P): - Show password 顯示密碼 - Private key file: 私密金鑰檔: @@ -35943,27 +30168,22 @@ p, li { white-space: pre-wrap; } 設為預設值 - Physical Device 實體裝置 - Emulator 模擬器 - You will need at least one port. 您需要至少一個連接埠。 - Create New... - Machine type: @@ -35971,47 +30191,38 @@ p, li { white-space: pre-wrap; } RemoteLinux::Internal::GenericLinuxDeviceConfigurationWizardSetupPage - WizardPage 精靈頁面 - The name to identify this configuration: 用於辨認此設置的名稱: - The device's host name or IP address: 裝置的主機名稱或 IP 位址: - The user name to log into the device: 登入此裝置用的使用者名稱: - The authentication type: 認證型態: - Password 密碼 - Key 金鑰 - The user's password: 使用者密碼: - The file containing the user's private key: 包含使用者私密金鑰的檔案: @@ -36019,7 +30230,6 @@ p, li { white-space: pre-wrap; } RemoteLinux::Internal::LinuxDeviceTestDialog - Device Test 裝置測試 @@ -36027,7 +30237,6 @@ p, li { white-space: pre-wrap; } RemoteLinux::Internal::RemoteLinuxDeployConfigurationWidget - Form 表單 @@ -36040,12 +30249,10 @@ p, li { white-space: pre-wrap; } <a href="irrelevant">管理裝置設置</a> - These show the INSTALLS settings from the project file(s). 顯示來自於專案檔的安裝 (INSTALLS) 設定。 - Files to install for subproject: 為子專案安裝的檔案: @@ -36072,7 +30279,6 @@ p, li { white-space: pre-wrap; } TextEditor::Internal::BehaviorSettingsPage - Form 表單 @@ -36080,22 +30286,18 @@ p, li { white-space: pre-wrap; } TextEditor::Internal::BehaviorSettingsWidget - Typing 打字 - Enable automatic &indentation 開啟自動縮排(&I) - Backspace indentation: 返回縮排: - <html><head/><body> Specifies how backspace interacts with indentation. @@ -36126,102 +30328,82 @@ Specifies how backspace interacts with indentation. - None - Follows Previous Indents 跟隨之前的縮排 - Unindents 取消縮排 - Tab key performs auto-indent: Tab 鍵提供自動縮排: - Never 從不 - Always 總是 - In Leading White Space 於行首空白 - Cleanup actions which are automatically performed right before the file is saved to disk. 在檔案儲存到磁碟之前自動執行的清理動作。 - Cleanups Upon Saving 儲存時清理 - Removes trailing whitespace upon saving. 儲存時去除尾部空白。 - &Clean whitespace 清除空白(&C) - Clean whitespace in entire document instead of only for changed parts. 清除整個文件中的空白,而不是只有變更的部份。 - In entire &document 於整份文件(&D) - Correct leading whitespace according to tab settings. 根據定位點設置修正開頭的空白。 - Clean indentation 清除縮排 - Always write a newline character at the end of the file. 總是在檔案結尾處加入一個換新行符號。 - &Ensure newline at end of file 確保檔案結尾處有新行(&E) - File Encodings 檔案編碼 - Default encoding: 預設編碼: - <html><head/><body> <p>How text editors should deal with UTF-8 Byte Order Marks. The options are:</p> <ul ><li><i>Add If Encoding Is UTF-8:</i> always add a BOM when saving a file in UTF-8 encoding. Note that this will not work if the encoding is <i>System</i>, as Qt Creator does not know what it actually is.</li> @@ -36238,67 +30420,54 @@ Specifies how backspace interacts with indentation. <p>此項設置 <b>不</b> 影響UTF-16 和UTF-32 BOMs的使用.</p></body></html> - Add If Encoding Is UTF-8 如果編碼是 UTF-8 則新增 - Keep If Already Present 如果已存在則保持 - Always Delete 總是刪除 - UTF-8 BOM: UTF-8 BOM: - Mouse and Keyboard 滑鼠和鍵盤 - Enable &mouse navigation 開啟滑鼠導覽(&M) - Enable scroll &wheel zooming 開啟滑鼠滾輪縮放(&W) - Enable built-in camel case &navigation 開啟內建的駝峰式大小寫導覽(&N) - Show help tooltips: 顯示說明工具提示: - On Mouseover 滑鼠置於上時 - On Shift+Mouseover 按住 Shift 並將滑鼠置於上時 - Press Alt to display context-sensitive help or type information as tooltips. 按住 Alt 來以工具提示顯示內文相關說明或是型態資訊。 - Using keyboard shortcut (Alt) 使用鍵盤捷徑 (Alt) @@ -36306,37 +30475,30 @@ Specifies how backspace interacts with indentation. TextEditor::Internal::CodeStyleSelectorWidget - Form 表單 - Current settings: 目前設定: - Copy... 複製... - Edit... 編輯... - Remove 移除 - Export... 匯出... - Import... 匯入... @@ -36344,72 +30506,58 @@ Specifies how backspace interacts with indentation. TextEditor::Internal::DisplaySettingsPage - Display 顯示 - Display line &numbers 顯示行號(&N) - Highlight current &line 突顯目前行(&L) - Display &folding markers 顯示摺疊標記(&F) - Highlight &blocks 突顯段落區塊(&B) - Mark &text changes 標記文字改變(&T) - Show tabs and spaces. 顯示定位點跟空白。 - &Visualize whitespace 標示空白(&V) - &Animate matching parentheses 動畫顯示對應的括號(&A) - Auto-fold first &comment 自動摺疊開頭的註解(&C) - Center &cursor on scroll 滾動時游標居中(&C) - Text Wrapping 文字折行 - Enable text &wrapping 開啟文字折行(&W) - Display right &margin at column: 顯示在欄右邊的邊界(&M): @@ -36417,44 +30565,36 @@ Specifies how backspace interacts with indentation. TextEditor::Internal::HighlighterSettingsPage - Form 表單 - <html><head/><body> <p>Highlight definitions are provided by the <a href="http://kate-editor.org/">Kate Text Editor</a>.</p></body></html> <html><head/><body> <p>突顯定義是由 <a href="http://kate-editor.org/">Kate 文字編輯器</a>所提供。</p></body></html> - Syntax Highlight Definition Files 語法突顯定義檔 - Location: 位置: - Use fallback location 使用預設位置 - Behavior 行為 - Alert when a highlight definition is not found 當找不到突顯的定義時警示 - Ignored file patterns: 被忽略的檔案樣式: @@ -36462,37 +30602,30 @@ Specifies how backspace interacts with indentation. TextEditor::Internal::SnippetsSettingsPage - Form 表單 - Group: 群組: - Add 新增 - Remove 移除 - Revert Built-in 回復到內建 - Restore Removed Built-ins 回復被移除的內建 - Reset All 全部重置 @@ -36500,52 +30633,42 @@ Specifies how backspace interacts with indentation. TextEditor::Internal::TabSettingsWidget - Form 表單 - Tabs And Indentation 定位點與縮排 - Tab policy: 定位點策略: - Spaces Only 只有空格 - Tabs Only 只有定位點 - Mixed 混合 - Ta&b size: 定位點大小(&B): - &Indent size: 縮排大小(&I): - Align continuation lines: 對齊連續行: - <html><head/><body> Influences the indentation of continuation lines. @@ -36598,17 +30721,14 @@ Influences the indentation of continuation lines. </ul></body></html> - Not At All 完全不要 - With Spaces 伴隨空格 - With Regular Indent 伴隨正規縮排 @@ -36631,47 +30751,38 @@ Influences the indentation of continuation lines. Todo::Internal::OptionsDialog - Form 表單 - Keywords 關鍵字 - Add 新增 - Edit 編輯 - Remove 移除 - Reset 重置 - Scanning scope 掃描範圍 - Scan in the whole project 在整個專案中掃描 - Scan in the current opened file 在目前開啟的檔案中掃描 @@ -36679,62 +30790,50 @@ Influences the indentation of continuation lines. VcsBase::Internal::BaseCheckoutWizardPage - WizardPage 精靈頁面 - Repository 主目錄 - The remote repository to check out. 要取出的遠端主目錄。 - Branch: 分支: - The development branch in the remote repository to check out. 要取出的遠端主目錄中的開發分支。 - Retrieve list of branches in repository. 取得主目錄中的分支列表。 - ... ... - Working Copy 工作複本 - The path in which the directory containing the checkout will be created. 此次取出的目錄要建立在哪個路徑。 - Checkout path: 取出路徑: - The local directory that will contain the code after the checkout. 包含此次取出的代碼的本地目錄。 - Checkout directory: 取出目錄: @@ -36742,7 +30841,6 @@ Influences the indentation of continuation lines. VcsBase::Internal::CleanDialog - Clean Repository 清除主目錄 @@ -36750,61 +30848,50 @@ Influences the indentation of continuation lines. VcsBase::Internal::CommonSettingsPage - Wrap submit message at: 提交訊息折行在: - characters 個字元處 - An executable which is called with the submit message in a temporary file as first argument. It should return with an exit != 0 and a message on standard error to indicate failure. 一個可執行檔,以儲存在臨時檔案中的提交訊息為首參數。當提交失敗時以非零值退出並在標準錯誤中輸出訊息。 - Submit message &check script: 提交訊息檢查腳本(&c): - A file listing user names and email addresses in a 4-column mailmap format: name <email> alias <email> 一個列出使用者名稱和 email 地址的檔案,使用四列的郵件映射格式: 名字 <email> 別名 <email> - User/&alias configuration file: 使用者/別名設置檔案(&a): - A simple file containing lines with field names like "Reviewed-By:" which will be added below the submit editor. 一個包含了如 」Reviewed-By:" 等字段名的簡單檔案,其內容會被新增在提交編輯器的下面。 - User &fields configuration file: 使用者字段設置檔案(&f): - &Patch command: 修補指令(&P): - Specifies a command that is executed to graphically prompt for a password, should a repository require SSH-authentication (see documentation on SSH and the environment variable SSH_ASKPASS). 指定一條執行圖形化提示密碼的命令, 會在代碼倉函式庫要求 SSH 身份驗證的時候用到。(查看 SSH 和環境變數 SSH_ASKPASS 的相關文檔)。 - &SSH prompt command: SSH 提示指令(&S): @@ -36819,27 +30906,22 @@ should a repository require SSH-authentication (see documentation on SSH and the develop - Develop 開發 - Sessions 工作階段 - Recent Projects 最近使用的專案 - Open Project 開啟專案 - Create Project 建立專案 @@ -36847,12 +30929,10 @@ should a repository require SSH-authentication (see documentation on SSH and the examples - Examples 範例 - Search in Examples... 在範例中搜尋... @@ -36860,47 +30940,38 @@ should a repository require SSH-authentication (see documentation on SSH and the gettingstarted - Getting Started 入門 - To select a tutorial and learn how to develop applications. 選擇一個教學,學習如何開發應用程式。 - Start Developing 開始開發 - To check that the Qt SDK installation was successful, open an example application and run it. 要檢查 Qt SDK 安裝是否成功,請開啟一個範例應用程式並執行。 - Building and Running an Example Application 建置與執行範例應用程式 - IDE Overview 整合開發介面概觀 - To find out what kind of integrated environment (IDE) Qt Creator is. - To become familiar with the parts of the Qt Creator user interface and to learn how to use them. - Blogs @@ -36913,17 +30984,14 @@ should a repository require SSH-authentication (see documentation on SSH and the 讓您熟悉 Qt Creator 的使用者介面,並學習如何使用。 - User Interface 使用者介面 - User Guide 使用者指南 - Online Community 線上社群 @@ -36935,12 +31003,10 @@ should a repository require SSH-authentication (see documentation on SSH and the tutorials - Tutorials 教學 - Search in Tutorials... 在教學中搜尋... @@ -36948,17 +31014,14 @@ should a repository require SSH-authentication (see documentation on SSH and the Delegate - 2D PAINTING EXAMPLE long description 2D 繪圖範例的長描述 - The 2D Painting example shows how QPainter and QGLWidget work together. 2D 繪圖範例顯示如何讓 QPainter 與 QGLWidget 放在一起運作。 - Tags: 標籤: @@ -36966,7 +31029,6 @@ should a repository require SSH-authentication (see documentation on SSH and the SearchBar - Search... 搜尋... @@ -36974,17 +31036,14 @@ should a repository require SSH-authentication (see documentation on SSH and the SessionItem - Clone 複製 - Rename 重新命名 - Delete 刪除 @@ -36992,12 +31051,10 @@ should a repository require SSH-authentication (see documentation on SSH and the Sessions - %1 (last session) %1 (上次的工作階段) - %1 (current session) %1 (目前的工作階段) @@ -37005,322 +31062,258 @@ should a repository require SSH-authentication (see documentation on SSH and the StaticAnalysisMessages - do not use '%1' as a constructor 不要用 '%1' 做為建構子 - invalid value for enum 無效的列舉值 - enum value must be a string or a number 列舉值必須是字串或數字 - number value expected 預期應為數值 - boolean value expected 預期應為布林值 - string value expected 預期應為字串值 - invalid URL 無效的網址 - file or directory does not exist 檔案或目錄不存在 - invalid color 無效的顏色 - anchor line expected 預期應為定錨行 - duplicate property binding 重複的屬性綁定 - id expected 預期應為代碼 - invalid id 無效的代碼 - duplicate id 重複的代碼 - invalid property name '%1' 無效的屬性名稱 '%1' - '%1' does not have members '%1' 沒有成員 - '%1' is not a member of '%2' '%1' 不是 '%2' 的成員 - assignment in condition 條件指定 - unterminated non-empty case block 未結束非空的 case 區塊 - do not use 'eval' 不要使用 'eval' - unreachable 無法到達 - do not use 'with' 不要使用 'with' - do not use comma expressions 不要使用逗號表示式 - '%1' is already a formal parameter '%1' 已經是一個正規參數 - unnecessary message suppression - '%1' is already a function '%1' 已經是函式 - var '%1' is used before its declaration 變數 '%1' 在宣告前使用 - '%1' is already a var '%1' 已經是變數 - '%1' is declared more than once '%1' 被宣告多次 - function '%1' is used before its declaration 函式 '%1' 在宣告前使用 - the 'function' keyword and the opening parenthesis should be separated by a single space 'function' 關鍵字與接下來的括號應該用單一空白隔開 - do not use stand-alone blocks 不要使用單獨 (standalone) 的區塊 - do not use void expressions 不要使用 void 表示式 - confusing pluses 令人混淆的加號 - confusing minuses 令人混淆的減號 - declare all function vars on a single line 在同一行中宣告所有的函式變數 - unnecessary parentheses 不需要的括號 - == and != may perform type coercion, use === or !== to avoid == 與 != 可能會執行強制型別轉換。用 === 或 !== 來避免這種狀況 - expression statements should be assignments, calls or delete expressions only 表示式敘述應該只能是指定、呼叫或刪除表示式 - var declarations should be at the start of a function 變數宣告應該在函式的開始處 - only use one statement per line 一行只使用一個敘述 - unknown component 未知的組件 - could not resolve the prototype '%1' of '%2' 無法解析 '%2' 的原生型態 '%1' - could not resolve the prototype '%1' 無法解析原生型態 '%1' - prototype cycle, the last non-repeated component is '%1' 原生型態循環,前一個未重覆的組件為 '%1' - invalid property type '%1' 無效的屬性型態 '%1' - == and != perform type coercion, use === or !== to avoid == 與 != 可能會執行強制型別轉換。用 === 或 !== 來避免這種狀況 - calls of functions that start with an uppercase letter should use 'new' 呼叫以大寫字母開始的函式,應該要用 'new' - 'new' should only be used with functions that start with an uppercase letter 'new' 只能用在以大寫字母開始的函式 - use spaces around binary operators 在二元運算符週圍加入空白 - unintentional empty block, use ({}) for empty object literal 非刻意的空白區塊,用 ({}) 做空白物件 - use %1 instead of 'var' or 'variant' to improve performance 用 %1 而不用 'var' 或 'variant' 來增進效能 - missing property '%1' 遺失的屬性 '%1' - object value expected 預期應為物件 - array value expected 預期應為陣列 - %1 value expected 預期應為 %1 的值 - maximum number value is %1 最大數值為 %1 - minimum number value is %1 最小數值為 %1 - maximum number value is exclusive 最大數值是互斥的 - minimum number value is exclusive 最小數值是互斥的 - string value does not match required pattern 字串值不符合需要的樣式 - minimum string value length is %1 最小字串長度為 %1 - maximum string value length is %1 最大字串長度為 %1 - %1 elements expected in array value 在陣列中應該有 %1 個元素 @@ -37341,33 +31334,26 @@ should a repository require SSH-authentication (see documentation on SSH and the Utils::SettingsSelector - Add 新增 - - Remove 移除 - Rename 重新命名 - Do you really want to delete the configuration <b>%1</b>? 您確定要刪除此設置 <b>%1</b> 嗎? - New name for configuration <b>%1</b>: 設置 <b>%1</b> 的新名稱: - Rename... 重新命名... @@ -37405,58 +31391,47 @@ should a repository require SSH-authentication (see documentation on SSH and the ZeroConf::Internal::ZConfLib - AvahiZConfLib could not load the native library '%1': %2 - %1 cannot create a client. The daemon is probably not running. - cAvahiClient, server collision. - cAvahiClient, an error occurred on the client side. - cAvahiClient, still connecting, no server available. - Unexpected state %1 in cAvahiClientReply. - Unexpected state %1 in cAvahiBrowseReply. - %1 failed to kill other daemons with '%2'. - %1 detected a file at /tmp/mdnsd, daemon startup will probably fail. - %1: log of previous daemon run is: '%2'. - %1 failed starting embedded daemon at %2. @@ -37464,7 +31439,6 @@ should a repository require SSH-authentication (see documentation on SSH and the Analyzer::Internal::AnalyzerToolDetailWidget - <strong>%1</strong> settings <strong>%1</strong> 設定 @@ -37472,7 +31446,6 @@ should a repository require SSH-authentication (see documentation on SSH and the Analyzer::AnalyzerRunConfigurationAspect - Analyzer Settings 分析器設定 @@ -37480,7 +31453,6 @@ should a repository require SSH-authentication (see documentation on SSH and the AutotoolsProjectManager::Internal::AutogenStepFactory - Autogen Display name for AutotoolsProjectManager::AutogenStep id. Autogen @@ -37489,12 +31461,10 @@ should a repository require SSH-authentication (see documentation on SSH and the AutotoolsProjectManager::Internal::AutogenStep - Autogen Autogen - Configuration unchanged, skipping autogen step. 設置未變更,跳過 autogen 步驟。 @@ -37502,12 +31472,10 @@ should a repository require SSH-authentication (see documentation on SSH and the AutotoolsProjectManager::Internal::AutogenStepConfigWidget - Arguments: 參數: - Autogen AutotoolsProjectManager::AutogenStepConfigWidget display name. Autogen @@ -37516,7 +31484,6 @@ should a repository require SSH-authentication (see documentation on SSH and the AutotoolsProjectManager::Internal::AutoreconfStepFactory - Autoreconf Display name for AutotoolsProjectManager::AutoreconfStep id. Autoreconf @@ -37525,12 +31492,10 @@ should a repository require SSH-authentication (see documentation on SSH and the AutotoolsProjectManager::Internal::AutoreconfStep - Autoreconf Autoreconf - Configuration unchanged, skipping autoreconf step. 設置未變更,跳過 autoreconf 步驟。 @@ -37538,12 +31503,10 @@ should a repository require SSH-authentication (see documentation on SSH and the AutotoolsProjectManager::Internal::AutoreconfStepConfigWidget - Arguments: 參數: - Autoreconf AutotoolsProjectManager::AutoreconfStepConfigWidget display name. Autoreconf @@ -37552,17 +31515,14 @@ should a repository require SSH-authentication (see documentation on SSH and the AutotoolsProjectManager::Internal::AutotoolsBuildConfigurationFactory - Build 建置 - New Configuration 新增設置 - New configuration name: 新設置名稱: @@ -37570,7 +31530,6 @@ should a repository require SSH-authentication (see documentation on SSH and the AutotoolsProjectManager::Internal::AutotoolsBuildSettingsWidget - Build directory: 建置目錄: @@ -37586,12 +31545,10 @@ should a repository require SSH-authentication (see documentation on SSH and the AutotoolsProjectManager::Internal::AutotoolsManager - Failed opening project '%1': Project file does not exist 開啟專案 '%1' 失敗:專案檔不存在 - Failed opening project '%1': Project already open 開啟專案 '%1' 失敗:專案已經被開啟 @@ -37599,7 +31556,6 @@ should a repository require SSH-authentication (see documentation on SSH and the AutotoolsProjectManager::Internal::AutotoolsOpenProjectWizard - Autotools Wizard Autotools 精靈 @@ -37607,17 +31563,14 @@ should a repository require SSH-authentication (see documentation on SSH and the AutotoolsProjectManager::Internal::BuildPathPage - Please enter the directory in which you want to build your project. Qt Creator recommends to not use the source directory for building. This ensures that the source directory remains clean and enables multiple builds with different settings. 請輸入您想建置專案的目錄。Qt Creator 建議您不要直接用源碼的目錄來做建置。這樣可以保持源碼目錄的乾淨,並且可以讓您用不同的設定進行多個建置。 - Build directory: 建置目錄: - Build Location 建置位置 @@ -37633,7 +31586,6 @@ should a repository require SSH-authentication (see documentation on SSH and the AutotoolsProjectManager::Internal::ConfigureStepFactory - Configure Display name for AutotoolsProjectManager::ConfigureStep id. 設置 @@ -37642,12 +31594,10 @@ should a repository require SSH-authentication (see documentation on SSH and the AutotoolsProjectManager::Internal::ConfigureStep - Configure 設置 - Configuration unchanged, skipping configure step. 設置未變更,跳過設置步驟。 @@ -37655,12 +31605,10 @@ should a repository require SSH-authentication (see documentation on SSH and the AutotoolsProjectManager::Internal::ConfigureStepConfigWidget - Arguments: 參數: - Configure AutotoolsProjectManager::ConfigureStepConfigWidget display name. 設置 @@ -37669,12 +31617,10 @@ should a repository require SSH-authentication (see documentation on SSH and the AutotoolsProjectManager::Internal::MakefileParser - Parsing %1 in directory %2 在目錄 %2 剖析 %1 中 - Parsing directory %1 剖析目錄 %1 中 @@ -37682,7 +31628,6 @@ should a repository require SSH-authentication (see documentation on SSH and the AutotoolsProjectManager::Internal::MakeStepFactory - Make Display name for AutotoolsProjectManager::MakeStep id. Make @@ -37691,17 +31636,14 @@ should a repository require SSH-authentication (see documentation on SSH and the AutotoolsProjectManager::Internal::MakeStep - Make Make - Qt Creator needs a compiler set up to build. Configure a compiler in the kit options. - Configuration is faulty. Check the Issues view for details. 設置錯誤。請在錯誤檢視中看詳情。 @@ -37709,12 +31651,10 @@ should a repository require SSH-authentication (see documentation on SSH and the AutotoolsProjectManager::Internal::MakeStepConfigWidget - Arguments: 參數: - Make AutotoolsProjectManager::MakeStepConfigWidget display name. Make @@ -37727,20 +31667,14 @@ should a repository require SSH-authentication (see documentation on SSH and the BinEditorDocument - The Binary Editor cannot open empty files. - - Cannot open %1: %2 無法開啟 %1:%2 - - - File Error 檔案錯誤 @@ -37748,7 +31682,6 @@ should a repository require SSH-authentication (see documentation on SSH and the CMakeProjectManager::Internal::CMakeLocatorFilter - Build CMake target 建置 CMake 目標 @@ -37756,53 +31689,42 @@ should a repository require SSH-authentication (see documentation on SSH and the Core::DocumentManager - - File Error 檔案錯誤 - Error while saving file: %1 儲存檔案時發生錯誤:%1 - Overwrite? 要覆寫嗎? - An item named '%1' already exists at this location. Do you want to overwrite it? 名為 '%1' 的項目已經存在。您要覆寫它嗎? - Save File As 另存新檔 - Open File 開啟檔案 - File Is Read Only 檔案為唯讀狀態 - The file <i>%1</i> is read only. 檔案 <i>%1</i> 是唯讀的。 - Make &Writable - &Save As... @@ -37819,7 +31741,6 @@ should a repository require SSH-authentication (see documentation on SSH and the 另存新檔... - Cannot reload %1 無法重新載入 %1 @@ -37831,7 +31752,6 @@ should a repository require SSH-authentication (see documentation on SSH and the 檔案已經由自動儲存的備份恢復。您可以使用「<i>儲存</i>」來確認,或是用「<i>回復到已儲存</i>」來丟棄變更。 - File was restored from auto-saved copy. Select Save to confirm or Revert to Saved to discard changes. @@ -37839,23 +31759,18 @@ should a repository require SSH-authentication (see documentation on SSH and the QuickFix::ExtractFunction - Extract Function 展開函式 - - Extract Function Refactoring 展開函式重構 - Enter function name 輸入函式名稱 - Invalid function name 無效的函式名稱 @@ -37863,7 +31778,6 @@ should a repository require SSH-authentication (see documentation on SSH and the CppTools::CppClassesFilter - Classes 類別 @@ -37871,27 +31785,22 @@ should a repository require SSH-authentication (see documentation on SSH and the Debugger::Internal::TypeFormatsDialog - Reset 重置 - Type Formats 型態格式 - Qt Types Qt 型態 - Standard Types 標準型態 - Misc Types 其他型態 @@ -37899,32 +31808,26 @@ should a repository require SSH-authentication (see documentation on SSH and the Debugger::Internal::DebuggerRunConfigWidget - Debugger Settings 除錯工具設定 - Enable C++ 開啟 C++ - Enable QML 開啟 QML - Debug port: 除錯連接埠: - <a href="qthelp://org.qt-project.qtcreator/doc/creator-debugging-qml.html">What are the prerequisites?</a> <a href="qthelp://org.qt-project.qtcreator/doc/creator-debugging-qml.html">先決條件是什麼?</a> - Enable Debugging of Subprocesses @@ -37936,7 +31839,6 @@ should a repository require SSH-authentication (see documentation on SSH and the 匿名函式 - Anonymous Function @@ -37944,27 +31846,22 @@ should a repository require SSH-authentication (see documentation on SSH and the Debugger::Internal::QtMessageLogEditor - Cu&t 剪下(&T) - &Copy 複製(&C) - &Paste 貼上(&P) - Select &All 全部選取(&A) - C&lear 清除(&L) @@ -37972,17 +31869,14 @@ should a repository require SSH-authentication (see documentation on SSH and the Debugger::Internal::QtMessageLogView - &Copy 複製(&C) - &Show in Editor 在編輯器中顯示(&S) - C&lear 清除(&L) @@ -37990,37 +31884,30 @@ should a repository require SSH-authentication (see documentation on SSH and the Debugger::Internal::QtMessageLogWindow - Log 紀錄 - Show debug, log, and info messages. - Warning 警告 - Show warning messages. - Error 錯誤 - Show error and fatal messages. - Clear Console 清除主控台 @@ -38028,42 +31915,34 @@ should a repository require SSH-authentication (see documentation on SSH and the Git::Internal::CommitData - untracked 未追蹤的 - staged + 已暫存 + - modified 已變更 - added 已新增 - deleted 已刪除 - renamed 已重新命名 - copied 已複製 - updated 已更新 @@ -38071,12 +31950,10 @@ should a repository require SSH-authentication (see documentation on SSH and the Git::Internal::GitLogArgumentsWidget - Show Diff 顯示差異 - Show difference. 顯示差異之處。 @@ -38084,39 +31961,32 @@ should a repository require SSH-authentication (see documentation on SSH and the Locator::Internal::ExecuteFilter - Previous command is still running ('%1'). Do you want to kill it? 前一個指令仍然在執行中 ('%1')。 您要強行結束它嗎? - Kill Previous Process? 要強行結束先前的行程嗎? - finished 已完成 - failed 已失敗 - Could not find executable for '%1' 找不到 '%1' 的執行檔 - Starting command '%1' 啟動指令 '%1' 中 - Execute Custom Commands 執行自訂指令 @@ -38124,7 +31994,6 @@ Do you want to kill it? ProjectExplorer::EnvironmentItemsDialog - Edit Environment 編輯環境變數 @@ -38132,7 +32001,6 @@ Do you want to kill it? ProjectExplorer::Internal::ProjectListWidget - %1 (%2) %1 (%2) @@ -38140,8 +32008,6 @@ Do you want to kill it? ProjectExplorer::Internal::SessionModel - - New session name 新工作階段名稱 @@ -38149,7 +32015,6 @@ Do you want to kill it? ProjectExplorer::DebuggerRunConfigurationAspect - Debugger settings 除錯工具設定 @@ -38157,8 +32022,6 @@ Do you want to kill it? ProjectExplorer::Internal::WinCEToolChainFactory - - WinCE WinCE @@ -38166,17 +32029,14 @@ Do you want to kill it? ProjectExplorer::Internal::WinCEToolChainConfigWidget - SDK: SDK: - WinCE Version: WinCE 版本: - ABI: ABI: @@ -38188,7 +32048,6 @@ Do you want to kill it? 新增註解以抑制此訊息 - Add a Comment to Suppress This Message @@ -38196,25 +32055,21 @@ Do you want to kill it? QmlJSEditor::Internal::Operation - Wrap Component in Loader - // TODO: Move position bindings from the component to the Loader. // Check all uses of 'parent' inside the root element of the component. - // Rename all outer uses of the id '%1' to '%2.item'. - // Rename all outer uses of the id '%1' to '%2.item.%1'. @@ -38223,83 +32078,67 @@ Do you want to kill it? QmlProfiler::Internal::QmlProfilerEventsMainView - Location 位置 - Type 型態 - Time in Percent 時間百分比 - Total Time 總時間 - Self Time in Percent 自身時間百分比 - Self Time 自身時間 - Calls 呼叫 - Mean Time 平均時間 - Median Time 中間時間 - Longest Time 最長時間 - Shortest Time 最短時間 - Details 詳情 - (Opt) - Binding is evaluated by the optimized engine. - Binding not optimized (e.g. has side effects or assignments, references to elements in other files, loops, etc.) - Binding loop detected. @@ -38308,42 +32147,34 @@ references to elements in other files, loops, etc.) 偵測到綁定迴圈 - µs 微秒 - ms 毫秒 - s - Paint - Compile 編譯 - Create 建立 - Binding 綁定 - Signal 信號 @@ -38355,42 +32186,34 @@ references to elements in other files, loops, etc.) 綁定迴圈的部份 - Part of binding loop. - Callee 被呼叫者 - Caller 呼叫者 - Type 型態 - Total Time 總時間 - Calls 呼叫 - Callee Description 被呼叫者描述 - Caller Description 呼叫者描述 @@ -38398,7 +32221,6 @@ references to elements in other files, loops, etc.) Qt4ProjectManager::Internal::UnconfiguredProjectPanel - Configure Project 設置專案 @@ -38406,22 +32228,18 @@ references to elements in other files, loops, etc.) Qt4ProjectManager::Internal::TargetSetupPageWrapper - Configure Project 設置專案 - The project <b>%1</b> is not yet configured.<br/>Qt Creator cannot parse the project, because no kit has been set up. - The project <b>%1</b> is not yet configured.<br/>Qt Creator uses the kit <b>%2</b> to parse the project. - The project <b>%1</b> is not yet configured.<br/>Qt Creator uses the <b>invalid</b> kit <b>%2</b> to parse the project. @@ -38444,58 +32262,46 @@ references to elements in other files, loops, etc.) QtSupport::Internal::ExamplesWelcomePage - Examples 範例 - Tutorials 教學 - Copy Project to writable Location? 是否要複製專案到可寫入的位置? - <p>The project you are about to open is located in the write-protected location:</p><blockquote>%1</blockquote><p>Please select a writable location below and click "Copy Project and Open" to open a modifiable copy of the project or click "Keep Project and Open" to open the project in location.</p><p><b>Note:</b> You will not be able to alter or compile your project in the current location.</p> <p>你正在開啟的專案處於寫入保護狀態:</p><blockquote>%1</blockquote><p>請選擇一個可寫的位置然後單擊"複製專案並且開啟" 來開啟一個可變更的專案拷貝或者單擊 "保留專案然後開啟" 就在此處開啟專案.</p><p><b>Note:</b> 在目前位置,你將不能變更或者編譯專案.</p> - &Location: 位置(&L): - &Copy Project and Open 複製專案並開啟(&C) - &Keep Project and Open 保留專案並開啟(&K) - Cannot Use Location 無法使用位置 - The specified location already exists. Please specify a valid location. 指定位置已經存在。請指定有效的位置。 - - Cannot Copy Project 無法複製專案 - Failed to Open Project @@ -38507,7 +32313,6 @@ references to elements in other files, loops, etc.) QtSupport - MeeGo/Harmattan MeeGo/Harmattan @@ -38516,27 +32321,22 @@ references to elements in other files, loops, etc.) Symbian - Maemo/Fremantle - Desktop 桌面 - Embedded Linux 嵌入式 Linux - Windows CE Windows CE - Android @@ -38562,7 +32362,6 @@ references to elements in other files, loops, etc.) RemoteLinux::RemoteLinuxDeployConfigurationWidget - Double-click to edit the project file 雙擊以編輯專案檔 @@ -38570,7 +32369,6 @@ references to elements in other files, loops, etc.) TextEditor::Internal::CountingLabel - %1 found 找到 %1 @@ -38578,12 +32376,10 @@ references to elements in other files, loops, etc.) TextEditor::Internal::FindInOpenFiles - Open Documents 開啟文件 - Open documents: @@ -38592,7 +32388,6 @@ references to elements in other files, loops, etc.) 開啟文件: - Open Documents %1 開啟文件 @@ -38602,17 +32397,14 @@ references to elements in other files, loops, etc.) Todo::Internal::TodoItemsModel - Description 描述 - File 檔案 - Line 行號 @@ -38620,17 +32412,14 @@ references to elements in other files, loops, etc.) Todo::Internal::TodoOutputPane - To-Do Entries 待辦事項條目 - Scan in the current opened file 掃描目前已開啟的檔案 - Scan in the whole project 掃描整個專案 @@ -38638,8 +32427,6 @@ references to elements in other files, loops, etc.) Todo::Internal::OptionsPage - - To-Do 待辦事項 @@ -38655,12 +32442,10 @@ references to elements in other files, loops, etc.) 複製網址 - Open URL in Browser... - Copy URL Location @@ -38676,12 +32461,10 @@ references to elements in other files, loops, etc.) 複製電子郵件地址 - Send Email To... - Copy Email Address @@ -38689,97 +32472,78 @@ references to elements in other files, loops, etc.) QSsh::SshKeyCreationDialog - SSH Key Configuration SSH 金鑰設置 - Options 選項 - Key algorithm: 金鑰演算法: - &RSA &RSA - &DSA &DSA - Key &size: 金鑰長度(&S): - Private key file: 私密金鑰檔: - Browse... 瀏覽... - Public key file: 公開金鑰檔: - &Generate And Save Key Pair 產生並儲存金鑰配對(&G) - &Cancel 取消(&C) - Key Generation Failed 金鑰產生失敗 - Choose Private Key File Name - Cannot Save Key File - Failed to create directory: '%1'. 建立目錄失敗:'%1'。 - Cannot Save Private Key File - The private key file could not be saved: %1 - Cannot Save Public Key File - The public key file could not be saved: %1 @@ -38787,27 +32551,22 @@ references to elements in other files, loops, etc.) AddNewAVDDialog - Create new AVD - Name: 名稱: - Kit: - SD card size: - MiB @@ -38815,97 +32574,78 @@ references to elements in other files, loops, etc.) AndroidCreateKeystoreCertificate - Create a keystore and a certificate - Keystore - Password: 密碼: - Retype password: - Show password 顯示密碼 - <span style=" color:#ff0000;">Password is too short</span> - Certificate - Alias name: - Aaaaaaaa; - Keysize: - Validity (days): - Certificate Distinguished Names - First and last name: - Organizational unit (e.g. Necessitas): - Organization (e.g. KDE): - City or locality: - State or province: - Two-letter country code for this unit (e.g. RO): - >AA; @@ -38913,54 +32653,44 @@ references to elements in other files, loops, etc.) AndroidDeployStepWidget - Form 表單 - Use Qt libraries from device - Push local Qt libraries to device. You must have Qt libraries compiled for that platform - Deploy local Qt libraries - Check this option to force the application to use local Qt libraries instead of system libraries. - Use local Qt libraries - Edit Rules File - Choose and install Ministro system wide Qt shared libraries. This option is useful when you want to try your application on devices which don't have Android Market (e.g. Android Emulator). - Install Ministro, system-wide Qt shared libraries installer - Choose APK @@ -38968,22 +32698,18 @@ This option is useful when you want to try your application on devices which don AndroidPackageCreationWidget - Manifest - <b>Android target SDK:</b> - <b>Package name:</b> - <p align="justify">Please choose a valid package name for your application (e.g. "org.example.myapplication").</p> <p align="justify">Packages are usually defined using a hierarchical naming pattern, with levels in the hierarchy separated by periods (.) (pronounced "dot").</p> <p align="justify">In general, a package name begins with the top level domain name of the organization and then the organization's domain and then any subdomains listed in reverse order. The organization can then choose a specific name for their package. Package names should be all lowercase characters whenever possible.</p> @@ -38991,148 +32717,119 @@ This option is useful when you want to try your application on devices which don - <b>Version code:</b> - <b>Version name:</b> - 1.0.0 0.1x {1.0.0?} - Application - <b>Application name:</b> - <b>Run:</b> - <b>Application icon:</b> - Select low dpi icon - Select medium dpi icon - Select high dpi icon - Permissions - Add 新增 - Remove 移除 - Save 儲存 - Discard 丟棄 - Name: 名稱: - Libraries 函式庫 - Automatically check required Qt libraries from compiled application - Read information from application (must be compiled) - Required Qt libraries - <center>Prebundled libraries</center> <p align="justify">Please be aware that the order is very important: If library <i>A</i> depends on library <i>B</i>, <i>B</i> <b>must</b> go before <i>A</i>.</p> - Up - Down - Sign package - Keystore: - Create 建立 - Browse - Open package location after is complete - Certificate alias: @@ -39140,92 +32837,74 @@ This option is useful when you want to try your application on devices which don AndroidSettingsWidget - Android Configuration - Android SDK location: - Browse - Android NDK location: - Android NDK tool chain version: - Ant location: - ARM GDB location: - ARM GDB server location: - x86 GDB location: - x86 GDB server location: - OpenJDK location: - Start 啟動 - AVD Manager - System/data partition size: - Mb - Start Android AVD Manager - Add 新增 - Remove 移除 @@ -39233,32 +32912,26 @@ This option is useful when you want to try your application on devices which don ClearCase::Internal::CheckOutDialog - Check Out - &Checkout comment: - &Reserved - &Unreserved if already reserved - &Preserve file modification time - Use &Hijacked file Hijack: Unset read-only flag without check-out. This is used for local changes which the user does not want to commit. @@ -39267,93 +32940,75 @@ This option is useful when you want to try your application on devices which don ClearCase::Internal::SettingsPage - Configuration 設置 - &Command: 指令(&C): - Diff - &Graphical (Single file only) - &External 外部(&E) - Arg&uments: - Miscellaneous 雜項 - &History count: - &Timeout: - s - &Automatically check out files on edit - Check this if you have a trigger that renames the activity automatically. You will not be prompted for activity name - Aut&o assign activity names - &Prompt on check-in - Di&sable indexer - &Index only VOBs: VOB: Versioned Object Base - VOBs list, separated by comma. Indexer will only traverse the specified VOBs. If left blank, all active VOBs will be indexed - ClearCase @@ -39361,17 +33016,14 @@ This option is useful when you want to try your application on devices which don ClearCase::Internal::UndoCheckOut - Dialog 對話框 - The file was changed. - &Save copy of the file with a '.keep' extension @@ -39379,38 +33031,31 @@ This option is useful when you want to try your application on devices which don ClearCase::Internal::VersionSelector - Confirm Version to Check Out - There are multiple versions of '%1' which can be considered for checkout. Please select version to checkout: - &Loaded Version - Created by: - Created on: Date - Version after &update - <html><head/><body><p><b>NOTE: You will not be able to check in this file without merging the changes (not supported by the plugin)</b></p></body></html> @@ -39418,22 +33063,18 @@ This option is useful when you want to try your application on devices which don Core::RemoveFileDialog - Remove File 移除檔案 - File to remove: 要移除的檔案: - &Delete file permanently 永久刪除檔案(&D) - &Remove from Version Control 從版本控制系統中移除(&R) @@ -39441,17 +33082,14 @@ This option is useful when you want to try your application on devices which don ProjectExplorer::Internal::DeviceFactorySelectionDialog - Device Configuration Wizard Selection 裝置設置精靈選擇 - Available device types: 可用的裝置型態: - Start Wizard @@ -39459,72 +33097,58 @@ This option is useful when you want to try your application on devices which don ProjectExplorer::Internal::DeviceSettingsWidget - Linux Device Configurations Linux 裝置設置 - &Device: - General 一般 - &Name: 名稱(&N): - Type: 型態: - Auto-detected: - Current state: - Type Specific - &Add... 新增(&A)... - &Remove 移除(&R) - Set As Default 設為預設 - Yes (id is "%1") - No - Remote Processes @@ -39532,59 +33156,46 @@ This option is useful when you want to try your application on devices which don Qnx::Internal::BarDescriptorFileImageWizardPage - WizardPage 精靈頁面 - Icon: - Splash screens - Landscape: - Portrait: - Images 影像 - Images (*.jpg *.png) - - - <font color="red">Could not open '%1' for reading.</font> - <font color="red">Incorrect icon size (%1x%2). The maximum size is %3x%4 pixels.</font> - <font color="red">Incorrect landscape splash screen size (%1x%2). The maximum size is %3x%4 pixels.</font> - <font color="red">Incorrect portrait splash screen size (%1x%2). The maximum size is %3x%4 pixels.</font> @@ -39592,7 +33203,6 @@ This option is useful when you want to try your application on devices which don Qnx::Internal::BlackBerryDeployConfigurationWidget - Packages to deploy: @@ -39600,32 +33210,26 @@ This option is useful when you want to try your application on devices which don Qnx::Internal::BlackBerryDeviceConfigurationWidget - &Device name: - IP or host name of the device 裝置的 IP 或主機名稱 - Device &password: - Show password 顯示密碼 - Debug token: - Private key file: 私密金鑰檔: @@ -39633,52 +33237,42 @@ This option is useful when you want to try your application on devices which don Qnx::Internal::BlackBerryDeviceConfigurationWizardSetupPage - WizardPage 精靈頁面 - The name to identify this configuration: 用於辨認此設置的名稱: - The device's host name or IP address: 裝置的主機名稱或 IP 位址: - Device password: - Device type: 裝置型態: - Physical device - Simulator - Debug token: - Connection Details - BlackBerry Device @@ -39686,37 +33280,30 @@ This option is useful when you want to try your application on devices which don Qnx::Internal::BlackBerryDeviceConfigurationWizardSshKeyPage - WizardPage 精靈頁面 - Private key file: 私密金鑰檔: - Public key file: 公開金鑰檔: - Generate - SSH Key Setup - Please select an existing <b>4096</b>-bit key or click <b>Generate</b> to create a new one. - Key Generation Failed 金鑰產生失敗 @@ -39724,12 +33311,10 @@ This option is useful when you want to try your application on devices which don Qnx::Internal::BlackBerryRunConfigurationWidget - Device: 裝置: - Package: 套件: @@ -39737,7 +33322,6 @@ This option is useful when you want to try your application on devices which don Qnx::Internal::QnxBaseQtConfigWidget - SDK: SDK: @@ -39745,17 +33329,14 @@ This option is useful when you want to try your application on devices which don RemoteLinuxCheckForFreeDiskSpaceStepWidget - Form 表單 - Remote path to check for free space: - Required disk space: @@ -39763,32 +33344,26 @@ This option is useful when you want to try your application on devices which don Todo::Internal::KeywordDialog - Keyword 關鍵字 - Icon 圖示 - Color 顏色 - errorLabel - Keyword cannot be empty, contain spaces, colons, slashes or asterisks. - There is already a keyword with this name. @@ -39796,13 +33371,11 @@ This option is useful when you want to try your application on devices which don QmlDebug::QmlOutputParser - The port seems to be in use. Error message shown after 'Could not connect ... debugger:" 連接埠似乎在使用中。 - The application is not set up for QML/JS debugging. Error message shown after 'Could not connect ... debugger:" 應用程式未設定為可以讓 QML/JS 除錯。 @@ -39811,108 +33384,86 @@ This option is useful when you want to try your application on devices which don QSsh::Internal::SftpChannelPrivate - Server could not start SFTP subsystem. - Unexpected packet of type %1. 未預期的封包型態 %1。 - Protocol version mismatch: Expected %1, got %2 協定版本不符:預期應為 %1,得到 %2 - Unknown error. 未知的錯誤。 - Created remote directory '%1'. 建立遠端目錄 '%1'。 - Remote directory '%1' already exists. 遠端目錄 '%1' 已存在。 - Error creating directory '%1': %2 建立目錄 '%1' 時發生錯誤:'%2' - Could not open local file '%1': %2 無法開啟本地檔案 '%1':%2 - Remote directory could not be opened for reading. 無法開啟遠端目錄以讀取。 - Failed to list remote directory contents. 列出遠端目錄的內容失敗。 - Failed to close remote directory. 關閉遠端目錄失敗。 - Failed to open remote file for reading. 開啟遠端檔案以讀取失敗。 - Failed to retrieve information on the remote file ('stat' failed). - Failed to read remote file. 讀取遠端檔案失敗。 - - Failed to close remote file. 關閉遠端檔案失敗。 - Failed to open remote file for writing. 開啟遠端檔案以寫入失敗。 - Failed to write remote file. 寫入遠端檔案失敗。 - Cannot append to remote file: Server does not support the file size attribute. 無法附加到遠端檔案:伺服器不支援檔案大小屬性。 - SFTP channel closed unexpectedly. - Server could not start session: %1 伺服器無法啟動工作階段:%1 - Error reading local file: %1 讀取本地檔案時發生錯誤:%1 @@ -39920,22 +33471,18 @@ This option is useful when you want to try your application on devices which don QSsh::SftpFileSystemModel - File Type 檔案型態 - File Name 檔案名稱 - Error getting 'stat' info about '%1': %2 取得關於 '%1' 的 'stat' 資訊時發生錯誤:%2 - Error listing contents of directory '%1': %2 列出目錄 '%1' 的內容時發生錯誤:%2 @@ -39943,7 +33490,6 @@ This option is useful when you want to try your application on devices which don QSsh::Internal::SshChannelManager - Invalid channel id %1 無效的頻道代碼 %1 @@ -39951,97 +33497,76 @@ This option is useful when you want to try your application on devices which don QSsh::Internal::SshConnectionPrivate - SSH Protocol error: %1 SSH 協定錯誤:%1 - Botan library exception: %1 Botan 函式庫異常:%1 - Server identification string is %n characters long, but the maximum allowed length is 255. - Server identification string contains illegal NUL character. - Server Identification string '%1' is invalid. - Server protocol version is '%1', but needs to be 2.0 or 1.99. - Server identification string is invalid (missing carriage return). - Server reports protocol version 1.99, but sends data before the identification string, which is not allowed. - - - - Unexpected packet of type %1. 未預期的封包型態 %1。 - Password expired. 密碼已過期。 - Server rejected password. 伺服器拒絕了密碼。 - Server rejected key. 伺服器拒絕了金鑰。 - The server sent an unexpected SSH packet of type SSH_MSG_UNIMPLEMENTED. 伺服器送出一個未預期的 SSH 封包,型態為 SSH_MSG_UNIMPLEMENTED。 - Server closed connection: %1 伺服器關閉了連線:%1 - Connection closed unexpectedly. 連線未預期地關閉。 - Timeout waiting for reply from server. 從伺服器等待回應時逾時。 - No private key file given. 沒有指定私密金鑰檔。 - Private key file error: %1 私密金鑰檔錯誤:%1 @@ -40049,12 +33574,10 @@ This option is useful when you want to try your application on devices which don QSsh::Ssh - Password Required 需要密碼 - Please enter the password for your private key. 美請輸入您的私密金鑰的密碼。 @@ -40062,12 +33585,10 @@ This option is useful when you want to try your application on devices which don QSsh::Internal::SshRemoteProcessPrivate - Process killed by signal 行程被信號強行中止 - Server sent invalid signal '%1' 伺服器送出無效的信號 '%1' @@ -40075,7 +33596,6 @@ This option is useful when you want to try your application on devices which don Utils::BaseTreeView - Adjust Column Widths to Contents @@ -40083,54 +33603,44 @@ This option is useful when you want to try your application on devices which don Utils::ElfReader - '%1' is an invalid ELF object (%2) - '%1' is not an ELF object (file too small) - '%1' is not an ELF object - odd cpu architecture - odd endianess - unexpected e_shsize - unexpected e_shentsize - announced %n sections, each %1 bytes, exceed file size - string table seems to be at 0x%1 - section name %1 of %2 behind end of file @@ -40138,94 +33648,74 @@ This option is useful when you want to try your application on devices which don ZeroConf - could not load native library - skipping over avahi compatibility lib (or obsolete mdnsd) - *WARNING* detected an obsolete version of Apple Bonjour, either disable/uninstall it or upgrade it, otherwise zeroconf will fail - Zeroconf could not load a valid library, failing. - Zeroconf giving up on non working %1 (%2). - - Zeroconf has no valid library, aborting connection. - Zeroconf giving up on %1, switching to %2. - Zeroconf giving up on %1, no fallback provided, aborting connection. - Trying %1... - Zeroconf using %1 failed the initialization of the main library connection with error %2. - - Zeroconf using %1 failed because no daemon is running. - Starting the Zeroconf daemon using %1 seems successful, continuing. - Zeroconf using %1 failed getProperty call with error %2. - Succeeded using %1. - MainConnection could successfully create a connection using %1. - Zeroconf, unexpected start status, aborting. - Zeroconf detected an unexpected return status of handleEvent. - Zeroconf for [%1] accumulated %n consecutive errors, aborting. @@ -40235,7 +33725,6 @@ This option is useful when you want to try your application on devices which don ZeroConf::ServiceBrowser - Starting Zeroconf Browsing @@ -40243,27 +33732,22 @@ This option is useful when you want to try your application on devices which don Analyzer::StartRemoteDialog - Start Remote Analysis 開始遠端分析 - Kit: - Executable: - Arguments: 參數: - Working directory: @@ -40271,12 +33755,10 @@ This option is useful when you want to try your application on devices which don Android::Internal::AndroidConfigurations - Error Creating AVD - Cannot create a new AVD. No sufficiently recent Android SDK available. Please install an SDK of at least API version %1. @@ -40285,7 +33767,6 @@ Please install an SDK of at least API version %1. Android - Android @@ -40293,35 +33774,26 @@ Please install an SDK of at least API version %1. Android::Internal::AndroidCreateKeystoreCertificate - - <span style=" color:#ff0000;">Password is too short</span> - - <span style=" color:#ff0000;">Passwords don't match</span> - - <span style=" color:#00ff00;">Password is ok</span> - Keystore file name - Keystore files (*.keystore *.jks) - Error 錯誤 @@ -40329,7 +33801,6 @@ Please install an SDK of at least API version %1. Android::Internal::AndroidDeployConfiguration - Deploy to Android device @@ -40337,7 +33808,6 @@ Please install an SDK of at least API version %1. Android::Internal::AndroidDeployConfigurationFactory - Deploy on Android @@ -40345,73 +33815,59 @@ Please install an SDK of at least API version %1. Android::Internal::AndroidDeployStep - Deploy to Android device AndroidDeployStep default display name - Please wait, searching for a suitable device for target:%1. - Cannot deploy: no devices or emulators found for your package. - Package deploy: Running command '%1 %2'. - Packaging error: Could not start command '%1 %2'. Reason: %3 - Packaging Error: Command '%1 %2' failed. 打包錯誤:指令 '%1' 失敗。 {1 %2'?} - Reason: %1 原因:%1 - Exit code: %1 離開代碼:%1 - Clean old Qt libraries - Deploy Qt libraries. This may take some time, please wait. - Qt Android smart installer installation failed - Installing package onto %1. - Package installation failed. - Pulling files necessary for debugging. @@ -40419,7 +33875,6 @@ Please install an SDK of at least API version %1. Android::Internal::AndroidDeployStepFactory - Deploy to Android device or emulator @@ -40427,17 +33882,14 @@ Please install an SDK of at least API version %1. Android::Internal::AndroidDeployStepWidget - <b>Deploy configurations</b> - Qt Android Smart Installer - Android package (*.apk) @@ -40445,12 +33897,10 @@ Please install an SDK of at least API version %1. Android::Internal::AndroidDevice - Run on Android - Android @@ -40458,7 +33908,6 @@ Please install an SDK of at least API version %1. Android::Internal::AndroidDeviceFactory - Android Device @@ -40466,38 +33915,31 @@ Please install an SDK of at least API version %1. Android::Internal::AndroidManager - Error creating Android directory '%1'. - No Qt for Android SDKs were found. Please install at least one SDK. - Warning 警告 - Android files have been updated automatically - Error creating Android templates - Can't parse '%1' - Can't open '%1' @@ -40505,7 +33947,6 @@ Please install at least one SDK. Android::Internal::AndroidPackageCreationFactory - Create Android (.apk) Package @@ -40513,124 +33954,99 @@ Please install at least one SDK. Android::Internal::AndroidPackageCreationStep - Packaging for Android - Cannot create Android package: current build configuration is not Qt 4. - Cannot find ELF information - Cannot find '%1'. Please make sure your application is built successfully and is selected in Application tab ('Run option'). - - Error 錯誤 - Failed to run keytool - Invalid password - Copy Qt app & libs to Android package ... - Can't copy gdbserver from '%1' to '%2' - Creating package file ... - Signing package ... - Failed, try again - Release signed package created to %1 - Package created. 套件已建立。 - Package deploy: Running command '%1 %2'. - Packaging failed. 打包失敗。 - Packaging error: Could not start command '%1 %2'. Reason: %3 - Packaging Error: Command '%1 %2' failed. 打包錯誤:指令 '%1' 失敗。 {1 %2'?} - Reason: %1 原因:%1 - Exit code: %1 離開代碼:%1 - Keystore - Keystore password: - Certificate - Certificate password (%1): @@ -40638,56 +34054,43 @@ Please make sure your application is built successfully and is selected in Appli Android::Internal::AndroidPackageCreationWidget - Invalid Package Name - The package name '%1' is not valid. Please choose a valid package name for your application (e.g. "org.example.myapplication"). - Choose High DPI Icon - - - PNG images (*.png) - Choose Medium DPI Icon - Choose Low DPI Icon - - < Type or choose a permission > - <b>Package configurations</b> - Select keystore file - Keystore files (*.keystore *.jks) @@ -40695,7 +34098,6 @@ Please choose a valid package name for your application (e.g. "org.example. Android::Internal::AndroidPackageInstallationFactory - Deploy to device @@ -40703,7 +34105,6 @@ Please choose a valid package name for your application (e.g. "org.example. Android::Internal::AndroidPackageInstallationStep - Copy application data @@ -40711,12 +34112,10 @@ Please choose a valid package name for your application (e.g. "org.example. Android::Internal::AndroidQtVersion - Failed to detect the ABIs used by the Qt version. - Android Qt Version is meant for Android @@ -40725,7 +34124,6 @@ Please choose a valid package name for your application (e.g. "org.example. Android::Internal::AndroidRunConfiguration - Run on Android device @@ -40733,7 +34131,6 @@ Please choose a valid package name for your application (e.g. "org.example. Android::Internal::AndroidRunControl - Starting remote process. @@ -40741,7 +34138,6 @@ Please choose a valid package name for your application (e.g. "org.example. Android::Internal::AndroidRunControlFactory - Run on Android device or emulator. @@ -40749,49 +34145,40 @@ Please choose a valid package name for your application (e.g. "org.example. Android::Internal::AndroidRunner - '%1' died. - Failed to forward C++ debugging ports. Reason: %1. - Failed to forward C++ debugging ports. - Failed to forward QML debugging ports. Reason: %1. - Failed to forward QML debugging ports. - Failed to start the activity. Reason: %1. - Unable to start '%1'. - Cannot find %1 process. - '%1' killed. @@ -40801,7 +34188,6 @@ Please choose a valid package name for your application (e.g. "org.example. Android::Internal::AndroidSettingsPage - Android Configurations @@ -40809,18 +34195,15 @@ Please choose a valid package name for your application (e.g. "org.example. Android::Internal::AvdModel - AVD Name AVD - Android Virtual Device - AVD Target - CPU/ABI @@ -40828,50 +34211,38 @@ Please choose a valid package name for your application (e.g. "org.example. Android::Internal::AndroidSettingsWidget - - Android SDK Folder - "%1" does not seem to be an Android SDK top folder. - "%1" does not seem to be an Android NDK top folder. - Select Android SDK folder - Select Android NDK folder - Select ant Script - - Select GDB Executable - - Select GDB Server Android Executable - Select OpenJDK Path @@ -40879,18 +34250,14 @@ Please choose a valid package name for your application (e.g. "org.example. Android::Internal::AndroidToolChainFactory - - Android GCC - Android GCC for %1 - Android GCC (%1-%2) @@ -40898,7 +34265,6 @@ Please choose a valid package name for your application (e.g. "org.example. Android::Internal::AndroidToolChainConfigWidget - NDK Root: @@ -40906,12 +34272,10 @@ Please choose a valid package name for your application (e.g. "org.example. Bookmarks::Internal::BookmarkViewFactory - Alt+Meta+M - Alt+M @@ -40919,17 +34283,14 @@ Please choose a valid package name for your application (e.g. "org.example. ClearCase::Internal::ActivitySelector - Select &activity: - Add 新增 - Keep item activity @@ -40937,12 +34298,10 @@ Please choose a valid package name for your application (e.g. "org.example. ClearCase::Internal::ClearCaseControl - &Check Out - &Hijack @@ -40950,7 +34309,6 @@ Please choose a valid package name for your application (e.g. "org.example. ClearCase::Internal::ClearCaseEditor - Annotate version "%1" @@ -40958,363 +34316,290 @@ Please choose a valid package name for your application (e.g. "org.example. ClearCase::Internal::ClearCasePlugin - C&learCase - Check Out... - Check &Out "%1"... - Meta+L,Meta+O - Alt+L,Alt+O - Check &In... - Check &In "%1"... - Meta+L,Meta+I - Alt+L,Alt+I - Undo Check Out - &Undo Check Out "%1" - Meta+L,Meta+U - Alt+L,Alt+U - Undo Hijack - Undo Hi&jack "%1" - Meta+L,Meta+R - Alt+L,Alt+R - Diff Current File 比較目前檔案 - &Diff "%1" - Meta+L,Meta+D - Alt+L,Alt+D - History Current File - &History "%1" - Meta+L,Meta+H - Alt+L,Alt+H - Annotate Current File 目前檔案最後註記 - &Annotate "%1" - Meta+L,Meta+A - Alt+L,Alt+A - Add File... - Add File "%1" - Diff A&ctivity... - Ch&eck In Activity - Chec&k In Activity "%1"... - Update Index - Update View - U&pdate View "%1" - Check In All &Files... - Meta+L,Meta+F - Alt+L,Alt+F - View &Status - Meta+L,Meta+S - Alt+L,Alt+S - Check In - Diff Selected Files - &Undo 復原(&U) - &Redo 重做(&R) - Closing ClearCase Editor - Do you want to check in the files? - The comment check failed. Do you want to check in the files? - Do you want to undo the check out of '%1'? - Undo Hijack File - Do you want to undo hijack of '%1'? - - External diff is required to compare multiple files. - Enter Activity - Activity Name - Check In Activity - Another check in is currently being executed. - There are no modified files. - No ClearCase executable specified. - ClearCase Checkout - File is already checked out. - Set current activity failed: %1 - Enter &comment: - ClearCase Add File %1 - ClearCase Remove Element %1 - This operation is irreversible. Are you sure? - ClearCase Remove File %1 - ClearCase Rename File %1 -> %2 - Activity Headline - Enter activity headline - CC Indexing @@ -41322,7 +34607,6 @@ Please choose a valid package name for your application (e.g. "org.example. ClearCase::Internal::ClearCaseSubmitEditor - ClearCase Check In @@ -41330,17 +34614,14 @@ Please choose a valid package name for your application (e.g. "org.example. ClearCase::Internal::ClearCaseSubmitEditorWidget - Chec&k in even if identical to previous version - &Preserve file modification time - &Check In @@ -41348,17 +34629,14 @@ Please choose a valid package name for your application (e.g. "org.example. ClearCase::Internal::SettingsPageWidget - ClearCase Command - In order to use External diff, 'diff' command needs to be accessible. - DiffUtils is available for free download <a href="http://gnuwin32.sourceforge.net/packages/diffutils.htm">here</a>. Please extract it to a directory in your PATH. @@ -41366,23 +34644,18 @@ Please choose a valid package name for your application (e.g. "org.example. QApplication - Ninja (%1) - NMake Generator (%1) NMake 建立器(%1) - MinGW Generator (%1) MinGW 建立器 (%1) - - Unix Generator (%1) Unix 建立器 (%1) @@ -41390,32 +34663,26 @@ Please choose a valid package name for your application (e.g. "org.example. CMakeProjectManager::Internal::ChooseCMakePage - Choose Cmake Executable - The cmake executable is valid. - Please specify the path to the cmake executable. No cmake executable was found in the path. 請指定 cmake 執行檔的路徑。在環境變數 path 中找不到 cmake 執行檔。 - The cmake executable (%1) does not exist. cmake 執行檔 (%1) 不存在。 - The path %1 is not a executable. 路徑 (%1) 不是可執行檔。 - The path %1 is not a valid cmake. 路徑 (%1) 不是有效的 cmake。 @@ -41423,12 +34690,10 @@ Please choose a valid package name for your application (e.g. "org.example. Core::Internal::OpenEditorsViewFactory - Meta+O - Alt+O @@ -41436,7 +34701,6 @@ Please choose a valid package name for your application (e.g. "org.example. Core::IVersionControl - Open with VCS (%1) 使用 VCS 開啟 (%1) @@ -41444,22 +34708,18 @@ Please choose a valid package name for your application (e.g. "org.example. CppEditor::Internal::FunctionDeclDefLink - Target file was changed, could not apply changes 目標檔案改變,無法套用變更 - Apply changes to definition 套用變更到定義 - Apply changes to declaration 套用變更到宣告 - Apply Function Signature Changes @@ -41467,77 +34727,62 @@ Please choose a valid package name for your application (e.g. "org.example. Debugger::Internal::BreakTreeView - Delete Breakpoint 刪除中斷點 - Delete All Breakpoints 刪除所有中斷點 - Delete Breakpoints of "%1" 刪除 "%1" 的中斷點 - Delete Breakpoints of File 刪除檔案的中斷點 - Adjust Column Widths to Contents - Edit Breakpoint... 編輯中斷點... - Associate Breakpoint With All Threads 關聯中斷點到所有執行緒 - Associate Breakpoint With Thread %1 關聯中斷點到執行緒 %1 - Synchronize Breakpoints 同步中斷點 - Disable Selected Breakpoints 關閉已選擇的中斷點 - Enable Selected Breakpoints 開啟已選擇中斷點 - Disable Breakpoint 關閉中斷點 - Enable Breakpoint 開啟中斷點 - Add Breakpoint... 新增中斷點... - Add Breakpoint 新增中斷點 @@ -41545,87 +34790,70 @@ Please choose a valid package name for your application (e.g. "org.example. Debugger::Internal::StartApplicationDialog - Start Debugger 啟動除錯工具 - Select Executable 選擇執行檔 - Server port: - Select Working Directory 選擇工作目錄 - Select Server Start Script 選擇伺服器啟動腳本 - This option can be used to point to a script that will be used to start a debug server. If the field is empty, Qt Creator's default methods to set up debug servers will be used. - &Server start script: 伺服器啟動腳本(&S): - Select Location of Debugging Information 選擇除錯資訊的位置 - Base path for external debug information and debug sources. If empty, $SYSROOT/usr/lib/debug will be chosen. - &Kit: - Local &executable: 本地執行檔(&E): - Command line &arguments: - &Working directory: 工作目錄(&W): - Run in &terminal: 在終端機中執行(&T): - Break at "&main": - Debug &information: - &Recent: 最近使用的(&R): @@ -41633,32 +34861,26 @@ Please choose a valid package name for your application (e.g. "org.example. Debugger::Internal::DebuggerKitConfigWidget - Manage... 管理... - The debugger to use for this kit. - Auto-detect - Edit... 編輯... - Debugger: - Debugger for "%1" @@ -41666,27 +34888,22 @@ Please choose a valid package name for your application (e.g. "org.example. Debugger::Internal::DebuggerKitConfigDialog - &Engine: - &Binary: - 64-bit version 64 位元版本 - 32-bit version 32 位元版本 - <html><body><p>Specify the path to the <a href="%1">Windows Console Debugger executable</a> (%2) here.</p></body></html> Label text for path configuration. %2 is "x-bit version". <html><body><p>請在此指定 <a href="%1">Windows 主控台除錯器執行檔</a> (%2) 的路徑。</p></body></html> @@ -41695,57 +34912,46 @@ Please choose a valid package name for your application (e.g. "org.example. Debugger::DebuggerKitInformation - No debugger set up. - Debugger '%1' not found. - Debugger '%1' not executable. - The debugger location must be given as an absolute path (%1). - %1 <None> - %1 using "%2" - Debugger - GDB Engine - CDB Engine - LLDB Engine - No kit found. @@ -41753,7 +34959,6 @@ Please choose a valid package name for your application (e.g. "org.example. DeviceProcessesDialog - &Attach to Process @@ -41761,12 +34966,10 @@ Please choose a valid package name for your application (e.g. "org.example. DebuggerPlugin - Debug 除錯 - Unable to create a debugger engine of the type '%1' 無法為型態 '%1' 建立除錯引擎 @@ -41774,7 +34977,6 @@ Please choose a valid package name for your application (e.g. "org.example. Debugger::Internal::GdbAbstractPlainEngine - Starting executable failed: 啟動執行檔失敗: @@ -41784,7 +34986,6 @@ Please choose a valid package name for your application (e.g. "org.example. Debugger::Internal::GdbAttachEngine - Attached to process %1. 已掛接到行程 %1。 @@ -41792,32 +34993,26 @@ Please choose a valid package name for your application (e.g. "org.example. Debugger::Internal::DebuggerCore - Open Qt Options 開啟 Qt 選項 - Turn off Helper Usage 關閉小助手應用 - Continue Anyway 依然繼續 - Debugging Helper Missing 除錯小助手已遺失 - The debugger could not load the debugging helper library. 除錯工具無法載入除錯小助手函式庫。 - The debugging helper is used to nicely format the values of some Qt and Standard Library data types. It must be compiled for each used Qt version separately. In the Qt Creator Build and Run preferences page, select a Qt version, expand the Details section and click Build All. @@ -41825,52 +35020,42 @@ Please choose a valid package name for your application (e.g. "org.example. Debugger::Internal::GdbCoreEngine - Error Loading Core File - The specified file does not appear to be a core file. - Error Loading Symbols - No executable to load symbols from specified core. - Symbols found. 找到符號。 - No symbols found in core file <i>%1</i>. core 檔案 <i>%1</i> 中找不到符號。 - This can be caused by a path length limitation in the core file. 這個問題可能是由 core 檔中的路徑長度限制所引起。 - Try to specify the binary using the <i>Debug->Start Debugging->Attach to Core</i> dialog. 請試著用<i>「除錯」─「開始除錯」─「附加到 core 檔」</i>對話框來指定二進位檔案。 - Attached to core. 已附加到 core 檔。 - Attach to core "%1" failed: 附加到 core 檔 "%1" 失敗: @@ -41879,7 +35064,6 @@ Please choose a valid package name for your application (e.g. "org.example. Debugger::Internal::GdbLocalPlainEngine - Cannot set up communication with child process: %1 無法與子行程建立通訊:%1 @@ -41887,53 +35071,43 @@ Please choose a valid package name for your application (e.g. "org.example. Debugger::Internal::GdbRemoteServerEngine - The upload process failed to start. Shell missing? 上傳行程啟動失敗。沒有可用的 Shell 嗎? - The upload process crashed some time after starting successfully. 上傳行程成功啟動後崩潰。 - The last waitFor...() function timed out. The state of QProcess is unchanged, and you can try calling waitFor...() again. 最近的 waitFor...() 函式發生逾時。QProcess 的狀態未改變。您可以試著再次呼叫 waitFor...()。 - An error occurred when attempting to write to the upload process. For example, the process may not be running, or it may have closed its input channel. 當嘗試寫入上傳程序時發生錯誤。例如,行程可能未執行,或是它關閉了它的輸入通道。 - An error occurred when attempting to read from the upload process. For example, the process may not be running. 嘗試從上傳行程讀取時遇到錯誤。例如,有可能是行程尚未執行。 - An unknown error in the upload process occurred. This is the default return value of error(). 上傳行程中發生未知錯誤。這是 error() 預設的傳回值。 - Error 錯誤 - No symbol file given. 未指定符號檔案。 - Reading debug information failed: 讀取除錯資訊時失敗: - Interrupting not possible 無法中斷 @@ -41941,69 +35115,54 @@ Please choose a valid package name for your application (e.g. "org.example. Debugger::Internal::GdbServerStarter - Remote Error 遠端錯誤 - Could not retrieve list of free ports: 無法取得可用連接埠列表: - - Process aborted 行程已中止 - Running command: %1 執行指令:%1 - Connection error: %1 連線錯誤:%1 - Starting gdbserver... 啟動 gdbserver 中... - Port %1 is now accessible. 連接埠 %1 現可使用。 - Server started on %1:%2 伺服器已啟動於 %1:%2 - - Warning 警告 - Cannot find local executable for remote process "%1". 找不到遠端行程 "%1" 在本地端的執行檔。 - Cannot find ABI for remote process "%1". 找不到遠端行程 "%1" 的 ABI。 - Remote: "%1:%2" 遠端:"%1" {1:%2"?} - Process gdbserver finished. Status: %1 gdbserver 行程已完成。狀態:%1 @@ -42011,7 +35170,6 @@ Please choose a valid package name for your application (e.g. "org.example. Debugger::Internal::GdbTermEngine - Debugger Error 除錯工具錯誤 @@ -42019,7 +35177,6 @@ Please choose a valid package name for your application (e.g. "org.example. Debugger::Internal::SelectRemoteFileDialog - Download of remote file succeeded. @@ -42027,102 +35184,81 @@ Please choose a valid package name for your application (e.g. "org.example. Debugger::Internal::ModulesHandler - Module Name - Module Path - Symbols Read - Symbols Type - Start Address - End Address - - Unknown - No - Yes - None - Plain - Fast - debuglnk - buildid - It is unknown whether this module contains debug information. Use "Examine Symbols" from the context menu to initiate a check. - This module neither contains nor references debug information. Stepping into the module or setting breakpoints by file and line will not work. - - This module contains debug information. Stepping into the module or setting breakpoints by file and is expected to work. - This module does not contain debug information itself, but contains a reference to external debug information. - <unknown> address End address of loaded module @@ -42132,62 +35268,50 @@ Stepping into the module or setting breakpoints by file and is expected to work. Debugger::Internal::ModulesTreeView - Update Module List 更新模組列表 - Show Source Files for Module "%1" 顯示模組 "%1" 的源碼檔 - Load Symbols for All Modules 載入所有模組的符號 - Examine All Modules 檢視所有模組 - Load Symbols for Module 載入模組的符號 - Edit File 編輯檔案 - Show Symbols 顯示符號 - Show Dependencies 顯示相依性 - Load Symbols for Module "%1" 載入模組 "%1" 的符號 - Edit File "%1" 編輯檔案 "%1" - Show Symbols in File "%1" 顯示檔案 "%1" 中的符號 - Show Dependencies of "%1" 顯示 "%1" 的相依性 @@ -42195,42 +35319,35 @@ Stepping into the module or setting breakpoints by file and is expected to work. Debugger::Internal::QmlAdapter - Connecting to debug server %1:%2 正在連線到除錯伺服器 %1:%2 - Error: (%1) %2 %1=error code, %2=error message 錯誤:(%1) %2 - Disconnected. - Resolving host. - Connecting to debug server. - Connected. 已連線。 - Closing. @@ -42238,12 +35355,10 @@ Stepping into the module or setting breakpoints by file and is expected to work. Debugger::Internal::QmlInspectorAgent - Success: - Properties 屬性 @@ -42251,32 +35366,26 @@ Stepping into the module or setting breakpoints by file and is expected to work. Debugger::Internal::QmlLiveTextPreview - The %1 attribute at line %2, column %3 cannot be changed without reloading the QML application. 第 %2 行第 %3 欄的 %1 屬性必須要重新載入 QML 應用程式才能更改。 - The %1 element at line %2, column %3 cannot be changed without reloading the QML application. 第 %2 行第 %3 列的 %1 元素必須重新載入 QML 應用程式才能更改。 - The changes in JavaScript cannot be applied without reloading the QML application. - The changes made cannot be applied without reloading the QML application. - You can continue debugging, but behavior can be unexpected. 您可以繼續除錯,但是可能會有非預期中的行為。 - Reload QML @@ -42284,62 +35393,50 @@ Stepping into the module or setting breakpoints by file and is expected to work. Debugger::Internal::RegisterTreeView - Reload Register Listing 重新載入暫存器列表 - Open Disassembler... 開啟反組譯器... - Open Memory Editor at 0x%1 在 0x%1 處開啟記憶體編輯器 - Open Memory View at Value of Register %1 0x%2 開啟記憶體檢視查看暫存器 %1 0x%2 的值 - Open Disassembler at 0x%1 - Open Memory Editor 開啟記憶體編輯器 - Open Memory View at Value of Register 開啟記憶體檢視查看暫存器的值 - Open Disassembler 開啟反組譯器 - Hexadecimal 十六進位 - Decimal 十進位 - Octal 八進位 - Binary 二進位 @@ -42347,17 +35444,14 @@ Stepping into the module or setting breakpoints by file and is expected to work. Debugger::Internal::SnapshotTreeView - Snapshots 快照 - Create Snapshot 建立快照 - Remove Snapshot 移除快照 @@ -42365,17 +35459,14 @@ Stepping into the module or setting breakpoints by file and is expected to work. Debugger::Internal::SourceFilesTreeView - Reload Data 重新載入資料 - Open File 開啟檔案 - Open File "%1"' 開啟檔案 "%1" @@ -42383,67 +35474,54 @@ Stepping into the module or setting breakpoints by file and is expected to work. Debugger::Internal::StackTreeView - Stack 堆疊 - Function: 函式: - Disassemble Function 反組譯函式 - Copy Contents to Clipboard 複製內容到剪貼簿 - Open Memory Editor 開啟記憶體編輯器 - Open Memory Editor at 0x%1 在 0x%1 處開啟記憶體編輯器 - Open Disassembler at Address... 在此位址開啟反組譯器... - Disassemble Function... 反組譯函式... - Open Disassembler 開啟反組譯器 - Open Disassembler at 0x%1 - Try to Load Unknown Symbols 試著載入未知符號 - Memory at Frame #%1 (%2) 0x%3 位於框架 #%1 (%2) 0x%3 的記憶體 - Frame #%1 (%2) 框架 #%1 (%2) @@ -42451,265 +35529,212 @@ Stepping into the module or setting breakpoints by file and is expected to work. Debugger::Internal::WatchTreeView - <i>%1</i> %2 at #%3 HTML tooltip of a variable in the memory editor <i>%1</i> %2 於 #%3 - <i>%1</i> %2 HTML tooltip of a variable in the memory editor <i>%1</i> %2 - Register <i>%1</i> 暫存器 <i>%1</i> - Memory Referenced by Pointer "%1" (0x%2) 指標 "%1" 參考的記憶體 (0x%2) - Memory at Variable "%1" (0x%2) 變數 "%1" 的記憶體 (0x%2) - Cannot Display Stack Layout 無法顯示堆疊佈局 - Could not determine a suitable address range. 無法決定一個適合的位址範圍。 - Memory Layout of Local Variables at 0x%1 局部變數於 0x%1 的記憶體佈局 - Locals and Expressions 局部變數與表示式 - Add Expression Evaluator - Add Expression Evaluator for "%1" - Remove Expression Evaluator - Remove Expression Evaluator for "%1" - Change Local Display Format... 變更本地顯示格式... - Treat All Characters as Printable 將所有字元視為可列印字元 - Show Unprintable Characters as Escape Sequences 將所有不可列印的字元以脫逸序列顯示 - Show Unprintable Characters as Octal 將所有不可列印的字元以八進位數值顯示 - Show Unprintable Characters as Hexadecimal 將所有不可列印的字元以十六進位數值顯示 - Change Display for Object Named "%1": 變更物件名稱 "%1" 的顯示: - Use Format for Type (Currently %1) 此型態使用格式 (目前為 %1) - Use Display Format Based on Type 依據型態使用顯示格式 - Change Display for Type "%1": 變更型態 "%1" 的顯示: - Automatic 自動 - Change Display for Type or Item... 變更型態或項目的顯示... - Add Data Breakpoint... 新增資料中斷點... - Add Data Breakpoint at Object's Address (0x%1) 於物件位址 (0x%1) 新增資料中斷點 - Add Data Breakpoint at Referenced Address (0x%1) 於參考位址 (0x%1) 新增資料中斷點 - Add Data Breakpoint 新增資料中斷點 - Setting a data breakpoint on an address will cause the program to stop when the data at the address is modified. 在某個位址上設定資料中斷點時,該位址上的資料被變更時程式會被中斷。 - Add Data Breakpoint at Expression 在表示式處新增資料中斷點 - Add Data Breakpoint at Expression "%1" 在表示式 "%1" 處新增資料中斷點 - Setting a data breakpoint on an expression will cause the program to stop when the data at the address given by the expression is modified. 在某個表示式上設定資料中斷點時,該表示式所給的位址上的資料被變更時程式會被中斷。 - Insert New Expression Evaluator - Select Widget to Add into Expression Evaluator - Remove All Expression Evaluators - - Open Memory Editor... 開啟記憶體編輯器... - Open Memory Editor at Object's Address (0x%1) 在物件位址 (0x%1) 處開啟記憶體編輯器 - Open Memory View at Object's Address (0x%1) 在物件地址 (0x%1) 處開啟記憶體檢視 - Open Memory Editor at Object's Address 在物件位址處開啟記憶體編輯器 - Open Memory View at Object's Address 在物件地址開啟記憶體檢視 - Open Memory Editor at Referenced Address (0x%1) 在參考位址 (0x%1) 處開啟記憶體編輯器 - Open Memory View at Referenced Address (0x%1) 在參考地址 (0x%1) 處開啟記憶體檢視 - Open Memory Editor at Referenced Address 在引用位址處開啟記憶體編輯器 - Open Memory View at Referenced Address 在引用位址處開啟記憶體檢視 - Open Memory Editor Showing Stack Layout 開啟記憶體編輯器顯示堆疊佈局 - Copy Contents to Clipboard 複製內容到剪貼簿 - Copy Value to Clipboard 複製數值到剪貼簿 - Show View Contents in Editor 在編輯器中顯示檢視內容 - Close Editor Tooltips 關閉編輯器工具提示 - Enter Expression for Evaluator - Expression: 表示式: - Locals & Expressions @@ -42717,47 +35742,38 @@ Stepping into the module or setting breakpoints by file and is expected to work. Gerrit::Internal::GerritDialog - Gerrit %1@%2 - Changes 變更 - &Query: - Change #, SHA-1, tr:id, owner:email or reviewer:email - Details 詳情 - Diff... - Apply... - Checkout... - Refresh 刷新 @@ -42765,53 +35781,42 @@ Stepping into the module or setting breakpoints by file and is expected to work. Gerrit::Internal::GerritModel - <html><head/><body><table><tr><td>Subject</td><td>%1</td></tr><tr><td>Number</td><td><a href="%11">%2</a></td></tr><tr><td>Owner</td><td>%3 <a href="mailto:%4">%4</a></td></tr><tr><td>Project</td><td>%5 (%6)</td></tr><tr><td>Status</td><td>%7, %8</td></tr><tr><td>Patch set</td><td>%9</td></tr>%10<tr><td>URL</td><td><a href="%11">%11</a></td></tr></table></body></html> - Subject - Owner 擁有者 - Updated - Project 專案 - Approvals - Status 狀態 - Parse error: '%1' -> %2 - - Parse error: '%1' - Parse error in line '%1' @@ -42819,22 +35824,18 @@ Stepping into the module or setting breakpoints by file and is expected to work. Gerrit::Internal::QueryContext - Gerrit - Error running %1: %2 - %1 crashed. - %1 returned %2. @@ -42842,7 +35843,6 @@ Stepping into the module or setting breakpoints by file and is expected to work. Gerrit::Internal::GerritOptionsPage - Gerrit @@ -42850,37 +35850,30 @@ Stepping into the module or setting breakpoints by file and is expected to work. Gerrit::Internal::GerritOptionsWidget - HTTPS - &Host: 主機(&H): - &User: - &ssh: - &Port: 連接埠(&P): - P&rotocol: - Determines the protocol used to form a URL in case "canonicalWebUrl" is not configured in the file "gerrit.config". @@ -42890,37 +35883,30 @@ Stepping into the module or setting breakpoints by file and is expected to work. Gerrit::Internal::FetchContext - Gerrit Fetch - %1 crashed. - %1 returned %2. - Error running %1: %2 - Error writing to temporary file. - Writing %1... - Cherry-picking %1... @@ -42928,17 +35914,14 @@ Stepping into the module or setting breakpoints by file and is expected to work. Gerrit::Internal::GerritPlugin - Gerrit... - Git is not available. - Enter Local Repository for '%1' (%2) @@ -42946,7 +35929,6 @@ Stepping into the module or setting breakpoints by file and is expected to work. Git::Internal::GitSubmitEditorWidget - Detached HEAD @@ -42954,22 +35936,18 @@ Stepping into the module or setting breakpoints by file and is expected to work. Git::Internal::ResetDialog - Sha1 - Subject - Reset to: - Undo Changes to %1 @@ -42977,68 +35955,54 @@ Stepping into the module or setting breakpoints by file and is expected to work. Madde::Internal::DebianManager - Error Creating Debian Project Templates - Failed to open debian changelog "%1" file for reading. - - Debian changelog file '%1' has unexpected format. Debian 變更紀錄檔 '%1' 裡有未知的格式。 - Refusing to update changelog file: Already contains version '%1'. 拒絕更新變更紀錄檔。已經存在版本 '%1'。 - Cannot update changelog: Invalid format (no maintainer entry found). 無法更新變更紀錄:無效的格式 (找不到維護者的條目)。 - Invalid icon data in Debian control file. Debian 控制檔中的圖示資料無效。 - Could not read image file '%1'. 無法讀取影像檔 '%1'。 - Could not export image file '%1'. 無法匯出影像檔 '%1'。 - Failed to create directory "%1". - Unable to create Debian templates: No Qt version set. 無法建立 Debian 樣本:沒有設定 Qt 版本。 - Unable to create Debian templates: dh_make failed (%1). 無法建立 Debian 樣本:dh_make 失敗 (%1)。 - Unable to create debian templates: dh_make failed (%1). 無法建立 debian 樣本:dh_make 失敗 (%1)。 - Unable to move new debian directory to '%1'. 無法將新的 debian 目錄移動到'%1'。 @@ -43046,22 +36010,18 @@ Stepping into the module or setting breakpoints by file and is expected to work. Madde::Internal::MaddeDevice - Test 測試 - Deploy Public Key... 佈署公開金鑰... - Maemo5/Fremantle Maemo5/Fremantle - MeeGo 1.2 Harmattan MeeGo 1.2 Harmattan @@ -43069,27 +36029,22 @@ Stepping into the module or setting breakpoints by file and is expected to work. Madde::Internal::MaddeQemuStartService - Checking whether to start Qemu... - Target device is not an emulator. Nothing to do. - Qemu is already running. Nothing to do. - Cannot deploy: Qemu was not running. It has now been started up for you, but it will take a bit of time until it is ready. Please try again then. 無法佈署:Qemu 尚未執行。現在它將會啟動,但是需要過一點時間才能就緒。請稍後再試一次。 - Cannot deploy: You want to deploy to Qemu, but it is not enabled for this Qt version. @@ -43097,7 +36052,6 @@ Stepping into the module or setting breakpoints by file and is expected to work. Madde::Internal::MaddeQemuStartStep - Start Qemu, if necessary @@ -43105,12 +36059,10 @@ Stepping into the module or setting breakpoints by file and is expected to work. Madde::Internal::Qt4MaemoDeployConfiguration - Add Packaging Files to Project 新增打包檔到專案中 - <html>Qt Creator has set up the following files to enable packaging: %1 Do you want to add them to the project?</html> @@ -43122,12 +36074,10 @@ Do you want to add them to the project?</html> Perforce::Internal::PerforceVersionControl - &Edit (%1) - &Hijack @@ -43135,12 +36085,10 @@ Do you want to add them to the project?</html> ProjectExplorer::DesktopDevice - Run locally - Desktop 桌面 @@ -43148,7 +36096,6 @@ Do you want to add them to the project?</html> ProjectExplorer::Internal::DesktopDeviceFactory - Desktop 桌面 @@ -43156,42 +36103,34 @@ Do you want to add them to the project?</html> ProjectExplorer::DeviceApplicationRunner - User requested stop. Shutting down... - Cannot run: No device. - Connecting to device... 正在連線到裝置... - SSH connection failed: %1 - Application did not finish in time, aborting. - Remote application crashed: %1 - Remote application finished with exit code %1. - Remote application finished with exit code 0. @@ -43199,7 +36138,6 @@ Do you want to add them to the project?</html> ProjectExplorer::DeviceManagerModel - %1 (default for %2) @@ -43207,32 +36145,26 @@ Do you want to add them to the project?</html> ProjectExplorer::DeviceProcessesDialog - Kit: - List of Processes - Filter 過濾器 - &Update List 更新列表(&U) - &Kill Process - &Filter: @@ -43240,7 +36172,6 @@ Do you want to add them to the project?</html> ProjectExplorer::Internal::DeviceProcessesDialogPrivate - Remote Error 遠端錯誤 @@ -43248,12 +36179,10 @@ Do you want to add them to the project?</html> ProjectExplorer::DeviceProcessList - Process ID 行程代碼 - Command Line 命令列 @@ -43261,7 +36190,6 @@ Do you want to add them to the project?</html> ProjectExplorer::Internal::DeviceSettingsPage - Devices @@ -43269,27 +36197,22 @@ Do you want to add them to the project?</html> ProjectExplorer::DeviceUsedPortsGatherer - Connection error: %1 連線錯誤:%1 - Could not start remote process: %1 無法啟動遠端行程:%1 - Remote process crashed: %1 遠端行程已崩潰:%1 - Remote process failed; exit code was %1. 遠端行程已失敗,離開代碼 '%1'。 - Remote error output was: %1 @@ -43299,7 +36222,6 @@ Remote error output was: %1 ProjectExplorer::IDevice - Device @@ -43307,12 +36229,10 @@ Remote error output was: %1 ProjectExplorer::Internal::LocalProcessList - Cannot terminate process %1: %2 - Cannot open process %1: %2 @@ -43320,42 +36240,34 @@ Remote error output was: %1 ProjectExplorer::SshDeviceProcessList - Connection failure: %1 連線失敗:%1 - Error: Process listing command failed to start: %1 - Error: Process listing command crashed: %1 - Process listing command failed with exit code %1. - Error: Kill process failed to start: %1 - Error: Kill process crashed: %1 - Kill process failed with exit code %1. - Remote stderr was: %1 @@ -43365,22 +36277,18 @@ Remote stderr was: %1 ProjectExplorer::Kit - Unnamed - Clone of %1 %1 的複本 - Error: 錯誤: - Warning: 警告: @@ -43388,12 +36296,10 @@ Remote stderr was: %1 ProjectExplorer::SysRootKitInformation - Sys Root "%1" is not a directory. - Sys Root @@ -43401,17 +36307,14 @@ Remote stderr was: %1 ProjectExplorer::ToolChainKitInformation - Compiler - None - No compiler set in kit. @@ -43419,12 +36322,10 @@ Remote stderr was: %1 ProjectExplorer::DeviceTypeKitInformation - Unknown device type - Device type @@ -43432,22 +36333,18 @@ Remote stderr was: %1 ProjectExplorer::DeviceKitInformation - Device does not match device type. - No Device set. - Device - Unconfigured 未設置 @@ -43455,12 +36352,10 @@ Remote stderr was: %1 ProjectExplorer::Internal::SysRootInformationConfigWidget - The root directory of the system image to use.<br>Leave empty when building for the desktop. - Sysroot: Sysroot: @@ -43468,22 +36363,18 @@ Remote stderr was: %1 ProjectExplorer::Internal::ToolChainInformationConfigWidget - The compiler to use for building.<br>Make sure the compiler will produce binaries compatible with the target device, Qt version and other libraries used. - Manage... 管理... - Compiler: - <No compiler available> @@ -43491,12 +36382,10 @@ Remote stderr was: %1 ProjectExplorer::Internal::DeviceTypeInformationConfigWidget - The type of device to run applications on. - Device type: 裝置型態: @@ -43504,17 +36393,14 @@ Remote stderr was: %1 ProjectExplorer::Internal::DeviceInformationConfigWidget - The device to run the applications on. - Manage... 管理... - Device: 裝置: @@ -43522,7 +36408,6 @@ Remote stderr was: %1 ProjectExplorer::KitManager - Desktop 桌面 @@ -43530,22 +36415,18 @@ Remote stderr was: %1 ProjectExplorer::Internal::KitManagerConfigWidget - Name: 名稱: - Kit name and icon. - Select Icon 選擇圖示 - Images (*.png *.xpm *.jpg) @@ -43553,28 +36434,23 @@ Remote stderr was: %1 ProjectExplorer::Internal::KitModel - Auto-detected 自動偵測 - Manual 手動 - %1 (default) Mark up a kit as the default one. - Name 名稱 - Clone of %1 %1 的複本 @@ -43582,28 +36458,22 @@ Remote stderr was: %1 ProjectExplorer::KitOptionsPage - - Kits - Add 新增 - Clone 複製 - Remove 移除 - Make Default @@ -43611,7 +36481,6 @@ Remote stderr was: %1 ProjectExplorer::RunConfiguration - Unknown error. 未知的錯誤。 @@ -43619,7 +36488,6 @@ Remote stderr was: %1 ProjectExplorer::Target - Default build @@ -43627,12 +36495,10 @@ Remote stderr was: %1 QmlJSTools::FindExportedCppTypes - The type will only be available in Qt Creator's QML editors when the type name is a string literal 此種類型名稱字串字面常數僅在 Qt Creator 中的 QML編輯器時可使用 - The module URI cannot be determined by static analysis. The type will be available globally in the QML editor. You can add a "// @uri My.Module.Uri" annotation to let Qt Creator know about a likely URI. @@ -43641,7 +36507,6 @@ Qt Creator know about a likely URI. Qt Creator 知道一個相似的URI. - must be a string literal to be available in the QML editor 字串字面常數只在 QML 編輯器中可用 @@ -43649,12 +36514,10 @@ Qt Creator 知道一個相似的URI. QmlProfiler::Internal::QmlProfilerClientManager - Qt Creator Qt Creator - Could not connect to the in-process QML profiler. Do you want to retry? 無法連線到進行中的 QML 效能分析器。 @@ -43664,62 +36527,50 @@ Do you want to retry? QmlProfiler::Internal::QmlProfilerDataModel - Source code not available 無法使用源碼 - <bytecode> <位元組代碼> - Animation Timer Update 動畫計時器更新 - <Animation Update> <動畫更新> - <program> <程式> - Main Program 主要程式 - %1 animations at %2 FPS %1 動畫,速度 %2 FPS - No data to save 沒有資料可儲存 - Could not open %1 for writing 無法開啟 %1 來寫入 - Could not open %1 for reading 無法開啟 %1 來讀取 - Error while parsing %1 剖析 %1 時發生錯誤 - Invalid version of QML Trace file. 無效的 QML 追蹤檔版本。 @@ -43727,32 +36578,26 @@ Do you want to retry? QmlProfiler::Internal::QmlProfilerEventsWidget - Trace information from the v8 JavaScript engine. Available only in Qt5 based applications. - Copy Row 複製列 - Copy Table 複製表格 - Extended Event Statistics 延伸事件統計 - Limit Events Pane to Current Range 限制事件窗格到目前的範圍 - Reset Events Pane 重置事件窗格 @@ -43760,22 +36605,18 @@ Do you want to retry? QmlProfiler::Internal::QmlProfilerStateWidget - Loading data 載入資料中 - Profiling application 效能分析應用程式 - No QML events recorded 沒有錄製 QML 事件 - Application stopped before loading all data 載入所有資料前應用程式已停止 @@ -43783,42 +36624,34 @@ Do you want to retry? QmlProfiler::Internal::QmlProfilerTraceView - Jump to previous event 跳到前一個事件 - Jump to next event 跳到下一個事件 - Show zoom slider 顯示縮放滑動器 - Select range 選擇範圍 - View event information on mouseover 在滑鼠置於上時檢視事件資訊 - Limit Events Pane to Current Range 限制事件窗格到目前的範圍 - Reset Events Pane 重置事件窗格 - Reset Zoom 重置縮放 @@ -43826,17 +36659,14 @@ Do you want to retry? QmlProfiler::Internal::QmlProfilerViewManager - Events 事件 - Timeline 時間線 - JavaScript JavaScript @@ -43844,7 +36674,6 @@ Do you want to retry? Qnx::Internal::BlackBerryAbstractDeployStep - Starting: "%1" %2 正在啟動:"%1" %2 @@ -43852,12 +36681,10 @@ Do you want to retry? Qnx::Internal::BlackBerryApplicationRunner - Launching application failed - Cannot show debug output. Error: %1 @@ -43865,48 +36692,38 @@ Do you want to retry? Qnx::Internal::BlackBerryCreatePackageStep - - Create BAR packages - Could not find packager command '%1' in the build environment - No packages enabled for deployment - Application descriptor file not specified, please check deployment settings - No package specified, please check deployment settings - Could not create build directory '%1' - Error preparing application descriptor file - Could not open '%1' for reading - Could not create prepared application descriptor file in '%1' @@ -43914,7 +36731,6 @@ Do you want to retry? Qnx::Internal::BlackBerryCreatePackageStepConfigWidget - <b>Create packages</b> @@ -43922,7 +36738,6 @@ Do you want to retry? Qnx::Internal::BlackBerryCreatePackageStepFactory - Create BAR Packages @@ -43930,7 +36745,6 @@ Do you want to retry? Qnx::Internal::BlackBerryDeployConfiguration - Deploy to BlackBerry Device @@ -43938,7 +36752,6 @@ Do you want to retry? Qnx::Internal::BlackBerryDeployConfigurationFactory - Deploy to BlackBerry Device @@ -43946,17 +36759,14 @@ Do you want to retry? Qnx::Internal::BlackBerryDeployInformation - Enabled 已開啟 - Application descriptor file - Package @@ -43964,28 +36774,22 @@ Do you want to retry? Qnx::Internal::BlackBerryDeployStep - - Deploy packages - Could not find deploy command '%1' in the build environment - No hostname specified for device - No packages enabled for deployment - Package '%1' does not exist. Create the package first. @@ -43993,7 +36797,6 @@ Do you want to retry? Qnx::Internal::BlackBerryDeployStepConfigWidget - <b>Deploy packages</b> @@ -44001,7 +36804,6 @@ Do you want to retry? Qnx::Internal::BlackBerryDeployStepFactory - Deploy Package @@ -44009,7 +36811,6 @@ Do you want to retry? Qnx::Internal::BlackBerryDeviceConfiguration - BlackBerry @@ -44017,7 +36818,6 @@ Do you want to retry? Qnx::Internal::BlackBerryDeviceConfigurationFactory - BlackBerry Device @@ -44025,29 +36825,22 @@ Do you want to retry? Qnx::Internal::BlackBerryDeviceConfigurationWizard - New BlackBerry Device Configuration Setup - - - Failure to Save Key File - Failed to create directory: '%1'. 建立目錄失敗:'%1'。 - Private key file already exists: '%1' - Public key file already exists: '%1' @@ -44055,12 +36848,10 @@ Do you want to retry? Qnx::Internal::BlackBerryDeviceConfigurationWizardFinalPage - Setup Finished 設定完成 - The new device configuration will now be created. 新裝置設置將會被建立。 @@ -44068,18 +36859,15 @@ Do you want to retry? Qnx::Internal::BlackBerryQtVersion - BlackBerry %1 Qt Version is meant for BlackBerry - BlackBerry - BlackBerry Native SDK: @@ -44087,12 +36875,10 @@ Do you want to retry? Qnx::Internal::BlackBerryRunConfiguration - %1 on BlackBerry device - Run on BlackBerry device @@ -44100,7 +36886,6 @@ Do you want to retry? Qnx::Internal::BlackBerryRunConfigurationFactory - %1 on BlackBerry Device @@ -44108,12 +36893,10 @@ Do you want to retry? Qnx::Internal::BlackBerryRunControlFactory - No active deploy configuration - Run on BlackBerry Device @@ -44121,7 +36904,6 @@ Do you want to retry? Qnx::Internal::QnxAbstractQtVersion - No SDK path set @@ -44129,19 +36911,16 @@ Do you want to retry? Qnx::Internal::QnxDebugSupport - Preparing remote side... 準備遠端中... - The %1 process closed unexpectedly. - Initial setup failed: %1 初始設定失敗:%1 @@ -44149,7 +36928,6 @@ Do you want to retry? Qnx::Internal::QnxDeployConfigurationFactory - Deploy to QNX Device @@ -44157,7 +36935,6 @@ Do you want to retry? Qnx::Internal::QnxDeviceConfiguration - QNX @@ -44165,7 +36942,6 @@ Do you want to retry? Qnx::Internal::QnxDeviceConfigurationFactory - QNX Device @@ -44173,7 +36949,6 @@ Do you want to retry? Qnx::Internal::QnxDeviceConfigurationWizard - New QNX Device Configuration Setup @@ -44181,7 +36956,6 @@ Do you want to retry? Qnx::Internal::QnxDeviceConfigurationWizardSetupPage - QNX Device @@ -44189,18 +36963,15 @@ Do you want to retry? Qnx::Internal::QnxQtVersion - QNX %1 Qt Version is meant for QNX - QNX - QNX Software Development Platform: @@ -44208,7 +36979,6 @@ Do you want to retry? Qnx::Internal::QnxRunConfiguration - Path to Qt libraries on device: @@ -44216,7 +36986,6 @@ Do you want to retry? Qnx::Internal::QnxRunConfigurationFactory - %1 on QNX Device @@ -44224,7 +36993,6 @@ Do you want to retry? Qnx::Internal::QnxRunControlFactory - Run on remote QNX device @@ -44232,12 +37000,10 @@ Do you want to retry? Qt4ProjectManager::Internal::QmakeKitConfigWidget - The mkspec to use when building the project with qmake.<br>This setting is ignored when using other build systems. - Qt mkspec: @@ -44245,17 +37011,14 @@ Do you want to retry? Qt4ProjectManager::QmakeKitInformation - No Qt version set, so mkspec is ignored. - Mkspec not found for Qt version. - mkspec @@ -44263,18 +37026,15 @@ Do you want to retry? Qt4ProjectManager::Qt4TargetSetupWidget - Manage... 管理... - <b>Error:</b> Severity is Task::Error <b>錯誤:</b> - <b>Warning:</b> Severity is Task::Warning <b>警告:</b> @@ -44283,12 +37043,10 @@ Do you want to retry? Qt4ProjectManager::Internal::ImportWidget - Import Build from... - Import @@ -44296,47 +37054,38 @@ Do you want to retry? QtSupport::Internal::CustomExecutableConfigurationWidget - Command: 指令: - Arguments: 參數: - Working directory: - Run in &terminal 在終端機中執行(&T) - Run Environment - Base environment for this run configuration: - Clean Environment - System Environment 系統環境變數 - Build Environment 建置環境變數 @@ -44344,7 +37093,6 @@ Do you want to retry? CustomExecutableDialog - Could not find the executable, please specify one. 找不到可執行檔。請指定一個。 @@ -44352,39 +37100,32 @@ Do you want to retry? QtSupport::CustomExecutableRunConfiguration - No executable. - The executable %1 cannot be found in the path. - Clean Environment - System Environment 系統環境變數 - Build Environment 建置環境變數 - Custom Executable 自訂執行檔 - Run %1 @@ -44392,7 +37133,6 @@ cannot be found in the path. QtSupport::CustomExecutableRunConfigurationFactory - Custom Executable 自訂執行檔 @@ -44400,22 +37140,18 @@ cannot be found in the path. QtSupport::Internal::QtKitConfigWidget - The Qt library to use for all projects using this kit.<br>A Qt version is required for qmake-based projects and optional when using other build systems. - Manage... 管理... - None - Qt version: Qt 版本: @@ -44423,12 +37159,10 @@ cannot be found in the path. QtSupport::QtKitInformation - Qt version - None @@ -44436,17 +37170,14 @@ cannot be found in the path. RemoteLinux::Internal::LinuxDevice - Generic Linux 通用 Linux - Test 測試 - Deploy Public Key... 佈署公開金鑰... @@ -44454,36 +37185,30 @@ cannot be found in the path. RemoteLinux::RemoteLinuxCheckForFreeDiskSpaceService - Remote process failed to start. 遠端行程啟動失敗。 - Remote process crashed. - Unexpected output from remote process: '%1'. - The remote file system has only %n megabytes of free space, but %1 megabytes are required. - The remote file system has %n megabytes of free space, going ahead. - Cannot check for free disk space: '%1' is not an absolute path. @@ -44491,7 +37216,6 @@ cannot be found in the path. RemoteLinux::Internal::RemoteLinuxCheckForFreeDiskSpaceStepWidget - MB @@ -44499,7 +37223,6 @@ cannot be found in the path. RemoteLinux::RemoteLinuxCheckForFreeDiskSpaceStep - Check for free disk space @@ -44507,23 +37230,19 @@ cannot be found in the path. RemoteLinux::LinuxDeviceDebugSupport - Checking available ports... - Debugging failed. - Initial setup failed: %1 初始設定失敗:%1 - Not enough free ports on device for debugging. 裝置上可用於除錯的連接埠不夠。 @@ -44531,62 +37250,50 @@ cannot be found in the path. ResourceEditor::Internal::QrcEditor - Add Files 新增檔案 - Add Prefix 新增前置字串 - Invalid file location 無效的檔案位置 - Copy 複製 - Abort 終止 - Skip 跳過 - The file %1 is not in a subdirectory of the resource file. You now have the option to copy this file to a valid location. 檔案 %1 沒有在資源檔所在的子目錄中。您可以選擇複製此檔案到一個有效的位置。 - Choose Copy Location 選擇複製位置 - Overwriting Failed 覆寫失敗 - Could not overwrite file %1. 無法覆寫檔案 %1。 - Copying Failed 複製失敗 - Could not copy the file to %1. 無法複製檔案到 %1。 @@ -44594,23 +37301,18 @@ cannot be found in the path. ResourceFile - - The file name is empty. 檔名為空。 - XML error on line %1, col %2: %3 在第 %1行,第 %2 欄發生 XML 錯誤:%3 - The <RCC> root element is missing. <RCC> root 元素遺失。 - Cannot write file. Disk full? 無法寫入檔案。磁碟空間是否已滿? @@ -44618,12 +37320,10 @@ cannot be found in the path. ResourceEditor::Internal::ResourceView - Open File 開啟檔案 - All files (*) 所有檔案 (*) diff --git a/src/libs/cplusplus/CppDocument.cpp b/src/libs/cplusplus/CppDocument.cpp index ee6d7f3a9d6..84092fc93da 100644 --- a/src/libs/cplusplus/CppDocument.cpp +++ b/src/libs/cplusplus/CppDocument.cpp @@ -464,6 +464,57 @@ void Document::setGlobalNamespace(Namespace *globalNamespace) _globalNamespace = globalNamespace; } +/*! + * Extract the function name including scope at the given position. + * + * Note that a function (scope) starts at the name of that function, not at the return type. The + * implication is that this method will return an empty string when the line/column is on the + * return type. + * + * \param line the line number, starting with line 1 + * \param column the column number, starting with column 1 + */ +QString Document::functionAt(int line, int column) const +{ + if (line < 1 || column < 1) + return QString(); + + CPlusPlus::Symbol *symbol = lastVisibleSymbolAt(line, column); + if (!symbol) + return QString(); + + // Find the enclosing function scope (which might be several levels up, or we might be standing + // on it) + Scope *scope; + if (symbol->isScope()) + scope = symbol->asScope(); + else + scope = symbol->enclosingScope(); + + while (scope && !scope->isFunction() ) + scope = scope->enclosingScope(); + + if (!scope) + return QString(); + + // We found the function scope, extract its name. + const Overview o; + QString rc = o.prettyName(scope->name()); + + // Prepend namespace "Foo::Foo::foo()" up to empty root namespace + for (const Symbol *owner = scope->enclosingNamespace(); + owner; owner = owner->enclosingNamespace()) { + const QString name = o.prettyName(owner->name()); + if (name.isEmpty()) { + break; + } else { + rc.prepend(QLatin1String("::")); + rc.prepend(name); + } + } + return rc; +} + Scope *Document::scopeAt(unsigned line, unsigned column) { FindScopeAt findScopeAt(_translationUnit, line, column); diff --git a/src/libs/cplusplus/CppDocument.h b/src/libs/cplusplus/CppDocument.h index 589e2b9503a..b9a58f547fc 100644 --- a/src/libs/cplusplus/CppDocument.h +++ b/src/libs/cplusplus/CppDocument.h @@ -99,6 +99,7 @@ public: QList definedMacros() const { return _definedMacros; } + QString functionAt(int line, int column) const; Symbol *lastVisibleSymbolAt(unsigned line, unsigned column = 0) const; Scope *scopeAt(unsigned line, unsigned column = 0); diff --git a/src/libs/cplusplus/pp-engine.cpp b/src/libs/cplusplus/pp-engine.cpp index 91aa73efb9b..3643601a85c 100644 --- a/src/libs/cplusplus/pp-engine.cpp +++ b/src/libs/cplusplus/pp-engine.cpp @@ -1332,19 +1332,6 @@ void Preprocessor::synchronizeOutputLines(const PPToken &tk, bool forceLine) adjustForCommentOrStringNewlines(&m_env->currentLine, tk); } -void Preprocessor::removeTrailingOutputLines() -{ - QByteArray &buffer = currentOutputBuffer(); - int i = buffer.size() - 1; - while (i >= 0 && buffer.at(i) == '\n') - --i; - const int mightChop = buffer.size() - i - 1; - if (mightChop > 1) { - // Keep one new line at end. - buffer.chop(mightChop - 1); - } -} - std::size_t Preprocessor::computeDistance(const Preprocessor::PPToken &tk, bool forceTillLine) { // Find previous non-space character or line begin. @@ -1450,8 +1437,6 @@ void Preprocessor::preprocess(const QString &fileName, const QByteArray &source, } while (tk.isNot(T_EOF_SYMBOL)); - removeTrailingOutputLines(); - if (includeGuardMacroName) { if (m_state.m_includeGuardState == State::IncludeGuardState_AfterDefine || m_state.m_includeGuardState == State::IncludeGuardState_AfterEndif) @@ -1915,8 +1900,6 @@ void Preprocessor::handleEndIfDirective(PPToken *tk, const PPToken £Token) void Preprocessor::handleIfDefDirective(bool checkUndefined, PPToken *tk) { - static const QByteArray qCreatorRun("Q_CREATOR_RUN"); - lex(tk); // consume "ifdef" token if (tk->is(T_IDENTIFIER)) { if (checkUndefined && m_state.m_ifLevel == 0) @@ -1937,8 +1920,6 @@ void Preprocessor::handleIfDefDirective(bool checkUndefined, PPToken *tk) } } else if (m_env->isBuiltinMacro(macroName)) { value = true; - } else if (macroName == qCreatorRun) { - value = true; } if (checkUndefined) diff --git a/src/libs/cplusplus/pp-engine.h b/src/libs/cplusplus/pp-engine.h index f118a00da40..2614c107b15 100644 --- a/src/libs/cplusplus/pp-engine.h +++ b/src/libs/cplusplus/pp-engine.h @@ -237,7 +237,6 @@ private: void maybeStartOutputLine(); void generateOutputLineMarker(unsigned lineno); void synchronizeOutputLines(const PPToken &tk, bool forceLine = false); - void removeTrailingOutputLines(); void enforceSpacing(const PPToken &tk, bool forceSpacing = false); static std::size_t computeDistance(const PPToken &tk, bool forceTillLine = false); diff --git a/src/libs/extensionsystem/plugindetailsview.cpp b/src/libs/extensionsystem/plugindetailsview.cpp index ca3c267cead..cb9e792443f 100644 --- a/src/libs/extensionsystem/plugindetailsview.cpp +++ b/src/libs/extensionsystem/plugindetailsview.cpp @@ -46,7 +46,6 @@ using namespace ExtensionSystem; /*! - \fn PluginDetailsView::PluginDetailsView(QWidget *parent) Constructs a new view with given \a parent widget. */ PluginDetailsView::PluginDetailsView(QWidget *parent) @@ -57,7 +56,6 @@ PluginDetailsView::PluginDetailsView(QWidget *parent) } /*! - \fn PluginDetailsView::~PluginDetailsView() \internal */ PluginDetailsView::~PluginDetailsView() @@ -66,7 +64,6 @@ PluginDetailsView::~PluginDetailsView() } /*! - \fn void PluginDetailsView::update(PluginSpec *spec) Reads the given \a spec and displays its values in this PluginDetailsView. */ diff --git a/src/libs/extensionsystem/pluginerrorview.cpp b/src/libs/extensionsystem/pluginerrorview.cpp index 7d4c9e825a8..81d3c63f1b8 100644 --- a/src/libs/extensionsystem/pluginerrorview.cpp +++ b/src/libs/extensionsystem/pluginerrorview.cpp @@ -46,7 +46,6 @@ using namespace ExtensionSystem; /*! - \fn PluginErrorView::PluginErrorView(QWidget *parent) Constructs a new error view with given \a parent widget. */ PluginErrorView::PluginErrorView(QWidget *parent) @@ -57,7 +56,6 @@ PluginErrorView::PluginErrorView(QWidget *parent) } /*! - \fn PluginErrorView::~PluginErrorView() \internal */ PluginErrorView::~PluginErrorView() @@ -66,7 +64,6 @@ PluginErrorView::~PluginErrorView() } /*! - \fn void PluginErrorView::update(PluginSpec *spec) Reads the given \a spec and displays its state and error information in this PluginErrorView. */ diff --git a/src/libs/extensionsystem/pluginmanager.cpp b/src/libs/extensionsystem/pluginmanager.cpp index e2e8d124e8c..373f96a9236 100644 --- a/src/libs/extensionsystem/pluginmanager.cpp +++ b/src/libs/extensionsystem/pluginmanager.cpp @@ -454,6 +454,8 @@ QHash PluginManager::pluginCollections() return m_instance->d->pluginCategories; } +static const char argumentKeywordC[] = ":arguments"; + /*! Serialize plugin options and arguments for sending in a single string via QtSingleApplication: @@ -462,9 +464,6 @@ QHash PluginManager::pluginCollections() \sa setPluginPaths() */ - -static const char argumentKeywordC[] = ":arguments"; - QString PluginManager::serializedArguments() { const QChar separator = QLatin1Char('|'); @@ -639,7 +638,6 @@ void PluginManager::formatPluginOptions(QTextStream &str, int optionIndentation, /*! Format the version of the plugin specs for command line help. */ - void PluginManager::formatPluginVersions(QTextStream &str) { const PluginSpecSet::const_iterator cend = m_instance->d->pluginSpecs.constEnd(); diff --git a/src/libs/extensionsystem/pluginspec.cpp b/src/libs/extensionsystem/pluginspec.cpp index 87a70d09c2d..c9ccce4ce20 100644 --- a/src/libs/extensionsystem/pluginspec.cpp +++ b/src/libs/extensionsystem/pluginspec.cpp @@ -145,7 +145,6 @@ using namespace ExtensionSystem; using namespace ExtensionSystem::Internal; /*! - \fn uint qHash(const ExtensionSystem::PluginDependency &value) \internal */ uint ExtensionSystem::qHash(const ExtensionSystem::PluginDependency &value) @@ -154,7 +153,6 @@ uint ExtensionSystem::qHash(const ExtensionSystem::PluginDependency &value) } /*! - \fn bool PluginDependency::operator==(const PluginDependency &other) const \internal */ bool PluginDependency::operator==(const PluginDependency &other) const @@ -163,7 +161,6 @@ bool PluginDependency::operator==(const PluginDependency &other) const } /*! - \fn PluginSpec::PluginSpec() \internal */ PluginSpec::PluginSpec() @@ -172,7 +169,6 @@ PluginSpec::PluginSpec() } /*! - \fn PluginSpec::~PluginSpec() \internal */ PluginSpec::~PluginSpec() @@ -182,7 +178,6 @@ PluginSpec::~PluginSpec() } /*! - \fn QString PluginSpec::name() const The plugin name. This is valid after the PluginSpec::Read state is reached. */ QString PluginSpec::name() const @@ -191,7 +186,6 @@ QString PluginSpec::name() const } /*! - \fn QString PluginSpec::version() const The plugin version. This is valid after the PluginSpec::Read state is reached. */ QString PluginSpec::version() const @@ -200,7 +194,6 @@ QString PluginSpec::version() const } /*! - \fn QString PluginSpec::compatVersion() const The plugin compatibility version. This is valid after the PluginSpec::Read state is reached. */ QString PluginSpec::compatVersion() const @@ -209,7 +202,6 @@ QString PluginSpec::compatVersion() const } /*! - \fn QString PluginSpec::vendor() const The plugin vendor. This is valid after the PluginSpec::Read state is reached. */ QString PluginSpec::vendor() const @@ -218,7 +210,6 @@ QString PluginSpec::vendor() const } /*! - \fn QString PluginSpec::copyright() const The plugin copyright. This is valid after the PluginSpec::Read state is reached. */ QString PluginSpec::copyright() const @@ -227,7 +218,6 @@ QString PluginSpec::copyright() const } /*! - \fn QString PluginSpec::license() const The plugin license. This is valid after the PluginSpec::Read state is reached. */ QString PluginSpec::license() const @@ -236,7 +226,6 @@ QString PluginSpec::license() const } /*! - \fn QString PluginSpec::description() const The plugin description. This is valid after the PluginSpec::Read state is reached. */ QString PluginSpec::description() const @@ -245,7 +234,6 @@ QString PluginSpec::description() const } /*! - \fn QString PluginSpec::url() const The plugin url where you can find more information about the plugin. This is valid after the PluginSpec::Read state is reached. */ QString PluginSpec::url() const @@ -254,7 +242,6 @@ QString PluginSpec::url() const } /*! - \fn QString PluginSpec::category() const The category that the plugin belongs to. Categories are groups of plugins which allow for keeping them together in the UI. Returns an empty string if the plugin does not belong to a category. */ @@ -264,7 +251,6 @@ QString PluginSpec::category() const } /*! - \fn bool PluginSpec::isExperimental() const Returns if the plugin has its experimental flag set. */ bool PluginSpec::isExperimental() const @@ -283,7 +269,6 @@ bool PluginSpec::isDisabledByDefault() const } /*! - \fn bool PluginSpec::isEnabledInSettings() const Returns if the plugin should be loaded at startup. True by default The user can change it from the Plugin settings. Note: That this function returns true even if a plugin is disabled because @@ -295,7 +280,6 @@ bool PluginSpec::isEnabledInSettings() const } /*! - \fn bool PluginSpec::isEffectivelyEnabled() const Returns if the plugin is loaded at startup. \see PluginSpec::isEnabled */ @@ -307,7 +291,6 @@ bool PluginSpec::isEffectivelyEnabled() const } /*! - \fn bool PluginSpec::isDisabledIndirectly() const Returns true if loading was not done due to user unselecting this plugin or its dependencies. */ bool PluginSpec::isDisabledIndirectly() const @@ -316,7 +299,6 @@ bool PluginSpec::isDisabledIndirectly() const } /*! - \fn bool PluginSpec::isForceEnabled() const Returns if the plugin is enabled via the -load option on the command line. */ bool PluginSpec::isForceEnabled() const @@ -325,7 +307,6 @@ bool PluginSpec::isForceEnabled() const } /*! - \fn bool PluginSpec::isForceDisabled() const Returns if the plugin is disabled via the -noload option on the command line. */ bool PluginSpec::isForceDisabled() const @@ -334,7 +315,6 @@ bool PluginSpec::isForceDisabled() const } /*! - \fn QList PluginSpec::dependencies() const The plugin dependencies. This is valid after the PluginSpec::Read state is reached. */ QList PluginSpec::dependencies() const @@ -343,7 +323,6 @@ QList PluginSpec::dependencies() const } /*! - \fn PluginSpec::PluginArgumentDescriptions PluginSpec::argumentDescriptions() const Returns a list of descriptions of command line arguments the plugin processes. */ @@ -353,7 +332,6 @@ PluginSpec::PluginArgumentDescriptions PluginSpec::argumentDescriptions() const } /*! - \fn QString PluginSpec::location() const The absolute path to the directory containing the plugin xml description file this PluginSpec corresponds to. */ @@ -363,7 +341,6 @@ QString PluginSpec::location() const } /*! - \fn QString PluginSpec::filePath() const The absolute path to the plugin xml description file (including the file name) this PluginSpec corresponds to. */ @@ -373,7 +350,6 @@ QString PluginSpec::filePath() const } /*! - \fn QStringList PluginSpec::arguments() const Command line arguments specific to that plugin. Set at startup */ @@ -383,7 +359,6 @@ QStringList PluginSpec::arguments() const } /*! - \fn void PluginSpec::setArguments(const QStringList &arguments) Set the command line arguments specific to that plugin to \a arguments. */ @@ -393,7 +368,6 @@ void PluginSpec::setArguments(const QStringList &arguments) } /*! - \fn PluginSpec::addArgument(const QString &argument) Adds \a argument to the command line arguments specific to that plugin. */ @@ -404,7 +378,6 @@ void PluginSpec::addArgument(const QString &argument) /*! - \fn PluginSpec::State PluginSpec::state() const The state in which the plugin currently is. See the description of the PluginSpec::State enum for details. */ @@ -414,7 +387,6 @@ PluginSpec::State PluginSpec::state() const } /*! - \fn bool PluginSpec::hasError() const Returns whether an error occurred while reading/starting the plugin. */ bool PluginSpec::hasError() const @@ -423,7 +395,6 @@ bool PluginSpec::hasError() const } /*! - \fn QString PluginSpec::errorString() const Detailed, possibly multi-line, error description in case of an error. */ QString PluginSpec::errorString() const @@ -432,7 +403,6 @@ QString PluginSpec::errorString() const } /*! - \fn bool PluginSpec::provides(const QString &pluginName, const QString &version) const Returns if this plugin can be used to fill in a dependency of the given \a pluginName and \a version. @@ -444,7 +414,6 @@ bool PluginSpec::provides(const QString &pluginName, const QString &version) con } /*! - \fn IPlugin *PluginSpec::plugin() const The corresponding IPlugin instance, if the plugin library has already been successfully loaded, i.e. the PluginSpec::Loaded state is reached. */ @@ -454,7 +423,6 @@ IPlugin *PluginSpec::plugin() const } /*! - \fn QList PluginSpec::dependencySpecs() const Returns the list of dependencies, already resolved to existing plugin specs. Valid if PluginSpec::Resolved state is reached. @@ -493,7 +461,6 @@ namespace { const char ARGUMENT_PARAMETER[] = "parameter"; } /*! - \fn PluginSpecPrivate::PluginSpecPrivate(PluginSpec *spec) \internal */ PluginSpecPrivate::PluginSpecPrivate(PluginSpec *spec) @@ -512,7 +479,6 @@ PluginSpecPrivate::PluginSpecPrivate(PluginSpec *spec) } /*! - \fn bool PluginSpecPrivate::read(const QString &fileName) \internal */ bool PluginSpecPrivate::read(const QString &fileName) @@ -590,7 +556,6 @@ void PluginSpec::setForceDisabled(bool value) } /*! - \fn bool PluginSpecPrivate::reportError(const QString &err) \internal */ bool PluginSpecPrivate::reportError(const QString &err) @@ -626,7 +591,6 @@ static inline QString msgUnexpectedToken() } /*! - \fn void PluginSpecPrivate::readPluginSpec(QXmlStreamReader &reader) \internal */ void PluginSpecPrivate::readPluginSpec(QXmlStreamReader &reader) @@ -702,10 +666,8 @@ void PluginSpecPrivate::readPluginSpec(QXmlStreamReader &reader) } /*! - \fn void PluginSpecPrivate::readArgumentDescriptions(QXmlStreamReader &reader) \internal */ - void PluginSpecPrivate::readArgumentDescriptions(QXmlStreamReader &reader) { QString element; @@ -736,7 +698,6 @@ void PluginSpecPrivate::readArgumentDescriptions(QXmlStreamReader &reader) } /*! - \fn void PluginSpecPrivate::readArgumentDescription(QXmlStreamReader &reader) \internal */ void PluginSpecPrivate::readArgumentDescription(QXmlStreamReader &reader) @@ -766,7 +727,6 @@ bool PluginSpecPrivate::readBooleanValue(QXmlStreamReader &reader, const char *k } /*! - \fn void PluginSpecPrivate::readDependencies(QXmlStreamReader &reader) \internal */ void PluginSpecPrivate::readDependencies(QXmlStreamReader &reader) @@ -799,7 +759,6 @@ void PluginSpecPrivate::readDependencies(QXmlStreamReader &reader) } /*! - \fn void PluginSpecPrivate::readDependencyEntry(QXmlStreamReader &reader) \internal */ void PluginSpecPrivate::readDependencyEntry(QXmlStreamReader &reader) @@ -834,7 +793,6 @@ void PluginSpecPrivate::readDependencyEntry(QXmlStreamReader &reader) } /*! - \fn bool PluginSpecPrivate::provides(const QString &pluginName, const QString &pluginVersion) const \internal */ bool PluginSpecPrivate::provides(const QString &pluginName, const QString &pluginVersion) const @@ -845,7 +803,6 @@ bool PluginSpecPrivate::provides(const QString &pluginName, const QString &plugi } /*! - \fn QRegExp &PluginSpecPrivate::versionRegExp() \internal */ QRegExp &PluginSpecPrivate::versionRegExp() @@ -854,7 +811,6 @@ QRegExp &PluginSpecPrivate::versionRegExp() return reg; } /*! - \fn bool PluginSpecPrivate::isValidVersion(const QString &version) \internal */ bool PluginSpecPrivate::isValidVersion(const QString &version) @@ -863,7 +819,6 @@ bool PluginSpecPrivate::isValidVersion(const QString &version) } /*! - \fn int PluginSpecPrivate::versionCompare(const QString &version1, const QString &version2) \internal */ int PluginSpecPrivate::versionCompare(const QString &version1, const QString &version2) @@ -888,7 +843,6 @@ int PluginSpecPrivate::versionCompare(const QString &version1, const QString &ve } /*! - \fn bool PluginSpecPrivate::resolveDependencies(const QList &specs) \internal */ bool PluginSpecPrivate::resolveDependencies(const QList &specs) @@ -956,7 +910,6 @@ void PluginSpecPrivate::disableIndirectlyIfDependencyDisabled() } /*! - \fn bool PluginSpecPrivate::loadLibrary() \internal */ bool PluginSpecPrivate::loadLibrary() @@ -1013,7 +966,6 @@ bool PluginSpecPrivate::loadLibrary() } /*! - \fn bool PluginSpecPrivate::initializePlugin() \internal */ bool PluginSpecPrivate::initializePlugin() @@ -1043,7 +995,6 @@ bool PluginSpecPrivate::initializePlugin() } /*! - \fn bool PluginSpecPrivate::initializeExtensions() \internal */ bool PluginSpecPrivate::initializeExtensions() @@ -1068,7 +1019,6 @@ bool PluginSpecPrivate::initializeExtensions() } /*! - \fn bool PluginSpecPrivate::delayedInitialize() \internal */ bool PluginSpecPrivate::delayedInitialize() @@ -1086,7 +1036,6 @@ bool PluginSpecPrivate::delayedInitialize() } /*! - \fn bool PluginSpecPrivate::stop() \internal */ IPlugin::ShutdownFlag PluginSpecPrivate::stop() @@ -1098,7 +1047,6 @@ IPlugin::ShutdownFlag PluginSpecPrivate::stop() } /*! - \fn bool PluginSpecPrivate::kill() \internal */ void PluginSpecPrivate::kill() diff --git a/src/libs/qmldebug/qpacketprotocol.cpp b/src/libs/qmldebug/qpacketprotocol.cpp index d9aa7493a91..4bc56c21734 100644 --- a/src/libs/qmldebug/qpacketprotocol.cpp +++ b/src/libs/qmldebug/qpacketprotocol.cpp @@ -265,8 +265,6 @@ QPacketAutoSend QPacketProtocol::send() } /*! - \fn void QPacketProtocol::send(const QPacket & packet) - Transmit the \a packet. */ void QPacketProtocol::send(const QPacket & p) diff --git a/src/libs/qmljs/parser/qmlerror.cpp b/src/libs/qmljs/parser/qmlerror.cpp index cd81100d1e6..b097eea8121 100644 --- a/src/libs/qmljs/parser/qmlerror.cpp +++ b/src/libs/qmljs/parser/qmlerror.cpp @@ -237,7 +237,6 @@ QString QmlError::toString() const /*! \relates QmlError - \fn QDebug operator<<(QDebug debug, const QmlError &error) Outputs a human readable version of \a error to \a debug. */ diff --git a/src/libs/qmljs/qmljs-lib.pri b/src/libs/qmljs/qmljs-lib.pri index f31879a6f01..12913de0a52 100644 --- a/src/libs/qmljs/qmljs-lib.pri +++ b/src/libs/qmljs/qmljs-lib.pri @@ -39,7 +39,8 @@ HEADERS += \ $$PWD/consoleitem.h \ $$PWD/iscriptevaluator.h \ $$PWD/qmljssimplereader.h \ - $$PWD/persistenttrie.h + $$PWD/persistenttrie.h \ + $$PWD/qmljsqrcparser.h SOURCES += \ $$PWD/qmljsbind.cpp \ @@ -69,7 +70,8 @@ SOURCES += \ $$PWD/consolemanagerinterface.cpp \ $$PWD/consoleitem.cpp \ $$PWD/qmljssimplereader.cpp \ - $$PWD/persistenttrie.cpp + $$PWD/persistenttrie.cpp \ + $$PWD/qmljsqrcparser.cpp RESOURCES += \ $$PWD/qmljs.qrc diff --git a/src/libs/qmljs/qmljs.pro b/src/libs/qmljs/qmljs.pro index c9c018de5c1..5db252b2906 100644 --- a/src/libs/qmljs/qmljs.pro +++ b/src/libs/qmljs/qmljs.pro @@ -1,5 +1,5 @@ DEFINES += QMLJS_BUILD_DIR -QT +=script +QT +=script xml include(../../qtcreatorlibrary.pri) include(qmljs-lib.pri) diff --git a/src/libs/qmljs/qmljs.qbs b/src/libs/qmljs/qmljs.qbs index 2bef9864c4c..7029b1149f7 100644 --- a/src/libs/qmljs/qmljs.qbs +++ b/src/libs/qmljs/qmljs.qbs @@ -12,7 +12,7 @@ QtcLibrary { Depends { name: "Utils" } Depends { name: "LanguageUtils" } - Depends { name: "Qt"; submodules: ["widgets", "script"] } + Depends { name: "Qt"; submodules: ["widgets", "script", "xml"] } files: [ "jsoncheck.cpp", @@ -52,6 +52,8 @@ QtcLibrary { "qmljsmodelmanagerinterface.h", "qmljspropertyreader.cpp", "qmljspropertyreader.h", + "qmljsqrcparser.cpp", + "qmljsqrcparser.h", "qmljsreformatter.cpp", "qmljsreformatter.h", "qmljsrewriter.cpp", diff --git a/src/libs/qmljs/qmljsdocument.cpp b/src/libs/qmljs/qmljsdocument.cpp index 3e55ccc42a9..a7eb00c354d 100644 --- a/src/libs/qmljs/qmljsdocument.cpp +++ b/src/libs/qmljs/qmljsdocument.cpp @@ -115,6 +115,22 @@ bool Document::isFullySupportedLanguage(Document::Language language) return false; } +bool Document::isQmlLikeOrJsLanguage(Document::Language language) +{ + switch (language) { + case QmlLanguage: + case QmlQtQuick1Language: + case QmlQtQuick2Language: + case QmlQbsLanguage: + case QmlProjectLanguage: + case QmlTypeInfoLanguage: + case JavaScriptLanguage: + return true; + default: + return false; + } +} + Document::Document(const QString &fileName, Language language) : _engine(0) , _ast(0) diff --git a/src/libs/qmljs/qmljsdocument.h b/src/libs/qmljs/qmljsdocument.h index e18f95d475b..56ebb7061e8 100644 --- a/src/libs/qmljs/qmljsdocument.h +++ b/src/libs/qmljs/qmljsdocument.h @@ -65,6 +65,7 @@ public: static bool isQmlLikeLanguage(Language languge); static bool isFullySupportedLanguage(Language language); + static bool isQmlLikeOrJsLanguage(Language language); protected: Document(const QString &fileName, Language language); diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp index 24d68d4948e..c9b1f4381a5 100644 --- a/src/libs/qmljs/qmljsinterpreter.cpp +++ b/src/libs/qmljs/qmljsinterpreter.cpp @@ -35,6 +35,7 @@ #include "qmljstypedescriptionreader.h" #include "qmljsvalueowner.h" #include "qmljscontext.h" +#include "qmljsmodelmanagerinterface.h" #include "parser/qmljsast_p.h" #include @@ -2107,13 +2108,19 @@ ImportInfo ImportInfo::pathImport(const QString &docPath, const QString &path, importFileInfo = QFileInfo(docPath + QDir::separator() + path); info._path = importFileInfo.absoluteFilePath(); - if (importFileInfo.isFile()) + if (importFileInfo.isFile()) { info._type = FileImport; - else if (importFileInfo.isDir()) + } else if (importFileInfo.isDir()) { info._type = DirectoryImport; - else + } else if (path.startsWith(QLatin1String("qrc:"))) { + info._path = path; + if (ModelManagerInterface::instance()->filesAtQrcPath(info.path()).isEmpty()) + info._type = QrcDirectoryImport; + else + info._type = QrcFileImport; + } else { info._type = UnknownFileImport; - + } info._version = version; info._as = as; info._ast = ast; @@ -2192,7 +2199,7 @@ const Value *TypeScope::lookupMember(const QString &name, const Context *context const ImportInfo &info = i.info; // JS import has no types - if (info.type() == ImportInfo::FileImport) + if (info.type() == ImportInfo::FileImport || info.type() == ImportInfo::QrcFileImport) continue; if (!info.as().isEmpty()) { @@ -2222,7 +2229,7 @@ void TypeScope::processMembers(MemberProcessor *processor) const const ImportInfo &info = i.info; // JS import has no types - if (info.type() == ImportInfo::FileImport) + if (info.type() == ImportInfo::FileImport || info.type() == ImportInfo::QrcFileImport) continue; if (!info.as().isEmpty()) @@ -2249,7 +2256,7 @@ const Value *JSImportScope::lookupMember(const QString &name, const Context *, const ImportInfo &info = i.info; // JS imports are always: import "somefile.js" as Foo - if (info.type() != ImportInfo::FileImport) + if (info.type() != ImportInfo::FileImport && info.type() != ImportInfo::QrcFileImport) continue; if (info.as() == name) { @@ -2272,7 +2279,7 @@ void JSImportScope::processMembers(MemberProcessor *processor) const const ObjectValue *import = i.object; const ImportInfo &info = i.info; - if (info.type() == ImportInfo::FileImport) + if (info.type() == ImportInfo::FileImport || info.type() == ImportInfo::QrcFileImport) processor->processProperty(info.as(), import); } } @@ -2329,7 +2336,7 @@ ImportInfo Imports::info(const QString &name, const Context *context) const continue; } - if (info.type() == ImportInfo::FileImport) { + if (info.type() == ImportInfo::FileImport || info.type() == ImportInfo::QrcFileImport) { if (import->className() == firstId) return info; } else { @@ -2349,7 +2356,7 @@ QString Imports::nameForImportedObject(const ObjectValue *value, const Context * const ObjectValue *import = i.object; const ImportInfo &info = i.info; - if (info.type() == ImportInfo::FileImport) { + if (info.type() == ImportInfo::FileImport || info.type() == ImportInfo::QrcFileImport) { if (import == value) return import->className(); } else { diff --git a/src/libs/qmljs/qmljsinterpreter.h b/src/libs/qmljs/qmljsinterpreter.h index 56f914713f1..356f52bb387 100644 --- a/src/libs/qmljs/qmljsinterpreter.h +++ b/src/libs/qmljs/qmljsinterpreter.h @@ -872,6 +872,8 @@ public: LibraryImport, FileImport, DirectoryImport, + QrcFileImport, + QrcDirectoryImport, UnknownFileImport // refers a file/directory that wasn't found }; diff --git a/src/libs/qmljs/qmljslink.cpp b/src/libs/qmljs/qmljslink.cpp index e90dd9a9ae2..2d5672fa20e 100644 --- a/src/libs/qmljs/qmljslink.cpp +++ b/src/libs/qmljs/qmljslink.cpp @@ -34,6 +34,7 @@ #include "qmljsbind.h" #include "qmljsutils.h" #include "qmljsmodelmanagerinterface.h" +#include #include #include @@ -245,6 +246,8 @@ void LinkPrivate::populateImportedTypes(Imports *imports, Document::Ptr doc) switch (info.type()) { case ImportInfo::FileImport: case ImportInfo::DirectoryImport: + case ImportInfo::QrcFileImport: + case ImportInfo::QrcDirectoryImport: import = importFileOrDirectory(doc, info); break; case ImportInfo::LibraryImport: @@ -285,7 +288,7 @@ Import LinkPrivate::importFileOrDirectory(Document::Ptr doc, const ImportInfo &i import.object = 0; import.valid = true; - const QString &path = importInfo.path(); + QString path = importInfo.path(); if (importInfo.type() == ImportInfo::DirectoryImport || importInfo.type() == ImportInfo::ImplicitDirectoryImport) { @@ -304,8 +307,36 @@ Import LinkPrivate::importFileOrDirectory(Document::Ptr doc, const ImportInfo &i Document::Ptr importedDoc = snapshot.document(path); if (importedDoc) import.object = importedDoc->bind()->rootObjectValue(); - } + } else if (importInfo.type() == ImportInfo::QrcFileImport) { + QLocale locale; + QStringList filePaths = ModelManagerInterface::instance() + ->filesAtQrcPath(path, &locale, 0, ModelManagerInterface::ActiveQrcResources); + if (filePaths.isEmpty()) { + filePaths = ModelManagerInterface::instance()->filesAtQrcPath(path); + } + if (!filePaths.isEmpty()) { + Document::Ptr importedDoc = snapshot.document(filePaths.at(0)); + if (importedDoc) + import.object = importedDoc->bind()->rootObjectValue(); + } + } else if (importInfo.type() == ImportInfo::QrcDirectoryImport){ + import.object = new ObjectValue(valueOwner); + importLibrary(doc, path, &import); + + QMapIterator iter(ModelManagerInterface::instance() + ->filesInQrcPath(path)); + while (iter.hasNext()) { + iter.next(); + if (Document::isQmlLikeLanguage(Document::guessLanguageFromSuffix(iter.key()))) { + Document::Ptr importedDoc = snapshot.document(iter.value().at(0)); + if (importedDoc && importedDoc->bind()->rootObjectValue()) { + const QString targetName = QFileInfo(iter.key()).baseName(); + import.object->setMember(targetName, importedDoc->bind()->rootObjectValue()); + } + } + } + } return import; } diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.h b/src/libs/qmljs/qmljsmodelmanagerinterface.h index b708c3ca413..cdcaef362dc 100644 --- a/src/libs/qmljs/qmljsmodelmanagerinterface.h +++ b/src/libs/qmljs/qmljsmodelmanagerinterface.h @@ -53,6 +53,11 @@ class QMLJS_EXPORT ModelManagerInterface: public QObject Q_OBJECT public: + enum QrcResourceSelector { + ActiveQrcResources, + AllQrcResources + }; + class ProjectInfo { public: @@ -80,6 +85,8 @@ public: QPointer project; QStringList sourceFiles; QStringList importPaths; + QStringList activeResourceFiles; + QStringList allResourceFiles; // whether trying to run qmldump makes sense bool tryQmlDump; @@ -142,6 +149,14 @@ public: bool emitDocumentOnDiskChanged) = 0; virtual void fileChangedOnDisk(const QString &path) = 0; virtual void removeFiles(const QStringList &files) = 0; + virtual QStringList filesAtQrcPath(const QString &path, const QLocale *locale = 0, + ProjectExplorer::Project *project = 0, + QrcResourceSelector resources = AllQrcResources) = 0; + virtual QMap filesInQrcPath(const QString &path, + const QLocale *locale = 0, + ProjectExplorer::Project *project = 0, + bool addDirs = false, + QrcResourceSelector resources = AllQrcResources) = 0; virtual QList projectInfos() const = 0; virtual ProjectInfo projectInfo(ProjectExplorer::Project *project) const = 0; diff --git a/src/libs/qmljs/qmljsqrcparser.cpp b/src/libs/qmljs/qmljsqrcparser.cpp new file mode 100644 index 00000000000..cdecbcd735e --- /dev/null +++ b/src/libs/qmljs/qmljsqrcparser.cpp @@ -0,0 +1,517 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#include "qmljsqrcparser.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace QmlJS { + +namespace Internal { +/*! + * \class QrcParser + * \brief Parses one or more qrc files, and keeps their content cached + * + * A Qrc resource contains files read from the filesystem but organized in a possibly different way. + * + * To easily describe that with a simple structure we use a map from qrc paths to the paths in the + * filesystem. + * By using a map we can easily find all qrc paths that start with a given prefix, and thus loop + * on a qrc directory. + * + * Qrc files also support languages, those are mapped to a prefix of the qrc path. + * For example the french /image/bla.png (lang=fr) will have the path "fr/image/bla.png". + * The empty language represent the default resource. + * Languages are looked up using the locale uiLanguages() property + * + * For a single qrc a given path maps to a single file, but when one has multiple + * (platform specific exclusive) qrc files, then multiple files match, so QStringList are used. + * + * Especially the collect* methods are thought as low level interface. + */ +class QrcParserPrivate +{ + Q_DECLARE_TR_FUNCTIONS(QmlJS::QrcParser) +public: + typedef QMap SMap; + QrcParserPrivate(QrcParser *q); + bool parseFile(const QString &path); + QString firstFileAtPath(const QString &path, const QLocale &locale) const; + void collectFilesAtPath(const QString &path, QStringList *res, const QLocale *locale = 0) const; + bool hasDirAtPath(const QString &path, const QLocale *locale = 0) const; + void collectFilesInPath(const QString &path, QMap *res, bool addDirs = false, + const QLocale *locale = 0) const; + QStringList errorMessages() const; + QStringList languages() const; +private: + static QString fixPrefix(const QString &prefix); + QStringList allUiLanguages(const QLocale *locale) const; + + SMap m_resources; + QStringList m_languages; + QStringList m_errorMessages; +}; + +class QrcCachePrivate +{ + Q_DECLARE_TR_FUNCTIONS(QmlJS::QrcCachePrivate) +public: + QrcCachePrivate(QrcCache *q); + QrcParser::Ptr addPath(const QString &path); + void removePath(const QString &path); + QrcParser::Ptr updatePath(const QString &path); + QrcParser::Ptr parsedPath(const QString &path); + void clear(); +private: + QHash > m_cache; + QMutex m_mutex; +}; +} // namespace Internal + +/*! \brief normalizes the path to a file in a qrc resource by dropping the "qrc:/" or ":" and + * any extra slashes at the beginning + */ +QString QrcParser::normalizedQrcFilePath(const QString &path) { + QString normPath = path; + int endPrefix = 0; + if (path.startsWith(QLatin1String("qrc:/"))) { + endPrefix = 4; + } else if (path.startsWith(QLatin1String(":/"))) { + endPrefix = 1; + } + if (endPrefix < path.size() && path.at(endPrefix) == QLatin1Char('/')) + while (endPrefix + 1 < path.size() && path.at(endPrefix+1) == QLatin1Char('/')) + ++endPrefix; + normPath = path.right(path.size()-endPrefix); + if (!normPath.startsWith(QLatin1String("/"))) + normPath.insert(0, QLatin1Char('/')); + return normPath; +} + +/*! \brief normalizes the path to a directory in a qrc resource by dropping the "qrc:/" or ":" and + * any extra slashes at the beginning, and ensuring it ends with a slash + */ +QString QrcParser::normalizedQrcDirectoryPath(const QString &path) { + QString normPath = normalizedQrcFilePath(path); + if (!normPath.endsWith(QLatin1Char('/'))) + normPath.append(QLatin1Char('/')); + return normPath; +} + +QrcParser::QrcParser() +{ + d = new Internal::QrcParserPrivate(this); +} + +QrcParser::~QrcParser() +{ + delete d; +} + +bool QrcParser::parseFile(const QString &path) +{ + return d->parseFile(path); +} + +/*! \brief returns fs path of the first (active) file at the given qrc path + */ +QString QrcParser::firstFileAtPath(const QString &path, const QLocale &locale) const +{ + return d->firstFileAtPath(path, locale); +} + +/*! \brief adds al the fs paths for the given qrc path to *res + * If locale is null all possible files are added, otherwise just the first match + * using that locale. + */ +void QrcParser::collectFilesAtPath(const QString &path, QStringList *res, const QLocale *locale) const +{ + d->collectFilesAtPath(path, res, locale); +} + +/*! \brief returns true if the given path is a non empty directory + */ +bool QrcParser::hasDirAtPath(const QString &path, const QLocale *locale) const +{ + return d->hasDirAtPath(path, locale); +} + +/*! \brief adds the directory contents of the given qrc path to res + * + * adds the qrcFileName => fs paths associations contained in the given qrc path + * to res. If addDirs is true directories are also added. + * If locale is null all possible files are added, otherwise just the first match + * using that locale. + */ +void QrcParser::collectFilesInPath(const QString &path, QMap *res, bool addDirs, + const QLocale *locale) const +{ + d->collectFilesInPath(path, res, addDirs, locale); +} + +/*! \brief returns the errors found while parsing + */ +QStringList QrcParser::errorMessages() const +{ + return d->errorMessages(); +} + +/*! \brief returns all languages used in this qrc resource + */ +QStringList QrcParser::languages() const +{ + return d->languages(); +} + +/*! \brief if the contents are valid + */ +bool QrcParser::isValid() const +{ + return errorMessages().isEmpty(); +} + +QrcParser::Ptr QrcParser::parseQrcFile(const QString &path) +{ + Ptr res(new QrcParser); + if (!path.isEmpty()) + res->parseFile(path); + return res; +} + +// ---------------- + +QrcCache::QrcCache() +{ + d = new Internal::QrcCachePrivate(this); +} + +QrcCache::~QrcCache() +{ + delete d; +} + +QrcParser::ConstPtr QrcCache::addPath(const QString &path) +{ + return d->addPath(path); +} + +void QrcCache::removePath(const QString &path) +{ + d->removePath(path); +} + +QrcParser::ConstPtr QrcCache::updatePath(const QString &path) +{ + return d->updatePath(path); +} + +QrcParser::ConstPtr QrcCache::parsedPath(const QString &path) +{ + return d->parsedPath(path); +} + +void QrcCache::clear() +{ + d->clear(); +} + +// -------------------- + +namespace Internal { + +QrcParserPrivate::QrcParserPrivate(QrcParser *) +{ } + +bool QrcParserPrivate::parseFile(const QString &path) +{ + QFile file(path); + if (!file.open(QIODevice::ReadOnly)) { + m_errorMessages.append(file.errorString()); + return false; + } + + QDomDocument doc; + + QString error_msg; + int error_line, error_col; + if (!doc.setContent(&file, &error_msg, &error_line, &error_col)) { + m_errorMessages.append(tr("XML error on line %1, col %2: %3") + .arg(error_line).arg(error_col).arg(error_msg)); + return false; + } + + QDomElement root = doc.firstChildElement(QLatin1String("RCC")); + if (root.isNull()) { + m_errorMessages.append(tr("The root element is missing.")); + return false; + } + + QDomElement relt = root.firstChildElement(QLatin1String("qresource")); + for (; !relt.isNull(); relt = relt.nextSiblingElement(QLatin1String("qresource"))) { + + QString prefix = fixPrefix(relt.attribute(QLatin1String("prefix"))); + const QString language = relt.attribute(QLatin1String("lang")); + if (!m_languages.contains(language)) + m_languages.append(language); + + QDomElement felt = relt.firstChildElement(QLatin1String("file")); + for (; !felt.isNull(); felt = felt.nextSiblingElement(QLatin1String("file"))) { + const QString fileName = felt.text(); + QTC_CHECK(!QDir::isAbsolutePath(fileName)); + const QString alias = felt.attribute(QLatin1String("alias")); + QString filePath = QFileInfo(path).path() + QLatin1Char('/') + fileName; + QString accessPath; + if (!alias.isEmpty()) + accessPath = language + prefix + alias; + else + accessPath = language + prefix + fileName; + if (m_resources.contains(accessPath)) { + QStringList &val = m_resources[accessPath]; + if (!val.contains(filePath)) + val.append(filePath); + } else { + m_resources.insert(accessPath, QStringList(filePath)); + } + } + } + return true; +} + +// path is assumed to be a normalized absolute path +QString QrcParserPrivate::firstFileAtPath(const QString &path, const QLocale &locale) const +{ + QTC_CHECK(path.startsWith(QLatin1Char('/'))); + QStringList langs = allUiLanguages(&locale); + foreach (const QString &language, langs) { + if (m_languages.contains(language)) { + SMap::const_iterator res = m_resources.find(language + path); + if (res != m_resources.end()) + return res.value().at(0); + } + } + return QString(); +} + +void QrcParserPrivate::collectFilesAtPath(const QString &path, QStringList *files, + const QLocale *locale) const +{ + QTC_CHECK(path.startsWith(QLatin1Char('/'))); + QStringList langs = allUiLanguages(locale); + foreach (const QString &language, langs) { + if (m_languages.contains(language)) { + SMap::const_iterator res = m_resources.find(language + path); + if (res != m_resources.end()) + (*files) << res.value(); + } + } +} + +// path is expected to be normalized and start and end with a slash +bool QrcParserPrivate::hasDirAtPath(const QString &path, const QLocale *locale) const +{ + QTC_CHECK(path.startsWith(QLatin1Char('/'))); + QTC_CHECK(path.endsWith(QLatin1Char('/'))); + QStringList langs = allUiLanguages(locale); + foreach (const QString &language, langs) { + if (m_languages.contains(language)) { + QString key = language + path; + SMap::const_iterator res = m_resources.lowerBound(key); + if (res != m_resources.end() && res.key().startsWith(key)) + return true; + } + } + return false; +} + +void QrcParserPrivate::collectFilesInPath(const QString &path, QMap *contents, + bool addDirs, const QLocale *locale) const +{ + QTC_CHECK(path.startsWith(QLatin1Char('/'))); + QTC_CHECK(path.endsWith(QLatin1Char('/'))); + SMap::const_iterator end = m_resources.end(); + QStringList langs = allUiLanguages(locale); + foreach (const QString &language, langs) { + QString key = language + path; + SMap::const_iterator res = m_resources.lowerBound(key); + while (res != end && res.key().startsWith(key)) { + const QString &actualKey = res.key(); + int endDir = actualKey.indexOf(QLatin1Char('/'), key.size()); + if (endDir == -1) { + QString fileName = res.key().right(res.key().size()-key.size()); + QStringList &els = (*contents)[fileName]; + foreach (const QString &val, res.value()) + if (!els.contains(val)){ + els << val; + } + ++res; + } else { + QString dirName = res.key().mid(key.size(), endDir - key.size() + 1); + if (addDirs) + contents->insert(dirName, QStringList()); + QString key2 = key + dirName; + do { + ++res; + } while (res != end && res.key().startsWith(key2)); + } + } + } +} + +QStringList QrcParserPrivate::errorMessages() const +{ + return m_errorMessages; +} + +QStringList QrcParserPrivate::languages() const +{ + return m_languages; +} + +QString QrcParserPrivate::fixPrefix(const QString &prefix) +{ + const QChar slash = QLatin1Char('/'); + QString result = QString(slash); + for (int i = 0; i < prefix.size(); ++i) { + const QChar c = prefix.at(i); + if (c == slash && result.at(result.size() - 1) == slash) + continue; + result.append(c); + } + + if (!result.endsWith(slash)) + result.append(slash); + + return result; +} + +QStringList QrcParserPrivate::allUiLanguages(const QLocale *locale) const +{ + if (!locale) + return languages(); + QStringList langs = locale->uiLanguages(); + foreach (const QString &language, langs) { // qt4 support + if (language.contains(QLatin1Char('_')) || language.contains(QLatin1Char('-'))) { + QStringList splits = QString(language).replace(QLatin1Char('_'), QLatin1Char('-')) + .split(QLatin1Char('-')); + if (splits.size() > 1 && !langs.contains(splits.at(0))) + langs.append(splits.at(0)); + } + } + if (!langs.contains(QString())) + langs.append(QString()); + return langs; +} + +// ---------------- + +QrcCachePrivate::QrcCachePrivate(QrcCache *) +{ } + +QrcParser::Ptr QrcCachePrivate::addPath(const QString &path) +{ + QPair currentValue; + { + QMutexLocker l(&m_mutex); + currentValue = m_cache.value(path, qMakePair(QrcParser::Ptr(0), 0)); + currentValue.second += 1; + if (currentValue.second > 1) { + m_cache.insert(path, currentValue); + return currentValue.first; + } + } + QrcParser::Ptr newParser = QrcParser::parseQrcFile(path); + if (!newParser->isValid()) + qDebug() << "adding invalid qrc " << path << " to the cache:" << newParser->errorMessages(); + { + QMutexLocker l(&m_mutex); + QPair currentValue = m_cache.value(path, qMakePair(QrcParser::Ptr(0), 0)); + if (currentValue.first.isNull()) + currentValue.first = newParser; + currentValue.second += 1; + m_cache.insert(path, currentValue); + return currentValue.first; + } +} + +void QrcCachePrivate::removePath(const QString &path) +{ + QPair currentValue; + { + QMutexLocker l(&m_mutex); + currentValue = m_cache.value(path, qMakePair(QrcParser::Ptr(0), 0)); + if (currentValue.second == 1) { + m_cache.remove(path); + } else if (currentValue.second > 1) { + currentValue.second -= 1; + m_cache.insert(path, currentValue); + } else { + QTC_CHECK(!m_cache.contains(path)); + } + } +} + +QrcParser::Ptr QrcCachePrivate::updatePath(const QString &path) +{ + QrcParser::Ptr newParser = QrcParser::parseQrcFile(path); + { + QMutexLocker l(&m_mutex); + QPair currentValue = m_cache.value(path, qMakePair(QrcParser::Ptr(0), 0)); + QTC_CHECK(currentValue.second > 0); + currentValue.first = newParser; + m_cache.insert(path, currentValue); + return currentValue.first; + } +} + +QrcParser::Ptr QrcCachePrivate::parsedPath(const QString &path) +{ + QMutexLocker l(&m_mutex); + QPair currentValue = m_cache.value(path, qMakePair(QrcParser::Ptr(0), 0)); + return currentValue.first; +} + +void QrcCachePrivate::clear() +{ + QMutexLocker l(&m_mutex); + m_cache.clear(); +} + +} // namespace Internal +} // namespace QmlJS diff --git a/src/libs/qmljs/qmljsqrcparser.h b/src/libs/qmljs/qmljsqrcparser.h new file mode 100644 index 00000000000..e25baa2c73b --- /dev/null +++ b/src/libs/qmljs/qmljsqrcparser.h @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#ifndef QMLJSQRCPARSER_H +#define QMLJSQRCPARSER_H +#include "qmljs_global.h" + +#include +#include +#include +#include + +QT_FORWARD_DECLARE_CLASS(QLocale) + +namespace QmlJS { + +namespace Internal { +class QrcParserPrivate; +class QrcCachePrivate; +} + +class QMLJS_EXPORT QrcParser +{ +public: + typedef QSharedPointer Ptr; + typedef QSharedPointer ConstPtr; + ~QrcParser(); + bool parseFile(const QString &path); + QString firstFileAtPath(const QString &path, const QLocale &locale) const; + void collectFilesAtPath(const QString &path, QStringList *res, const QLocale *locale = 0) const; + bool hasDirAtPath(const QString &path, const QLocale *locale = 0) const; + void collectFilesInPath(const QString &path, QMap *res, bool addDirs = false, + const QLocale *locale = 0) const; + QStringList errorMessages() const; + QStringList languages() const; + bool isValid() const; + + static Ptr parseQrcFile(const QString &path); + static QString normalizedQrcFilePath(const QString &path); + static QString normalizedQrcDirectoryPath(const QString &path); +private: + QrcParser(); + QrcParser(const QrcParser &); + Internal::QrcParserPrivate *d; +}; + +class QMLJS_EXPORT QrcCache +{ +public: + QrcCache(); + ~QrcCache(); + QrcParser::ConstPtr addPath(const QString &path); + void removePath(const QString &path); + QrcParser::ConstPtr updatePath(const QString &path); + QrcParser::ConstPtr parsedPath(const QString &path); + void clear(); +private: + Internal::QrcCachePrivate *d; +}; +} +#endif // QMLJSQRCPARSER_H diff --git a/src/libs/qmljs/qmljsscopechain.cpp b/src/libs/qmljs/qmljsscopechain.cpp index 4c6ff96c93e..a0a9bf0f912 100644 --- a/src/libs/qmljs/qmljsscopechain.cpp +++ b/src/libs/qmljs/qmljsscopechain.cpp @@ -30,6 +30,7 @@ #include "qmljsscopechain.h" #include "qmljsbind.h" #include "qmljsevaluate.h" +#include "qmljsmodelmanagerinterface.h" using namespace QmlJS; @@ -310,7 +311,10 @@ void ScopeChain::initializeRootScope() if (!m_document->bind()->isJsLibrary()) { foreach (Document::Ptr otherDoc, snapshot) { foreach (const ImportInfo &import, otherDoc->bind()->imports()) { - if (import.type() == ImportInfo::FileImport && m_document->fileName() == import.path()) { + if ((import.type() == ImportInfo::FileImport && m_document->fileName() == import.path()) + || (import.type() == ImportInfo::QrcFileImport + && ModelManagerInterface::instance()->filesAtQrcPath(import.path()) + .contains(m_document->fileName()))) { QmlComponentChain *component = new QmlComponentChain(otherDoc); componentScopes.insert(otherDoc.data(), component); chain->addInstantiatingComponent(component); diff --git a/src/libs/utils/fileutils.cpp b/src/libs/utils/fileutils.cpp index d5193bdad8d..06b8936e825 100644 --- a/src/libs/utils/fileutils.cpp +++ b/src/libs/utils/fileutils.cpp @@ -373,10 +373,12 @@ bool FileSaver::finalize() return FileSaverBase::finalize(); SaveFile *sf = static_cast(m_file); - if (m_hasError) - sf->rollback(); - else + if (m_hasError) { + if (sf->isOpen()) + sf->rollback(); + } else { setResult(sf->commit()); + } delete sf; m_file = 0; return !m_hasError; diff --git a/src/libs/utils/savedaction.cpp b/src/libs/utils/savedaction.cpp index 953c1613657..11a908280ff 100644 --- a/src/libs/utils/savedaction.cpp +++ b/src/libs/utils/savedaction.cpp @@ -191,8 +191,6 @@ QString SavedAction::toString() const } /*! - \fn QAction *SavedAction::updatedAction(const QString &text) - Adjust the \c text() of the underlying action. This can be used to update the item shortly before e.g. a menu is shown. diff --git a/src/libs/utils/textfileformat.cpp b/src/libs/utils/textfileformat.cpp index c4c33cd6521..62f22bb964e 100644 --- a/src/libs/utils/textfileformat.cpp +++ b/src/libs/utils/textfileformat.cpp @@ -289,13 +289,11 @@ bool TextFileFormat::writeFile(const QString &fileName, QString plainText, QStri } Utils::FileSaver saver(fileName, fileMode); - if (saver.hasError()) { - *errorString = saver.errorString(); - return false; + if (!saver.hasError()) { + if (hasUtf8Bom && codec->name() == "UTF-8") + saver.write("\xef\xbb\xbf", 3); + saver.write(codec->fromUnicode(plainText)); } - if (hasUtf8Bom && codec->name() == "UTF-8") - saver.write("\xef\xbb\xbf", 3); - saver.write(codec->fromUnicode(plainText)); const bool ok = saver.finalize(errorString); if (debug) qDebug().nospace() << Q_FUNC_INFO << fileName << ' ' << *this << ' ' << plainText.size() diff --git a/src/libs/zeroconf/servicebrowser.cpp b/src/libs/zeroconf/servicebrowser.cpp index 0dd8accf4f4..b1e8eebfb50 100644 --- a/src/libs/zeroconf/servicebrowser.cpp +++ b/src/libs/zeroconf/servicebrowser.cpp @@ -289,8 +289,6 @@ Service::~Service() } /*! - \fn QString Service::networkInterface() - Returns the interface on which the service is reachable. */ QNetworkInterface Service::networkInterface() const diff --git a/src/plugins/analyzerbase/analyzermanager.cpp b/src/plugins/analyzerbase/analyzermanager.cpp index 919b5b2a10c..5101e208547 100644 --- a/src/plugins/analyzerbase/analyzermanager.cpp +++ b/src/plugins/analyzerbase/analyzermanager.cpp @@ -102,7 +102,6 @@ public: setIcon(QIcon(QLatin1String(":/images/analyzer_mode.png"))); setPriority(P_MODE_ANALYZE); setId(MODE_ANALYZE); - setType(MODE_EDIT_TYPE); } ~AnalyzerMode() diff --git a/src/plugins/analyzerbase/ianalyzerengine.h b/src/plugins/analyzerbase/ianalyzerengine.h index 233564120a7..deea4638ce9 100644 --- a/src/plugins/analyzerbase/ianalyzerengine.h +++ b/src/plugins/analyzerbase/ianalyzerengine.h @@ -84,6 +84,7 @@ public: StartMode mode() const { return m_sp.startMode; } virtual void notifyRemoteSetupDone(quint16) {} + virtual void notifyRemoteFinished(bool) {} public slots: virtual void logApplicationMessage(const QString &, Utils::OutputFormat) {} diff --git a/src/plugins/android/androidconfigurations.cpp b/src/plugins/android/androidconfigurations.cpp index ea41e543f69..800b43403da 100644 --- a/src/plugins/android/androidconfigurations.cpp +++ b/src/plugins/android/androidconfigurations.cpp @@ -206,6 +206,9 @@ void AndroidConfig::save(QSettings &settings) const settings.setValue(PartitionSizeKey, partitionSize); settings.setValue(AutomaticKitCreationKey, automaticKitCreation); settings.setValue(ToolchainHostKey, toolchainHost); + settings.setValue(MakeExtraSearchDirectory, + makeExtraSearchDirectories.isEmpty() ? QString() + : makeExtraSearchDirectories.at(0)); } void AndroidConfigurations::setConfig(const AndroidConfig &devConfigs) diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp index b17e044b80b..a47e6fccb0d 100644 --- a/src/plugins/android/androidmanager.cpp +++ b/src/plugins/android/androidmanager.cpp @@ -572,19 +572,20 @@ void AndroidManager::updateTarget(ProjectExplorer::Target *target, const QString bool modified = false; bool comment = false; for (int i = 0; i < lines.size(); i++) { - if (lines[i].contains("@ANDROID-")) { - commentLines = targetSDKNumber < lines[i].mid(lines[i].lastIndexOf('-') + 1).toInt(); + QByteArray trimmed = lines[i].trimmed(); + if (trimmed.contains("@ANDROID-")) { + commentLines = targetSDKNumber < trimmed.mid(trimmed.lastIndexOf('-') + 1).toInt(); comment = !comment; continue; } if (!comment) continue; if (commentLines) { - if (!lines[i].trimmed().startsWith("//QtCreator")) { + if (!trimmed.startsWith("//QtCreator")) { lines[i] = "//QtCreator " + lines[i]; modified = true; } - } else { if (lines[i].trimmed().startsWith("//QtCreator")) { + } else { if (trimmed.startsWith("//QtCreator")) { lines[i] = lines[i].mid(12); modified = true; } diff --git a/src/plugins/bazaar/bazaarplugin.cpp b/src/plugins/bazaar/bazaarplugin.cpp index ebf104bc975..3614e74529b 100644 --- a/src/plugins/bazaar/bazaarplugin.cpp +++ b/src/plugins/bazaar/bazaarplugin.cpp @@ -540,9 +540,7 @@ void BazaarPlugin::showCommitWidget(const QListappendError(tr("Unable to create an editor for the commit.")); return; diff --git a/src/plugins/bookmarks/bookmarkmanager.cpp b/src/plugins/bookmarks/bookmarkmanager.cpp index aee3b30f6cf..c4a7d4ca648 100644 --- a/src/plugins/bookmarks/bookmarkmanager.cpp +++ b/src/plugins/bookmarks/bookmarkmanager.cpp @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include @@ -237,9 +237,11 @@ void BookmarkView::contextMenuEvent(QContextMenuEvent *event) QMenu menu; QAction *moveUp = menu.addAction(tr("Move Up")); QAction *moveDown = menu.addAction(tr("Move Down")); - QAction *remove = menu.addAction(tr("&Remove")); - QAction *removeAll = menu.addAction(tr("Remove All")); QAction *editNote = menu.addAction(tr("Edit Note")); + menu.addSeparator(); + QAction *remove = menu.addAction(tr("&Remove")); + menu.addSeparator(); + QAction *removeAll = menu.addAction(tr("Remove All")); m_contextMenuIndex = indexAt(event->pos()); if (!m_contextMenuIndex.isValid()) { @@ -508,8 +510,8 @@ Bookmark *BookmarkManager::bookmarkForIndex(const QModelIndex &index) bool BookmarkManager::gotoBookmark(Bookmark *bookmark) { using namespace TextEditor; - if (ITextEditor *editor = qobject_cast(BaseTextEditorWidget::openEditorAt(bookmark->filePath(), - bookmark->lineNumber()))) { + if (ITextEditor *editor = qobject_cast(EditorManager::openEditorAt(bookmark->filePath(), + bookmark->lineNumber()))) { return (editor->currentLine() == bookmark->lineNumber()); } return false; diff --git a/src/plugins/classview/classviewmanager.cpp b/src/plugins/classview/classviewmanager.cpp index 7cd708f8989..a09eb9bf021 100644 --- a/src/plugins/classview/classviewmanager.cpp +++ b/src/plugins/classview/classviewmanager.cpp @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -441,10 +440,7 @@ void Manager::onDocumentUpdated(CPlusPlus::Document::Ptr doc) void Manager::gotoLocation(const QString &fileName, int line, int column) { - bool newEditor = false; - TextEditor::BaseTextEditorWidget::openEditorAt(fileName, line, column, Core::Id(), - Core::EditorManager::IgnoreNavigationHistory, - &newEditor); + Core::EditorManager::openEditorAt(fileName, line, column); } /*! diff --git a/src/plugins/clearcase/clearcaseplugin.cpp b/src/plugins/clearcase/clearcaseplugin.cpp index d7614bf67ec..ee881e3e4b4 100644 --- a/src/plugins/clearcase/clearcaseplugin.cpp +++ b/src/plugins/clearcase/clearcaseplugin.cpp @@ -687,9 +687,7 @@ QString ClearCasePlugin::ccGetFileActivity(const QString &workingDir, const QStr ClearCaseSubmitEditor *ClearCasePlugin::openClearCaseSubmitEditor(const QString &fileName, bool isUcm) { Core::IEditor *editor = - Core::EditorManager::openEditor(fileName, - Constants::CLEARCASECHECKINEDITOR_ID, - Core::EditorManager::ModeSwitch); + Core::EditorManager::openEditor(fileName, Constants::CLEARCASECHECKINEDITOR_ID); ClearCaseSubmitEditor *submitEditor = qobject_cast(editor); QTC_CHECK(submitEditor); submitEditor->registerActions(m_submitUndoAction, m_submitRedoAction, m_checkInSelectedAction, m_checkInDiffAction); @@ -932,7 +930,7 @@ void ClearCasePlugin::ccDiffWithPred(const QString &workingDir, const QStringLis // Show in the same editor if diff has been executed before if (Core::IEditor *existingEditor = VcsBase::VcsBaseEditorWidget::locateEditorByTag(tag)) { existingEditor->createNew(result); - Core::EditorManager::activateEditor(existingEditor, Core::EditorManager::ModeSwitch); + Core::EditorManager::activateEditor(existingEditor); setDiffBaseDirectory(existingEditor, workingDir); return; } @@ -1192,7 +1190,7 @@ void ClearCasePlugin::history(const QString &workingDir, const QString tag = VcsBase::VcsBaseEditorWidget::editorTag(VcsBase::LogOutput, workingDir, files); if (Core::IEditor *editor = VcsBase::VcsBaseEditorWidget::locateEditorByTag(tag)) { editor->createNew(response.stdOut); - Core::EditorManager::activateEditor(editor, Core::EditorManager::ModeSwitch); + Core::EditorManager::activateEditor(editor); } else { const QString title = QString::fromLatin1("cc history %1").arg(id); const QString source = VcsBase::VcsBaseEditorWidget::getSource(workingDir, files); @@ -1305,7 +1303,7 @@ void ClearCasePlugin::vcsAnnotate(const QString &workingDir, const QString &file if (Core::IEditor *editor = VcsBase::VcsBaseEditorWidget::locateEditorByTag(tag)) { editor->createNew(res); VcsBase::VcsBaseEditorWidget::gotoLineOfEditor(editor, lineNumber); - Core::EditorManager::activateEditor(editor, Core::EditorManager::ModeSwitch); + Core::EditorManager::activateEditor(editor); } else { const QString title = QString::fromLatin1("cc annotate %1").arg(id); Core::IEditor *newEditor = showOutputInEditor(title, res, VcsBase::AnnotateOutput, source, codec); @@ -1341,7 +1339,7 @@ void ClearCasePlugin::describe(const QString &source, const QString &changeNr) const QString tag = VcsBase::VcsBaseEditorWidget::editorTag(VcsBase::DiffOutput, source, QStringList(), changeNr); if (Core::IEditor *editor = VcsBase::VcsBaseEditorWidget::locateEditorByTag(tag)) { editor->createNew(description); - Core::EditorManager::activateEditor(editor, Core::EditorManager::ModeSwitch); + Core::EditorManager::activateEditor(editor); } else { const QString title = QString::fromLatin1("cc describe %1").arg(id); Core::IEditor *newEditor = showOutputInEditor(title, description, VcsBase::DiffOutput, source, codec); @@ -1413,7 +1411,7 @@ Core::IEditor *ClearCasePlugin::showOutputInEditor(const QString& title, const Q if (codec) e->setCodec(codec); Core::IEditor *ie = e->editor(); - Core::EditorManager::activateEditor(ie, Core::EditorManager::ModeSwitch); + Core::EditorManager::activateEditor(ie); return ie; } diff --git a/src/plugins/coreplugin/basefilewizard.cpp b/src/plugins/coreplugin/basefilewizard.cpp index cb8f8bc4c91..9b4750fd1ee 100644 --- a/src/plugins/coreplugin/basefilewizard.cpp +++ b/src/plugins/coreplugin/basefilewizard.cpp @@ -649,7 +649,7 @@ bool BaseFileWizard::postGenerateOpenEditors(const GeneratedFiles &l, QString *e { foreach (const Core::GeneratedFile &file, l) { if (file.attributes() & Core::GeneratedFile::OpenEditorAttribute) { - if (!Core::EditorManager::openEditor(file.path(), file.editorId(), Core::EditorManager::ModeSwitch )) { + if (!Core::EditorManager::openEditor(file.path(), file.editorId())) { if (errorMessage) *errorMessage = tr("Failed to open an editor for '%1'.").arg(QDir::toNativeSeparators(file.path())); return false; diff --git a/src/plugins/coreplugin/coreconstants.h b/src/plugins/coreplugin/coreconstants.h index 1bdc864a074..db0b96591fa 100644 --- a/src/plugins/coreplugin/coreconstants.h +++ b/src/plugins/coreplugin/coreconstants.h @@ -109,7 +109,7 @@ const char SPLIT_SIDE_BY_SIDE[] = "QtCreator.SplitSideBySide"; const char SPLIT_NEW_WINDOW[] = "QtCreator.SplitNewWindow"; const char REMOVE_CURRENT_SPLIT[] = "QtCreator.RemoveCurrentSplit"; const char REMOVE_ALL_SPLITS[] = "QtCreator.RemoveAllSplits"; -const char GOTO_OTHER_SPLIT[] = "QtCreator.GotoOtherSplit"; +const char GOTO_NEXT_SPLIT[] = "QtCreator.GotoOtherSplit"; const char CLOSE[] = "QtCreator.Close"; const char CLOSE_ALTERNATIVE[] = "QtCreator.Close_Alternative"; // temporary, see QTCREATORBUG-72 const char CLOSEALL[] = "QtCreator.CloseAll"; diff --git a/src/plugins/coreplugin/designmode.cpp b/src/plugins/coreplugin/designmode.cpp index 47f17349546..a591d995fc6 100644 --- a/src/plugins/coreplugin/designmode.cpp +++ b/src/plugins/coreplugin/designmode.cpp @@ -120,7 +120,6 @@ DesignMode::DesignMode() setIcon(QIcon(QLatin1String(":/fancyactionbar/images/mode_Design.png"))); setPriority(Constants::P_MODE_DESIGN); setId(Constants::MODE_DESIGN); - setType(Constants::MODE_DESIGN_TYPE); ExtensionSystem::PluginManager::addObject(d->m_coreListener); diff --git a/src/plugins/coreplugin/documentmanager.cpp b/src/plugins/coreplugin/documentmanager.cpp index 4d13e4cf49e..8cc017240fc 100644 --- a/src/plugins/coreplugin/documentmanager.cpp +++ b/src/plugins/coreplugin/documentmanager.cpp @@ -1352,7 +1352,7 @@ void DocumentManager::executeOpenWithMenuAction(QAction *action) return; } - EditorManager::openEditor(entry.fileName, entry.editorFactory->id(), EditorManager::ModeSwitch); + EditorManager::openEditor(entry.fileName, entry.editorFactory->id()); return; } if (entry.externalEditor) diff --git a/src/plugins/coreplugin/editmode.cpp b/src/plugins/coreplugin/editmode.cpp index 77ddd25ae72..1a6072e978d 100644 --- a/src/plugins/coreplugin/editmode.cpp +++ b/src/plugins/coreplugin/editmode.cpp @@ -55,7 +55,6 @@ EditMode::EditMode() : setIcon(QIcon(QLatin1String(":/fancyactionbar/images/mode_Edit.png"))); setPriority(Constants::P_MODE_EDIT); setId(Constants::MODE_EDIT); - setType(Constants::MODE_EDIT_TYPE); m_rightSplitWidgetLayout->setSpacing(0); m_rightSplitWidgetLayout->setMargin(0); diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 88762f1f298..47f64a2d60d 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -196,7 +196,7 @@ struct EditorManagerPrivate QAction *m_splitNewWindowAction; QAction *m_removeCurrentSplitAction; QAction *m_removeAllSplitsAction; - QAction *m_gotoOtherSplitAction; + QAction *m_gotoNextSplitAction; QAction *m_saveCurrentEditorContextAction; QAction *m_saveAsCurrentEditorContextAction; @@ -381,7 +381,7 @@ EditorManager::EditorManager(QWidget *parent) : mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT); connect(d->m_splitSideBySideAction, SIGNAL(triggered()), this, SLOT(splitSideBySide())); - d->m_splitNewWindowAction = new QAction(tr("Split New Window"), this); + d->m_splitNewWindowAction = new QAction(tr("Open in New Window"), this); cmd = ActionManager::registerAction(d->m_splitNewWindowAction, Constants::SPLIT_NEW_WINDOW, editManagerContext); cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+E,4") : tr("Ctrl+E,4"))); mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT); @@ -399,11 +399,11 @@ EditorManager::EditorManager(QWidget *parent) : mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT); connect(d->m_removeAllSplitsAction, SIGNAL(triggered()), this, SLOT(removeAllSplits())); - d->m_gotoOtherSplitAction = new QAction(tr("Go to Next Split"), this); - cmd = ActionManager::registerAction(d->m_gotoOtherSplitAction, Constants::GOTO_OTHER_SPLIT, editManagerContext); + d->m_gotoNextSplitAction = new QAction(tr("Go to Next Split or Window"), this); + cmd = ActionManager::registerAction(d->m_gotoNextSplitAction, Constants::GOTO_NEXT_SPLIT, editManagerContext); cmd->setDefaultKeySequence(QKeySequence(UseMacShortcuts ? tr("Meta+E,o") : tr("Ctrl+E,o"))); mwindow->addAction(cmd, Constants::G_WINDOW_SPLIT); - connect(d->m_gotoOtherSplitAction, SIGNAL(triggered()), this, SLOT(gotoOtherSplit())); + connect(d->m_gotoNextSplitAction, SIGNAL(triggered()), this, SLOT(gotoNextSplit())); ActionContainer *medit = ActionManager::actionContainer(Constants::M_EDIT); ActionContainer *advancedMenu = ActionManager::createMenu(Constants::M_EDIT_ADVANCED); @@ -604,13 +604,20 @@ EditorView *EditorManager::viewForEditor(IEditor *editor) return 0; } -SplitterOrView *EditorManager::findRoot(EditorView *view) +SplitterOrView *EditorManager::findRoot(const EditorView *view, int *rootIndex) { SplitterOrView *current = view->parentSplitterOrView(); - while (current && !m_instance->d->m_root.contains(current)) { + while (current) { + int index = m_instance->d->m_root.indexOf(current); + if (index >= 0) { + if (rootIndex) + *rootIndex = index; + return current; + } current = current->findParentSplitter(); } - return current; + QTC_CHECK(false); // we should never have views without a root + return 0; } QList EditorManager::editorsForFileName(const QString &filename) const @@ -691,15 +698,15 @@ void EditorManager::splitNewWindow(Internal::EditorView *view) context->setContext(Context(Constants::C_EDITORMANAGER)); context->setWidget(splitter); ICore::addContextObject(context); + m_instance->d->m_root.append(splitter); + m_instance->d->m_rootContext.append(context); + connect(splitter, SIGNAL(destroyed(QObject*)), m_instance, SLOT(rootDestroyed(QObject*))); splitter->show(); ICore::raiseWindow(splitter); if (newEditor) m_instance->activateEditor(splitter->view(), newEditor, IgnoreNavigationHistory); else splitter->view()->setFocus(); - m_instance->d->m_root.append(splitter); - m_instance->d->m_rootContext.append(context); - connect(splitter, SIGNAL(destroyed(QObject*)), m_instance, SLOT(rootDestroyed(QObject*))); m_instance->updateActions(); } @@ -1042,15 +1049,15 @@ bool EditorManager::closeEditors(const QList &editorsToClose, bool ask if (!newCurrent) newCurrent = pickUnusedEditor(); if (newCurrent) { - activateEditor(view, newCurrent, NoActivate); + activateEditor(view, newCurrent, DoNotChangeCurrentEditor); } else { QModelIndex idx = d->m_editorModel->firstRestoredEditor(); if (idx.isValid()) { - activateEditorForIndex(view, idx, NoActivate); + activateEditorForIndex(view, idx, DoNotChangeCurrentEditor); } else { const QList editors = d->m_editorModel->editors(); if (!editors.isEmpty()) - activateEditor(view, editors.last(), NoActivate); + activateEditor(view, editors.last(), DoNotChangeCurrentEditor); } } } @@ -1105,11 +1112,11 @@ void EditorManager::closeDuplicate(Core::IEditor *editor) if (!newCurrent) newCurrent = pickUnusedEditor(); if (newCurrent) { - activateEditor(view, newCurrent, NoActivate); + activateEditor(view, newCurrent, DoNotChangeCurrentEditor); } else { QModelIndex idx = d->m_editorModel->firstRestoredEditor(); if (idx.isValid()) - activateEditorForIndex(view, idx, NoActivate); + activateEditorForIndex(view, idx, DoNotChangeCurrentEditor); } } @@ -1151,6 +1158,18 @@ void EditorManager::activateEditorForIndex(Internal::EditorView *view, const QMo d->m_editorModel->removeEditor(index); } +void EditorManager::activateView(EditorView *view) +{ + QTC_ASSERT(view, return); + if (IEditor *editor = view->currentEditor()) { + setCurrentEditor(editor, true); + editor->widget()->setFocus(); + ICore::raiseWindow(editor->widget()); + } else { + setCurrentView(view); + } +} + Core::IEditor *EditorManager::placeEditor(Core::Internal::EditorView *view, Core::IEditor *editor) { Q_ASSERT(view && editor); @@ -1202,13 +1221,22 @@ Core::IEditor *EditorManager::activateEditor(Core::Internal::EditorView *view, C editor = placeEditor(view, editor); - if (!(flags & NoActivate)) { + if (!(flags & DoNotChangeCurrentEditor)) { setCurrentEditor(editor, (flags & IgnoreNavigationHistory)); - if (flags & ModeSwitch) - switchToPreferedMode(); - if (isVisible()) { - editor->widget()->setFocus(); - ICore::raiseWindow(editor->widget()); + if (!(flags & DoNotMakeVisible)) { + // switch to design mode? + if (editor->isDesignModePreferred()) { + ModeManager::activateMode(Core::Constants::MODE_DESIGN); + ModeManager::setFocusToCurrentMode(); + } else { + int rootIndex; + findRoot(view, &rootIndex); + if (rootIndex == 0) // main window --> we might need to switch mode + if (!editor->widget()->isVisible()) + ModeManager::activateMode(Core::Constants::MODE_EDIT); + editor->widget()->setFocus(); + ICore::raiseWindow(editor->widget()); + } } } return editor; @@ -1394,18 +1422,23 @@ Core::Id EditorManager::getOpenWithEditorId(const QString &fileName, IEditor *EditorManager::openEditor(const QString &fileName, const Id &editorId, OpenEditorFlags flags, bool *newEditor) { + if (flags & EditorManager::OpenInOtherSplit) + m_instance->gotoOtherSplit(); return m_instance->openEditor(m_instance->currentEditorView(), fileName, editorId, flags, newEditor); } -IEditor *EditorManager::openEditorInNextSplit(const QString &fileName, const Id &editorId, OpenEditorFlags flags, bool *newEditor) +IEditor *EditorManager::openEditorAt(const QString &fileName, int line, int column, + const Id &editorId, OpenEditorFlags flags, bool *newEditor) { - if (!m_instance->hasSplitter()) - m_instance->splitSideBySide(); - - m_instance->gotoOtherSplit(); - return m_instance->openEditor(m_instance->currentEditorView(), - fileName, editorId, flags, newEditor); + m_instance->cutForwardNavigationHistory(); + m_instance->addCurrentPositionToNavigationHistory(); + OpenEditorFlags tempFlags = flags | IgnoreNavigationHistory; + Core::IEditor *editor = Core::EditorManager::openEditor(fileName, editorId, + tempFlags, newEditor); + if (editor && line != -1) + editor->gotoLine(line, column); + return editor; } static int extractLineNumber(QString *fileName) @@ -1548,22 +1581,6 @@ QStringList EditorManager::getOpenFileNames() const } -/// Empty mode == figure out the correct mode from the editor -/// forcePrefered = true, switch to the mode even if the editor is visible in another mode -/// forcePrefered = false, only switch if it is not visible -void EditorManager::switchToPreferedMode() -{ - Id preferedMode; - // Figure out preferred mode for editor - if (d->m_currentEditor) - preferedMode = d->m_currentEditor->preferredModeType(); - - if (!preferedMode.isValid()) - preferedMode = Id(Constants::MODE_EDIT_TYPE); - - ModeManager::activateModeType(preferedMode); -} - IEditor *EditorManager::openEditorWithContents(const Id &editorId, QString *titlePattern, const QString &contents) @@ -1973,7 +1990,7 @@ void EditorManager::updateActions() bool hasSplitter = parentSplitter && parentSplitter->isSplitter(); d->m_removeCurrentSplitAction->setEnabled(hasSplitter); d->m_removeAllSplitsAction->setEnabled(hasSplitter); - d->m_gotoOtherSplitAction->setEnabled(hasSplitter); + d->m_gotoNextSplitAction->setEnabled(hasSplitter || d->m_root.size() > 1); } void EditorManager::setCloseSplitEnabled(SplitterOrView *splitterOrView, bool enable) @@ -2010,7 +2027,8 @@ QList EditorManager::visibleEditors() const if (view->currentEditor()) editors.append(view->currentEditor()); view = view->findNextView(); - } while (view && view != firstView); + QTC_ASSERT(view != firstView, break); // we start with firstView and shouldn't have cycles + } while (view); } } else { if (root->editor()) @@ -2166,7 +2184,7 @@ bool EditorManager::restoreState(const QByteArray &state) continue; QFileInfo rfi(autoSaveName(fileName)); if (rfi.exists() && fi.lastModified() < rfi.lastModified()) - openEditor(fileName, id); + openEditor(fileName, id, DoNotMakeVisible); else d->m_editorModel->addRestoredEditor(fileName, displayName, id); } @@ -2375,26 +2393,77 @@ void EditorManager::removeAllSplits() root->unsplitAll(); } +/*! + * Moves focus to the next split, cycling through windows. + */ +void EditorManager::gotoNextSplit() +{ + EditorView *view = currentEditorView(); + if (!view) + return; + EditorView *nextView = view->findNextView(); + if (!nextView) { + // we are in the "last" view in this root + int rootIndex = -1; + SplitterOrView *root = findRoot(view, &rootIndex); + QTC_ASSERT(root, return); + QTC_ASSERT(rootIndex >= 0 && rootIndex < d->m_root.size(), return); + // find next root. this might be the same root if there's only one. + int nextRootIndex = rootIndex + 1; + if (nextRootIndex >= d->m_root.size()) + nextRootIndex = 0; + nextView = d->m_root.at(nextRootIndex)->findFirstView(); + QTC_CHECK(nextView); + } + + if (nextView) + activateView(nextView); +} + +/*! + * Moves focus to "other" split, possibly creating a split if necessary. + * If there's no split and no other window, a side-by-side split is created. + * If the current window is split, focus is moved to the next split within this window, cycling. + * If the current window is not split, focus is moved to the next window. + */ void EditorManager::gotoOtherSplit() { EditorView *view = currentEditorView(); if (!view) return; - SplitterOrView *root = findRoot(view); - QTC_ASSERT(root, return); - if (!root->isSplitter()) - splitSideBySide(); - - view = view->findNextView(); - if (view) { - if (IEditor *editor = view->currentEditor()) { - setCurrentEditor(editor, true); - editor->widget()->setFocus(); - ICore::raiseWindow(editor->widget()); + EditorView *nextView = view->findNextView(); + if (!nextView) { + // we are in the "last" view in this root + int rootIndex = -1; + SplitterOrView *root = findRoot(view, &rootIndex); + QTC_ASSERT(root, return); + QTC_ASSERT(rootIndex >= 0 && rootIndex < d->m_root.size(), return); + // stay in same window if it is split + if (root->isSplitter()) { + nextView = root->findFirstView(); + QTC_CHECK(nextView != view); } else { - setCurrentView(view); + // find next root. this might be the same root if there's only one. + int nextRootIndex = rootIndex + 1; + if (nextRootIndex >= d->m_root.size()) + nextRootIndex = 0; + nextView = d->m_root.at(nextRootIndex)->findFirstView(); + QTC_CHECK(nextView); + // if we had only one root with only one view, we end up at the startpoint + // in that case we need to split + if (nextView == view) { + QTC_CHECK(!root->isSplitter()); + splitSideBySide(); // that deletes 'view' + view = root->findFirstView(); + nextView = view->findNextView(); + QTC_CHECK(nextView != view); + QTC_CHECK(nextView); + } } } + + if (nextView) + activateView(nextView); } qint64 EditorManager::maxTextFileSize() diff --git a/src/plugins/coreplugin/editormanager/editormanager.h b/src/plugins/coreplugin/editormanager/editormanager.h index 1dabf2f3685..38cb29cf888 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.h +++ b/src/plugins/coreplugin/editormanager/editormanager.h @@ -107,18 +107,20 @@ public: static EditorToolBar *createToolBar(QWidget *parent = 0); enum OpenEditorFlag { - NoActivate = 1, + DoNotChangeCurrentEditor = 1, IgnoreNavigationHistory = 2, - ModeSwitch = 4, - CanContainLineNumber = 8 + DoNotMakeVisible = 4, + CanContainLineNumber = 8, + OpenInOtherSplit = 16 }; Q_DECLARE_FLAGS(OpenEditorFlags, OpenEditorFlag) static QString splitLineNumber(QString *fileName); static IEditor *openEditor(const QString &fileName, const Id &editorId = Id(), OpenEditorFlags flags = 0, bool *newEditor = 0); - static IEditor *openEditorInNextSplit(const QString &fileName, const Id &editorId = Id(), - OpenEditorFlags flags = 0, bool *newEditor = 0); + static IEditor *openEditorAt(const QString &fileName, int line, int column = 0, + const Id &editorId = Id(), OpenEditorFlags flags = 0, + bool *newEditor = 0); static IEditor *openEditorWithContents(const Id &editorId, QString *titlePattern = 0, const QString &contents = QString()); @@ -234,6 +236,8 @@ private slots: void rootDestroyed(QObject *root); void setCurrentEditorFromContextChange(); + void gotoNextSplit(); + public slots: void goBackInNavigationHistory(); void goForwardInNavigationHistory(); @@ -257,6 +261,7 @@ private: IEditor *duplicateEditor(IEditor *editor); IEditor *activateEditor(Internal::EditorView *view, IEditor *editor, OpenEditorFlags flags = 0); void activateEditorForIndex(Internal::EditorView *view, const QModelIndex &index, OpenEditorFlags = 0); + void activateView(Internal::EditorView *view); IEditor *openEditor(Internal::EditorView *view, const QString &fileName, const Id &id = Id(), OpenEditorFlags flags = 0, bool *newEditor = 0); @@ -264,7 +269,7 @@ private: void setCurrentView(Internal::EditorView *view); Internal::EditorView *currentEditorView() const; static Internal::EditorView *viewForEditor(IEditor *editor); - static Internal::SplitterOrView *findRoot(Internal::EditorView *view); + static Internal::SplitterOrView *findRoot(const Internal::EditorView *view, int *rootIndex = 0); void closeEditor(IEditor *editor); void closeDuplicate(IEditor *editor); @@ -273,7 +278,6 @@ private: static void splitNewWindow(Internal::EditorView *view); IEditor *pickUnusedEditor() const; void addDocumentToRecentFiles(IDocument *document); - void switchToPreferedMode(); void updateAutoSave(); void setCloseSplitEnabled(Internal::SplitterOrView *splitterOrView, bool enable); void updateMakeWritableWarning(); diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp index 87e4ecee5aa..6bd6009b3d2 100644 --- a/src/plugins/coreplugin/editormanager/editorview.cpp +++ b/src/plugins/coreplugin/editormanager/editorview.cpp @@ -144,8 +144,8 @@ EditorView *EditorView::findNextView() current = parent; parent = current->findParentSplitter(); } - // current has no parent, so just take the very first view - return current->findFirstView(); + // current has no parent, so we are at the top and there is no "next" view + return 0; } void EditorView::closeView() @@ -299,7 +299,7 @@ IEditor *EditorView::currentEditor() const void EditorView::listSelectionActivated(int index) { QAbstractItemModel *model = EditorManager::instance()->openedEditorsModel(); - EditorManager::instance()->activateEditorForIndex(this, model->index(index, 0), Core::EditorManager::ModeSwitch); + EditorManager::instance()->activateEditorForIndex(this, model->index(index, 0)); } void EditorView::splitHorizontally() @@ -465,11 +465,11 @@ void EditorView::goBackInNavigationHistory() IEditor *editor = 0; if (location.document) { editor = em->activateEditorForDocument(this, location.document, - EditorManager::IgnoreNavigationHistory | EditorManager::ModeSwitch); + EditorManager::IgnoreNavigationHistory); } if (!editor) { editor = em->openEditor(this, location.fileName, location.id, - EditorManager::IgnoreNavigationHistory | EditorManager::ModeSwitch); + EditorManager::IgnoreNavigationHistory); if (!editor) { m_navigationHistory.removeAt(m_currentNavigationHistoryPosition); continue; @@ -492,7 +492,7 @@ void EditorView::goForwardInNavigationHistory() IEditor *editor = 0; if (location.document) { editor = em->activateEditorForDocument(this, location.document, - EditorManager::IgnoreNavigationHistory | EditorManager::ModeSwitch); + EditorManager::IgnoreNavigationHistory); } if (!editor) { editor = em->openEditor(this, location.fileName, location.id, EditorManager::IgnoreNavigationHistory); @@ -784,13 +784,13 @@ void SplitterOrView::restoreState(const QByteArray &state) if (!QFile::exists(fileName)) return; IEditor *e = em->openEditor(view(), fileName, Id::fromString(id), Core::EditorManager::IgnoreNavigationHistory - | Core::EditorManager::NoActivate); + | Core::EditorManager::DoNotChangeCurrentEditor); if (!e) { QModelIndex idx = em->openedEditorsModel()->firstRestoredEditor(); if (idx.isValid()) em->activateEditorForIndex(view(), idx, Core::EditorManager::IgnoreNavigationHistory - | Core::EditorManager::NoActivate); + | Core::EditorManager::DoNotChangeCurrentEditor); } if (e) { diff --git a/src/plugins/coreplugin/editormanager/ieditor.h b/src/plugins/coreplugin/editormanager/ieditor.h index d4203131362..f2c64f7a9bd 100644 --- a/src/plugins/coreplugin/editormanager/ieditor.h +++ b/src/plugins/coreplugin/editormanager/ieditor.h @@ -68,7 +68,7 @@ public: virtual QWidget *toolBar() = 0; - virtual Id preferredModeType() const { return Id(); } + virtual bool isDesignModePreferred() const { return false; } signals: void changed(); diff --git a/src/plugins/coreplugin/editormanager/ieditorfactory.cpp b/src/plugins/coreplugin/editormanager/ieditorfactory.cpp index f501289f926..fdceef33b92 100644 --- a/src/plugins/coreplugin/editormanager/ieditorfactory.cpp +++ b/src/plugins/coreplugin/editormanager/ieditorfactory.cpp @@ -29,11 +29,12 @@ #include "ieditorfactory.h" -#include "ieditor.h" -#include "editormanager.h" +#include -Core::IDocument *Core::IEditorFactory::open(const QString &fileName) +Core::IDocument *Core::IEditorFactory::open(const QString &) { - Core::IEditor *iface = Core::EditorManager::openEditor(fileName, id()); - return iface ? iface->document() : 0; + qWarning("This should never be called, use IEditorFactor::createEditor, " + "or EditorManager::openEditor instead!"); + QTC_CHECK(false); + return 0; } diff --git a/src/plugins/coreplugin/editormanager/ieditorfactory.h b/src/plugins/coreplugin/editormanager/ieditorfactory.h index 5d59ab0e310..029554af0d8 100644 --- a/src/plugins/coreplugin/editormanager/ieditorfactory.h +++ b/src/plugins/coreplugin/editormanager/ieditorfactory.h @@ -44,7 +44,7 @@ public: IEditorFactory(QObject *parent = 0) : IDocumentFactory(parent) {} virtual IEditor *createEditor(QWidget *parent) = 0; - virtual IDocument *open(const QString &fileName); + virtual IDocument *open(const QString &); }; } // namespace Core diff --git a/src/plugins/coreplugin/editormanager/openeditorsview.cpp b/src/plugins/coreplugin/editormanager/openeditorsview.cpp index 9a462468466..0b6dacba5bd 100644 --- a/src/plugins/coreplugin/editormanager/openeditorsview.cpp +++ b/src/plugins/coreplugin/editormanager/openeditorsview.cpp @@ -189,7 +189,7 @@ void OpenEditorsWidget::handleClicked(const QModelIndex &index) void OpenEditorsWidget::activateEditor(const QModelIndex &index) { selectionModel()->select(index, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows); - EditorManager::instance()->activateEditorForIndex(index, EditorManager::ModeSwitch); + EditorManager::instance()->activateEditorForIndex(index); } void OpenEditorsWidget::closeEditor(const QModelIndex &index) diff --git a/src/plugins/coreplugin/editormanager/openeditorswindow.cpp b/src/plugins/coreplugin/editormanager/openeditorswindow.cpp index e7caecf7111..1367c799a5a 100644 --- a/src/plugins/coreplugin/editormanager/openeditorswindow.cpp +++ b/src/plugins/coreplugin/editormanager/openeditorswindow.cpp @@ -225,11 +225,10 @@ void OpenEditorsWindow::selectEditor(QTreeWidgetItem *item) return; if (IDocument *document = item->data(0, Qt::UserRole).value()) { EditorView *view = item->data(0, Qt::UserRole+1).value(); - EditorManager::instance()->activateEditorForDocument(view, document, EditorManager::ModeSwitch); + EditorManager::instance()->activateEditorForDocument(view, document); } else { if (!EditorManager::openEditor( - item->toolTip(0), item->data(0, Qt::UserRole+2).value(), - Core::EditorManager::ModeSwitch)) { + item->toolTip(0), item->data(0, Qt::UserRole+2).value())) { EditorManager::instance()->openedEditorsModel()->removeEditor(item->toolTip(0)); delete item; } diff --git a/src/plugins/coreplugin/editortoolbar.cpp b/src/plugins/coreplugin/editortoolbar.cpp index ffc9b69d129..9fd7e2ca828 100644 --- a/src/plugins/coreplugin/editortoolbar.cpp +++ b/src/plugins/coreplugin/editortoolbar.cpp @@ -87,7 +87,7 @@ EditorToolBarPrivate::EditorToolBarPrivate(QWidget *parent, EditorToolBar *q) : m_splitButton(new QToolButton), m_horizontalSplitAction(new QAction(QIcon(QLatin1String(Constants::ICON_SPLIT_HORIZONTAL)), EditorManager::tr("Split"), parent)), m_verticalSplitAction(new QAction(QIcon(QLatin1String(Constants::ICON_SPLIT_VERTICAL)), EditorManager::tr("Split Side by Side"), parent)), - m_splitNewWindowAction(new QAction(EditorManager::tr("Split New Window"), parent)), + m_splitNewWindowAction(new QAction(EditorManager::tr("Open in New Window"), parent)), m_closeSplitButton(new QToolButton), m_activeToolBar(0), m_toolBarPlaceholder(new QWidget), @@ -311,7 +311,7 @@ void EditorToolBar::changeActiveEditor(int row) { EditorManager *em = ICore::editorManager(); QAbstractItemModel *model = d->m_editorList->model(); - em->activateEditorForIndex(model->index(row, 0), EditorManager::ModeSwitch); + em->activateEditorForIndex(model->index(row, 0)); } void EditorToolBar::listContextMenu(QPoint pos) diff --git a/src/plugins/coreplugin/imode.h b/src/plugins/coreplugin/imode.h index 232b0bf51f0..ea9de058a22 100644 --- a/src/plugins/coreplugin/imode.h +++ b/src/plugins/coreplugin/imode.h @@ -49,7 +49,6 @@ public: QIcon icon() const { return m_icon; } int priority() const { return m_priority; } Id id() const { return m_id; } - Id type() const { return m_type; } bool isEnabled() const; void setEnabled(bool enabled); @@ -57,7 +56,6 @@ public: void setIcon(const QIcon &icon) { m_icon = icon; } void setPriority(int priority) { m_priority = priority; } void setId(Id id) { m_id = id; } - void setType(Id type) { m_type = type; } signals: void enabledStateChanged(bool enabled); @@ -67,7 +65,6 @@ private: QIcon m_icon; int m_priority; Id m_id; - Id m_type; bool m_isEnabled; }; diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index 64f90435a62..6ae0d92318d 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -861,8 +861,6 @@ IDocument *MainWindow::openFiles(const QStringList &fileNames, ICore::OpenFilesF } } else { QFlags emFlags; - if (flags & ICore::SwitchMode) - emFlags = EditorManager::ModeSwitch; if (flags & ICore::CanContainLineNumbers) emFlags |= EditorManager::CanContainLineNumber; IEditor *editor = EditorManager::openEditor(absoluteFilePath, Id(), emFlags); @@ -1005,7 +1003,7 @@ void MainWindow::openFileWith() if (isExternal) EditorManager::openExternalEditor(fileName, editorId); else - EditorManager::openEditor(fileName, editorId, Core::EditorManager::ModeSwitch); + EditorManager::openEditor(fileName, editorId); } } @@ -1289,7 +1287,7 @@ void MainWindow::openRecentFile() { if (const QAction *action = qobject_cast(sender())) { const DocumentManager::RecentFile file = action->data().value(); - EditorManager::openEditor(file.first, file.second, EditorManager::ModeSwitch); + EditorManager::openEditor(file.first, file.second); } } diff --git a/src/plugins/coreplugin/modemanager.cpp b/src/plugins/coreplugin/modemanager.cpp index f1f019be140..b278f08c48f 100644 --- a/src/plugins/coreplugin/modemanager.cpp +++ b/src/plugins/coreplugin/modemanager.cpp @@ -73,6 +73,7 @@ struct ModeManagerPrivate Context m_addedContexts; int m_oldCurrent; bool m_saveSettingsOnModeChange; + bool m_modeSelectorVisible; }; static ModeManagerPrivate *d; @@ -100,6 +101,8 @@ ModeManager::ModeManager(Internal::MainWindow *mainWindow, d->m_actionBar = new Internal::FancyActionBar(modeStack); d->m_modeStack->addCornerWidget(d->m_actionBar); d->m_saveSettingsOnModeChange = false; + d->m_modeSelectorVisible = true; + d->m_modeStack->setSelectionWidgetVisible(d->m_modeSelectorVisible); connect(d->m_modeStack, SIGNAL(currentAboutToShow(int)), SLOT(currentTabAboutToChange(int))); connect(d->m_modeStack, SIGNAL(currentChanged(int)), SLOT(currentTabChanged(int))); @@ -147,21 +150,6 @@ IMode *ModeManager::mode(Id id) return 0; } -void ModeManager::activateModeType(Id type) -{ - if (currentMode() && currentMode()->type() == type) - return; - int index = -1; - for (int i = 0; i < d->m_modes.count(); ++i) { - if (d->m_modes.at(i)->type() == type) { - index = i; - break; - } - } - if (index != -1) - d->m_modeStack->setCurrentIndex(index); -} - void ModeManager::slotActivateMode(int id) { m_instance->activateMode(Id::fromUniqueIdentifier(id)); @@ -330,21 +318,22 @@ void ModeManager::setFocusToCurrentMode() QWidget *widget = mode->widget(); if (widget) { QWidget *focusWidget = widget->focusWidget(); - if (focusWidget) - focusWidget->setFocus(); - else - widget->setFocus(); + if (!focusWidget) + focusWidget = widget; + focusWidget->setFocus(); + ICore::raiseWindow(focusWidget); } } void ModeManager::setModeSelectorVisible(bool visible) { + d->m_modeSelectorVisible = visible; d->m_modeStack->setSelectionWidgetVisible(visible); } bool ModeManager::isModeSelectorVisible() { - return d->m_modeStack->isSelectionWidgetVisible(); + return d->m_modeSelectorVisible; } ModeManager *ModeManager::instance() diff --git a/src/plugins/coreplugin/modemanager.h b/src/plugins/coreplugin/modemanager.h index caf17cada03..f053f98d9f6 100644 --- a/src/plugins/coreplugin/modemanager.h +++ b/src/plugins/coreplugin/modemanager.h @@ -65,7 +65,6 @@ public: static void addProjectSelector(QAction *action); static void addWidget(QWidget *widget); - static void activateModeType(Id type); static void activateMode(Id id); static void setFocusToCurrentMode(); static bool isModeSelectorVisible(); diff --git a/src/plugins/coreplugin/progressmanager/futureprogress.cpp b/src/plugins/coreplugin/progressmanager/futureprogress.cpp index 917c3b3ec51..da6a6a1dcd3 100644 --- a/src/plugins/coreplugin/progressmanager/futureprogress.cpp +++ b/src/plugins/coreplugin/progressmanager/futureprogress.cpp @@ -145,7 +145,6 @@ FutureProgress::FutureProgress(QWidget *parent) : } /*! - \fn FutureProgress::~FutureProgress() \internal */ FutureProgress::~FutureProgress() @@ -155,7 +154,6 @@ FutureProgress::~FutureProgress() } /*! - \fn void FutureProgress::setWidget(QWidget *widget) Sets the \a widget to show below the progress bar. This will be destroyed when the progress indicator is destroyed. Default is to show no widget below the progress indicator. @@ -172,7 +170,6 @@ void FutureProgress::setWidget(QWidget *widget) } /*! - \fn void FutureProgress::setTitle(const QString &title) Changes the \a title of the progress indicator. */ void FutureProgress::setTitle(const QString &title) @@ -181,7 +178,6 @@ void FutureProgress::setTitle(const QString &title) } /*! - \fn QString FutureProgress::title() const Returns the title of the progress indicator. */ QString FutureProgress::title() const @@ -268,7 +264,6 @@ void FutureProgress::setProgressText(const QString &text) } /*! - \fn void FutureProgress::setFuture(const QFuture &future) \internal */ void FutureProgress::setFuture(const QFuture &future) @@ -277,7 +272,6 @@ void FutureProgress::setFuture(const QFuture &future) } /*! - \fn QFuture FutureProgress::future() const Returns a QFuture object that represents this running task. */ QFuture FutureProgress::future() const @@ -286,7 +280,6 @@ QFuture FutureProgress::future() const } /*! - \fn void FutureProgress::mousePressEvent(QMouseEvent *event) \internal */ void FutureProgress::mousePressEvent(QMouseEvent *event) @@ -304,7 +297,6 @@ void FutureProgress::paintEvent(QPaintEvent *) } /*! - \fn bool FutureProgress::hasError() const Returns the error state of this progress indicator. */ bool FutureProgress::hasError() const diff --git a/src/plugins/coreplugin/variablemanager.cpp b/src/plugins/coreplugin/variablemanager.cpp index 3af6ab709ff..06146712ae9 100644 --- a/src/plugins/coreplugin/variablemanager.cpp +++ b/src/plugins/coreplugin/variablemanager.cpp @@ -308,7 +308,7 @@ void VariableManager::registerFileVariables(const QByteArray &prefix, const QStr { registerVariable(prefix + kFilePathPostfix, tr("%1: Full path including file name.").arg(heading)); registerVariable(prefix + kPathPostfix, tr("%1: Full path excluding file name.").arg(heading)); - registerVariable(prefix + kFileNamePostfix, tr("%1: File name without including path.").arg(heading)); + registerVariable(prefix + kFileNamePostfix, tr("%1: File name without path.").arg(heading)); registerVariable(prefix + kFileBaseNamePostfix, tr("%1: File base name without path and suffix.").arg(heading)); } diff --git a/src/plugins/coreplugin/vcsmanager.cpp b/src/plugins/coreplugin/vcsmanager.cpp index 461c1526a50..ce8cef68e58 100644 --- a/src/plugins/coreplugin/vcsmanager.cpp +++ b/src/plugins/coreplugin/vcsmanager.cpp @@ -106,6 +106,11 @@ public: return result; } + void clearCache() + { + m_cachedMatches.clear(); + } + void resetCache(const QString &dir) { QTC_ASSERT(QDir(dir).isAbsolute(), return); @@ -226,8 +231,10 @@ IVersionControl* VcsManager::findVersionControlForDirectory(const QString &input foreach (IVersionControl * versionControl, versionControls) { QString topLevel; - if (versionControl->managesDirectory(directory, &topLevel)) + if (versionControl->isConfigured() + && versionControl->managesDirectory(directory, &topLevel)) { allThatCanManage.push_back(StringVersionControlPair(topLevel, versionControl)); + } } // To properly find a nested repository (say, git checkout inside SVN), @@ -379,4 +386,12 @@ void VcsManager::promptToAdd(const QString &directory, const QStringList &fileNa } } +void VcsManager::clearVersionControlCache() +{ + QStringList repoList = d->m_cachedMatches.keys(); + d->clearCache(); + foreach (const QString &repo, repoList) + emit repositoryChanged(repo); +} + } // namespace Core diff --git a/src/plugins/coreplugin/vcsmanager.h b/src/plugins/coreplugin/vcsmanager.h index 103ecb8f09d..e8f43623a58 100644 --- a/src/plugins/coreplugin/vcsmanager.h +++ b/src/plugins/coreplugin/vcsmanager.h @@ -95,6 +95,9 @@ public: signals: void repositoryChanged(const QString &repository); +public slots: + void clearVersionControlCache(); + private: VcsManagerPrivate *d; }; diff --git a/src/plugins/cpaster/cpasterplugin.cpp b/src/plugins/cpaster/cpasterplugin.cpp index 2d1409c5e9b..12102111d1b 100644 --- a/src/plugins/cpaster/cpasterplugin.cpp +++ b/src/plugins/cpaster/cpasterplugin.cpp @@ -380,7 +380,7 @@ void CodepasterPlugin::finishFetch(const QString &titleDescription, const QString fileName = saver.fileName(); m_fetchedSnippets.push_back(fileName); // Open editor with title. - Core::IEditor *editor = EditorManager::openEditor(fileName, Core::Id(), EditorManager::ModeSwitch); + Core::IEditor *editor = EditorManager::openEditor(fileName); QTC_ASSERT(editor, return); editor->setDisplayName(titleDescription); } diff --git a/src/plugins/cppeditor/cppeditor.cpp b/src/plugins/cppeditor/cppeditor.cpp index dd42d6cb7f2..ae80aa425ed 100644 --- a/src/plugins/cppeditor/cppeditor.cpp +++ b/src/plugins/cppeditor/cppeditor.cpp @@ -1992,22 +1992,14 @@ bool CPPEditorWidget::openCppEditorAt(const Link &link, bool inNextSplit) if (!link.hasValidTarget()) return false; - Core::EditorManager *editorManager = Core::EditorManager::instance(); - if (inNextSplit) { - if (!editorManager->hasSplitter()) - editorManager->splitSideBySide(); - editorManager->gotoOtherSplit(); - } else if (baseTextDocument()->fileName() == link.targetFileName) { - editorManager->addCurrentPositionToNavigationHistory(); - gotoLine(link.targetLine, link.targetColumn); - setFocus(); - return true; - } - - return TextEditor::BaseTextEditorWidget::openEditorAt(link.targetFileName, - link.targetLine, - link.targetColumn, - Constants::CPPEDITOR_ID); + Core::EditorManager::OpenEditorFlags flags; + if (inNextSplit) + flags |= Core::EditorManager::OpenInOtherSplit; + return Core::EditorManager::openEditorAt(link.targetFileName, + link.targetLine, + link.targetColumn, + Constants::CPPEDITOR_ID, + flags); } void CPPEditorWidget::semanticRehighlight(bool force) diff --git a/src/plugins/cppeditor/cppeditorplugin.h b/src/plugins/cppeditor/cppeditorplugin.h index 239e6dc8441..64c19e31301 100644 --- a/src/plugins/cppeditor/cppeditorplugin.h +++ b/src/plugins/cppeditor/cppeditorplugin.h @@ -178,7 +178,8 @@ private slots: void test_quickfix_MoveFuncDefOutside_MemberFuncOutsideWithNs(); void test_quickfix_MoveFuncDefOutside_FreeFuncToCpp(); void test_quickfix_MoveFuncDefOutside_FreeFuncToCppNS(); - void test_quickfix_MoveFuncDefOutside_CtorWithInitialization(); + void test_quickfix_MoveFuncDefOutside_CtorWithInitialization1(); + void test_quickfix_MoveFuncDefOutside_CtorWithInitialization2(); void test_quickfix_MoveFuncDefToDecl_MemberFunc(); void test_quickfix_MoveFuncDefToDecl_MemberFuncOutside(); diff --git a/src/plugins/cppeditor/cppquickfix_test.cpp b/src/plugins/cppeditor/cppquickfix_test.cpp index 17823ecadef..66aa48fd470 100644 --- a/src/plugins/cppeditor/cppquickfix_test.cpp +++ b/src/plugins/cppeditor/cppquickfix_test.cpp @@ -842,17 +842,17 @@ void CppEditorPlugin::test_quickfix_InsertDefFromDecl_headerSource_namespace2() // Source File original = - "#include \"file.h\"\n" - "using namespace N;\n" - "\n" - ; + "#include \"file.h\"\n" + "using namespace N;\n" + ; expected = original + - "\n" - "Foo::Foo()\n" - "{\n\n" - "}\n" - "\n" - ; + "\n" + "\n" + "Foo::Foo()\n" + "{\n\n" + "}\n" + "\n" + ; testFiles << TestDocument::create(original, expected, QLatin1String("file.cpp")); InsertDefFromDecl factory; @@ -1310,7 +1310,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncToCpp() // Header File original = "class Foo {\n" - " inline int numbe@r() const {\n" + " inline int numbe@r() const\n" + " {\n" " return 5;\n" " }\n" "\n" @@ -1332,7 +1333,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncToCpp() "#include \"file.h\"\n" "\n" "\n" - "int Foo::number() const {\n" + "int Foo::number() const\n" + "{\n" " return 5;\n" "}\n" "\n"; @@ -1348,7 +1350,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncOutside() { QByteArray original = "class Foo {\n" - " inline int numbe@r() const {\n" + " inline int numbe@r() const\n" + " {\n" " return 5;\n" " }\n" "};"; @@ -1357,7 +1360,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncOutside() " inline int number() const;\n" "};\n" "\n" - "int Foo::number() const {\n" + "int Foo::number() const\n" + "{\n" " return 5;\n" "}" "\n\n"; @@ -1378,7 +1382,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncToCppNS() original = "namespace MyNs {\n" "class Foo {\n" - " inline int numbe@r() const {\n" + " inline int numbe@r() const\n" + " {\n" " return 5;\n" " }\n" "};\n" @@ -1399,7 +1404,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncToCppNS() "#include \"file.h\"\n" "\n" "\n" - "int MyNs::Foo::number() const {\n" + "int MyNs::Foo::number() const\n" + "{\n" " return 5;\n" "}\n" "\n"; @@ -1421,7 +1427,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncToCppNSUsing() original = "namespace MyNs {\n" "class Foo {\n" - " inline int numbe@r() const {\n" + " inline int numbe@r() const\n" + " {\n" " return 5;\n" " }\n" "};\n" @@ -1444,7 +1451,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncToCppNSUsing() "using namespace MyNs;\n" "\n" "\n" - "int Foo::number() const {\n" + "int Foo::number() const\n" + "{\n" " return 5;\n" "}\n" "\n"; @@ -1461,7 +1469,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncOutsideWithNs() QByteArray original = "namespace MyNs {\n" "class Foo {\n" - " inline int numbe@r() const {\n" + " inline int numbe@r() const\n" + " {\n" " return 5;\n" " }\n" "};}"; @@ -1471,7 +1480,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_MemberFuncOutsideWithNs() " inline int number() const;\n" "};\n" "\n" - "int Foo::number() const {\n" + "int Foo::number() const\n" + "{\n" " return 5;\n" "}" "\n}\n"; @@ -1490,7 +1500,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_FreeFuncToCpp() // Header File original = - "int numbe@r() const {\n" + "int numbe@r() const\n" + "{\n" " return 5;\n" "}\n"; expected = @@ -1506,7 +1517,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_FreeFuncToCpp() "#include \"file.h\"\n" "\n" "\n" - "int number() const {\n" + "int number() const\n" + "{\n" " return 5;\n" "}\n" "\n"; @@ -1527,7 +1539,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_FreeFuncToCppNS() // Header File original = "namespace MyNamespace {\n" - "int numbe@r() const {\n" + "int numbe@r() const\n" + "{\n" " return 5;\n" "}\n" "}\n"; @@ -1546,7 +1559,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_FreeFuncToCppNS() "#include \"file.h\"\n" "\n" "\n" - "int MyNamespace::number() const {\n" + "int MyNamespace::number() const\n" + "{\n" " return 5;\n" "}\n" "\n"; @@ -1558,7 +1572,7 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_FreeFuncToCppNS() } /// Check: Move Ctor with member initialization list (QTCREATORBUG-9157). -void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_CtorWithInitialization() +void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_CtorWithInitialization1() { QList testFiles; QByteArray original; @@ -1597,6 +1611,51 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_CtorWithInitialization() data.run(&factory); } +/// Check: Move Ctor with member initialization list (QTCREATORBUG-9462). +void CppEditorPlugin::test_quickfix_MoveFuncDefOutside_CtorWithInitialization2() +{ + QList testFiles; + QByteArray original; + QByteArray expected; + + // Header File + original = + "class Foo\n" + "{\n" + "public:\n" + " Fo@o() : member(2)\n" + " {\n" + " }\n" + "\n" + " int member;\n" + "};"; + + expected = + "class Foo\n" + "{\n" + "public:\n" + " Foo();\n" + "\n" + " int member;\n" + "};\n"; + testFiles << TestDocument::create(original, expected, QLatin1String("file.h")); + + // Source File + original ="#include \"file.h\"\n"; + expected = + "#include \"file.h\"\n" + "\n" + "Foo::Foo() : member(2)\n" + "{\n" + "}\n" + "\n"; + testFiles << TestDocument::create(original, expected, QLatin1String("file.cpp")); + + MoveFuncDefOutside factory; + TestCase data(testFiles); + data.run(&factory); +} + /// Check: revert test_quickfix_MoveFuncDefOutside_MemberFuncToCpp() void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_MemberFunc() { @@ -1605,8 +1664,14 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_MemberFunc() QByteArray expected; // Header File - original = "class Foo {inline int number() const;};\n"; - expected = "class Foo {inline int number() const {return 5;}};\n\n"; + original = + "class Foo {\n" + " inline int number() const;\n" + "};\n"; + expected = + "class Foo {\n" + " inline int number() const {return 5;}\n" + "};\n\n"; testFiles << TestDocument::create(original, expected, QLatin1String("file.h")); // Source File @@ -1632,13 +1697,15 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_MemberFuncOutside() " inline int number() const;\n" "};\n" "\n" - "int Foo::num@ber() const {\n" + "int Foo::num@ber() const\n" + "{\n" " return 5;\n" "}\n"; QByteArray expected = "class Foo {\n" - " inline int number() const {\n" + " inline int number() const\n" + " {\n" " return 5;\n" " }\n" "};\n" @@ -1666,7 +1733,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_MemberFuncToCppNS() expected = "namespace MyNs {\n" "class Foo {\n" - " inline int number() const {\n" + " inline int number() const\n" + " {\n" " return 5;\n" " }\n" "};\n" @@ -1677,7 +1745,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_MemberFuncToCppNS() original = "#include \"file.h\"\n" "\n" - "int MyNs::Foo::num@ber() const {\n" + "int MyNs::Foo::num@ber() const\n" + "{\n" " return 5;\n" "}\n"; expected = "#include \"file.h\"\n\n\n\n"; @@ -1705,7 +1774,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_MemberFuncToCppNSUsing() expected = "namespace MyNs {\n" "class Foo {\n" - " inline int number() const {\n" + " inline int number() const\n" + " {\n" " return 5;\n" " }\n" "};\n" @@ -1717,7 +1787,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_MemberFuncToCppNSUsing() "#include \"file.h\"\n" "using namespace MyNs;\n" "\n" - "int Foo::num@ber() const {\n" + "int Foo::num@ber() const\n" + "{\n" " return 5;\n" "}\n"; expected = @@ -1740,14 +1811,16 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_MemberFuncOutsideWithNs() " inline int number() const;\n" "};\n" "\n" - "int Foo::numb@er() const {\n" + "int Foo::numb@er() const\n" + "{\n" " return 5;\n" "}" "\n}\n"; QByteArray expected = "namespace MyNs {\n" "class Foo {\n" - " inline int number() const {\n" + " inline int number() const\n" + " {\n" " return 5;\n" " }\n" "};\n\n\n}\n\n"; @@ -1767,7 +1840,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_FreeFuncToCpp() // Header File original = "int number() const;\n"; expected = - "int number() const {\n" + "int number() const\n" + "{\n" " return 5;\n" "}\n\n"; testFiles << TestDocument::create(original, expected, QLatin1String("file.h")); @@ -1777,7 +1851,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_FreeFuncToCpp() "#include \"file.h\"\n" "\n" "\n" - "int numb@er() const {\n" + "int numb@er() const\n" + "{\n" " return 5;\n" "}\n"; expected = "#include \"file.h\"\n\n\n\n\n"; @@ -1802,7 +1877,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_FreeFuncToCppNS() "}\n"; expected = "namespace MyNamespace {\n" - "int number() const {\n" + "int number() const\n" + "{\n" " return 5;\n" "}\n" "}\n\n"; @@ -1812,7 +1888,8 @@ void CppEditorPlugin::test_quickfix_MoveFuncDefToDecl_FreeFuncToCppNS() original = "#include \"file.h\"\n" "\n" - "int MyNamespace::nu@mber() const {\n" + "int MyNamespace::nu@mber() const\n" + "{\n" " return 5;\n" "}\n"; expected = diff --git a/src/plugins/cppeditor/cppquickfixes.cpp b/src/plugins/cppeditor/cppquickfixes.cpp index a75d9871707..095e596ad32 100644 --- a/src/plugins/cppeditor/cppquickfixes.cpp +++ b/src/plugins/cppeditor/cppquickfixes.cpp @@ -2334,8 +2334,8 @@ class InsertDeclOperation: public CppQuickFixOperation public: InsertDeclOperation(const QSharedPointer &interface, const QString &targetFileName, const Class *targetSymbol, - InsertionPointLocator::AccessSpec xsSpec, const QString &decl) - : CppQuickFixOperation(interface, 0) + InsertionPointLocator::AccessSpec xsSpec, const QString &decl, int priority) + : CppQuickFixOperation(interface, priority) , m_targetFileName(targetFileName) , m_targetSymbol(targetSymbol) , m_xsSpec(xsSpec) @@ -2397,10 +2397,11 @@ public: , m_decl(decl) {} TextEditor::QuickFixOperation::Ptr - operator()(InsertionPointLocator::AccessSpec xsSpec) + operator()(InsertionPointLocator::AccessSpec xsSpec, int priority) { return TextEditor::QuickFixOperation::Ptr( - new InsertDeclOperation(m_interface, m_fileName, m_matchingClass, xsSpec, m_decl)); + new InsertDeclOperation(m_interface, m_fileName, m_matchingClass, xsSpec, m_decl, + priority)); } private: @@ -2462,12 +2463,12 @@ void InsertDeclFromDef::match(const CppQuickFixInterface &interface, QuickFixOpe // Add several possible insertion locations for declaration DeclOperationFactory operation(interface, fileName, matchingClass, decl); - result.append(operation(InsertionPointLocator::Public)); - result.append(operation(InsertionPointLocator::PublicSlot)); - result.append(operation(InsertionPointLocator::Protected)); - result.append(operation(InsertionPointLocator::ProtectedSlot)); - result.append(operation(InsertionPointLocator::Private)); - result.append(operation(InsertionPointLocator::PrivateSlot)); + result.append(operation(InsertionPointLocator::Public, 5)); + result.append(operation(InsertionPointLocator::PublicSlot, 4)); + result.append(operation(InsertionPointLocator::Protected, 3)); + result.append(operation(InsertionPointLocator::ProtectedSlot, 2)); + result.append(operation(InsertionPointLocator::Private, 1)); + result.append(operation(InsertionPointLocator::PrivateSlot, 0)); } } @@ -3696,7 +3697,7 @@ class ApplyDeclDefLinkOperation : public CppQuickFixOperation public: explicit ApplyDeclDefLinkOperation(const CppQuickFixInterface &interface, const QSharedPointer &link) - : CppQuickFixOperation(interface, 10) + : CppQuickFixOperation(interface, 100) , m_link(link) {} @@ -3815,13 +3816,10 @@ public: // construct definition const QString funcDec = getDefinitionSignature(assistInterface(), m_func, toFile, scopeAtInsertPos); - QString textFuncBody; - if (m_funcDef->ctor_initializer) - textFuncBody = fromFile->textOf(m_funcDef->ctor_initializer) + QLatin1Char(' '); - textFuncBody += fromFile->textOf(m_funcDef->function_body); - QString funcDef = QString::fromLatin1("\n%1 %2\n") - .arg(funcDec) - .arg(textFuncBody); + QString funcDef = QLatin1String("\n") + funcDec; + const int startPosition = fromFile->endOf(m_funcDef->declarator); + const int endPosition = fromFile->endOf(m_funcDef->function_body); + funcDef += fromFile->textOf(startPosition, endPosition) + QLatin1String("\n"); if (m_cppFileName.isEmpty() || !m_insideHeader) funcDef = QLatin1String("\n") + funcDef; @@ -3839,7 +3837,7 @@ public: headerTarget.remove(fromFile->range(m_funcDef)); } else { QString textFuncDecl = fromFile->textOf(m_funcDef); - textFuncDecl.remove(-textFuncBody.length(), textFuncBody.length()); + textFuncDecl.truncate(startPosition - fromFile->startOf(m_funcDef)); textFuncDecl = textFuncDecl.trimmed() + QLatin1String(";"); headerTarget.replace(fromFile->range(m_funcDef), textFuncDecl); } @@ -3944,12 +3942,10 @@ public: CppRefactoringFilePtr fromFile = refactoring.file(m_fromFileName); CppRefactoringFilePtr toFile = refactoring.file(m_toFileName); ChangeSet::Range fromRange = fromFile->range(m_funcAST); - const QString definitionText = fromFile->textOf(m_funcAST->function_body); - QString wholeFunctionText = m_declarationText; - if (m_funcAST->ctor_initializer) - wholeFunctionText += QLatin1Char(' ') + fromFile->textOf(m_funcAST->ctor_initializer); - wholeFunctionText += QLatin1Char(' ') + definitionText; + const QString wholeFunctionText = m_declarationText + + fromFile->textOf(fromFile->endOf(m_funcAST->declarator), + fromFile->endOf(m_funcAST->function_body)); // Replace declaration with function and delete old definition Utils::ChangeSet toTarget; diff --git a/src/plugins/cppeditor/cpptypehierarchy.cpp b/src/plugins/cppeditor/cpptypehierarchy.cpp index 11d75cc4ae1..2883a6f8f20 100644 --- a/src/plugins/cppeditor/cpptypehierarchy.cpp +++ b/src/plugins/cppeditor/cpptypehierarchy.cpp @@ -105,10 +105,10 @@ private: if (!m_link.hasValidTarget()) return; - TextEditor::BaseTextEditorWidget::openEditorAt(m_link.targetFileName, - m_link.targetLine, - m_link.targetColumn, - Constants::CPPEDITOR_ID); + Core::EditorManager::openEditorAt(m_link.targetFileName, + m_link.targetLine, + m_link.targetColumn, + Constants::CPPEDITOR_ID); } CPPEditorWidget::Link m_link; @@ -205,10 +205,10 @@ void CppTypeHierarchyWidget::onItemClicked(const QModelIndex &index) const TextEditor::BaseTextEditorWidget::Link link = index.data(LinkRole).value(); if (link.hasValidTarget()) - TextEditor::BaseTextEditorWidget::openEditorAt(link.targetFileName, - link.targetLine, - link.targetColumn, - Constants::CPPEDITOR_ID); + Core::EditorManager::openEditorAt(link.targetFileName, + link.targetLine, + link.targetColumn, + Constants::CPPEDITOR_ID); } // CppTypeHierarchyStackedWidget diff --git a/src/plugins/cpptools/abstracteditorsupport.cpp b/src/plugins/cpptools/abstracteditorsupport.cpp index 6410473e34d..cdbd86f342b 100644 --- a/src/plugins/cpptools/abstracteditorsupport.cpp +++ b/src/plugins/cpptools/abstracteditorsupport.cpp @@ -55,29 +55,13 @@ QString AbstractEditorSupport::functionAt(const CppModelManagerInterface *modelM const QString &fileName, int line, int column) { - const CPlusPlus::Snapshot snapshot = modelManager->snapshot(); - const CPlusPlus::Document::Ptr document = snapshot.document(fileName); - if (!document) + if (!modelManager) return QString(); - if (const CPlusPlus::Symbol *symbol = document->lastVisibleSymbolAt(line, column)) - if (const CPlusPlus::Scope *scope = symbol->enclosingScope()) - if (const CPlusPlus::Scope *functionScope = scope->enclosingFunction()) - if (const CPlusPlus::Symbol *function = functionScope) { - const CPlusPlus::Overview o; - QString rc = o.prettyName(function->name()); - // Prepend namespace "Foo::Foo::foo()" up to empty root namespace - for (const CPlusPlus::Symbol *owner = function->enclosingNamespace(); - owner; owner = owner->enclosingNamespace()) { - const QString name = o.prettyName(owner->name()); - if (name.isEmpty()) { - break; - } else { - rc.prepend(QLatin1String("::")); - rc.prepend(name); - } - } - return rc; - } + + const CPlusPlus::Snapshot snapshot = modelManager->snapshot(); + if (const CPlusPlus::Document::Ptr document = snapshot.document(fileName)) + return document->functionAt(line, column); + return QString(); } diff --git a/src/plugins/cpptools/cppcodeformatter.cpp b/src/plugins/cpptools/cppcodeformatter.cpp index 1ad33ca0265..967bc9321c0 100644 --- a/src/plugins/cpptools/cppcodeformatter.cpp +++ b/src/plugins/cpptools/cppcodeformatter.cpp @@ -207,6 +207,8 @@ void CodeFormatter::recalculateStateAfter(const QTextBlock &block) // oops, the expression was a function declaration argument list, hand lbrace/colon to declaration_start leave(); continue; + } else { + turnInto(substatement_open); } break; default: tryExpression(); break; diff --git a/src/plugins/cpptools/cppcurrentdocumentfilter.cpp b/src/plugins/cpptools/cppcurrentdocumentfilter.cpp index eaf3aa358d8..e7aa07ac901 100644 --- a/src/plugins/cpptools/cppcurrentdocumentfilter.cpp +++ b/src/plugins/cpptools/cppcurrentdocumentfilter.cpp @@ -110,8 +110,7 @@ QList CppCurrentDocumentFilter::matchesFor(QFutureInterfac void CppCurrentDocumentFilter::accept(Locator::FilterEntry selection) const { ModelItemInfo info = qvariant_cast(selection.internalData); - TextEditor::BaseTextEditorWidget::openEditorAt(info.fileName, info.line, info.column, - Core::Id(), Core::EditorManager::ModeSwitch); + Core::EditorManager::openEditorAt(info.fileName, info.line, info.column); } void CppCurrentDocumentFilter::refresh(QFutureInterface &future) diff --git a/src/plugins/cpptools/cppfilesettingspage.cpp b/src/plugins/cpptools/cppfilesettingspage.cpp index c0ebe30a330..1c0c49904d9 100644 --- a/src/plugins/cpptools/cppfilesettingspage.cpp +++ b/src/plugins/cpptools/cppfilesettingspage.cpp @@ -305,8 +305,7 @@ void CppFileSettingsWidget::slotEdit() setLicenseTemplatePath(path); } // Edit (now) existing file with C++ - Core::EditorManager::openEditor(path, CppEditor::Constants::CPPEDITOR_ID, - Core::EditorManager::ModeSwitch); + Core::EditorManager::openEditor(path, CppEditor::Constants::CPPEDITOR_ID); } // --------------- CppFileSettingsPage diff --git a/src/plugins/cpptools/cppfindreferences.cpp b/src/plugins/cpptools/cppfindreferences.cpp index 4d8283c1453..bcf590c0d9f 100644 --- a/src/plugins/cpptools/cppfindreferences.cpp +++ b/src/plugins/cpptools/cppfindreferences.cpp @@ -32,11 +32,11 @@ #include "cpptoolsconstants.h" #include "cppmodelmanagerinterface.h" +#include #include #include #include #include -#include #include #include @@ -509,13 +509,10 @@ void CppFindReferences::setPaused(bool paused) void CppFindReferences::openEditor(const Find::SearchResultItem &item) { if (item.path.size() > 0) { - TextEditor::BaseTextEditorWidget::openEditorAt(QDir::fromNativeSeparators(item.path.first()), - item.lineNumber, item.textMarkPos, - Core::Id(), - Core::EditorManager::ModeSwitch); + Core::EditorManager::openEditorAt(QDir::fromNativeSeparators(item.path.first()), + item.lineNumber, item.textMarkPos); } else { - Core::EditorManager::openEditor(QDir::fromNativeSeparators(item.text), - Core::Id(), Core::EditorManager::ModeSwitch); + Core::EditorManager::openEditor(QDir::fromNativeSeparators(item.text)); } } diff --git a/src/plugins/cpptools/cpplocatorfilter.cpp b/src/plugins/cpptools/cpplocatorfilter.cpp index 6bb5c8ef518..0117a7d9812 100644 --- a/src/plugins/cpptools/cpplocatorfilter.cpp +++ b/src/plugins/cpptools/cpplocatorfilter.cpp @@ -177,8 +177,7 @@ QList CppLocatorFilter::matchesFor(QFutureInterface(selection.internalData); - TextEditor::BaseTextEditorWidget::openEditorAt(info.fileName, info.line, info.column, - Core::Id(), Core::EditorManager::ModeSwitch); + Core::EditorManager::openEditorAt(info.fileName, info.line, info.column); } void CppLocatorFilter::reset() diff --git a/src/plugins/cpptools/cppmodelmanager.cpp b/src/plugins/cpptools/cppmodelmanager.cpp index f168e6bfa85..7fa7fc3a38c 100644 --- a/src/plugins/cpptools/cppmodelmanager.cpp +++ b/src/plugins/cpptools/cppmodelmanager.cpp @@ -143,6 +143,7 @@ protected: static const char pp_configuration[] = "# 1 \"\"\n" + "#define Q_CREATOR_RUN 1\n" "#define __cplusplus 1\n" "#define __extension__\n" "#define __context__\n" diff --git a/src/plugins/cpptools/cpppreprocessor.cpp b/src/plugins/cpptools/cpppreprocessor.cpp index 5c5d1bd803f..d12b56b207a 100644 --- a/src/plugins/cpptools/cpppreprocessor.cpp +++ b/src/plugins/cpptools/cpppreprocessor.cpp @@ -5,6 +5,18 @@ #include +/*! + * \class CppTools::Internal::CppPreprocessor + * \brief The CppPreprocessor class updates set of indexed C++ files. + * + * Indexed file is truncated version of fully parsed document: copy of source + * code and full AST will be dropped when indexing is done. Working copy ensures + * that documents with most recent copy placed in memory will be parsed correctly. + * + * \sa CPlusPlus::Document + * \sa CppTools::CppModelManagerInterface::WorkingCopy + */ + using namespace CPlusPlus; using namespace CppTools; using namespace CppTools::Internal; diff --git a/src/plugins/cpptools/cpppreprocessor.h b/src/plugins/cpptools/cpppreprocessor.h index d931a880c4b..c54bbefb302 100644 --- a/src/plugins/cpptools/cpppreprocessor.h +++ b/src/plugins/cpptools/cpppreprocessor.h @@ -14,11 +14,14 @@ namespace Internal { class CppModelManager; +// Documentation inside. class CPPTOOLS_EXPORT CppPreprocessor: public CPlusPlus::Client { Q_DISABLE_COPY(CppPreprocessor) public: + static QString cleanPath(const QString &path); + CppPreprocessor(QPointer modelManager, bool dumpFileNameWhileParsing = false); virtual ~CppPreprocessor(); @@ -26,15 +29,11 @@ public: void setWorkingCopy(const CppTools::CppModelManagerInterface::WorkingCopy &workingCopy); void setIncludePaths(const QStringList &includePaths); void setFrameworkPaths(const QStringList &frameworkPaths); - void addFrameworkPath(const QString &frameworkPath); - void setProjectFiles(const QStringList &files); void setTodo(const QStringList &files); void run(const QString &fileName); void removeFromCache(const QString &fileName); - void resetEnvironment(); - static QString cleanPath(const QString &path); const QSet &todo() const { return m_todo; } @@ -69,6 +68,8 @@ protected: virtual void sourceNeeded(unsigned line, const QString &fileName, IncludeType type); private: + void addFrameworkPath(const QString &frameworkPath); + CPlusPlus::Snapshot m_snapshot; QPointer m_modelManager; bool m_dumpFileNameWhileParsing; diff --git a/src/plugins/cpptools/cpptoolsplugin.cpp b/src/plugins/cpptools/cpptoolsplugin.cpp index 7f70a37640c..93b2a804824 100644 --- a/src/plugins/cpptools/cpptoolsplugin.cpp +++ b/src/plugins/cpptools/cpptoolsplugin.cpp @@ -164,7 +164,7 @@ void CppToolsPlugin::switchHeaderSourceInNextSplit() QString otherFile = correspondingHeaderOrSource( Core::EditorManager::currentEditor()->document()->fileName()); if (!otherFile.isEmpty()) - Core::EditorManager::openEditorInNextSplit(otherFile); + Core::EditorManager::openEditor(otherFile, Core::Id(), Core::EditorManager::OpenInOtherSplit); } static QStringList findFilesInProject(const QString &name, diff --git a/src/plugins/cpptools/insertionpointlocator.cpp b/src/plugins/cpptools/insertionpointlocator.cpp index 08d9722086f..f7118a2cfec 100644 --- a/src/plugins/cpptools/insertionpointlocator.cpp +++ b/src/plugins/cpptools/insertionpointlocator.cpp @@ -363,7 +363,7 @@ public: : ASTVisitor(translationUnit) {} - void operator()(Declaration *decl, unsigned *line, unsigned *column) + void operator()(Symbol *decl, unsigned *line, unsigned *column) { // default to end of file _bestToken.maybeSet(-1, translationUnit()->ast()->lastToken()); @@ -470,7 +470,7 @@ static Declaration *isNonVirtualFunctionDeclaration(Symbol *s) return declaration; } -static InsertionLocation nextToSurroundingDefinitions(Declaration *declaration, const CppRefactoringChanges &changes) +static InsertionLocation nextToSurroundingDefinitions(Symbol *declaration, const CppRefactoringChanges &changes) { InsertionLocation noResult; Class *klass = declaration->enclosingClass(); @@ -545,15 +545,18 @@ static InsertionLocation nextToSurroundingDefinitions(Declaration *declaration, return InsertionLocation(QString::fromUtf8(definitionFunction->fileName()), prefix, suffix, line, column); } -QList InsertionPointLocator::methodDefinition(Declaration *declaration) const +QList InsertionPointLocator::methodDefinition(Symbol *declaration, + bool useSymbolFinder) const { QList result; if (!declaration) return result; - CppTools::SymbolFinder symbolFinder; - if (symbolFinder.findMatchingDefinition(declaration, m_refactoringChanges.snapshot(), true)) - return result; + if (useSymbolFinder) { + CppTools::SymbolFinder symbolFinder; + if (symbolFinder.findMatchingDefinition(declaration, m_refactoringChanges.snapshot(), true)) + return result; + } const InsertionLocation location = nextToSurroundingDefinitions(declaration, m_refactoringChanges); if (location.isValid()) { diff --git a/src/plugins/cpptools/insertionpointlocator.h b/src/plugins/cpptools/insertionpointlocator.h index da9799744b7..f5ea46d26d3 100644 --- a/src/plugins/cpptools/insertionpointlocator.h +++ b/src/plugins/cpptools/insertionpointlocator.h @@ -98,7 +98,8 @@ public: const CPlusPlus::Class *clazz, AccessSpec xsSpec) const; - QList methodDefinition(CPlusPlus::Declaration *declaration) const; + QList methodDefinition(CPlusPlus::Symbol *declaration, + bool useSymbolFinder = true) const; private: CppRefactoringChanges m_refactoringChanges; diff --git a/src/plugins/cpptools/symbolsfindfilter.cpp b/src/plugins/cpptools/symbolsfindfilter.cpp index 78c636674d0..290b5bd5fd1 100644 --- a/src/plugins/cpptools/symbolsfindfilter.cpp +++ b/src/plugins/cpptools/symbolsfindfilter.cpp @@ -187,9 +187,9 @@ void SymbolsFindFilter::openEditor(const Find::SearchResultItem &item) if (!item.userData.canConvert()) return; ModelItemInfo info = item.userData.value(); - TextEditor::BaseTextEditorWidget::openEditorAt(info.fileName, - info.line, - info.column); + Core::EditorManager::openEditorAt(info.fileName, + info.line, + info.column); } QWidget *SymbolsFindFilter::createConfigWidget() diff --git a/src/plugins/cvs/cvsplugin.cpp b/src/plugins/cvs/cvsplugin.cpp index b3cadb5e173..85ffd0a65c7 100644 --- a/src/plugins/cvs/cvsplugin.cpp +++ b/src/plugins/cvs/cvsplugin.cpp @@ -592,7 +592,7 @@ void CvsPlugin::cvsDiff(const CvsDiffParameters &p) const QString tag = VcsBaseEditorWidget::editorTag(DiffOutput, p.workingDir, p.files); if (IEditor *existingEditor = VcsBaseEditorWidget::locateEditorByTag(tag)) { existingEditor->createNew(output); - EditorManager::activateEditor(existingEditor, EditorManager::ModeSwitch); + EditorManager::activateEditor(existingEditor); setDiffBaseDirectory(existingEditor, p.workingDir); return; } @@ -615,8 +615,7 @@ void CvsPlugin::cvsDiff(const CvsDiffParameters &p) CvsSubmitEditor *CvsPlugin::openCVSSubmitEditor(const QString &fileName) { - IEditor *editor = EditorManager::openEditor(fileName, Constants::CVSCOMMITEDITOR_ID, - EditorManager::ModeSwitch); + IEditor *editor = EditorManager::openEditor(fileName, Constants::CVSCOMMITEDITOR_ID); CvsSubmitEditor *submitEditor = qobject_cast(editor); QTC_CHECK(submitEditor); submitEditor->registerActions(m_submitUndoAction, m_submitRedoAction, m_submitCurrentLogAction, m_submitDiffAction); @@ -861,7 +860,7 @@ void CvsPlugin::filelog(const QString &workingDir, const QString tag = VcsBaseEditorWidget::editorTag(LogOutput, workingDir, files); if (Core::IEditor *editor = VcsBaseEditorWidget::locateEditorByTag(tag)) { editor->createNew(response.stdOut); - Core::EditorManager::activateEditor(editor, Core::EditorManager::ModeSwitch); + Core::EditorManager::activateEditor(editor); } else { const QString title = QString::fromLatin1("cvs log %1").arg(id); Core::IEditor *newEditor = showOutputInEditor(title, response.stdOut, LogOutput, source, codec); @@ -1004,7 +1003,7 @@ void CvsPlugin::annotate(const QString &workingDir, const QString &file, if (IEditor *editor = VcsBaseEditorWidget::locateEditorByTag(tag)) { editor->createNew(response.stdOut); VcsBaseEditorWidget::gotoLineOfEditor(editor, lineNumber); - EditorManager::activateEditor(editor, EditorManager::ModeSwitch); + EditorManager::activateEditor(editor); } else { const QString title = QString::fromLatin1("cvs annotate %1").arg(id); IEditor *newEditor = showOutputInEditor(title, response.stdOut, AnnotateOutput, source, codec); @@ -1199,7 +1198,7 @@ bool CvsPlugin::describe(const QString &repositoryPath, const QString commitId = entries.front().revisions.front().commitId; if (IEditor *editor = VcsBaseEditorWidget::locateEditorByTag(commitId)) { editor->createNew(output); - EditorManager::activateEditor(editor, EditorManager::ModeSwitch); + EditorManager::activateEditor(editor); setDiffBaseDirectory(editor, repositoryPath); } else { const QString title = QString::fromLatin1("cvs describe %1").arg(commitId); @@ -1285,7 +1284,7 @@ IEditor *CvsPlugin::showOutputInEditor(const QString& title, const QString &outp if (codec) e->setCodec(codec); IEditor *ie = e->editor(); - EditorManager::activateEditor(ie, EditorManager::ModeSwitch); + EditorManager::activateEditor(ie); return ie; } diff --git a/src/plugins/debugger/commonoptionspage.cpp b/src/plugins/debugger/commonoptionspage.cpp index 0082bdce252..e096037c551 100644 --- a/src/plugins/debugger/commonoptionspage.cpp +++ b/src/plugins/debugger/commonoptionspage.cpp @@ -69,7 +69,11 @@ CommonOptionsPageWidget::CommonOptionsPageWidget checkBoxListSourceFiles->setText(tr("Populate source file view automatically")); checkBoxCloseBuffersOnExit = new QCheckBox(behaviorBox); - checkBoxCloseBuffersOnExit->setText(tr("Close temporary buffers on debugger exit")); + checkBoxCloseBuffersOnExit->setText(tr("Close temporary views on debugger exit")); + checkBoxCloseBuffersOnExit->setText(tr("Stopping and stepping in the debugger " + "will automatically open source or disassembler views associated with the " + "current location. Select this option to automatically close them when " + "the debugger exits.")); checkBoxSwitchModeOnExit = new QCheckBox(behaviorBox); checkBoxSwitchModeOnExit->setText(tr("Switch to previous mode on debugger exit")); diff --git a/src/plugins/debugger/debuggeractions.cpp b/src/plugins/debugger/debuggeractions.cpp index c84ca969a64..c0422178856 100644 --- a/src/plugins/debugger/debuggeractions.cpp +++ b/src/plugins/debugger/debuggeractions.cpp @@ -447,6 +447,11 @@ DebuggerSettings::DebuggerSettings(QSettings *settings) insertItem(GdbStartupCommands, item); item = new SavedAction(this); + item->setSettingsKey(debugModeGroup, QLatin1String("GdbCustomDumperCommands")); + item->setDefaultValue(QString()); + insertItem(GdbCustomDumperCommands, item); + item = new SavedAction(this); + item->setSettingsKey(debugModeGroup, QLatin1String("GdbPostAttachCommands")); item->setDefaultValue(QString()); insertItem(GdbPostAttachCommands, item); diff --git a/src/plugins/debugger/debuggeractions.h b/src/plugins/debugger/debuggeractions.h index d98423a76ca..2abc5dddf40 100644 --- a/src/plugins/debugger/debuggeractions.h +++ b/src/plugins/debugger/debuggeractions.h @@ -130,6 +130,7 @@ enum DebuggerActionCode LoadGdbDumpers, AttemptQuickStart, GdbStartupCommands, + GdbCustomDumperCommands, GdbPostAttachCommands, GdbWatchdogTimeout, AutoEnrichParameters, diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index f90354e2b78..aada6367c99 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -508,7 +508,6 @@ public: setIcon(QIcon(QLatin1String(":/fancyactionbar/images/mode_Debug.png"))); setPriority(85); setId(MODE_DEBUG); - setType(CC::MODE_EDIT_TYPE); } ~DebugMode() @@ -3582,11 +3581,10 @@ void DebuggerPlugin::testPythonDumpers() void DebuggerPluginPrivate::testPythonDumpers1() { m_testSuccess = true; - QString proFile = ICore::resourcePath() -#ifndef Q_OS_MAC - + QLatin1String("/../..") -#endif - + QLatin1String("/tests/manual/debugger/simple/simple.pro"); + QString proFile = ICore::resourcePath(); + if (Utils::HostOsInfo::isMacHost()) + proFile += QLatin1String("/../.."); + proFile += QLatin1String("/../../tests/manual/debugger/simple/simple.pro"); testLoadProject(proFile, TestCallBack(this, "testPythonDumpers2")); QVERIFY(m_testSuccess); QTestEventLoop::instance().enterLoop(20); @@ -3617,8 +3615,10 @@ void DebuggerPlugin::testStateMachine() void DebuggerPluginPrivate::testStateMachine1() { m_testSuccess = true; - QString proFile = ICore::resourcePath() - + QLatin1String("/../../tests/manual/debugger/simple/simple.pro"); + QString proFile = ICore::resourcePath(); + if (Utils::HostOsInfo::isMacHost()) + proFile += QLatin1String("/../.."); + proFile += QLatin1String("/../../tests/manual/debugger/simple/simple.pro"); testLoadProject(proFile, TestCallBack(this, "testStateMachine2")); QVERIFY(m_testSuccess); QTestEventLoop::instance().enterLoop(20); diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 705fab28b4a..e8f80920f33 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -1827,14 +1827,7 @@ void GdbEngine::handleShowVersion(const GdbResponse &response) postCommand("set detach-on-fork off", ConsoleCommand); //postCommand("set build-id-verbose 2", ConsoleCommand); - - if (m_gdbVersion > 70100) { - // Quick check whether we have python. - showMessage(_("NOTE: CHECK FOR PYTHON SUPPRESSED, VERSION TOO LOW")); - postCommand("python print 43", ConsoleCommand, CB(handleHasPython)); - } else { - pythonDumpersFailed(); - } + postCommand("python print 43", ConsoleCommand, CB(handleHasPython)); } } @@ -1854,6 +1847,12 @@ void GdbEngine::handleHasPython(const GdbResponse &response) void GdbEngine::handlePythonSetup(const GdbResponse &response) { if (response.resultClass == GdbResultDone) { + const QString commands = debuggerCore()->stringSetting(GdbCustomDumperCommands); + if (!commands.isEmpty()) { + postCommand(commands.toLocal8Bit()); + postCommand("bbsetup"); + } + postCommand("python qqStringCutOff = " + debuggerCore()->action(MaximalStringLength)->value().toByteArray(), ConsoleCommand|NonCriticalResponse); @@ -2413,7 +2412,6 @@ void GdbEngine::handleExecuteReturn(const GdbResponse &response) } /*! - \fn void Debugger::Internal::GdbEngine::setTokenBarrier() \brief Discard the results of all pending watch-updating commands. This method is called at the beginning of all step/next/finish etc. @@ -2421,7 +2419,6 @@ void GdbEngine::handleExecuteReturn(const GdbResponse &response) If non-watch-updating commands with call-backs are still in the pipe, it will complain. */ - void GdbEngine::setTokenBarrier() { //QTC_ASSERT(m_nonDiscardableCount == 0, /**/); @@ -4972,6 +4969,7 @@ void GdbEngine::tryLoadPythonDumpers() postCommand("python execfile('" + dumperSourcePath + "gbridge.py')", ConsoleCommand, CB(handlePythonSetup)); + } void GdbEngine::reloadDebuggingHelpers() diff --git a/src/plugins/debugger/gdb/gdboptionspage.cpp b/src/plugins/debugger/gdb/gdboptionspage.cpp index e65711ab1eb..578b4027396 100644 --- a/src/plugins/debugger/gdb/gdboptionspage.cpp +++ b/src/plugins/debugger/gdb/gdboptionspage.cpp @@ -72,6 +72,8 @@ public: QTextEdit *textEditStartupCommands; QGroupBox *groupBoxPostAttachCommands; QTextEdit *textEditPostAttachCommands; + QGroupBox *groupBoxCustomDumperCommands; + QTextEdit *textEditCustomDumperCommands; //QGroupBox *groupBoxPluginDebugging; //QRadioButton *radioButtonAllPluginBreakpoints; @@ -167,20 +169,21 @@ GdbOptionsPageWidget::GdbOptionsPageWidget(QWidget *parent) "Note:This feature needs special support from the Linux " "distribution and GDB build and is not everywhere available.

")); - groupBoxStartupCommands = new QGroupBox(this); - groupBoxStartupCommands->setTitle(GdbOptionsPage::tr("Additional Startup Commands")); - groupBoxStartupCommands->setToolTip(GdbOptionsPage::tr( - "

GDB commands entered here will be executed after " - "GDB has been started and the debugging helpers have been initialized.

" - "

You can add commands to load further debugging helpers here, or " - "modify existing ones.

" + QString howToUsePython = GdbOptionsPage::tr( "

To execute simple Python commands, prefix them with \"python\".

" "

To execute sequences of Python commands spanning multiple lines " "prepend the block with \"python\" on a separate line, and append " "\"end\" on a separate line.

" "

To execute arbitrary Python scripts, " - "use python execfile('/path/to/script.py').

" - "")); + "use python execfile('/path/to/script.py').

"); + + groupBoxStartupCommands = new QGroupBox(this); + groupBoxStartupCommands->setTitle(GdbOptionsPage::tr("Additional Startup Commands")); + groupBoxStartupCommands->setToolTip(GdbOptionsPage::tr( + "

GDB commands entered here will be executed after " + "GDB has been started, but before the debugged program is started or " + "attached, and before the debugging helpers are initialized.

%1" + "").arg(howToUsePython)); textEditStartupCommands = new QTextEdit(groupBoxStartupCommands); textEditStartupCommands->setAcceptRichText(false); @@ -199,6 +202,18 @@ GdbOptionsPageWidget::GdbOptionsPageWidget(QWidget *parent) textEditPostAttachCommands->setAcceptRichText(false); textEditPostAttachCommands->setToolTip(groupBoxPostAttachCommands->toolTip()); + groupBoxCustomDumperCommands = new QGroupBox(this); + groupBoxCustomDumperCommands->setTitle(GdbOptionsPage::tr("Debugging Helper Customization")); + groupBoxCustomDumperCommands->setToolTip(GdbOptionsPage::tr( + "

GDB commands entered here will be executed after " + "Qt Creator's debugging helpers have been loaded and fully initialized. " + "You can load additional debugging helpers or modify existing ones here.

" + "%1").arg(howToUsePython)); + + textEditCustomDumperCommands = new QTextEdit(groupBoxStartupCommands); + textEditCustomDumperCommands->setAcceptRichText(false); + textEditCustomDumperCommands->setToolTip(groupBoxStartupCommands->toolTip()); + /* groupBoxPluginDebugging = new QGroupBox(q); groupBoxPluginDebugging->setTitle(GdbOptionsPage::tr( @@ -242,6 +257,9 @@ GdbOptionsPageWidget::GdbOptionsPageWidget(QWidget *parent) QGridLayout *postAttachLayout = new QGridLayout(groupBoxPostAttachCommands); postAttachLayout->addWidget(textEditPostAttachCommands, 0, 0, 1, 1); + QGridLayout *customDumperLayout = new QGridLayout(groupBoxCustomDumperCommands); + customDumperLayout->addWidget(textEditCustomDumperCommands, 0, 0, 1, 1); + //QHBoxLayout *horizontalLayout = new QHBoxLayout(); //horizontalLayout->addItem(new QSpacerItem(10, 10, QSizePolicy::Preferred, QSizePolicy::Minimum)); //horizontalLayout->addWidget(labelSelectedPluginBreakpoints); @@ -251,6 +269,7 @@ GdbOptionsPageWidget::GdbOptionsPageWidget(QWidget *parent) gridLayout->addWidget(groupBoxGeneral, 0, 0, 2, 1); gridLayout->addWidget(groupBoxStartupCommands, 0, 1, 1, 1); gridLayout->addWidget(groupBoxPostAttachCommands, 1, 1, 1, 1); + gridLayout->addWidget(groupBoxCustomDumperCommands, 2, 1, 1, 1); //gridLayout->addWidget(groupBoxStartupCommands, 0, 1, 1, 1); //gridLayout->addWidget(radioButtonAllPluginBreakpoints, 0, 0, 1, 1); @@ -262,6 +281,7 @@ GdbOptionsPageWidget::GdbOptionsPageWidget(QWidget *parent) DebuggerCore *dc = debuggerCore(); group.insert(dc->action(GdbStartupCommands), textEditStartupCommands); + group.insert(dc->action(GdbCustomDumperCommands), textEditCustomDumperCommands); group.insert(dc->action(GdbPostAttachCommands), textEditPostAttachCommands); group.insert(dc->action(LoadGdbInit), checkBoxLoadGdbInit); group.insert(dc->action(LoadGdbDumpers), checkBoxLoadGdbDumpers); diff --git a/src/plugins/debugger/lldb/lldbengine.cpp b/src/plugins/debugger/lldb/lldbengine.cpp index 2b3af11a484..1e0d7bbd588 100644 --- a/src/plugins/debugger/lldb/lldbengine.cpp +++ b/src/plugins/debugger/lldb/lldbengine.cpp @@ -164,6 +164,8 @@ void LldbEngine::setupInferior() { QString executable = QFileInfo(startParameters().executable).absoluteFilePath(); runCommand(Command("setupInferior").arg("executable", executable)); + + requestUpdateWatchers(); } void LldbEngine::runEngine() @@ -676,18 +678,16 @@ void LldbEngine::updateAll() // ////////////////////////////////////////////////////////////////////// -void LldbEngine::assignValueInDebugger(const Internal::WatchData *, const QString &expression, const QVariant &value) +void LldbEngine::assignValueInDebugger(const Internal::WatchData *data, + const QString &expression, const QVariant &value) { - Q_UNUSED(expression); - Q_UNUSED(value); - //SDEBUG("ASSIGNING: " << (expression + QLatin1Char('=') + value.toString())); -#if 0 - m_scriptEngine->evaluate(expression + QLatin1Char('=') + value.toString()); - updateLocals(); -#endif + Q_UNUSED(data); + Command cmd("assignValue"); + cmd.arg("exp", expression.toLatin1().toHex()); + cmd.arg("value", value.toString().toLatin1().toHex()); + runCommand(cmd); } - void LldbEngine::updateWatchData(const WatchData &data, const WatchUpdateFlags &flags) { Q_UNUSED(data); @@ -699,12 +699,13 @@ void LldbEngine::updateLocals() { WatchHandler *handler = watchHandler(); + //requestUpdateWatchers(); + Command cmd("updateData"); cmd.arg("expanded", handler->expansionRequests()); cmd.arg("typeformats", handler->typeFormatRequests()); cmd.arg("formats", handler->individualFormatRequests()); - QList watcherData; // const QString fileName = stackHandler()->currentFrame().file; // if (!fileName.isEmpty()) { // const QString function = stackHandler()->currentFrame().function; @@ -739,18 +740,8 @@ void LldbEngine::updateLocals() // } // } - QHashIterator it(handler->watcherNames()); - while (it.hasNext()) { - it.next(); - QHash hash; - hash["exp"] = '\'' + it.key() + '\''; - hash["id"] = "'watch." + QByteArray::number(it.value()) + '\''; - watcherData.append(Command::toData(hash)); - } - cmd.args.append("'watchers':" + Command::toData(watcherData) + ','); - const static bool alwaysVerbose = !qgetenv("QTC_DEBUGGER_PYTHON_VERBOSE").isEmpty(); - cmd.arg("passexeptions", alwaysVerbose); + cmd.arg("passexceptions", alwaysVerbose); cmd.arg("fancy", debuggerCore()->boolSetting(UseDebuggingHelpers)); cmd.arg("autoderef", debuggerCore()->boolSetting(AutoDerefPointers)); cmd.arg("dyntype", debuggerCore()->boolSetting(UseDynamicType)); @@ -839,58 +830,21 @@ void LldbEngine::readLldbStandardOutput() } } -QByteArray LldbEngine::currentOptions() const +void LldbEngine::requestUpdateWatchers() { - QByteArray localsOptions; - QByteArray stackOptions; - QByteArray threadsOptions; - - { - QByteArray watchers; - //if (!m_toolTipExpression.isEmpty()) - // watchers += m_toolTipExpression.toLatin1() - // + '#' + tooltipINameForExpression(m_toolTipExpression.toLatin1()); - - WatchHandler *handler = watchHandler(); - QHash watcherNames = handler->watcherNames(); - QHashIterator it(watcherNames); - while (it.hasNext()) { - it.next(); - if (!watchers.isEmpty()) - watchers += "##"; - watchers += it.key() + "#watch." + QByteArray::number(it.value()); - } - - QByteArray options; - if (debuggerCore()->boolSetting(UseDebuggingHelpers)) - options += "fancy,"; - if (debuggerCore()->boolSetting(AutoDerefPointers)) - options += "autoderef,"; - if (options.isEmpty()) - options += "defaults,"; - options.chop(1); - - localsOptions = "options:" + options + " " - + "vars: " - + "expanded:" + handler->expansionRequests() + " " - + "typeformats:" + handler->typeFormatRequests() + " " - + "formats:" + handler->individualFormatRequests() + " " - + "watcher:" + watchers.toHex(); + WatchHandler *handler = watchHandler(); + QHashIterator it(handler->watcherNames()); + QList watcherData; + while (it.hasNext()) { + it.next(); + QHash hash; + hash["iname"] = "'watch." + QByteArray::number(it.value()) + '\''; + hash["exp"] = '\'' + it.key().toHex() + '\''; + watcherData.append(Command::toData(hash)); } - - { - int maxdepth = debuggerCore()->action(MaximalStackDepth)->value().toInt(); - ThreadId curthread = threadsHandler()->currentThread(); - stackOptions += "maxdepth:" + QByteArray::number(maxdepth); - stackOptions += ",curthread:" + QByteArray::number(curthread.raw()); - } - - QByteArray result; - result += "\"locals\":\"" + localsOptions + '"'; - result += ",\"stack\":\"" + stackOptions + '"'; - result += ",\"threads\":\"" + threadsOptions + '"'; - - return result; + Command cmd("setWatchers"); + cmd.args.append("'watchers':" + Command::toData(watcherData) + ','); + runCommand(cmd); } void LldbEngine::refreshLocals(const GdbMi &vars) @@ -911,10 +865,9 @@ void LldbEngine::refreshLocals(const GdbMi &vars) dummy.iname = child["iname"].data(); GdbMi wname = child["wname"]; if (wname.isValid()) { - // Happens (only) for watched expressions. They are encoded as - // base64 encoded 8 bit data, without quotes - dummy.name = decodeData(wname.data(), Base64Encoded8Bit); - dummy.exp = dummy.name.toUtf8(); + // Happens (only) for watched expressions. + dummy.exp = QByteArray::fromHex(wname.data()); + dummy.name = QString::fromUtf8(dummy.exp); } else { dummy.name = child["name"].toUtf8(); } diff --git a/src/plugins/debugger/lldb/lldbengine.h b/src/plugins/debugger/lldb/lldbengine.h index fe44c1940ad..ff239aeee30 100644 --- a/src/plugins/debugger/lldb/lldbengine.h +++ b/src/plugins/debugger/lldb/lldbengine.h @@ -134,6 +134,7 @@ private: bool supportsThreads() const { return true; } bool isSynchronous() const { return true; } void updateWatchData(const WatchData &data, const WatchUpdateFlags &flags); + void requestUpdateWatchers(); void setRegisterValue(int regnr, const QString &value); void fetchMemory(Internal::MemoryAgent *, QObject *, quint64 addr, quint64 length); @@ -171,7 +172,6 @@ private: typedef void (LldbEngine::*LldbCommandContinuation)(); - QByteArray currentOptions() const; void handleStop(const QByteArray &response); void handleListLocals(const QByteArray &response); void handleListModules(const QByteArray &response); diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index d3384f64724..323f196ad99 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -632,7 +632,7 @@ void QmlEngine::notifyEngineRemoteServerRunning(const QByteArray &serverChannel, if (ok) startParameters().qmlServerPort = qmlPort; else - qWarning() << tr("QML debugging port not set! Unable to convert %1 to unsigned int.").arg(QString::fromLatin1(serverChannel)); + qWarning() << tr("QML debugging port not set: Unable to convert %1 to unsigned int.").arg(QString::fromLatin1(serverChannel)); DebuggerEngine::notifyEngineRemoteServerRunning(serverChannel, pid); notifyEngineSetupOk(); diff --git a/src/plugins/debugger/qml/qmlinspectoradapter.cpp b/src/plugins/debugger/qml/qmlinspectoradapter.cpp index c2cd81e0d55..20d9219b6af 100644 --- a/src/plugins/debugger/qml/qmlinspectoradapter.cpp +++ b/src/plugins/debugger/qml/qmlinspectoradapter.cpp @@ -472,17 +472,7 @@ void QmlInspectorAdapter::jumpToObjectDefinitionInEditor( { const QString fileName = m_engine->toFileInProject(objSource.url()); - Core::EditorManager *editorManager = Core::EditorManager::instance(); - Core::IEditor *editor = editorManager->openEditor(fileName); - TextEditor::ITextEditor *textEditor - = qobject_cast(editor); - - if (textEditor) { - editorManager->addCurrentPositionToNavigationHistory(); - textEditor->gotoLine(objSource.lineNumber()); - textEditor->widget()->setFocus(); - } - + Core::EditorManager::openEditorAt(fileName, objSource.lineNumber()); if (debugId != -1 && debugId != m_currentSelectedDebugId) { m_currentSelectedDebugId = debugId; m_currentSelectedDebugName = agent()->displayName(debugId); diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp index a250660763e..43106b36aa9 100644 --- a/src/plugins/debugger/watchwindow.cpp +++ b/src/plugins/debugger/watchwindow.cpp @@ -232,9 +232,9 @@ static int memberVariableRecursion(const QAbstractItemModel *model, return childCount; } -/*! - \fn variableMemoryMarkup() +typedef QList MemoryMarkupList; +/*! \brief Creates markup for a variable in the memory view. Marks the visible children with alternating colors in the parent, that is, for @@ -272,9 +272,6 @@ static int memberVariableRecursion(const QAbstractItemModel *model, \sa Debugger::Internal::MemoryViewWidget */ - -typedef QList MemoryMarkupList; - static MemoryMarkupList variableMemoryMarkup(const QAbstractItemModel *model, const QModelIndex &modelIndex, diff --git a/src/plugins/designer/formeditorfactory.cpp b/src/plugins/designer/formeditorfactory.cpp index 736a033d473..3da34f486a4 100644 --- a/src/plugins/designer/formeditorfactory.cpp +++ b/src/plugins/designer/formeditorfactory.cpp @@ -66,23 +66,15 @@ QString FormEditorFactory::displayName() const return qApp->translate("Designer", C_DESIGNER_XML_DISPLAY_NAME); } -Core::IDocument *FormEditorFactory::open(const QString &fileName) -{ - Core::IEditor *iface = Core::EditorManager::openEditor(fileName, id()); - if (!iface) - return 0; - if (qobject_cast(iface)) { - Core::InfoBarEntry info(Core::Id(Constants::INFO_READ_ONLY), - tr("This file can only be edited in Design mode.")); - info.setCustomButtonInfo(tr("Switch mode"), this, SLOT(designerModeClicked())); - iface->document()->infoBar()->addInfo(info); - } - return iface->document(); -} - Core::IEditor *FormEditorFactory::createEditor(QWidget *parent) { const EditorData data = FormEditorW::instance()->createEditor(parent); + if (data.formWindowEditor) { + Core::InfoBarEntry info(Core::Id(Constants::INFO_READ_ONLY), + tr("This file can only be edited in Design mode.")); + info.setCustomButtonInfo(tr("Switch mode"), this, SLOT(designerModeClicked())); + data.formWindowEditor->document()->infoBar()->addInfo(info); + } return data.formWindowEditor; } diff --git a/src/plugins/designer/formeditorfactory.h b/src/plugins/designer/formeditorfactory.h index 602d6630256..d1183fbfc58 100644 --- a/src/plugins/designer/formeditorfactory.h +++ b/src/plugins/designer/formeditorfactory.h @@ -48,7 +48,6 @@ public: QStringList mimeTypes() const; Core::Id id() const; QString displayName() const; - Core::IDocument *open(const QString &fileName); Core::IEditor *createEditor(QWidget *parent); private slots: diff --git a/src/plugins/designer/formeditorw.cpp b/src/plugins/designer/formeditorw.cpp index 5bedf6a41c4..e435c95cdb6 100644 --- a/src/plugins/designer/formeditorw.cpp +++ b/src/plugins/designer/formeditorw.cpp @@ -912,7 +912,7 @@ void FormEditorW::switchSourceForm() { const QString fileToOpen = otherFile(); if (!fileToOpen.isEmpty()) - Core::EditorManager::openEditor(fileToOpen, Core::Id(), Core::EditorManager::ModeSwitch); + Core::EditorManager::openEditor(fileToOpen); } } // namespace Internal diff --git a/src/plugins/designer/formwindoweditor.cpp b/src/plugins/designer/formwindoweditor.cpp index 6ed794e19cb..d6234089ee3 100644 --- a/src/plugins/designer/formwindoweditor.cpp +++ b/src/plugins/designer/formwindoweditor.cpp @@ -259,9 +259,9 @@ TextEditor::PlainTextEditor *FormWindowEditor::textEditor() return &d->m_textEditor; } -Core::Id FormWindowEditor::preferredModeType() const +bool FormWindowEditor::isDesignModePreferred() const { - return Core::Id(Core::Constants::MODE_DESIGN_TYPE); + return true; } } // namespace Designer diff --git a/src/plugins/designer/formwindoweditor.h b/src/plugins/designer/formwindoweditor.h index 05f8f786fa7..a04f417d16a 100644 --- a/src/plugins/designer/formwindoweditor.h +++ b/src/plugins/designer/formwindoweditor.h @@ -81,7 +81,7 @@ public: virtual QWidget *toolBar(); - virtual Core::Id preferredModeType() const; + virtual bool isDesignModePreferred() const; // For uic code model support QString contents() const; diff --git a/src/plugins/designer/qtcreatorintegration.cpp b/src/plugins/designer/qtcreatorintegration.cpp index 3b1395159f2..956c1bc51d8 100644 --- a/src/plugins/designer/qtcreatorintegration.cpp +++ b/src/plugins/designer/qtcreatorintegration.cpp @@ -270,7 +270,9 @@ static Document::Ptr findDefinition(Function *functionDeclaration, int *line) static inline ITextEditor *editableAt(const QString &fileName, int line, int column) { - return qobject_cast(TextEditor::BaseTextEditorWidget::openEditorAt(fileName, line, column)); + return qobject_cast(Core::EditorManager::openEditorAt(fileName, line, column, + Core::Id(), + Core::EditorManager::DoNotMakeVisible)); } static void addDeclaration(const Snapshot &snapshot, @@ -626,7 +628,7 @@ bool QtCreatorIntegration::navigateToSlot(const QString &objectName, } // jump to function definition, position within code - TextEditor::BaseTextEditorWidget::openEditorAt(sourceDoc->fileName(), line + 2, indentation); + Core::EditorManager::openEditorAt(sourceDoc->fileName(), line + 2, indentation); return true; } diff --git a/src/plugins/diffeditor/diffeditoreditable.cpp b/src/plugins/diffeditor/diffeditor.cpp similarity index 81% rename from src/plugins/diffeditor/diffeditoreditable.cpp rename to src/plugins/diffeditor/diffeditor.cpp index 50f1f0f2e76..381339e2f30 100644 --- a/src/plugins/diffeditor/diffeditoreditable.cpp +++ b/src/plugins/diffeditor/diffeditor.cpp @@ -27,12 +27,14 @@ ** ****************************************************************************/ -#include "diffeditoreditable.h" +#include "diffeditor.h" #include "diffeditorfile.h" #include "diffeditorwidget.h" #include "diffeditorconstants.h" #include +#include + #include #include #include @@ -45,9 +47,9 @@ namespace DiffEditor { -///////////////////////////////// DiffEditorEditable ////////////////////////////////// +///////////////////////////////// DiffEditor ////////////////////////////////// -DiffEditorEditable::DiffEditorEditable(DiffEditorWidget *editorWidget) +DiffEditor::DiffEditor(DiffEditorWidget *editorWidget) : IEditor(0), m_file(new Internal::DiffEditorFile(QLatin1String(Constants::DIFF_EDITOR_MIMETYPE), this)), m_editorWidget(editorWidget), @@ -59,20 +61,20 @@ DiffEditorEditable::DiffEditorEditable(DiffEditorWidget *editorWidget) this, SLOT(activateEntry(int))); } -DiffEditorEditable::~DiffEditorEditable() +DiffEditor::~DiffEditor() { delete m_toolWidget; if (m_widget) delete m_widget; } -bool DiffEditorEditable::createNew(const QString &contents) +bool DiffEditor::createNew(const QString &contents) { Q_UNUSED(contents) return true; } -bool DiffEditorEditable::open(QString *errorString, const QString &fileName, const QString &realFileName) +bool DiffEditor::open(QString *errorString, const QString &fileName, const QString &realFileName) { Q_UNUSED(errorString) Q_UNUSED(fileName) @@ -80,25 +82,25 @@ bool DiffEditorEditable::open(QString *errorString, const QString &fileName, con return true; } -Core::IDocument *DiffEditorEditable::document() +Core::IDocument *DiffEditor::document() { return m_file; } -QString DiffEditorEditable::displayName() const +QString DiffEditor::displayName() const { if (m_displayName.isEmpty()) m_displayName = QCoreApplication::translate("DiffEditor", Constants::DIFF_EDITOR_DISPLAY_NAME); return m_displayName; } -void DiffEditorEditable::setDisplayName(const QString &title) +void DiffEditor::setDisplayName(const QString &title) { m_displayName = title; emit changed(); } -Core::Id DiffEditorEditable::id() const +Core::Id DiffEditor::id() const { return Constants::DIFF_EDITOR_ID; } @@ -114,7 +116,7 @@ static QToolBar *createToolBar(const QWidget *someWidget) return toolBar; } -QWidget *DiffEditorEditable::toolBar() +QWidget *DiffEditor::toolBar() { if (m_toolWidget) return m_toolWidget; @@ -140,20 +142,33 @@ QWidget *DiffEditorEditable::toolBar() m_editorWidget, SLOT(setIgnoreWhitespaces(bool))); m_toolWidget->addWidget(whitespaceButton); - QLabel *contextLabel = new QLabel(tr("Context lines:"), m_toolWidget); + QLabel *contextLabel = new QLabel(m_toolWidget); + contextLabel->setText(tr("Context Lines:")); + contextLabel->setContentsMargins(6, 0, 6, 0); m_toolWidget->addWidget(contextLabel); QSpinBox *contextSpinBox = new QSpinBox(m_toolWidget); contextSpinBox->setRange(-1, 100); contextSpinBox->setValue(3); + contextSpinBox->setFrame(false); + contextSpinBox->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding); // Mac Qt5 connect(contextSpinBox, SIGNAL(valueChanged(int)), m_editorWidget, SLOT(setContextLinesNumber(int))); m_toolWidget->addWidget(contextSpinBox); + QToolButton *toggleSync = new QToolButton(m_toolWidget); + toggleSync->setIcon(QIcon(QLatin1String(Core::Constants::ICON_LINK))); + toggleSync->setCheckable(true); + toggleSync->setChecked(true); + toggleSync->setToolTip(tr("Synchronize Horizontal Scroll Bars")); + connect(toggleSync, SIGNAL(clicked(bool)), + m_editorWidget, SLOT(setHorizontalScrollBarSynchronization(bool))); + m_toolWidget->addWidget(toggleSync); + return m_toolWidget; } -void DiffEditorEditable::setDiff(const QList &diffFileList, +void DiffEditor::setDiff(const QList &diffFileList, const QString &workingDirectory) { m_entriesComboBox->clear(); @@ -197,27 +212,27 @@ void DiffEditorEditable::setDiff(const QListsetDiff(diffFileList, workingDirectory); } -void DiffEditorEditable::clear(const QString &message) +void DiffEditor::clear(const QString &message) { m_entriesComboBox->clear(); updateEntryToolTip(); m_editorWidget->clear(message); } -void DiffEditorEditable::updateEntryToolTip() +void DiffEditor::updateEntryToolTip() { const QString &toolTip = m_entriesComboBox->itemData( m_entriesComboBox->currentIndex(), Qt::ToolTipRole).toString(); m_entriesComboBox->setToolTip(toolTip); } -void DiffEditorEditable::entryActivated(int index) +void DiffEditor::entryActivated(int index) { updateEntryToolTip(); m_editorWidget->navigateToDiffFile(index); } -void DiffEditorEditable::activateEntry(int index) +void DiffEditor::activateEntry(int index) { m_entriesComboBox->blockSignals(true); m_entriesComboBox->setCurrentIndex(index); diff --git a/src/plugins/diffeditor/diffeditoreditable.h b/src/plugins/diffeditor/diffeditor.h similarity index 94% rename from src/plugins/diffeditor/diffeditoreditable.h rename to src/plugins/diffeditor/diffeditor.h index 8a0aff264e2..498a909065c 100644 --- a/src/plugins/diffeditor/diffeditoreditable.h +++ b/src/plugins/diffeditor/diffeditor.h @@ -47,12 +47,12 @@ namespace Internal { class DiffEditorFile; } -class DIFFEDITOR_EXPORT DiffEditorEditable : public Core::IEditor +class DIFFEDITOR_EXPORT DiffEditor : public Core::IEditor { Q_OBJECT public: - explicit DiffEditorEditable(DiffEditorWidget *editorWidget); - virtual ~DiffEditorEditable(); + explicit DiffEditor(DiffEditorWidget *editorWidget); + virtual ~DiffEditor(); public: void setDiff(const QList &diffFileList, diff --git a/src/plugins/diffeditor/diffeditor.pro b/src/plugins/diffeditor/diffeditor.pro index 2d6b13fc23b..0976171af77 100644 --- a/src/plugins/diffeditor/diffeditor.pro +++ b/src/plugins/diffeditor/diffeditor.pro @@ -3,13 +3,13 @@ include(../../qtcreatorplugin.pri) HEADERS += diffeditor_global.h \ diffeditorconstants.h \ - diffeditoreditable.h \ + diffeditor.h \ diffeditorfile.h \ diffeditorplugin.h \ diffeditorwidget.h \ differ.h -SOURCES += diffeditoreditable.cpp \ +SOURCES += diffeditor.cpp \ diffeditorfile.cpp \ diffeditorplugin.cpp \ diffeditorwidget.cpp \ diff --git a/src/plugins/diffeditor/diffeditor.qbs b/src/plugins/diffeditor/diffeditor.qbs index 1b1d5fd974c..e4afa534f47 100644 --- a/src/plugins/diffeditor/diffeditor.qbs +++ b/src/plugins/diffeditor/diffeditor.qbs @@ -14,8 +14,8 @@ QtcPlugin { files: [ "diffeditor_global.h", "diffeditorconstants.h", - "diffeditoreditable.cpp", - "diffeditoreditable.h", + "diffeditor.cpp", + "diffeditor.h", "diffeditorfile.cpp", "diffeditorfile.h", "diffeditorplugin.cpp", diff --git a/src/plugins/diffeditor/diffeditorplugin.cpp b/src/plugins/diffeditor/diffeditorplugin.cpp index 2fe36185745..6ca9090f03d 100644 --- a/src/plugins/diffeditor/diffeditorplugin.cpp +++ b/src/plugins/diffeditor/diffeditorplugin.cpp @@ -28,7 +28,7 @@ ****************************************************************************/ #include "diffeditorplugin.h" -#include "diffeditoreditable.h" +#include "diffeditor.h" #include "diffeditorwidget.h" #include "diffeditorconstants.h" @@ -67,7 +67,7 @@ QString DiffEditorFactory::displayName() const Core::IEditor *DiffEditorFactory::createEditor(QWidget *parent) { DiffEditorWidget *editorWidget = new DiffEditorWidget(parent); - DiffEditorEditable *editor = new DiffEditorEditable(editorWidget); + DiffEditor *editor = new DiffEditor(editorWidget); return editor; } @@ -136,15 +136,15 @@ void DiffEditorPlugin::diff() const Core::Id editorId = Constants::DIFF_EDITOR_ID; //: Editor title QString title = tr("Diff \"%1\", \"%2\"").arg(fileName1).arg(fileName2); - DiffEditorEditable *editorEditable = qobject_cast + DiffEditor *editor = qobject_cast (Core::EditorManager::openEditorWithContents(editorId, &title, QString())); - if (!editorEditable) + if (!editor) return; - Core::EditorManager::activateEditor(editorEditable, Core::EditorManager::ModeSwitch); + Core::EditorManager::activateEditor(editor); - DiffEditorWidget *editorWidget = editorEditable->editorWidget(); + DiffEditorWidget *editorWidget = editor->editorWidget(); const QString text1 = getFileContents(fileName1, editorWidget->codec()); const QString text2 = getFileContents(fileName2, editorWidget->codec()); @@ -157,7 +157,7 @@ void DiffEditorPlugin::diff() QList list; list.append(dfc); - editorEditable->setDiff(list); + editor->setDiff(list); } QString DiffEditorPlugin::getFileContents(const QString &fileName, QTextCodec *codec) const diff --git a/src/plugins/diffeditor/diffeditorwidget.cpp b/src/plugins/diffeditor/diffeditorwidget.cpp index c2579fdec8e..4bce0b34662 100644 --- a/src/plugins/diffeditor/diffeditorwidget.cpp +++ b/src/plugins/diffeditor/diffeditorwidget.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include @@ -138,6 +139,9 @@ public: void clearAllData(); QTextBlock firstVisibleBlock() const { return SnippetEditorWidget::firstVisibleBlock(); } +public slots: + void setDisplaySettings(const DisplaySettings &ds); + protected: virtual int extraAreaWidth(int *markWidthPtr = 0) const { return BaseTextEditorWidget::extraAreaWidth(markWidthPtr); } BaseTextEditor *createEditor() { return new DiffViewEditorEditable(this); } @@ -174,11 +178,26 @@ private: DiffViewEditorWidget::DiffViewEditorWidget(QWidget *parent) : SnippetEditorWidget(parent), m_lineNumberDigits(1), m_inPaintEvent(false) { - setLineNumbersVisible(true); + DisplaySettings settings = displaySettings(); + settings.m_textWrapping = false; + settings.m_displayLineNumbers = true; + settings.m_highlightCurrentLine = false; + settings.m_displayFoldingMarkers = true; + settings.m_markTextChanges = false; + settings.m_highlightBlocks = false; + SnippetEditorWidget::setDisplaySettings(settings); + setCodeFoldingSupported(true); setFrameStyle(QFrame::NoFrame); } +void DiffViewEditorWidget::setDisplaySettings(const DisplaySettings &ds) +{ + DisplaySettings settings = displaySettings(); + settings.m_visualizeWhitespace = ds.m_visualizeWhitespace; + SnippetEditorWidget::setDisplaySettings(settings); +} + QString DiffViewEditorWidget::lineNumber(int blockNumber) const { if (m_lineNumbers.contains(blockNumber)) @@ -355,7 +374,7 @@ void DiffViewEditorWidget::jumpToOriginalFile(const QTextCursor &cursor) const QDir dir(m_workingDirectory); const QString fileName = dir.absoluteFilePath(it.value().fileName); - Core::IEditor *ed = Core::EditorManager::openEditor(fileName, Core::Id(), Core::EditorManager::ModeSwitch); + Core::IEditor *ed = Core::EditorManager::openEditor(fileName); if (TextEditor::ITextEditor *editor = qobject_cast(ed)) editor->gotoLine(lineNr, position); } @@ -514,33 +533,25 @@ DiffEditorWidget::DiffEditorWidget(QWidget *parent) { TextEditor::TextEditorSettings *settings = TextEditorSettings::instance(); - QToolButton *toggleSync = new QToolButton(); - toggleSync = new QToolButton; - toggleSync->setText(QLatin1String("S")); - toggleSync->setCheckable(true); - toggleSync->setChecked(m_syncScrollBars); - toggleSync->setToolTip(tr("Synchronize Horizontal Scroll Bars")); - toggleSync->setAutoRaise(true); - connect(toggleSync, SIGNAL(clicked(bool)), this, SLOT(toggleScrollBarSynchronization(bool))); - m_leftEditor = new DiffViewEditorWidget(this); m_leftEditor->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); m_leftEditor->setReadOnly(true); - m_leftEditor->setHighlightCurrentLine(false); - m_leftEditor->setWordWrapMode(QTextOption::NoWrap); connect(settings, SIGNAL(fontSettingsChanged(TextEditor::FontSettings)), m_leftEditor, SLOT(setFontSettings(TextEditor::FontSettings))); m_leftEditor->setFontSettings(settings->fontSettings()); + connect(settings, SIGNAL(displaySettingsChanged(TextEditor::DisplaySettings)), + m_leftEditor, SLOT(setDisplaySettings(TextEditor::DisplaySettings))); + m_leftEditor->setDisplaySettings(settings->displaySettings()); m_leftEditor->setCodeStyle(settings->codeStyle()); m_rightEditor = new DiffViewEditorWidget(this); - m_rightEditor->setCornerWidget(toggleSync); m_rightEditor->setReadOnly(true); - m_rightEditor->setHighlightCurrentLine(false); - m_rightEditor->setWordWrapMode(QTextOption::NoWrap); connect(settings, SIGNAL(fontSettingsChanged(TextEditor::FontSettings)), m_rightEditor, SLOT(setFontSettings(TextEditor::FontSettings))); m_rightEditor->setFontSettings(settings->fontSettings()); + connect(settings, SIGNAL(displaySettingsChanged(TextEditor::DisplaySettings)), + m_rightEditor, SLOT(setDisplaySettings(TextEditor::DisplaySettings))); + m_rightEditor->setDisplaySettings(settings->displaySettings()); m_rightEditor->setCodeStyle(settings->codeStyle()); connect(m_leftEditor->verticalScrollBar(), SIGNAL(valueChanged(int)), @@ -1402,7 +1413,7 @@ void DiffEditorWidget::rightDocumentSizeChanged() synchronizeFoldings(m_rightEditor, m_leftEditor); } -void DiffEditorWidget::toggleScrollBarSynchronization(bool on) +void DiffEditorWidget::setHorizontalScrollBarSynchronization(bool on) { m_syncScrollBars = on; } diff --git a/src/plugins/diffeditor/diffeditorwidget.h b/src/plugins/diffeditor/diffeditorwidget.h index a5057deab63..8e4973c7f64 100644 --- a/src/plugins/diffeditor/diffeditorwidget.h +++ b/src/plugins/diffeditor/diffeditorwidget.h @@ -86,6 +86,7 @@ public: public slots: void setContextLinesNumber(int lines); void setIgnoreWhitespaces(bool ignore); + void setHorizontalScrollBarSynchronization(bool on); void navigateToDiffFile(int diffFileIndex); signals: @@ -104,7 +105,6 @@ private slots: void rightCursorPositionChanged(); void leftDocumentSizeChanged(); void rightDocumentSizeChanged(); - void toggleScrollBarSynchronization(bool on); private: struct DiffList { diff --git a/src/plugins/fakevim/fakevim_test.cpp b/src/plugins/fakevim/fakevim_test.cpp index ae2a7a31c35..e946ae20dad 100644 --- a/src/plugins/fakevim/fakevim_test.cpp +++ b/src/plugins/fakevim/fakevim_test.cpp @@ -786,6 +786,29 @@ void FakeVimPlugin::test_vim_delete() KEYS("\"xd$", X "" N "def"); KEYS("\"xp", "ab" X "c" N "def"); KEYS("2\"xp", "abcabcab" X "c" N "def"); + + /* QTCREATORBUG-9289 */ + data.setText("abc" N "def"); + KEYS("$" "dw", "a" X "b" N "def"); + KEYS("dw", X "a" N "def"); + KEYS("dw", X "" N "def"); + KEYS("dw", X "def"); + + data.setText("abc" N "def ghi"); + KEYS("2dw", X "ghi"); + + data.setText("abc" N X "" N "def"); + KEYS("dw", "abc" N X "def"); + KEYS("k$" "dw", "a" X "b" N "def"); + KEYS("j$h" "dw", "ab" N X "d"); + + data.setText("abc" N "def"); + KEYS("2lvx", "a" X "b" N "def"); + KEYS("vlx", "a" X "def"); + + data.setText("abc" N "def"); + KEYS("2lvox", "a" X "b" N "def"); + KEYS("vlox", "a" X "def"); } void FakeVimPlugin::test_vim_delete_inner_word() diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp index 6de785bacaa..695578a9f1a 100644 --- a/src/plugins/fakevim/fakevimhandler.cpp +++ b/src/plugins/fakevim/fakevimhandler.cpp @@ -1502,11 +1502,11 @@ public: int count() const { return mvCount() * opCount(); } QTextBlock block() const { return m_cursor.block(); } int leftDist() const { return position() - block().position(); } - int rightDist() const { return block().length() - leftDist() - 1; } + int rightDist() const { return block().length() - leftDist() - (isVisualCharMode() ? 0 : 1); } bool atBlockStart() const { return m_cursor.atBlockStart(); } bool atBlockEnd() const { return m_cursor.atBlockEnd(); } bool atEndOfLine() const { return atBlockEnd() && block().length() > 1; } - bool atDocumentEnd() const { return position() >= lastPositionInDocument(); } + bool atDocumentEnd() const { return position() >= lastPositionInDocument(true); } bool atDocumentStart() const { return m_cursor.atStart(); } bool atEmptyLine(const QTextCursor &tc = QTextCursor()) const; @@ -1605,7 +1605,14 @@ public: } void moveRight(int n = 1) { //dump("RIGHT 1"); - m_cursor.movePosition(Right, KeepAnchor, n); + if (isVisualCharMode()) { + const QTextBlock currentBlock = block(); + const int max = currentBlock.position() + currentBlock.length() - 1; + const int pos = position() + n; + setPosition(qMin(pos, max)); + } else { + m_cursor.movePosition(Right, KeepAnchor, n); + } if (atEndOfLine()) emit q->fold(1, false); //dump("RIGHT 2"); @@ -2060,7 +2067,8 @@ void FakeVimHandler::Private::leaveFakeVim() // The command might have destroyed the editor. if (m_textedit || m_plaintextedit) { // We fake vi-style end-of-line behaviour - m_fakeEnd = atEndOfLine() && g.mode == CommandMode && !isVisualBlockMode(); + m_fakeEnd = atEndOfLine() && g.m_mode == CommandMode && !isVisualBlockMode() + && !isVisualCharMode(); //QTC_ASSERT(g.mode == InsertMode || g.mode == ReplaceMode // || !atBlockEnd() || block().length() <= 1, @@ -2247,7 +2255,7 @@ void FakeVimHandler::Private::exportSelection() if (visualBlockInverted) setAnchorAndPosition(anc + 1, pos); else - setAnchorAndPosition(anc, pos + 1); + setAnchorAndPosition(anc, pos); if (g.visualMode == VisualBlockMode) { commitCursor(); @@ -2824,6 +2832,23 @@ void FakeVimHandler::Private::fixSelection() if (g.rangemode == RangeBlockMode) return; + if (g.movetype == MoveInclusive) { + // If position or anchor is after end of non-empty line, include line break in selection. + if (document()->characterAt(position()) == ParagraphSeparator) { + if (!atEmptyLine()) { + setPosition(position() + 1); + return; + } + } else if (document()->characterAt(anchor()) == ParagraphSeparator) { + QTextCursor tc = m_cursor; + tc.setPosition(anchor()); + if (!atEmptyLine(tc)) { + setAnchorAndPosition(anchor() + 1, position()); + return; + } + } + } + if (g.movetype == MoveExclusive) { if (anchor() < position() && atBlockStart()) { // Exlusive motion ending at the beginning of line @@ -3529,6 +3554,11 @@ bool FakeVimHandler::Private::handleMovement(const Input &input) g.movetype = MoveInclusive; } else { moveToNextWordStart(count, simple, true); + // Command 'dw' deletes to the next word on the same line or to end of line. + if (m_submode == DeleteSubMode && count == 1) { + const QTextBlock currentBlock = document()->findBlock(anchor()); + setPosition(qMin(position(), currentBlock.position() + currentBlock.length())); + } g.movetype = MoveExclusive; } setTargetColumn(); @@ -7270,10 +7300,9 @@ void FakeVimHandler::Private::redo() void FakeVimHandler::Private::updateCursorShape() { bool thinCursor = g.mode == ExMode - || g.subsubmode == SearchSubSubMode + || g.ubsubmode == SearchSubSubMode || g.mode == InsertMode - || isVisualMode() - || m_cursor.hasSelection(); + || (isVisualMode() && !isVisualCharMode()); EDITOR(setOverwriteMode(!thinCursor)); } @@ -7349,7 +7378,7 @@ void FakeVimHandler::Private::initVisualInsertMode(QChar command) void FakeVimHandler::Private::enterCommandMode(Mode returnToMode) { - if (atEndOfLine()) + if (isNoVisualMode() && atEndOfLine()) moveLeft(); g.mode = CommandMode; clearCommandMode(); diff --git a/src/plugins/fakevim/fakevimplugin.cpp b/src/plugins/fakevim/fakevimplugin.cpp index 235696eda64..3d9c30356a8 100644 --- a/src/plugins/fakevim/fakevimplugin.cpp +++ b/src/plugins/fakevim/fakevimplugin.cpp @@ -1324,7 +1324,7 @@ void FakeVimPluginPrivate::windowCommand(const QString &map, int count) else if (key == _("S") || key == _("")) triggerAction(Core::Constants::SPLIT); else if (key == _("W") || key == _("")) - triggerAction(Core::Constants::GOTO_OTHER_SPLIT); + triggerAction(Core::Constants::GOTO_NEXT_SPLIT); else if (key.contains(_("RIGHT")) || key == _("L") || key == _("")) moveSomewhere(&moveRightWeight, key == _("") ? -1 : count); else if (key.contains(_("LEFT")) || key == _("H") || key == _("")) diff --git a/src/plugins/git/Git.mimetypes.xml b/src/plugins/git/Git.mimetypes.xml index c40c30181a9..ae51ec2e9bb 100644 --- a/src/plugins/git/Git.mimetypes.xml +++ b/src/plugins/git/Git.mimetypes.xml @@ -6,4 +6,9 @@ + + + Git Commit File + + diff --git a/src/plugins/git/changeselectiondialog.cpp b/src/plugins/git/changeselectiondialog.cpp index 4f0e4837501..cc5dc40b22f 100644 --- a/src/plugins/git/changeselectiondialog.cpp +++ b/src/plugins/git/changeselectiondialog.cpp @@ -157,7 +157,7 @@ void ChangeSelectionDialog::chooseWorkingDirectory() QString ChangeSelectionDialog::workingDirectory() const { - if (!QDir(m_workingDirEdit->text()).exists()) + if (m_workingDirEdit->text().isEmpty() || !QDir(m_workingDirEdit->text()).exists()) return QString(); return GitPlugin::instance()->gitClient()-> @@ -230,7 +230,6 @@ void ChangeSelectionDialog::recalculateDetails() QString workingDir = workingDirectory(); QPalette palette = m_workingDirEdit->palette(); if (workingDir.isEmpty()) { - m_workingDirEdit->palette(); m_detailsText->setPlainText(tr("Error: Bad working directory.")); palette.setColor(QPalette::Text, Qt::red); m_workingDirEdit->setPalette(palette); diff --git a/src/plugins/git/gerrit/gerritplugin.cpp b/src/plugins/git/gerrit/gerritplugin.cpp index c1687fb7971..75226043363 100644 --- a/src/plugins/git/gerrit/gerritplugin.cpp +++ b/src/plugins/git/gerrit/gerritplugin.cpp @@ -106,28 +106,23 @@ private slots: void processReadyReadStandardOutput(); private: - // State enumeration. It starts in 'FetchState' and then - // branches to 'WritePatchFileState', 'CherryPickState' - // or 'CheckoutState' depending on FetchMode. enum State { - FetchState, // Fetch patch - WritePatchFileState, // Write patch to a file + FetchState, DoneState, ErrorState }; void handleError(const QString &message); - void startWritePatchFile(); + void show(); void cherryPick(); + void checkout(); const QSharedPointer m_change; const QString m_repository; const FetchMode m_fetchMode; const QString m_git; const QSharedPointer m_parameters; - QScopedPointer m_patchFile; - QString m_patchFileName; State m_state; QProcess m_process; QFutureInterface m_progress; @@ -183,7 +178,6 @@ void FetchContext::start() void FetchContext::processFinished(int exitCode, QProcess::ExitStatus es) { - Git::Internal::GitClient *client = Git::Internal::GitPlugin::instance()->gitClient(); if (es != QProcess::NormalExit) { handleError(tr("%1 crashed.").arg(m_git)); return; @@ -192,60 +186,18 @@ void FetchContext::processFinished(int exitCode, QProcess::ExitStatus es) handleError(tr("%1 returned %2.").arg(m_git).arg(exitCode)); return; } - switch (m_state) { - case DoneState: - case ErrorState: - break; - case FetchState: + if (m_state == FetchState) { m_progress.setProgressValue(m_progress.progressValue() + 1); - switch (m_fetchMode) { - case FetchDisplay: - if (client->settings()->boolValue(Git::Internal::GitSettings::useDiffEditorKey)) { - client->show(m_repository, QLatin1String("FETCH_HEAD")); - m_progress.reportFinished(); - m_state = DoneState; - deleteLater(); - } else { - m_state = WritePatchFileState; - startWritePatchFile(); - } - break; - case FetchCherryPick: - case FetchCheckout: - if (m_fetchMode == FetchCherryPick) { - cherryPick(); - } else { - client->synchronousCheckout(m_repository, QLatin1String("FETCH_HEAD")); - } - m_progress.reportFinished(); - m_state = DoneState; - deleteLater(); - break; - } // switch (m_fetchMode) - break; - case WritePatchFileState: - switch (m_fetchMode) { - case FetchDisplay: { - m_patchFileName = m_patchFile->fileName(); - m_patchFile->close(); - m_patchFile.reset(); - m_state = DoneState; - m_progress.reportFinished(); - QString title = QString(QLatin1String("Gerrit patch %1/%2")) - .arg(m_change->number).arg(m_change->currentPatchSet.patchSetNumber); - Core::IEditor *editor = Core::EditorManager::openEditor( - m_patchFileName, Git::Constants::GIT_DIFF_EDITOR_ID); - VcsBase::VcsBaseEditorWidget *vcsEditor = VcsBase::VcsBaseEditorWidget::getVcsBaseEditor(editor); - vcsEditor->setDiffBaseDirectory(m_repository); - vcsEditor->setForceReadOnly(true); - vcsEditor->setDisplayName(title); - deleteLater(); - break; - } - default: - break; - } - break; + if (m_fetchMode == FetchDisplay) + show(); + else if (m_fetchMode == FetchCherryPick) + cherryPick(); + else if (m_fetchMode == FetchCheckout) + checkout(); + + m_progress.reportFinished(); + m_state = DoneState; + deleteLater(); } } @@ -262,10 +214,7 @@ void FetchContext::processReadyReadStandardError() void FetchContext::processReadyReadStandardOutput() { const QByteArray output = m_process.readAllStandardOutput(); - if (m_state == WritePatchFileState) - m_patchFile->write(output); - else - VcsBase::VcsBaseOutputWindow::instance()->append(QString::fromLocal8Bit(output)); + VcsBase::VcsBaseOutputWindow::instance()->append(QString::fromLocal8Bit(output)); } void FetchContext::handleError(const QString &e) @@ -286,42 +235,30 @@ void FetchContext::processError(QProcess::ProcessError e) VcsBase::VcsBaseOutputWindow::instance()->appendError(msg); } -void FetchContext::startWritePatchFile() +void FetchContext::show() { - // Fetch to file in temporary folder. - QString tempPattern = QDir::tempPath(); - if (!tempPattern.endsWith(QLatin1Char('/'))) - tempPattern += QLatin1Char('/'); - tempPattern += QLatin1String("gerrit_") + QString::number(m_change->number) - + QLatin1Char('_') - + QString::number(m_change->currentPatchSet.patchSetNumber) - + QLatin1String("XXXXXX.patch"); - m_patchFile.reset(new QTemporaryFile(tempPattern)); - m_patchFile->setAutoRemove(false); - if (!m_patchFile->open()) { - handleError(tr("Error writing to temporary file.")); - return; - } - VcsBase::VcsBaseOutputWindow::instance()->append(tr("Writing %1...").arg(m_patchFile->fileName())); - QStringList args; - args << QLatin1String("format-patch") << QLatin1String("-1") - << QLatin1String("--stdout") << QLatin1String("FETCH_HEAD"); - VcsBase::VcsBaseOutputWindow::instance()->appendCommand(m_repository, m_git, args); - if (debug) - qDebug() << m_git << args; - m_process.start(m_git, args); - m_process.closeWriteChannel(); + const QString title = QString::number(m_change->number) + QLatin1Char('/') + + QString::number(m_change->currentPatchSet.patchSetNumber); + Git::Internal::GitPlugin::instance()->gitClient()->show( + m_repository, QLatin1String("FETCH_HEAD"), QStringList(), title); } void FetchContext::cherryPick() { // Point user to errors. - VcsBase::VcsBaseOutputWindow::instance()->popup(Core::IOutputPane::ModeSwitch | Core::IOutputPane::WithFocus); - VcsBase::VcsBaseOutputWindow::instance()->append(tr("Cherry-picking %1...").arg(m_patchFileName)); + VcsBase::VcsBaseOutputWindow::instance()->popup(Core::IOutputPane::ModeSwitch + | Core::IOutputPane::WithFocus); Git::Internal::GitPlugin::instance()->gitClient()->synchronousCherryPick( m_repository, QLatin1String("FETCH_HEAD")); } +void FetchContext::checkout() +{ + Git::Internal::GitPlugin::instance()->gitClient()->synchronousCheckout( + m_repository, QLatin1String("FETCH_HEAD")); +} + + GerritPlugin::GerritPlugin(QObject *parent) : QObject(parent) , m_parameters(new GerritParameters) @@ -375,11 +312,8 @@ void GerritPlugin::push() // QScopedPointer is required to delete the dialog when leaving the function GerritPushDialog dialog(topLevel, m_reviewers, Core::ICore::mainWindow()); - if (!dialog.localChangesFound()) { - QMessageBox::warning(Core::ICore::mainWindow(), tr("No Local Changes"), - tr("Change from HEAD appears to be in remote branch already. Aborting.")); + if (!dialog.localChangesFound()) return; - } if (!dialog.valid()) { QMessageBox::warning(Core::ICore::mainWindow(), tr("Initialization Failed"), @@ -416,7 +350,7 @@ void GerritPlugin::push() target += QLatin1Char('/') + topic; args << target; - Git::Internal::GitPlugin::instance()->gitClient()->synchronousPush(topLevel, args); + Git::Internal::GitPlugin::instance()->gitClient()->push(topLevel, args); } // Open or raise the Gerrit dialog window. diff --git a/src/plugins/git/gerrit/gerritpushdialog.cpp b/src/plugins/git/gerrit/gerritpushdialog.cpp index c5c52b602f1..9dc42192dbd 100644 --- a/src/plugins/git/gerrit/gerritpushdialog.cpp +++ b/src/plugins/git/gerrit/gerritpushdialog.cpp @@ -50,28 +50,21 @@ GerritPushDialog::GerritPushDialog(const QString &workingDir, const QString &rev m_ui->repositoryLabel->setText(tr("Local repository: %1").arg( QDir::toNativeSeparators(workingDir))); - m_ui->commitView->init(workingDir, QString(), false); + if (!m_ui->commitView->init(workingDir, QString(), false)) + return; + + QString earliestCommit = m_ui->commitView->earliestCommit(); + if (earliestCommit.isEmpty()) + return; + + m_localChangesFound = true; + Git::Internal::GitClient *gitClient = Git::Internal::GitPlugin::instance()->gitClient(); QString output; QString error; QStringList args; - - args << QLatin1String("--no-color") << QLatin1String("--format=%P") - << QLatin1String("HEAD") << QLatin1String("--not")<< QLatin1String("--remotes"); - - if (!gitClient->synchronousLog(m_workingDir, args, &output) || output.isEmpty()) - return; - - output.chop(1); - if (output.isEmpty()) { - return; - } else { - output = output.mid(output.lastIndexOf(QLatin1Char('\n')) + 1); - m_localChangesFound = true; - } - - args.clear(); - args << QLatin1String("--remotes") << QLatin1String("--contains") << output; + args << QLatin1String("--remotes") << QLatin1String("--contains") + << earliestCommit + QLatin1Char('^'); if (!gitClient->synchronousBranchCmd(m_workingDir, args, &output, &error)) return; diff --git a/src/plugins/git/git.pro b/src/plugins/git/git.pro index 0366c953e11..2a669e67777 100644 --- a/src/plugins/git/git.pro +++ b/src/plugins/git/git.pro @@ -22,7 +22,8 @@ HEADERS += gitplugin.h \ branchadddialog.h \ logchangedialog.h \ mergetool.h \ - branchcheckoutdialog.h + branchcheckoutdialog.h \ + githighlighters.h SOURCES += gitplugin.cpp \ gitclient.cpp \ @@ -46,7 +47,8 @@ SOURCES += gitplugin.cpp \ branchadddialog.cpp \ logchangedialog.cpp \ mergetool.cpp \ - branchcheckoutdialog.cpp + branchcheckoutdialog.cpp \ + githighlighters.cpp FORMS += settingspage.ui \ gitsubmitpanel.ui \ diff --git a/src/plugins/git/git.qbs b/src/plugins/git/git.qbs index 2f8110f8f28..2fdd1b6b96c 100644 --- a/src/plugins/git/git.qbs +++ b/src/plugins/git/git.qbs @@ -42,6 +42,8 @@ QtcPlugin { "gitconstants.h", "giteditor.cpp", "giteditor.h", + "githighlighters.cpp", + "githighlighters.h", "gitplugin.cpp", "gitplugin.h", "gitsettings.cpp", diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp index ed2172c6057..3201097c6b2 100644 --- a/src/plugins/git/gitclient.cpp +++ b/src/plugins/git/gitclient.cpp @@ -56,8 +56,7 @@ #include #include -#include -#include +#include #include #include @@ -108,7 +107,7 @@ public: } }; - GitDiffHandler(DiffEditor::DiffEditorEditable *editor, + GitDiffHandler(DiffEditor::DiffEditor *editor, const QString &gitPath, const QString &workingDirectory, const QProcessEnvironment &environment, @@ -139,7 +138,7 @@ private: void feedEditor(); QString workingTreeContents(const QString &fileName) const; - QPointer m_editor; + QPointer m_editor; const QString m_gitPath; const QString m_workingDirectory; const QProcessEnvironment m_processEnvironment; @@ -170,7 +169,7 @@ inline bool operator<(const GitDiffHandler::Revision &rev1, const GitDiffHandler return rev1.id < rev2.id; } -GitDiffHandler::GitDiffHandler(DiffEditor::DiffEditorEditable *editor, +GitDiffHandler::GitDiffHandler(DiffEditor::DiffEditor *editor, const QString &gitPath, const QString &workingDirectory, const QProcessEnvironment &environment, @@ -649,12 +648,13 @@ public: ~ConflictHandler() { + GitClient *client = GitPlugin::instance()->gitClient(); if (m_commit.isEmpty()) { GitPlugin::instance()->gitVersionControl()->emitRepositoryChanged(m_workingDirectory); - GitPlugin::instance()->gitClient()->endStashScope(m_workingDirectory); + if (client->checkCommandInProgress(m_workingDirectory) == GitClient::NoCommand) + client->endStashScope(m_workingDirectory); } else { - GitPlugin::instance()->gitClient()->handleMergeConflicts( - m_workingDirectory, m_commit, m_command); + client->handleMergeConflicts(m_workingDirectory, m_commit, m_command); } } @@ -794,6 +794,19 @@ QString GitClient::findGitDirForRepository(const QString &repositoryDir) const return res; } +QString GitClient::findRepositoryForGitDir(const QString &gitDir) const +{ + static QHash gitDirCache; + QString &res = gitDirCache[gitDir]; + if (!res.isEmpty()) + return res; + QByteArray outputText; + QStringList arguments; + arguments << QLatin1String("rev-parse") << QLatin1String("--show-toplevel"); + fullySynchronousGit(gitDir, arguments, &outputText, 0, false); + return QString::fromLocal8Bit(outputText.trimmed()); +} + VcsBase::VcsBaseEditorWidget *GitClient::findExistingVCSEditor(const char *registerDynamicProperty, const QString &dynamicPropertyValue) const { @@ -803,27 +816,36 @@ VcsBase::VcsBaseEditorWidget *GitClient::findExistingVCSEditor(const char *regis return 0; // Exists already - Core::EditorManager::activateEditor(outputEditor, Core::EditorManager::ModeSwitch); + Core::EditorManager::activateEditor(outputEditor); outputEditor->createNew(m_msgWait); rc = VcsBase::VcsBaseEditorWidget::getVcsBaseEditor(outputEditor); return rc; } -DiffEditor::DiffEditorEditable *GitClient::findExistingDiffEditor(const char *registerDynamicProperty, - const QString &dynamicPropertyValue) const +DiffEditor::DiffEditor *GitClient::findExistingOrOpenNewDiffEditor(const char *registerDynamicProperty, + const QString &dynamicPropertyValue, const QString &titlePattern) const { Core::IEditor *outputEditor = locateEditor(registerDynamicProperty, dynamicPropertyValue); - if (!outputEditor) - return 0; + if (outputEditor) { + // Exists already + Core::EditorManager::activateEditor(outputEditor); + outputEditor->createNew(m_msgWait); + } - // Exists already - Core::EditorManager::activateEditor(outputEditor, Core::EditorManager::ModeSwitch); - outputEditor->createNew(m_msgWait); - - return qobject_cast(outputEditor); + DiffEditor::DiffEditor *editor = qobject_cast(outputEditor); + if (!editor) { + const Core::Id editorId = DiffEditor::Constants::DIFF_EDITOR_ID; + QString title = titlePattern; + editor = qobject_cast( + Core::EditorManager::openEditorWithContents(editorId, &title, m_msgWait)); + editor->document()->setProperty(registerDynamicProperty, dynamicPropertyValue); + Core::EditorManager::activateEditor(editor); // should probably go outside this block + } + return editor; } + /* Create an editor associated to VCS output of a source file/directory * (using the file's codec). Makes use of a dynamic property to find an * existing instance and to reuse it (in case, say, 'git diff foo' is @@ -859,7 +881,7 @@ VcsBase::VcsBaseEditorWidget *GitClient::createVcsEditor(const Core::Id &id, } rc->setForceReadOnly(true); - Core::EditorManager::activateEditor(outputEditor, Core::EditorManager::ModeSwitch); + Core::EditorManager::activateEditor(outputEditor); if (configWidget) rc->setConfigurationWidget(configWidget); @@ -872,21 +894,13 @@ void GitClient::diff(const QString &workingDirectory, const QStringList &unstagedFileNames, const QStringList &stagedFileNames) { + const QString title = tr("Git Diff"); + const int timeout = settings()->intValue(GitSettings::timeoutKey); + if (settings()->boolValue(GitSettings::useDiffEditorKey)) { - const Core::Id editorId = DiffEditor::Constants::DIFF_EDITOR_ID; - QString title = tr("Git Diff"); + DiffEditor::DiffEditor *editor = findExistingOrOpenNewDiffEditor("originalFileName", workingDirectory, title); - DiffEditor::DiffEditorEditable *editorEditable = findExistingDiffEditor("originalFileName", workingDirectory); - - if (!editorEditable) { - editorEditable = qobject_cast( - Core::EditorManager::openEditorWithContents(editorId, &title, m_msgWait)); - editorEditable->document()->setProperty("originalFileName", workingDirectory); - Core::EditorManager::activateEditor(editorEditable, Core::EditorManager::ModeSwitch); // should probably go outside this block - } - - int timeout = settings()->intValue(GitSettings::timeoutKey); - GitDiffHandler *handler = new GitDiffHandler(editorEditable, gitBinaryPath(), workingDirectory, processEnvironment(), timeout); + GitDiffHandler *handler = new GitDiffHandler(editor, gitBinaryPath(), workingDirectory, processEnvironment(), timeout); if (unstagedFileNames.empty() && stagedFileNames.empty()) { // local repository diff @@ -901,7 +915,6 @@ void GitClient::diff(const QString &workingDirectory, } else { const QString binary = settings()->stringValue(GitSettings::binaryPathKey); const Core::Id editorId = Git::Constants::GIT_DIFF_EDITOR_ID; - const QString title = tr("Git Diff"); VcsBase::VcsBaseEditorWidget *editor = findExistingVCSEditor("originalFileName", workingDirectory); if (!editor) { @@ -927,8 +940,6 @@ void GitClient::diff(const QString &workingDirectory, QStringList cmdArgs; cmdArgs << QLatin1String("diff") << QLatin1String(noColorOption); - int timeout = settings()->intValue(GitSettings::timeoutKey); - if (unstagedFileNames.empty() && stagedFileNames.empty()) { QStringList arguments(cmdArgs); arguments << userDiffArgs; @@ -959,27 +970,18 @@ void GitClient::diff(const QString &workingDirectory, const QStringList &diffArgs, const QString &fileName) { + const QString title = tr("Git Diff \"%1\"").arg(fileName); if (settings()->boolValue(GitSettings::useDiffEditorKey)) { - const Core::Id editorId = DiffEditor::Constants::DIFF_EDITOR_ID; - QString title = tr("Git Diff \"%1\"").arg(fileName); const QString sourceFile = VcsBase::VcsBaseEditorWidget::getSource(workingDirectory, fileName); - - DiffEditor::DiffEditorEditable *editorEditable = findExistingDiffEditor("originalFileName", sourceFile); - if (!editorEditable) { - editorEditable = qobject_cast( - Core::EditorManager::openEditorWithContents(editorId, &title, m_msgWait)); - editorEditable->document()->setProperty("originalFileName", sourceFile); - Core::EditorManager::activateEditor(editorEditable, Core::EditorManager::ModeSwitch); - } + DiffEditor::DiffEditor *editor = findExistingOrOpenNewDiffEditor("originalFileName", sourceFile, title); if (!fileName.isEmpty()) { int timeout = settings()->intValue(GitSettings::timeoutKey); - GitDiffHandler *handler = new GitDiffHandler(editorEditable, gitBinaryPath(), workingDirectory, processEnvironment(), timeout); + GitDiffHandler *handler = new GitDiffHandler(editor, gitBinaryPath(), workingDirectory, processEnvironment(), timeout); handler->diffFile(fileName); } } else { const Core::Id editorId = Git::Constants::GIT_DIFF_EDITOR_ID; - const QString title = tr("Git Diff \"%1\"").arg(fileName); const QString sourceFile = VcsBase::VcsBaseEditorWidget::getSource(workingDirectory, fileName); VcsBase::VcsBaseEditorWidget *editor = findExistingVCSEditor("originalFileName", sourceFile); @@ -1009,24 +1011,16 @@ void GitClient::diffBranch(const QString &workingDirectory, const QStringList &diffArgs, const QString &branchName) { + const QString title = tr("Git Diff Branch \"%1\"").arg(branchName); if (settings()->boolValue(GitSettings::useDiffEditorKey)) { - const Core::Id editorId = DiffEditor::Constants::DIFF_EDITOR_ID; - QString title = tr("Git Diff Branch \"%1\"").arg(branchName); - - DiffEditor::DiffEditorEditable *editorEditable = findExistingDiffEditor("BranchName", branchName); - if (!editorEditable) { - editorEditable = qobject_cast( - Core::EditorManager::openEditorWithContents(editorId, &title, m_msgWait)); - editorEditable->document()->setProperty("BranchName", branchName); - Core::EditorManager::activateEditor(editorEditable, Core::EditorManager::ModeSwitch); - } + DiffEditor::DiffEditor *editor = + findExistingOrOpenNewDiffEditor("BranchName", branchName, title); int timeout = settings()->intValue(GitSettings::timeoutKey); - GitDiffHandler *handler = new GitDiffHandler(editorEditable, gitBinaryPath(), workingDirectory, processEnvironment(), timeout); + GitDiffHandler *handler = new GitDiffHandler(editor, gitBinaryPath(), workingDirectory, processEnvironment(), timeout); handler->diffBranch(branchName); } else { const Core::Id editorId = Git::Constants::GIT_DIFF_EDITOR_ID; - const QString title = tr("Git Diff Branch \"%1\"").arg(branchName); const QString sourceFile = VcsBase::VcsBaseEditorWidget::getSource(workingDirectory, QStringList()); VcsBase::VcsBaseEditorWidget *editor = findExistingVCSEditor("BranchName", branchName); @@ -1116,31 +1110,26 @@ static inline QString msgCannotShow(const QString &sha) return GitClient::tr("Cannot describe \"%1\".").arg(sha); } -void GitClient::show(const QString &source, const QString &id, const QStringList &args) +void GitClient::show(const QString &source, const QString &id, + const QStringList &args, const QString &name) { if (!canShow(id)) { outputWindow()->append(msgCannotShow(id)); return; } + const QString title = tr("Git Show \"%1\"").arg(name.isEmpty() ? id : name); + const QFileInfo sourceFi(source); + const QString workDir = sourceFi.isDir() ? sourceFi.absoluteFilePath() : sourceFi.absolutePath(); if (settings()->boolValue(GitSettings::useDiffEditorKey)) { - QString title = tr("Git Show \"%1\"").arg(id); - const Core::Id editorId = DiffEditor::Constants::DIFF_EDITOR_ID; - - DiffEditor::DiffEditorEditable *editorEditable = findExistingDiffEditor("show", id); - - if (!editorEditable) { - editorEditable = qobject_cast( - Core::EditorManager::openEditorWithContents(editorId, &title, m_msgWait)); - editorEditable->document()->setProperty("show", id); - Core::EditorManager::activateEditor(editorEditable, Core::EditorManager::ModeSwitch); // should probably go outside this block - } + DiffEditor::DiffEditor *editor = findExistingOrOpenNewDiffEditor("show", id, title); int timeout = settings()->intValue(GitSettings::timeoutKey); - GitDiffHandler *handler = new GitDiffHandler(editorEditable, gitBinaryPath(), source, processEnvironment(), timeout); + GitDiffHandler *handler = new GitDiffHandler(editor, gitBinaryPath(), + findRepositoryForDirectory(workDir), + processEnvironment(), timeout); handler->show(id); } else { - const QString title = tr("Git Show \"%1\"").arg(id); const Core::Id editorId = Git::Constants::GIT_DIFF_EDITOR_ID; VcsBase::VcsBaseEditorWidget *editor = findExistingVCSEditor("show", id); if (!editor) @@ -1156,8 +1145,6 @@ void GitClient::show(const QString &source, const QString &id, const QStringList arguments.append(userArgs); arguments << id; - const QFileInfo sourceFi(source); - const QString workDir = sourceFi.isDir() ? sourceFi.absoluteFilePath() : sourceFi.absolutePath(); editor->setDiffBaseDirectory(workDir); executeGit(workDir, arguments, editor); } @@ -1230,7 +1217,7 @@ void GitClient::blame(const QString &workingDirectory, arguments << QLatin1String("--") << fileName; if (!revision.isEmpty()) arguments << revision; - executeGit(workingDirectory, arguments, editor, false, VcsBase::Command::NoReport, lineNumber); + executeGit(workingDirectory, arguments, editor, false, lineNumber); } bool GitClient::synchronousCheckout(const QString &workingDirectory, @@ -2042,7 +2029,6 @@ bool GitClient::synchronousShow(const QString &workingDirectory, const QString & // Retrieve list of files to be cleaned bool GitClient::cleanList(const QString &workingDirectory, const QString &flag, QStringList *files, QString *errorMessage) { - files->clear(); QStringList args; args << QLatin1String("clean") << QLatin1String("--dry-run") << flag; QByteArray outputText; @@ -2065,6 +2051,15 @@ bool GitClient::synchronousCleanList(const QString &workingDirectory, QStringLis { bool res = cleanList(workingDirectory, QLatin1String("-df"), files, errorMessage); res &= cleanList(workingDirectory, QLatin1String("-dXf"), ignoredFiles, errorMessage); + + SubmoduleDataMap submodules = submoduleList(workingDirectory); + foreach (const SubmoduleData &submodule, submodules) { + if (submodule.ignore != QLatin1String("all") + && submodule.ignore != QLatin1String("dirty")) { + res &= synchronousCleanList(workingDirectory + QLatin1Char('/') + submodule.dir, + files, ignoredFiles, errorMessage); + } + } return res; } @@ -2115,15 +2110,13 @@ VcsBase::Command *GitClient::executeGit(const QString &workingDirectory, const QStringList &arguments, VcsBase::VcsBaseEditorWidget* editor, bool useOutputToWindow, - VcsBase::Command::TerminationReportMode tm, - int editorLineNumber, - bool unixTerminalDisabled) + int editorLineNumber) { outputWindow()->appendCommand(workingDirectory, settings()->stringValue(GitSettings::binaryPathKey), arguments); VcsBase::Command *command = createCommand(workingDirectory, editor, useOutputToWindow, editorLineNumber); command->addJob(arguments, settings()->intValue(GitSettings::timeoutKey)); - command->setTerminationReportMode(tm); - command->setUnixTerminalDisabled(unixTerminalDisabled); + command->setTerminationReportMode(VcsBase::Command::NoReport); + command->setUnixTerminalDisabled(false); command->execute(); return command; } @@ -2298,14 +2291,14 @@ GitClient::CommandInProgress GitClient::checkCommandInProgress(const QString &wo void GitClient::continueCommandIfNeeded(const QString &workingDirectory) { - switch (checkCommandInProgress(workingDirectory)) { + CommandInProgress command = checkCommandInProgress(workingDirectory); + switch (command) { case Rebase: - continuePreviousGitCommand(workingDirectory, tr("Continue Rebase"), - tr("Continue rebase?"), tr("Continue"), QLatin1String("rebase")); - break; case RebaseMerge: continuePreviousGitCommand(workingDirectory, tr("Continue Rebase"), - tr("Continue rebase?"), tr("Continue"), QLatin1String("rebase"), false); + tr("Rebase is in progress. What do you want to do?"), + tr("Continue"), QLatin1String("rebase"), + command != RebaseMerge); break; case Revert: continuePreviousGitCommand(workingDirectory, tr("Continue Revert"), @@ -2506,6 +2499,16 @@ bool GitClient::getCommitData(const QString &workingDirectory, // Run status. Note that it has exitcode 1 if there are no added files. QString output; + if (commitData.commitType == FixupCommit) { + QStringList arguments; + arguments << QLatin1String("HEAD") << QLatin1String("--not") + << QLatin1String("--remotes") << QLatin1String("-n1"); + synchronousLog(repoDirectory, arguments, &output, errorMessage); + if (output.isEmpty()) { + *errorMessage = msgNoCommits(false); + return false; + } + } const StatusResult status = gitStatus(repoDirectory, ShowAll, &output, errorMessage); switch (status) { case StatusChanged: @@ -2814,16 +2817,13 @@ void GitClient::revert(const QStringList &files, bool revertStaging) } } -bool GitClient::synchronousFetch(const QString &workingDirectory, const QString &remote) +void GitClient::fetch(const QString &workingDirectory, const QString &remote) { QStringList arguments(QLatin1String("fetch")); arguments << (remote.isEmpty() ? QLatin1String("--all") : remote); - // Disable UNIX terminals to suppress SSH prompting. - const unsigned flags = VcsBase::VcsBasePlugin::SshPasswordPrompt|VcsBase::VcsBasePlugin::ShowStdOutInLogWindow - |VcsBase::VcsBasePlugin::ShowSuccessMessage; - const Utils::SynchronousProcessResponse resp = synchronousGit(workingDirectory, arguments, flags); - return resp.result == Utils::SynchronousProcessResponse::Finished; + VcsBase::Command *cmd = executeGit(workingDirectory, arguments, 0, true); + connectRepositoryChanged(workingDirectory, cmd); } bool GitClient::executeAndHandleConflicts(const QString &workingDirectory, @@ -2961,17 +2961,14 @@ void GitClient::subversionLog(const QString &workingDirectory) executeGit(workingDirectory, arguments, editor); } -bool GitClient::synchronousPush(const QString &workingDirectory, const QStringList &pushArgs) +void GitClient::push(const QString &workingDirectory, const QStringList &pushArgs) { - // Disable UNIX terminals to suppress SSH prompting. - const unsigned flags = VcsBase::VcsBasePlugin::SshPasswordPrompt|VcsBase::VcsBasePlugin::ShowStdOutInLogWindow - |VcsBase::VcsBasePlugin::ShowSuccessMessage; QStringList arguments(QLatin1String("push")); if (!pushArgs.isEmpty()) arguments += pushArgs; - const Utils::SynchronousProcessResponse resp = - synchronousGit(workingDirectory, arguments, flags); - return resp.result == Utils::SynchronousProcessResponse::Finished; + + VcsBase::Command *cmd = executeGit(workingDirectory, arguments, 0, true); + connectRepositoryChanged(workingDirectory, cmd); } bool GitClient::synchronousMerge(const QString &workingDirectory, const QString &branch) @@ -3051,6 +3048,11 @@ QString GitClient::msgNoChangedFiles() return tr("There are no modified files."); } +QString GitClient::msgNoCommits(bool includeRemote) +{ + return includeRemote ? tr("No commits were found") : tr("No local commits were found"); +} + void GitClient::stashPop(const QString &workingDirectory, const QString &stash) { QStringList arguments(QLatin1String("stash")); diff --git a/src/plugins/git/gitclient.h b/src/plugins/git/gitclient.h index 414efe65216..a280ccc34d4 100644 --- a/src/plugins/git/gitclient.h +++ b/src/plugins/git/gitclient.h @@ -61,7 +61,7 @@ namespace Utils { } namespace DiffEditor { - class DiffEditorEditable; + class DiffEditor; } namespace Git { @@ -138,6 +138,7 @@ public: QString findRepositoryForDirectory(const QString &dir); QString findGitDirForRepository(const QString &repositoryDir) const; + QString findRepositoryForGitDir(const QString &gitDir) const; void diff(const QString &workingDirectory, const QStringList &diffArgs, const QString &fileName); void diff(const QString &workingDirectory, const QStringList &diffArgs, @@ -237,10 +238,9 @@ public: bool cloneRepository(const QString &directory, const QByteArray &url); QString vcsGetRepositoryURL(const QString &directory); - bool synchronousFetch(const QString &workingDirectory, const QString &remote); + void fetch(const QString &workingDirectory, const QString &remote); bool synchronousPull(const QString &workingDirectory, bool rebase); - bool synchronousPush(const QString &workingDirectory, - const QStringList &pushArgs = QStringList()); + void push(const QString &workingDirectory, const QStringList &pushArgs = QStringList()); bool synchronousMerge(const QString &workingDirectory, const QString &branch); bool canRebase(const QString &workingDirectory) const; bool synchronousRebase(const QString &workingDirectory, @@ -315,12 +315,14 @@ public: void handleMergeConflicts(const QString &workingDir, const QString &commit, const QString &abortCommand); static QString msgNoChangedFiles(); + static QString msgNoCommits(bool includeRemote); static const char *noColorOption; static const char *decorateOption; public slots: - void show(const QString &source, const QString &id, const QStringList &args = QStringList()); + void show(const QString &source, const QString &id, + const QStringList &args = QStringList(), const QString &name = QString()); void saveSettings(); private slots: @@ -332,8 +334,9 @@ private: QTextCodec *getSourceCodec(const QString &file) const; VcsBase::VcsBaseEditorWidget *findExistingVCSEditor(const char *registerDynamicProperty, const QString &dynamicPropertyValue) const; - DiffEditor::DiffEditorEditable *findExistingDiffEditor(const char *registerDynamicProperty, - const QString &dynamicPropertyValue) const; + DiffEditor::DiffEditor *findExistingOrOpenNewDiffEditor(const char *registerDynamicProperty, + const QString &dynamicPropertyValue, + const QString &titlePattern) const; enum CodecType { CodecSource, CodecLogOutput, CodecNone }; VcsBase::VcsBaseEditorWidget *createVcsEditor(const Core::Id &kind, @@ -353,9 +356,7 @@ private: const QStringList &arguments, VcsBase::VcsBaseEditorWidget* editor = 0, bool useOutputToWindow = false, - VcsBase::Command::TerminationReportMode tm = VcsBase::Command::NoReport, - int editorLineNumber = -1, - bool unixTerminalDisabled = false); + int editorLineNumber = -1); // Fully synchronous git execution (QProcess-based). bool fullySynchronousGit(const QString &workingDirectory, diff --git a/src/plugins/git/gitconstants.h b/src/plugins/git/gitconstants.h index 35cf9619562..ca311cb5f1a 100644 --- a/src/plugins/git/gitconstants.h +++ b/src/plugins/git/gitconstants.h @@ -50,6 +50,9 @@ const char C_GIT_DIFF_EDITOR[] = "Git Diff Editor"; const char GIT_COMMIT_TEXT_EDITOR_ID[] = "Git Commit Editor"; const char GIT_COMMIT_TEXT_EDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("VCS", "Git Commit Editor"); const char C_GIT_COMMIT_TEXT_EDITOR[] = "Git Commit Editor"; +const char GIT_REBASE_EDITOR_ID[] = "Git Rebase Editor"; +const char GIT_REBASE_EDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("VCS", "Git Rebase Editor"); +const char C_GIT_REBASE_EDITOR[] = "Git Rebase Editor"; const char C_GITSUBMITEDITOR[] = "Git Submit Editor"; const char GITSUBMITEDITOR_ID[] = "Git Submit Editor"; diff --git a/src/plugins/git/giteditor.cpp b/src/plugins/git/giteditor.cpp index 2c6062799bf..165b1e7998a 100644 --- a/src/plugins/git/giteditor.cpp +++ b/src/plugins/git/giteditor.cpp @@ -35,11 +35,12 @@ #include "gitsettings.h" #include "gitsubmiteditorwidget.h" #include "gitconstants.h" +#include "githighlighters.h" #include #include #include -#include + #include #include #include @@ -231,8 +232,23 @@ void GitEditor::revertChange() void GitEditor::init() { VcsBase::VcsBaseEditorWidget::init(); - if (editor()->id() == Git::Constants::GIT_COMMIT_TEXT_EDITOR_ID) + Core::Id editorId = editor()->id(); + if (editorId == Git::Constants::GIT_COMMIT_TEXT_EDITOR_ID) new GitSubmitHighlighter(baseTextDocument().data()); + else if (editorId == Git::Constants::GIT_REBASE_EDITOR_ID) + new GitRebaseHighlighter(baseTextDocument().data()); +} + +bool GitEditor::open(QString *errorString, const QString &fileName, const QString &realFileName) +{ + bool res = VcsBaseEditorWidget::open(errorString, fileName, realFileName); + Core::Id editorId = editor()->id(); + if (editorId == Git::Constants::GIT_COMMIT_TEXT_EDITOR_ID + || editorId == Git::Constants::GIT_REBASE_EDITOR_ID) { + QFileInfo fi(fileName); + setSource(GitPlugin::instance()->gitClient()->findRepositoryForGitDir(fi.absolutePath())); + } + return res; } QString GitEditor::decorateVersion(const QString &revision) const @@ -284,5 +300,12 @@ QString GitEditor::revisionSubject(const QTextBlock &inBlock) const return QString(); } +bool GitEditor::supportChangeLinks() const +{ + return VcsBaseEditorWidget::supportChangeLinks() + || (editor()->id() == Git::Constants::GIT_COMMIT_TEXT_EDITOR_ID) + || (editor()->id() == Git::Constants::GIT_REBASE_EDITOR_ID); +} + } // namespace Internal } // namespace Git diff --git a/src/plugins/git/giteditor.h b/src/plugins/git/giteditor.h index 5010fd81937..b5539892c90 100644 --- a/src/plugins/git/giteditor.h +++ b/src/plugins/git/giteditor.h @@ -60,6 +60,7 @@ private slots: private: void init(); + bool open(QString *errorString, const QString &fileName, const QString &realFileName); QSet annotationChanges() const; QString changeUnderCursor(const QTextCursor &) const; VcsBase::BaseAnnotationHighlighter *createAnnotationHighlighter(const QSet &changes, const QColor &bg) const; @@ -68,6 +69,7 @@ private: bool isValidRevision(const QString &revision) const; void addChangeActions(QMenu *menu, const QString &change); QString revisionSubject(const QTextBlock &inBlock) const; + bool supportChangeLinks() const; mutable QRegExp m_changeNumberPattern; QString m_currentChange; diff --git a/src/plugins/git/githighlighters.cpp b/src/plugins/git/githighlighters.cpp new file mode 100644 index 00000000000..2f00c9f2db3 --- /dev/null +++ b/src/plugins/git/githighlighters.cpp @@ -0,0 +1,164 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#include +#include +#include + +#include + +#include "githighlighters.h" + +namespace Git { +namespace Internal { + +static const char CHANGE_PATTERN[] = "\\b[a-f0-9]{7,40}\\b"; + +// Retrieve the comment char format from the text editor. +static QTextCharFormat commentFormat() +{ + const TextEditor::FontSettings settings = TextEditor::TextEditorSettings::instance()->fontSettings(); + return settings.toTextCharFormat(TextEditor::C_COMMENT); +} + +GitSubmitHighlighter::GitSubmitHighlighter(QTextEdit * parent) : + TextEditor::SyntaxHighlighter(parent) +{ + initialize(); +} + +GitSubmitHighlighter::GitSubmitHighlighter(TextEditor::BaseTextDocument *parent) : + TextEditor::SyntaxHighlighter(parent) +{ + initialize(); +} + +void GitSubmitHighlighter::initialize() +{ + m_commentFormat = commentFormat(); + m_keywordPattern.setPattern(QLatin1String("^[\\w-]+:")); + m_hashChar = QLatin1Char('#'); + QTC_CHECK(m_keywordPattern.isValid()); +} + +void GitSubmitHighlighter::highlightBlock(const QString &text) +{ + // figure out current state + State state = static_cast(previousBlockState()); + if (text.isEmpty()) { + if (state == Header) + state = Other; + setCurrentBlockState(state); + return; + } else if (text.startsWith(m_hashChar)) { + setFormat(0, text.size(), m_commentFormat); + setCurrentBlockState(state); + return; + } else if (state == None) { + state = Header; + } + + setCurrentBlockState(state); + // Apply format. + switch (state) { + case None: + break; + case Header: { + QTextCharFormat charFormat = format(0); + charFormat.setFontWeight(QFont::Bold); + setFormat(0, text.size(), charFormat); + break; + } + case Other: + // Format key words ("Task:") italic + if (m_keywordPattern.indexIn(text, 0, QRegExp::CaretAtZero) == 0) { + QTextCharFormat charFormat = format(0); + charFormat.setFontItalic(true); + setFormat(0, m_keywordPattern.matchedLength(), charFormat); + } + break; + } +} + +GitRebaseHighlighter::RebaseAction::RebaseAction(const QString ®exp, + const TextEditor::FontSettings &settings, + TextEditor::TextStyle category) + : exp(regexp) +{ + format = settings.toTextCharFormat(category); +} + +GitRebaseHighlighter::GitRebaseHighlighter(TextEditor::BaseTextDocument *parent) : + TextEditor::SyntaxHighlighter(parent), + m_hashChar(QLatin1Char('#')), + m_changeNumberPattern(QLatin1String(CHANGE_PATTERN)) +{ + const TextEditor::FontSettings settings = TextEditor::TextEditorSettings::instance()->fontSettings(); + m_commentFormat = settings.toTextCharFormat(TextEditor::C_COMMENT); + m_changeFormat = settings.toTextCharFormat(TextEditor::C_DOXYGEN_COMMENT); + m_descFormat = settings.toTextCharFormat(TextEditor::C_STRING); + m_actions << RebaseAction(QLatin1String("^(p|pick)\\b"), settings, TextEditor::C_KEYWORD); + m_actions << RebaseAction(QLatin1String("^(r|reword)\\b"), settings, TextEditor::C_FIELD); + m_actions << RebaseAction(QLatin1String("^(e|edit)\\b"), settings, TextEditor::C_TYPE); + m_actions << RebaseAction(QLatin1String("^(s|squash)\\b"), settings, TextEditor::C_ENUMERATION); + m_actions << RebaseAction(QLatin1String("^(f|fixup)\\b"), settings, TextEditor::C_NUMBER); + m_actions << RebaseAction(QLatin1String("^(x|exec)\\b"), settings, TextEditor::C_LABEL); +} + +void GitRebaseHighlighter::highlightBlock(const QString &text) +{ + if (text.startsWith(m_hashChar)) { + setFormat(0, text.size(), m_commentFormat); + int changeIndex = 0; + while ((changeIndex = m_changeNumberPattern.indexIn(text, changeIndex)) != -1) { + const int changeLen = m_changeNumberPattern.matchedLength(); + setFormat(changeIndex, changeLen, m_changeFormat); + changeIndex += changeLen; + } + return; + } + + foreach (const RebaseAction &action, m_actions) { + if (action.exp.indexIn(text) != -1) { + const int len = action.exp.matchedLength(); + setFormat(0, len, action.format); + const int changeIndex = m_changeNumberPattern.indexIn(text, len); + if (changeIndex != -1) { + const int changeLen = m_changeNumberPattern.matchedLength(); + const int descStart = changeIndex + changeLen + 1; + setFormat(changeIndex, changeLen, m_changeFormat); + setFormat(descStart, text.size() - descStart, m_descFormat); + } + break; + } + } +} + +} // namespace Internal +} // namespace Git diff --git a/src/plugins/git/githighlighters.h b/src/plugins/git/githighlighters.h new file mode 100644 index 00000000000..3d7f6e06218 --- /dev/null +++ b/src/plugins/git/githighlighters.h @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#ifndef GITHIGHLIGHTERS_H +#define GITHIGHLIGHTERS_H + +#include +#include + +namespace TextEditor { +class FontSettings; +} + +namespace Git { +namespace Internal { + +// Highlighter for git submit messages. Make the first line bold, indicates +// comments as such (retrieving the format from the text editor) and marks up +// keywords (words in front of a colon as in 'Task: '). +class GitSubmitHighlighter : public TextEditor::SyntaxHighlighter +{ +public: + explicit GitSubmitHighlighter(QTextEdit *parent); + explicit GitSubmitHighlighter(TextEditor::BaseTextDocument *parent); + void highlightBlock(const QString &text); + + void initialize(); +private: + enum State { None = -1, Header, Other }; + QTextCharFormat m_commentFormat; + QRegExp m_keywordPattern; + QChar m_hashChar; +}; + +// Highlighter for interactive rebase todo. Indicates comments as such +// (retrieving the format from the text editor) and marks up keywords +class GitRebaseHighlighter : public TextEditor::SyntaxHighlighter +{ +public: + explicit GitRebaseHighlighter(TextEditor::BaseTextDocument *parent); + void highlightBlock(const QString &text); + +private: + class RebaseAction + { + public: + mutable QRegExp exp; + QTextCharFormat format; + RebaseAction(const QString ®exp, const TextEditor::FontSettings &settings, + TextEditor::TextStyle category); + }; + QTextCharFormat m_commentFormat; + QTextCharFormat m_changeFormat; + QTextCharFormat m_descFormat; + const QChar m_hashChar; + QRegExp m_changeNumberPattern; + QList m_actions; +}; + +} // namespace Internal +} // namespace Git + +#endif // GITHIGHLIGHTERS_H diff --git a/src/plugins/git/gitplugin.cpp b/src/plugins/git/gitplugin.cpp index 665c332b210..2ffba4f0bc4 100644 --- a/src/plugins/git/gitplugin.cpp +++ b/src/plugins/git/gitplugin.cpp @@ -111,15 +111,13 @@ static const VcsBase::VcsBaseEditorParameters editorParameters[] = { Git::Constants::GIT_COMMIT_TEXT_EDITOR_DISPLAY_NAME, Git::Constants::C_GIT_COMMIT_TEXT_EDITOR, "text/vnd.qtcreator.git.commit"}, +{ VcsBase::OtherContent, + Git::Constants::GIT_REBASE_EDITOR_ID, + Git::Constants::GIT_REBASE_EDITOR_DISPLAY_NAME, + Git::Constants::C_GIT_REBASE_EDITOR, + "text/vnd.qtcreator.git.rebase"}, }; -// Utility to find a parameter set by type -static inline const VcsBase::VcsBaseEditorParameters *findType(int ie) -{ - const VcsBase::EditorContentType et = static_cast(ie); - return VcsBase::VcsBaseEditorWidget::findType(editorParameters, sizeof(editorParameters)/sizeof(VcsBase::VcsBaseEditorParameters), et); -} - Q_DECLARE_METATYPE(Git::Internal::GitClientMemberFunc) using namespace Git; @@ -437,7 +435,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) createRepositoryAction(localRepositoryMenu, tr("Reset..."), Core::Id("Git.Reset"), - globalcontext, false, SLOT(resetRepository())); + globalcontext, true, SLOT(resetRepository())); createRepositoryAction(localRepositoryMenu, tr("Interactive Rebase..."), Core::Id("Git.InteractiveRebase"), @@ -652,9 +650,9 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage) // -------------- gitContainer->addSeparator(globalcontext); - m_createRepositoryAction = new QAction(tr("Create Repository..."), this); - Core::Command *createRepositoryCommand = Core::ActionManager::registerAction(m_createRepositoryAction, "Git.CreateRepository", globalcontext); - connect(m_createRepositoryAction, SIGNAL(triggered()), this, SLOT(createRepository())); + QAction *repositoryAction = new QAction(tr("Create Repository..."), this); + Core::Command *createRepositoryCommand = Core::ActionManager::registerAction(repositoryAction, "Git.CreateRepository", globalcontext); + connect(repositoryAction, SIGNAL(triggered()), this, SLOT(createRepository())); gitContainer->addAction(createRepositoryCommand); if (0) { @@ -790,17 +788,19 @@ void GitPlugin::resetRepository() void GitPlugin::startRebase() { - QString workingDirectory = currentState().currentDirectoryOrTopLevel(); - if (workingDirectory.isEmpty() || !m_gitClient->canRebase(workingDirectory)) + const VcsBase::VcsBasePluginState state = currentState(); + QTC_ASSERT(state.hasTopLevel(), return); + const QString topLevel = state.topLevel(); + if (topLevel.isEmpty() || !m_gitClient->canRebase(topLevel)) return; - if (!m_gitClient->beginStashScope(workingDirectory, QLatin1String("Rebase-i"))) + if (!m_gitClient->beginStashScope(topLevel, QLatin1String("Rebase-i"))) return; LogChangeDialog dialog(false); dialog.setWindowTitle(tr("Interactive Rebase")); - if (dialog.runDialog(workingDirectory, QString(), false)) - m_gitClient->interactiveRebase(workingDirectory, dialog.commit(), false); + if (dialog.runDialog(topLevel, QString(), false)) + m_gitClient->interactiveRebase(topLevel, dialog.commit(), false); else - m_gitClient->endStashScope(workingDirectory); + m_gitClient->endStashScope(topLevel); } void GitPlugin::startChangeRelatedAction() @@ -956,7 +956,8 @@ void GitPlugin::startCommit(CommitType commitType) void GitPlugin::updateVersionWarning() { - if (m_gitClient->gitVersion() >= minimumRequiredVersion) + unsigned version = m_gitClient->gitVersion(); + if (!version || version >= minimumRequiredVersion) return; Core::IEditor *curEditor = Core::EditorManager::currentEditor(); if (!curEditor) @@ -976,8 +977,7 @@ void GitPlugin::updateVersionWarning() Core::IEditor *GitPlugin::openSubmitEditor(const QString &fileName, const CommitData &cd) { - Core::IEditor *editor = Core::EditorManager::openEditor(fileName, Constants::GITSUBMITEDITOR_ID, - Core::EditorManager::ModeSwitch); + Core::IEditor *editor = Core::EditorManager::openEditor(fileName, Constants::GITSUBMITEDITOR_ID); GitSubmitEditor *submitEditor = qobject_cast(editor); QTC_ASSERT(submitEditor, return 0); setSubmitEditor(submitEditor); @@ -1069,7 +1069,7 @@ bool GitPlugin::submitEditorAboutToClose() void GitPlugin::fetch() { - m_gitClient->synchronousFetch(currentState().topLevel(), QString()); + m_gitClient->fetch(currentState().topLevel(), QString()); } void GitPlugin::pull() @@ -1097,7 +1097,7 @@ void GitPlugin::push() { const VcsBase::VcsBasePluginState state = currentState(); QTC_ASSERT(state.hasTopLevel(), return); - m_gitClient->synchronousPush(state.topLevel()); + m_gitClient->push(state.topLevel()); } void GitPlugin::startMergeTool() diff --git a/src/plugins/git/gitplugin.h b/src/plugins/git/gitplugin.h index 05cbc2575d5..c7ff4a9e4a6 100644 --- a/src/plugins/git/gitplugin.h +++ b/src/plugins/git/gitplugin.h @@ -202,7 +202,6 @@ private: static GitPlugin *m_instance; Locator::CommandLocator *m_commandLocator; - QAction *m_createRepositoryAction; QAction *m_submitCurrentAction; QAction *m_diffSelectedFilesAction; diff --git a/src/plugins/git/gitsubmiteditorwidget.cpp b/src/plugins/git/gitsubmiteditorwidget.cpp index 4e2689ffdc0..8d057d4a6d0 100644 --- a/src/plugins/git/gitsubmiteditorwidget.cpp +++ b/src/plugins/git/gitsubmiteditorwidget.cpp @@ -27,19 +27,14 @@ ** ****************************************************************************/ -#include "gitsubmiteditorwidget.h" #include "commitdata.h" +#include "gitsubmiteditorwidget.h" +#include "githighlighters.h" #include "logchangedialog.h" -#include -#include -#include - #include -#include #include -#include #include #include #include @@ -48,72 +43,6 @@ namespace Git { namespace Internal { -// Retrieve the comment char format from the text editor. -static QTextCharFormat commentFormat() -{ - const TextEditor::FontSettings settings = TextEditor::TextEditorSettings::instance()->fontSettings(); - return settings.toTextCharFormat(TextEditor::C_COMMENT); -} - -GitSubmitHighlighter::GitSubmitHighlighter(QTextEdit * parent) : - TextEditor::SyntaxHighlighter(parent) -{ - initialize(); -} - -GitSubmitHighlighter::GitSubmitHighlighter(TextEditor::BaseTextDocument *parent) : - TextEditor::SyntaxHighlighter(parent) -{ - initialize(); -} - -void GitSubmitHighlighter::initialize() -{ - m_commentFormat = commentFormat(); - m_keywordPattern.setPattern(QLatin1String("^[\\w-]+:")); - m_hashChar = QLatin1Char('#'); - QTC_CHECK(m_keywordPattern.isValid()); -} - -void GitSubmitHighlighter::highlightBlock(const QString &text) -{ - // figure out current state - State state = static_cast(previousBlockState()); - if (text.isEmpty()) { - if (state == Header) - state = Other; - setCurrentBlockState(state); - return; - } else if (text.startsWith(m_hashChar)) { - setFormat(0, text.size(), m_commentFormat); - setCurrentBlockState(state); - return; - } else if (state == None) { - state = Header; - } - - setCurrentBlockState(state); - // Apply format. - switch (state) { - case None: - break; - case Header: { - QTextCharFormat charFormat = format(0); - charFormat.setFontWeight(QFont::Bold); - setFormat(0, text.size(), charFormat); - break; - } - case Other: - // Format key words ("Task:") italic - if (m_keywordPattern.indexIn(text, 0, QRegExp::CaretAtZero) == 0) { - QTextCharFormat charFormat = format(0); - charFormat.setFontItalic(true); - setFormat(0, m_keywordPattern.matchedLength(), charFormat); - } - break; - } -} - // ------------------ GitSubmitEditorWidget::GitSubmitEditorWidget(QWidget *parent) : VcsBase::SubmitEditorWidget(parent), diff --git a/src/plugins/git/gitsubmiteditorwidget.h b/src/plugins/git/gitsubmiteditorwidget.h index 3872786ebea..7eff3d4c03f 100644 --- a/src/plugins/git/gitsubmiteditorwidget.h +++ b/src/plugins/git/gitsubmiteditorwidget.h @@ -93,25 +93,6 @@ private: bool m_isInitialized; }; -// Highlighter for git submit messages. Make the first line bold, indicates -// comments as such (retrieving the format from the text editor) and marks up -// keywords (words in front of a colon as in 'Task: '). - -class GitSubmitHighlighter : public TextEditor::SyntaxHighlighter -{ -public: - explicit GitSubmitHighlighter(QTextEdit *parent); - explicit GitSubmitHighlighter(TextEditor::BaseTextDocument *parent); - void highlightBlock(const QString &text); - - void initialize(); -private: - enum State { None = -1, Header, Other }; - QTextCharFormat m_commentFormat; - QRegExp m_keywordPattern; - QChar m_hashChar; -}; - } // namespace Internal } // namespace Git diff --git a/src/plugins/git/logchangedialog.cpp b/src/plugins/git/logchangedialog.cpp index 78cf8b04d52..bb8f444c9e1 100644 --- a/src/plugins/git/logchangedialog.cpp +++ b/src/plugins/git/logchangedialog.cpp @@ -31,6 +31,8 @@ #include "gitplugin.h" #include "gitclient.h" +#include + #include #include #include @@ -67,8 +69,13 @@ LogChangeWidget::LogChangeWidget(QWidget *parent) bool LogChangeWidget::init(const QString &repository, const QString &commit, bool includeRemote) { - if (!populateLog(repository, commit, includeRemote) || !m_model->rowCount()) + if (!populateLog(repository, commit, includeRemote)) return false; + if (!m_model->rowCount()) { + VcsBase::VcsBaseOutputWindow::instance()->appendError( + GitPlugin::instance()->gitClient()->msgNoCommits(includeRemote)); + return false; + } selectionModel()->select(m_model->index(0, 0), QItemSelectionModel::SelectCurrent | QItemSelectionModel::Rows); return true; @@ -89,6 +96,16 @@ int LogChangeWidget::commitIndex() const return -1; } +QString LogChangeWidget::earliestCommit() const +{ + int rows = m_model->rowCount(); + if (rows) { + if (const QStandardItem *item = m_model->item(rows - 1, Sha1Column)) + return item->text(); + } + return QString(); +} + void LogChangeWidget::emitDoubleClicked(const QModelIndex &index) { if (index.isValid()) { @@ -181,7 +198,7 @@ LogChangeDialog::LogChangeDialog(bool isReset, QWidget *parent) : bool LogChangeDialog::runDialog(const QString &repository, const QString &commit, bool includeRemote) { if (!widget->init(repository, commit, includeRemote)) - return QDialog::Rejected; + return false; return QDialog::exec() == QDialog::Accepted; } diff --git a/src/plugins/git/logchangedialog.h b/src/plugins/git/logchangedialog.h index 4e298519ac4..a4790701b48 100644 --- a/src/plugins/git/logchangedialog.h +++ b/src/plugins/git/logchangedialog.h @@ -56,6 +56,7 @@ public: bool includeRemote = true); QString commit() const; int commitIndex() const; + QString earliestCommit() const; signals: void doubleClicked(const QString &commit); diff --git a/src/plugins/git/remotedialog.cpp b/src/plugins/git/remotedialog.cpp index a027d62bf2d..d24bc2789ca 100644 --- a/src/plugins/git/remotedialog.cpp +++ b/src/plugins/git/remotedialog.cpp @@ -172,7 +172,7 @@ void RemoteDialog::pushToRemote() const int row = indexList.at(0).row(); const QString remoteName = m_remoteModel->remoteName(row); - m_remoteModel->client()->synchronousPush(m_remoteModel->workingDirectory(), + m_remoteModel->client()->push(m_remoteModel->workingDirectory(), QStringList() << remoteName); } @@ -184,7 +184,7 @@ void RemoteDialog::fetchFromRemote() int row = indexList.at(0).row(); const QString remoteName = m_remoteModel->remoteName(row); - m_remoteModel->client()->synchronousFetch(m_remoteModel->workingDirectory(), remoteName); + m_remoteModel->client()->fetch(m_remoteModel->workingDirectory(), remoteName); } void RemoteDialog::updateButtonState() diff --git a/src/plugins/git/settingspage.ui b/src/plugins/git/settingspage.ui index c72a4c3eb1d..26b51f527f7 100644 --- a/src/plugins/git/settingspage.ui +++ b/src/plugins/git/settingspage.ui @@ -140,7 +140,7 @@ - Use Diff Editor + Show diff side-by-side diff --git a/src/plugins/helloworld/helloworldplugin.cpp b/src/plugins/helloworld/helloworldplugin.cpp index 25d64aeb461..ea781f40267 100644 --- a/src/plugins/helloworld/helloworldplugin.cpp +++ b/src/plugins/helloworld/helloworldplugin.cpp @@ -60,7 +60,6 @@ public: setIcon(QIcon()); setPriority(0); setId("HelloWorld.HelloWorldMode"); - setType("HelloWorld.HelloWorldMode"); setContextHelpId(QString()); } }; diff --git a/src/plugins/imageviewer/imageviewerfactory.cpp b/src/plugins/imageviewer/imageviewerfactory.cpp index 55d501c5c4b..d925ea6cc94 100644 --- a/src/plugins/imageviewer/imageviewerfactory.cpp +++ b/src/plugins/imageviewer/imageviewerfactory.cpp @@ -103,11 +103,6 @@ QString ImageViewerFactory::displayName() const return qApp->translate("OpenWith::Editors", Constants::IMAGEVIEWER_DISPLAY_NAME); } -Core::IDocument *ImageViewerFactory::open(const QString & /*fileName*/) -{ - return 0; -} - void ImageViewerFactory::extensionsInitialized() { d->actionHandler->createActions(); diff --git a/src/plugins/imageviewer/imageviewerfactory.h b/src/plugins/imageviewer/imageviewerfactory.h index 427eacadd4d..77d372a265d 100644 --- a/src/plugins/imageviewer/imageviewerfactory.h +++ b/src/plugins/imageviewer/imageviewerfactory.h @@ -50,7 +50,6 @@ public: QStringList mimeTypes() const; Core::Id id() const; QString displayName() const; - Core::IDocument *open(const QString &fileName); void extensionsInitialized(); diff --git a/src/plugins/locator/basefilefilter.cpp b/src/plugins/locator/basefilefilter.cpp index 14166a5bdf8..8cd2a96e40b 100644 --- a/src/plugins/locator/basefilefilter.cpp +++ b/src/plugins/locator/basefilefilter.cpp @@ -100,7 +100,7 @@ QList BaseFileFilter::matchesFor(QFutureInterface LocatorPlugin::filters() - Return all filters, including the ones created by the user. */ QList LocatorPlugin::filters() @@ -221,8 +219,6 @@ QList LocatorPlugin::filters() } /*! - \fn QList LocatorPlugin::customFilters() - This returns a subset of all the filters, that contains only the filters that have been created by the user at some point (maybe in a previous session). */ diff --git a/src/plugins/locator/opendocumentsfilter.cpp b/src/plugins/locator/opendocumentsfilter.cpp index f208a65ecf4..c626b2de948 100644 --- a/src/plugins/locator/opendocumentsfilter.cpp +++ b/src/plugins/locator/opendocumentsfilter.cpp @@ -106,5 +106,5 @@ void OpenDocumentsFilter::refresh(QFutureInterface &future) void OpenDocumentsFilter::accept(FilterEntry selection) const { EditorManager::openEditor(selection.internalData.toString(), Id(), - EditorManager::ModeSwitch | EditorManager::CanContainLineNumber); + EditorManager::CanContainLineNumber); } diff --git a/src/plugins/madde/maddedevice.cpp b/src/plugins/madde/maddedevice.cpp index f8b963246e2..e8f3c5546f4 100644 --- a/src/plugins/madde/maddedevice.cpp +++ b/src/plugins/madde/maddedevice.cpp @@ -41,7 +41,6 @@ using namespace RemoteLinux; namespace Madde { namespace Internal { -const char MaddeDeviceTestActionId[] = "Madde.DeviceTestAction"; MaddeDevice::Ptr MaddeDevice::create() { @@ -78,38 +77,6 @@ QString MaddeDevice::displayType() const return maddeDisplayType(type()); } -QList MaddeDevice::actionIds() const -{ - return QList() << Core::Id(MaddeDeviceTestActionId) - << Core::Id(Constants::GenericDeployKeyToDeviceActionId); -} - -QString MaddeDevice::displayNameForActionId(Core::Id actionId) const -{ - QTC_ASSERT(actionIds().contains(actionId), return QString()); - - if (actionId == MaddeDeviceTestActionId) - return tr("Test"); - if (actionId == Constants::GenericDeployKeyToDeviceActionId) - return tr("Deploy Public Key..."); - return QString(); // Can't happen. -} - -void MaddeDevice::executeAction(Core::Id actionId, QWidget *parent) const -{ - QTC_ASSERT(actionIds().contains(actionId), return); - - QDialog *d = 0; - const IDevice::ConstPtr device = sharedFromThis(); - if (actionId == MaddeDeviceTestActionId) - d = new LinuxDeviceTestDialog(device, new MaddeDeviceTester, parent); - else if (actionId == Constants::GenericDeployKeyToDeviceActionId) - d = PublicKeyDeploymentDialog::createDialog(device, parent); - if (d) - d->exec(); - delete d; -} - QString MaddeDevice::maddeDisplayType(Core::Id type) { if (type == Maemo5OsType) @@ -144,5 +111,10 @@ QSize MaddeDevice::packageManagerIconSize(Core::Id type) return QSize(); } +AbstractLinuxDeviceTester *MaddeDevice::createDeviceTester() const +{ + return new MaddeDeviceTester; +} + } // namespace Internal } // namespace Madde diff --git a/src/plugins/madde/maddedevice.h b/src/plugins/madde/maddedevice.h index 0d956147753..463c2252319 100644 --- a/src/plugins/madde/maddedevice.h +++ b/src/plugins/madde/maddedevice.h @@ -49,9 +49,6 @@ public: Origin origin = ManuallyAdded, Core::Id id = Core::Id()); QString displayType() const; - QList actionIds() const; - QString displayNameForActionId(Core::Id actionId) const; - void executeAction(Core::Id actionId, QWidget *parent) const; ProjectExplorer::IDevice::Ptr clone() const; static QString maddeDisplayType(Core::Id type); @@ -61,6 +58,8 @@ public: static QSize packageManagerIconSize(Core::Id type); + RemoteLinux::AbstractLinuxDeviceTester *createDeviceTester() const; + private: MaddeDevice(); MaddeDevice(const QString &name, Core::Id type, MachineType machineType, diff --git a/src/plugins/madde/maemopackagecreationwidget.cpp b/src/plugins/madde/maemopackagecreationwidget.cpp index 0511985bb00..90a1661d25d 100644 --- a/src/plugins/madde/maemopackagecreationwidget.cpp +++ b/src/plugins/madde/maemopackagecreationwidget.cpp @@ -263,8 +263,7 @@ void MaemoPackageCreationWidget::editDebianFile() void MaemoPackageCreationWidget::editFile(const QString &filePath) { - Core::EditorManager::openEditor(filePath, Core::Id(), - Core::EditorManager::ModeSwitch); + Core::EditorManager::openEditor(filePath); } } // namespace Internal diff --git a/src/plugins/mercurial/mercurialplugin.cpp b/src/plugins/mercurial/mercurialplugin.cpp index e53009f4b48..12db4d74c54 100644 --- a/src/plugins/mercurial/mercurialplugin.cpp +++ b/src/plugins/mercurial/mercurialplugin.cpp @@ -558,8 +558,7 @@ void MercurialPlugin::showCommitWidget(const QList &s } Core::IEditor *editor = Core::EditorManager::openEditor(saver.fileName(), - Constants::COMMIT_ID, - Core::EditorManager::ModeSwitch); + Constants::COMMIT_ID); if (!editor) { outputWindow->appendError(tr("Unable to create an editor for the commit.")); return; diff --git a/src/plugins/perforce/perforceplugin.cpp b/src/plugins/perforce/perforceplugin.cpp index 70c573c8830..8fd5957c804 100644 --- a/src/plugins/perforce/perforceplugin.cpp +++ b/src/plugins/perforce/perforceplugin.cpp @@ -649,8 +649,7 @@ void PerforcePlugin::startSubmitProject() Core::IEditor *PerforcePlugin::openPerforceSubmitEditor(const QString &fileName, const QStringList &depotFileNames) { - Core::IEditor *editor = Core::EditorManager::openEditor(fileName, Constants::PERFORCE_SUBMIT_EDITOR_ID, - Core::EditorManager::ModeSwitch); + Core::IEditor *editor = Core::EditorManager::openEditor(fileName, Constants::PERFORCE_SUBMIT_EDITOR_ID); PerforceSubmitEditor *submitEditor = static_cast(editor); setSubmitEditor(submitEditor); submitEditor->restrictToProjectFiles(depotFileNames); @@ -1180,7 +1179,7 @@ Core::IEditor *PerforcePlugin::showOutputInEditor(const QString &title, const QS if (codec) e->setCodec(codec); Core::IEditor *ie = e->editor(); - Core::EditorManager::activateEditor(ie, Core::EditorManager::ModeSwitch); + Core::EditorManager::activateEditor(ie); return ie; } @@ -1262,7 +1261,7 @@ void PerforcePlugin::p4Diff(const PerforceDiffParameters &p) if (existingEditor) { existingEditor->createNew(result.stdOut); - Core::EditorManager::activateEditor(existingEditor, Core::EditorManager::ModeSwitch); + Core::EditorManager::activateEditor(existingEditor); return; } // Create new editor diff --git a/src/plugins/projectexplorer/devicesupport/devicecheckbuildstep.cpp b/src/plugins/projectexplorer/devicesupport/devicecheckbuildstep.cpp new file mode 100644 index 00000000000..1c9554755ec --- /dev/null +++ b/src/plugins/projectexplorer/devicesupport/devicecheckbuildstep.cpp @@ -0,0 +1,109 @@ +/************************************************************************** +** +** Copyright (C) 2011 - 2013 Research In Motion +** +** Contact: Research In Motion (blackberry-qt@qnx.com) +** Contact: KDAB (info@kdab.com) +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#include "devicecheckbuildstep.h" + +#include "../kitinformation.h" +#include "../target.h" +#include "devicemanager.h" +#include "idevice.h" +#include "idevicefactory.h" + +#include + +using namespace ProjectExplorer; + +DeviceCheckBuildStep::DeviceCheckBuildStep(BuildStepList *bsl, Core::Id id) + : BuildStep(bsl, id) +{ + setDefaultDisplayName(stepDisplayName()); +} + +DeviceCheckBuildStep::DeviceCheckBuildStep(BuildStepList *bsl, DeviceCheckBuildStep *bs) + : BuildStep(bsl, bs) +{ + setDefaultDisplayName(stepDisplayName()); +} + +bool DeviceCheckBuildStep::init() +{ + IDevice::ConstPtr device = DeviceKitInformation::device(target()->kit()); + if (!device) { + Core::Id deviceTypeId = DeviceTypeKitInformation::deviceTypeId(target()->kit()); + IDeviceFactory *factory = IDeviceFactory::find(deviceTypeId); + if (!factory || !factory->canCreate()) { + emit addOutput(tr("No device configured."), BuildStep::ErrorMessageOutput); + return false; + } + + QMessageBox msgBox(QMessageBox::Question, tr("Set Up Device"), + tr("There is no device set up for this kit. Do you want to add a device?"), + QMessageBox::Yes|QMessageBox::No); + msgBox.setDefaultButton(QMessageBox::Yes); + if (msgBox.exec() == QMessageBox::No) { + emit addOutput(tr("No device configured."), BuildStep::ErrorMessageOutput); + return false; + } + + IDevice::Ptr newDevice = factory->create(deviceTypeId); + if (newDevice.isNull()) { + emit addOutput(tr("No device configured."), BuildStep::ErrorMessageOutput); + return false; + } + + DeviceManager *dm = DeviceManager::instance(); + dm->addDevice(newDevice); + + DeviceKitInformation::setDevice(target()->kit(), newDevice); + } + + return true; +} + +void DeviceCheckBuildStep::run(QFutureInterface &fi) +{ + fi.reportResult(true); +} + +BuildStepConfigWidget *DeviceCheckBuildStep::createConfigWidget() +{ + return new SimpleBuildStepConfigWidget(this); +} + +Core::Id DeviceCheckBuildStep::stepId() +{ + return Core::Id("ProjectExplorer.DeviceCheckBuildStep"); +} + +QString DeviceCheckBuildStep::stepDisplayName() +{ + return tr("Check for a configured device"); +} diff --git a/src/plugins/projectexplorer/devicesupport/devicecheckbuildstep.h b/src/plugins/projectexplorer/devicesupport/devicecheckbuildstep.h new file mode 100644 index 00000000000..96f982e6496 --- /dev/null +++ b/src/plugins/projectexplorer/devicesupport/devicecheckbuildstep.h @@ -0,0 +1,61 @@ +/************************************************************************** +** +** Copyright (C) 2011 - 2013 Research In Motion +** +** Contact: Research In Motion (blackberry-qt@qnx.com) +** Contact: KDAB (info@kdab.com) +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#ifndef PROJECTEXPLORER_DEVICECHECKBUILDSTEP_H +#define PROJECTEXPLORER_DEVICECHECKBUILDSTEP_H + +#include "../buildstep.h" +#include "../projectexplorer_export.h" + +namespace ProjectExplorer { + +class BuildStepList; + +class PROJECTEXPLORER_EXPORT DeviceCheckBuildStep : public BuildStep +{ + Q_OBJECT +public: + DeviceCheckBuildStep(BuildStepList *bsl, Core::Id id); + DeviceCheckBuildStep(ProjectExplorer::BuildStepList *bsl, DeviceCheckBuildStep *bs); + + bool init(); + + void run(QFutureInterface &fi); + + BuildStepConfigWidget *createConfigWidget(); + + static Core::Id stepId(); + static QString stepDisplayName(); +}; + +} // namespace ProjectExplorer + +#endif // PROJECTEXPLORER_DEVICECHECKBUILDSTEP_H diff --git a/src/plugins/projectexplorer/foldernavigationwidget.cpp b/src/plugins/projectexplorer/foldernavigationwidget.cpp index 0d498a4f7a1..09a069eae4c 100644 --- a/src/plugins/projectexplorer/foldernavigationwidget.cpp +++ b/src/plugins/projectexplorer/foldernavigationwidget.cpp @@ -261,7 +261,7 @@ void FolderNavigationWidget::openItem(const QModelIndex &srcIndex) return; } // Open file. - Core::EditorManager::openEditor(m_fileSystemModel->filePath(srcIndex), Core::Id(), Core::EditorManager::ModeSwitch); + Core::EditorManager::openEditor(m_fileSystemModel->filePath(srcIndex)); } void FolderNavigationWidget::setCurrentTitle(QString dirName, const QString &fullPath) diff --git a/src/plugins/projectexplorer/kitmodel.cpp b/src/plugins/projectexplorer/kitmodel.cpp index 0b363001cd8..087d8227431 100644 --- a/src/plugins/projectexplorer/kitmodel.cpp +++ b/src/plugins/projectexplorer/kitmodel.cpp @@ -59,7 +59,7 @@ public: widget = KitManager::instance()->createConfigWidget(k); if (widget) { - if (k) + if (k && k->isAutoDetected()) widget->makeStickySubWidgetsReadOnly(); widget->setVisible(false); } diff --git a/src/plugins/projectexplorer/miniprojecttargetselector.cpp b/src/plugins/projectexplorer/miniprojecttargetselector.cpp index 30d44ce5545..af399f4862f 100644 --- a/src/plugins/projectexplorer/miniprojecttargetselector.cpp +++ b/src/plugins/projectexplorer/miniprojecttargetselector.cpp @@ -779,7 +779,9 @@ void MiniProjectTargetSelector::doLayout(bool keepSize) m_summaryLabel->move(0, summaryLabelY); // Height to be aligned with side bar button - int alignedWithActionHeight = actionBar->height() - statusBar->height(); + int alignedWithActionHeight = 210; + if (actionBar->isVisible()) + alignedWithActionHeight = actionBar->height() - statusBar->height(); int bottomMargin = 9; int totalHeight = 0; diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index e89ce949677..e83723b7daa 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -265,7 +265,6 @@ public: setIcon(QIcon(QLatin1String(":/fancyactionbar/images/mode_Project.png"))); setPriority(Constants::P_MODE_SESSION); setId(Constants::MODE_SESSION); - setType(Core::Id()); setContextHelpId(QLatin1String("Managing Projects")); } }; @@ -1522,8 +1521,6 @@ static inline QStringList projectFileGlobs() } /*! - \fn void ProjectExplorerPlugin::restoreSession() - This method is connected to the ICore::coreOpened signal. If there was no session explicitly loaded, it creates an empty new default session and puts the list of recent projects and sessions @@ -2873,7 +2870,7 @@ void ProjectExplorerPlugin::removeProject() void ProjectExplorerPlugin::openFile() { QTC_ASSERT(d->m_currentNode, return); - Core::EditorManager::openEditor(d->m_currentNode->path(), Core::Id(), Core::EditorManager::ModeSwitch); + Core::EditorManager::openEditor(d->m_currentNode->path()); } void ProjectExplorerPlugin::searchOnFileSystem() @@ -3027,6 +3024,8 @@ void ProjectExplorerPlugin::setSession(QAction *action) void ProjectExplorerPlugin::setProjectExplorerSettings(const Internal::ProjectExplorerSettings &pes) { + QTC_ASSERT(d->m_projectExplorerSettings.environmentId == pes.environmentId, return); + if (d->m_projectExplorerSettings == pes) return; d->m_projectExplorerSettings = pes; diff --git a/src/plugins/projectexplorer/projectexplorer.pro b/src/plugins/projectexplorer/projectexplorer.pro index 8c381ecc48d..fb713469583 100644 --- a/src/plugins/projectexplorer/projectexplorer.pro +++ b/src/plugins/projectexplorer/projectexplorer.pro @@ -113,6 +113,7 @@ HEADERS += projectexplorer.h \ devicesupport/desktopdevicefactory.h \ devicesupport/idevicewidget.h \ devicesupport/idevicefactory.h \ + devicesupport/devicecheckbuildstep.h \ devicesupport/devicemanager.h \ devicesupport/devicemanagermodel.h \ devicesupport/devicefactoryselectiondialog.h \ @@ -228,6 +229,7 @@ SOURCES += projectexplorer.cpp \ devicesupport/desktopdevice.cpp \ devicesupport/desktopdevicefactory.cpp \ devicesupport/idevicefactory.cpp \ + devicesupport/devicecheckbuildstep.cpp \ devicesupport/devicemanager.cpp \ devicesupport/devicemanagermodel.cpp \ devicesupport/devicefactoryselectiondialog.cpp \ diff --git a/src/plugins/projectexplorer/projectexplorer.qbs b/src/plugins/projectexplorer/projectexplorer.qbs index c8b5785c808..a63070d2b93 100644 --- a/src/plugins/projectexplorer/projectexplorer.qbs +++ b/src/plugins/projectexplorer/projectexplorer.qbs @@ -251,6 +251,8 @@ QtcPlugin { "devicesupport/desktopdevicefactory.h", "devicesupport/deviceapplicationrunner.cpp", "devicesupport/deviceapplicationrunner.h", + "devicesupport/devicecheckbuildstep.cpp", + "devicesupport/devicecheckbuildstep.h", "devicesupport/devicefactoryselectiondialog.cpp", "devicesupport/devicefactoryselectiondialog.h", "devicesupport/devicefactoryselectiondialog.ui", diff --git a/src/plugins/projectexplorer/projectexplorersettings.h b/src/plugins/projectexplorer/projectexplorersettings.h index adf2b8a5586..507bf4612a6 100644 --- a/src/plugins/projectexplorer/projectexplorersettings.h +++ b/src/plugins/projectexplorer/projectexplorersettings.h @@ -81,7 +81,8 @@ inline bool operator==(const ProjectExplorerSettings &p1, const ProjectExplorerS && p1.useJom == p2.useJom && p1.autorestoreLastSession == p2.autorestoreLastSession && p1.prompToStopRunControl == p2.prompToStopRunControl - && p1.maxAppOutputLines == p2.maxAppOutputLines; + && p1.maxAppOutputLines == p2.maxAppOutputLines + && p1.environmentId == p2.environmentId; } } // namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/projectexplorersettingspage.cpp b/src/plugins/projectexplorer/projectexplorersettingspage.cpp index 06bc43c44fd..e9e934183a8 100644 --- a/src/plugins/projectexplorer/projectexplorersettingspage.cpp +++ b/src/plugins/projectexplorer/projectexplorersettingspage.cpp @@ -80,10 +80,11 @@ ProjectExplorerSettings ProjectExplorerSettingsWidget::settings() const pes.useJom = m_ui.jomCheckbox->isChecked(); pes.prompToStopRunControl = m_ui.promptToStopRunControlCheckBox->isChecked(); pes.maxAppOutputLines = m_ui.maxAppOutputBox->value(); + pes.environmentId = m_environmentId; return pes; } -void ProjectExplorerSettingsWidget::setSettings(const ProjectExplorerSettings &pes) const +void ProjectExplorerSettingsWidget::setSettings(const ProjectExplorerSettings &pes) { m_ui.buildProjectBeforeDeployCheckBox->setChecked(pes.buildBeforeDeploy); m_ui.deployProjectBeforeRunCheckBox->setChecked(pes.deployBeforeRun); @@ -97,6 +98,7 @@ void ProjectExplorerSettingsWidget::setSettings(const ProjectExplorerSettings & m_ui.jomCheckbox->setChecked(pes.useJom); m_ui.promptToStopRunControlCheckBox->setChecked(pes.prompToStopRunControl); m_ui.maxAppOutputBox->setValue(pes.maxAppOutputLines); + m_environmentId = pes.environmentId; } QString ProjectExplorerSettingsWidget::projectsDirectory() const diff --git a/src/plugins/projectexplorer/projectexplorersettingspage.h b/src/plugins/projectexplorer/projectexplorersettingspage.h index f84d9981bbb..75f63dcfb0d 100644 --- a/src/plugins/projectexplorer/projectexplorersettingspage.h +++ b/src/plugins/projectexplorer/projectexplorersettingspage.h @@ -34,6 +34,7 @@ #include "ui_projectexplorersettingspage.h" #include +#include namespace ProjectExplorer { namespace Internal { @@ -47,7 +48,7 @@ public: explicit ProjectExplorerSettingsWidget(QWidget *parent = 0); ProjectExplorerSettings settings() const; - void setSettings(const ProjectExplorerSettings &s) const; + void setSettings(const ProjectExplorerSettings &s); QString projectsDirectory() const; void setProjectsDirectory(const QString &pd); @@ -70,6 +71,7 @@ private: Ui::ProjectExplorerSettingsPageUi m_ui; mutable QString m_searchKeywords; + QUuid m_environmentId; }; class ProjectExplorerSettingsPage : public Core::IOptionsPage diff --git a/src/plugins/projectexplorer/projectfilewizardextension.cpp b/src/plugins/projectexplorer/projectfilewizardextension.cpp index f95da9ebb41..b1ffbec7ac2 100644 --- a/src/plugins/projectexplorer/projectfilewizardextension.cpp +++ b/src/plugins/projectexplorer/projectfilewizardextension.cpp @@ -52,6 +52,7 @@ #include #include +#include #include #include #include @@ -177,7 +178,7 @@ struct ProjectWizardContext QList versionControls; QList activeVersionControls; QList projects; - ProjectWizardPage *page; + QPointer page; // this is managed by the wizard! bool repositoryExists; // Is VCS 'add' sufficient, or should a repository be created? QString commonDirectory; const Core::IWizard *wizard; @@ -329,6 +330,9 @@ void ProjectFileWizardExtension::firstExtensionPageShown( void ProjectFileWizardExtension::initializeVersionControlChoices() { + if (m_context->page.isNull()) + return; + // Figure out version control situation: // 1) Directory is managed and VCS supports "Add" -> List it // 2) Directory is managed and VCS does not support "Add" -> None available diff --git a/src/plugins/projectexplorer/projecttreewidget.cpp b/src/plugins/projectexplorer/projecttreewidget.cpp index 51f77f56d59..2df69b1bd66 100644 --- a/src/plugins/projectexplorer/projecttreewidget.cpp +++ b/src/plugins/projectexplorer/projecttreewidget.cpp @@ -372,7 +372,7 @@ void ProjectTreeWidget::openItem(const QModelIndex &mainIndex) Node *node = m_model->nodeForIndex(mainIndex); if (node->nodeType() != FileNodeType) return; - IEditor *editor = EditorManager::openEditor(node->path(), Id(), EditorManager::ModeSwitch); + IEditor *editor = EditorManager::openEditor(node->path()); if (node->line() >= 0) editor->gotoLine(node->line()); } diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index 039255a38cf..4561b1343d7 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -104,6 +104,9 @@ bool ProcessHandle::equals(const ProcessHandle &rhs) const } +/*! + \brief Returns the widget used to configure this run configuration. Ownership is transferred to the caller +*/ RunConfigWidget *IRunConfigurationAspect::createConfigurationWidget() { return 0; @@ -200,12 +203,6 @@ bool RunConfiguration::ensureConfigured(QString *errorMessage) } -/*! - \fn virtual QWidget *ProjectExplorer::RunConfiguration::createConfigurationWidget() - - \brief Returns the widget used to configure this run configuration. Ownership is transferred to the caller -*/ - BuildConfiguration *RunConfiguration::activeBuildConfiguration() const { if (!target()) diff --git a/src/plugins/projectexplorer/session.cpp b/src/plugins/projectexplorer/session.cpp index 445db5f031a..cb493df4665 100644 --- a/src/plugins/projectexplorer/session.cpp +++ b/src/plugins/projectexplorer/session.cpp @@ -373,8 +373,6 @@ bool SessionManager::save() } /*! - \fn bool SessionManager::closeAllProjects() - Closes all projects */ void SessionManager::closeAllProjects() diff --git a/src/plugins/projectexplorer/showineditortaskhandler.cpp b/src/plugins/projectexplorer/showineditortaskhandler.cpp index f01c9e3ced5..3090fb47d74 100644 --- a/src/plugins/projectexplorer/showineditortaskhandler.cpp +++ b/src/plugins/projectexplorer/showineditortaskhandler.cpp @@ -31,7 +31,7 @@ #include "task.h" -#include +#include #include #include @@ -49,7 +49,7 @@ bool ShowInEditorTaskHandler::canHandle(const ProjectExplorer::Task &task) const void ShowInEditorTaskHandler::handle(const ProjectExplorer::Task &task) { QFileInfo fi(task.file.toFileInfo()); - TextEditor::BaseTextEditorWidget::openEditorAt(fi.filePath(), task.movedLine); + Core::EditorManager::openEditorAt(fi.filePath(), task.movedLine); } QAction *ShowInEditorTaskHandler::createAction(QObject *parent) const diff --git a/src/plugins/pythoneditor/pythoneditorfactory.cpp b/src/plugins/pythoneditor/pythoneditorfactory.cpp index 5afe99883da..5dc783f6ae9 100644 --- a/src/plugins/pythoneditor/pythoneditorfactory.cpp +++ b/src/plugins/pythoneditor/pythoneditorfactory.cpp @@ -56,16 +56,6 @@ QString EditorFactory::displayName() const return tr(Constants::C_EDITOR_DISPLAY_NAME); } -Core::IDocument *EditorFactory::open(const QString &fileName) -{ - Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id()); - if (!iface) { - qWarning() << "CEditorFactory::open: openEditor failed for " << fileName; - return 0; - } - return iface->document(); -} - Core::IEditor *EditorFactory::createEditor(QWidget *parent) { EditorWidget *widget = new EditorWidget(parent); diff --git a/src/plugins/pythoneditor/pythoneditorfactory.h b/src/plugins/pythoneditor/pythoneditorfactory.h index b483e6e4dca..5879e6fe391 100644 --- a/src/plugins/pythoneditor/pythoneditorfactory.h +++ b/src/plugins/pythoneditor/pythoneditorfactory.h @@ -54,11 +54,6 @@ public: Core::Id id() const; QString displayName() const; - /** - Opens file in new editor - */ - Core::IDocument *open(const QString &fileName); - /** Creates and initializes new editor widget */ diff --git a/src/plugins/qbsprojectmanager/qbsbuildstep.cpp b/src/plugins/qbsprojectmanager/qbsbuildstep.cpp index 37304766d69..93a5d304f7e 100644 --- a/src/plugins/qbsprojectmanager/qbsbuildstep.cpp +++ b/src/plugins/qbsprojectmanager/qbsbuildstep.cpp @@ -422,7 +422,8 @@ QbsBuildStepFactory::QbsBuildStepFactory(QObject *parent) : QList QbsBuildStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const { if (parent->id() == ProjectExplorer::Constants::BUILDSTEPS_BUILD - && qobject_cast(parent->parent())) + && qobject_cast(parent->parent()) + && qobject_cast(parent->target()->project())) return QList() << Core::Id(Constants::QBS_BUILDSTEP_ID); return QList(); } @@ -437,7 +438,8 @@ QString QbsBuildStepFactory::displayNameForId(const Core::Id id) const bool QbsBuildStepFactory::canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const { if (parent->id() != Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD) - || !qobject_cast(parent->parent())) + || !qobject_cast(parent->parent()) + || !qobject_cast(parent->target()->project())) return false; return id == Core::Id(Constants::QBS_BUILDSTEP_ID); } diff --git a/src/plugins/qbsprojectmanager/qbsinstallstep.cpp b/src/plugins/qbsprojectmanager/qbsinstallstep.cpp index bac939de882..b08b11ad5b2 100644 --- a/src/plugins/qbsprojectmanager/qbsinstallstep.cpp +++ b/src/plugins/qbsprojectmanager/qbsinstallstep.cpp @@ -44,15 +44,15 @@ #include +// -------------------------------------------------------------------- +// Constants: +// -------------------------------------------------------------------- + static const char QBS_INSTALL_ROOT[] = "Qbs.InstallRoot"; static const char QBS_REMOVE_FIRST[] = "Qbs.RemoveFirst"; static const char QBS_DRY_RUN[] = "Qbs.DryRun"; static const char QBS_KEEP_GOING[] = "Qbs.DryKeepGoing"; -// -------------------------------------------------------------------- -// Constants: -// -------------------------------------------------------------------- - namespace QbsProjectManager { namespace Internal { @@ -363,7 +363,8 @@ QbsInstallStepFactory::QbsInstallStepFactory(QObject *parent) : QList QbsInstallStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const { if (parent->id() == ProjectExplorer::Constants::BUILDSTEPS_DEPLOY - && qobject_cast(parent->parent())) + && qobject_cast(parent->parent()) + && qobject_cast(parent->target()->project())) return QList() << Core::Id(Constants::QBS_INSTALLSTEP_ID); return QList(); } @@ -378,7 +379,8 @@ QString QbsInstallStepFactory::displayNameForId(const Core::Id id) const bool QbsInstallStepFactory::canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const { if (parent->id() != Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY) - || !qobject_cast(parent->parent())) + || !qobject_cast(parent->parent()) + || !qobject_cast(parent->target()->project())) return false; return id == Core::Id(Constants::QBS_INSTALLSTEP_ID); } diff --git a/src/plugins/qbsprojectmanager/qbsnodes.cpp b/src/plugins/qbsprojectmanager/qbsnodes.cpp index 0fca740baa5..7c0da5b5c4e 100644 --- a/src/plugins/qbsprojectmanager/qbsnodes.cpp +++ b/src/plugins/qbsprojectmanager/qbsnodes.cpp @@ -230,6 +230,16 @@ void QbsFileNode::setLine(int l) m_line = l; } +bool QbsFileNode::update(const qbs::CodeLocation &loc) +{ + const QString oldPath = path(); + const int oldLine = line(); + + setPath(loc.fileName()); + setLine(loc.line()); + return (line() != oldLine || path() != oldPath); +} + // --------------------------------------------------------------------------- // QbsBaseProjectNode: // --------------------------------------------------------------------------- @@ -322,19 +332,29 @@ QbsGroupNode::QbsGroupNode(const qbs::GroupData *grp, const QString &productPath grp->location().line()); addFileNodes(QList() << idx, this); - updateQbsGroupData(grp, productPath); + updateQbsGroupData(grp, productPath, true, true); } bool QbsGroupNode::isEnabled() const { - return static_cast(parentFolderNode())->isEnabled() && qbsGroupData()->isEnabled(); + if (!parentFolderNode() || !m_qbsGroupData) + return false; + return static_cast(parentFolderNode())->isEnabled() + && m_qbsGroupData->isEnabled(); } -void QbsGroupNode::updateQbsGroupData(const qbs::GroupData *grp, const QString &productPath) +void QbsGroupNode::updateQbsGroupData(const qbs::GroupData *grp, const QString &productPath, + bool productWasEnabled, bool productIsEnabled) { + Q_ASSERT(grp); + if (grp == m_qbsGroupData && productPath == m_productPath) return; + bool groupWasEnabled = productWasEnabled && m_qbsGroupData && m_qbsGroupData->isEnabled(); + bool groupIsEnabled = productIsEnabled && grp->isEnabled(); + bool updateExisting = groupWasEnabled != groupIsEnabled; + m_productPath = productPath; m_qbsGroupData = grp; @@ -347,18 +367,17 @@ void QbsGroupNode::updateQbsGroupData(const qbs::GroupData *grp, const QString & if (idx) break; } + if (idx->update(grp->location()) || updateExisting) + idx->emitNodeUpdated(); - // idx not found, which should never happen! - Q_ASSERT(idx); - idx->setPath(grp->location().fileName()); - idx->setLine(grp->location().line()); + setupFiles(this, grp->allFilePaths(), productPath, updateExisting); - setupFiles(this, grp->allFilePaths(), m_productPath); - emitNodeUpdated(); + if (updateExisting) + emitNodeUpdated(); } void QbsGroupNode::setupFiles(QbsBaseProjectNode *root, const QStringList &files, - const QString &productPath) + const QString &productPath, bool updateExisting) { // Build up a tree of nodes: FileTreeNode tree; @@ -376,11 +395,12 @@ void QbsGroupNode::setupFiles(QbsBaseProjectNode *root, const QStringList &files FileTreeNode::reorder(&tree, productPath); FileTreeNode::simplify(&tree); - setupFolder(root, &tree, productPath); + setupFolder(root, &tree, productPath, updateExisting); } void QbsGroupNode::setupFolder(ProjectExplorer::FolderNode *root, - const FileTreeNode *fileTree, const QString &baseDir) + const FileTreeNode *fileTree, const QString &baseDir, + bool updateExisting) { // We only need to care about FileNodes and FolderNodes here. Everything else is // handled elsewhere. @@ -408,8 +428,9 @@ void QbsGroupNode::setupFolder(ProjectExplorer::FolderNode *root, if (c->isFile()) { ProjectExplorer::FileNode *fn = root->findFile(path); if (fn) { - fn->emitNodeUpdated(); // enabled might have changed filesToRemove.removeOne(fn); + if (updateExisting) + fn->emitNodeUpdated(); } else { fn = new ProjectExplorer::FileNode(path, ProjectExplorer::UnknownFileType, false); filesToAdd.append(fn); @@ -422,10 +443,12 @@ void QbsGroupNode::setupFolder(ProjectExplorer::FolderNode *root, root->projectNode()->addFolderNodes(QList() << fn, root); } else { foldersToRemove.removeOne(fn); + if (updateExisting) + fn->emitNodeUpdated(); } fn->setDisplayName(displayNameFromPath(c->path(), baseDir)); - setupFolder(fn, c, c->path()); + setupFolder(fn, c, c->path(), updateExisting); } } root->projectNode()->removeFileNodes(filesToRemove, root); @@ -442,42 +465,43 @@ QbsProductNode::QbsProductNode(const qbs::ProductData *prd) : m_qbsProductData(0) { setIcon(m_productIcon); + + ProjectExplorer::FileNode *idx = new QbsFileNode(prd->location().fileName(), + ProjectExplorer::ProjectFileType, false, + prd->location().line()); + addFileNodes(QList() << idx, this); + setQbsProductData(prd); } bool QbsProductNode::isEnabled() const { - return qbsProductData()->isEnabled(); + return m_qbsProductData ? m_qbsProductData->isEnabled() : false; } void QbsProductNode::setQbsProductData(const qbs::ProductData *prd) { + Q_ASSERT(prd); if (m_qbsProductData == prd) return; + bool productWasEnabled = m_qbsProductData ? m_qbsProductData->isEnabled() : true; + bool productIsEnabled = prd->isEnabled(); + bool updateExisting = productWasEnabled != productIsEnabled; + setDisplayName(prd->name()); setPath(prd->location().fileName()); const QString &productPath = QFileInfo(prd->location().fileName()).absolutePath(); - // Set Product file node used to jump to the product - QList files = fileNodes(); + // Find the QbsFileNode we added earlier: QbsFileNode *idx = 0; - if (files.isEmpty()) { - idx = new QbsFileNode(prd->location().fileName(), - ProjectExplorer::ProjectFileType, false, - prd->location().line()); - addFileNodes(QList() << idx, this); - } else { - // Find the QbsFileNode we added earlier: - foreach (ProjectExplorer::FileNode *fn, files) { - idx = qobject_cast(fn); - if (idx) { - idx->setPath(prd->location().fileName()); - idx->setLine(prd->location().line()); - break; - } - } + foreach (ProjectExplorer::FileNode *fn, fileNodes()) { + idx = qobject_cast(fn); + if (idx) + break; } + if (idx->update(prd->location()) || updateExisting) + idx->emitNodeUpdated(); QList toAdd; QList toRemove = subProjectNodes(); @@ -485,13 +509,13 @@ void QbsProductNode::setQbsProductData(const qbs::ProductData *prd) foreach (const qbs::GroupData &grp, prd->groups()) { if (grp.name() == prd->name() && grp.location() == prd->location()) { // Set implicit product group right onto this node: - QbsGroupNode::setupFiles(this, grp.allFilePaths(), productPath); + QbsGroupNode::setupFiles(this, grp.allFilePaths(), productPath, updateExisting); continue; } QbsGroupNode *gn = findGroupNode(grp.name()); if (gn) { toRemove.removeOne(gn); - gn->updateQbsGroupData(&grp, productPath); + gn->updateQbsGroupData(&grp, productPath, productWasEnabled, productIsEnabled); } else { gn = new QbsGroupNode(&grp, productPath); toAdd.append(gn); @@ -502,7 +526,8 @@ void QbsProductNode::setQbsProductData(const qbs::ProductData *prd) removeProjectNodes(toRemove); m_qbsProductData = prd; - emitNodeUpdated(); + if (updateExisting) + emitNodeUpdated(); } QList QbsProductNode::runConfigurationsFor(ProjectExplorer::Node *node) diff --git a/src/plugins/qbsprojectmanager/qbsnodes.h b/src/plugins/qbsprojectmanager/qbsnodes.h index 75e7ac88f11..46cd384a951 100644 --- a/src/plugins/qbsprojectmanager/qbsnodes.h +++ b/src/plugins/qbsprojectmanager/qbsnodes.h @@ -59,6 +59,8 @@ public: void setLine(int l); + bool update(const qbs::CodeLocation &loc); + private: int m_line; }; @@ -116,18 +118,19 @@ public: QbsGroupNode(const qbs::GroupData *grp, const QString &productPath); bool isEnabled() const; - void updateQbsGroupData(const qbs::GroupData *grp, const QString &productPath); + void updateQbsGroupData(const qbs::GroupData *grp, const QString &productPath, + bool productWasEnabled, bool productIsEnabled); const qbs::GroupData *qbsGroupData() const { return m_qbsGroupData; } QString productPath() const; static void setupFiles(QbsBaseProjectNode *root, const QStringList &files, - const QString &productPath); + const QString &productPath, bool updateExisting); private: static void setupFolder(ProjectExplorer::FolderNode *folder, - const FileTreeNode *subFileTree, const QString &baseDir); + const FileTreeNode *subFileTree, const QString &baseDir, bool updateExisting); const qbs::GroupData *m_qbsGroupData; QString m_productPath; diff --git a/src/plugins/qbsprojectmanager/qbsproject.cpp b/src/plugins/qbsprojectmanager/qbsproject.cpp index f01cdd4e527..92f7efbf527 100644 --- a/src/plugins/qbsprojectmanager/qbsproject.cpp +++ b/src/plugins/qbsprojectmanager/qbsproject.cpp @@ -385,6 +385,8 @@ void QbsProject::parse(const QVariantMap &config, const QString &dir) this, SLOT(handleQbsParsingTaskSetup(QString,int))); connect(m_qbsSetupProjectJob, SIGNAL(taskProgress(int,qbs::AbstractJob*)), this, SLOT(handleQbsParsingProgress(int))); + + emit projectParsingStarted(); } void QbsProject::prepareForParsing() diff --git a/src/plugins/qmldesigner/components/formeditor/abstractformeditortool.cpp b/src/plugins/qmldesigner/components/formeditor/abstractformeditortool.cpp index 7b67273fb85..56688e1c530 100644 --- a/src/plugins/qmldesigner/components/formeditor/abstractformeditortool.cpp +++ b/src/plugins/qmldesigner/components/formeditor/abstractformeditortool.cpp @@ -209,11 +209,13 @@ void AbstractFormEditorTool::mouseReleaseEvent(const QList & /*i } } -void AbstractFormEditorTool::mouseDoubleClickEvent(const QList &itemList, QGraphicsSceneMouseEvent *) +void AbstractFormEditorTool::mouseDoubleClickEvent(const QList &itemList, QGraphicsSceneMouseEvent *event) { - FormEditorItem *formEditorItem = topFormEditorItem(itemList); - if (formEditorItem) - view()->changeToCustomTool(formEditorItem->qmlItemNode().modelNode()); + if (event->button() == Qt::LeftButton) { + FormEditorItem *formEditorItem = topFormEditorItem(itemList); + if (formEditorItem) + view()->changeToCustomTool(formEditorItem->qmlItemNode().modelNode()); + } } void AbstractFormEditorTool::showContextMenu(QGraphicsSceneMouseEvent *event) diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorcrumblebar.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorcrumblebar.cpp index a90b169458b..d9e22c9bb96 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorcrumblebar.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorcrumblebar.cpp @@ -120,7 +120,8 @@ void FormEditorCrumbleBar::onCrumblePathElementClicked(const QVariant &data) } else { crumblePath()->popElement(); nextFileIsCalledInternally(); - Core::EditorManager::openEditor(clickedCrumbleBarInfo.fileName); + Core::EditorManager::openEditor(clickedCrumbleBarInfo.fileName, Core::Id(), + Core::EditorManager::DoNotMakeVisible); if (!clickedCrumbleBarInfo.componentId.isEmpty()) { currentDesignDocument()->changeToSubComponent( currentDesignDocument()->rewriterView()->modelNodeForId(clickedCrumbleBarInfo.componentId)); diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorgraphicsview.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorgraphicsview.cpp index 04484561dc0..cf7cd7770a1 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorgraphicsview.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorgraphicsview.cpp @@ -31,11 +31,13 @@ #include #include +#include namespace QmlDesigner { FormEditorGraphicsView::FormEditorGraphicsView(QWidget *parent) : - QGraphicsView(parent) + QGraphicsView(parent), + m_isPanning(false) { setTransformationAnchor(QGraphicsView::AnchorUnderMouse); setResizeAnchor(QGraphicsView::AnchorViewCenter); @@ -74,6 +76,44 @@ void FormEditorGraphicsView::wheelEvent(QWheelEvent *event) } +void FormEditorGraphicsView::mousePressEvent(QMouseEvent *event) +{ + if (event->buttons().testFlag(Qt::MiddleButton)) { + m_isPanning = true; + m_panStartX = event->x(); + m_panStartY = event->y(); + setCursor(Qt::ClosedHandCursor); + event->accept(); + } else { + QGraphicsView::mousePressEvent(event); + } +} + +void FormEditorGraphicsView::mouseMoveEvent(QMouseEvent *event) +{ + if (m_isPanning) { + horizontalScrollBar()->setValue(horizontalScrollBar()->value() - (event->x() - m_panStartX)); + verticalScrollBar()->setValue(verticalScrollBar()->value() - (event->y() - m_panStartY)); + m_panStartX = event->x(); + m_panStartY = event->y(); + event->accept(); + }else { + QGraphicsView::mouseMoveEvent(event); + } +} + +void FormEditorGraphicsView::mouseReleaseEvent(QMouseEvent *event) +{ + if (m_isPanning) { + + m_isPanning = false; + setCursor(Qt::ArrowCursor); + event->accept(); + }else { + QGraphicsView::mouseReleaseEvent(event); + } +} + void FormEditorGraphicsView::setRootItemRect(const QRectF &rect) { m_rootItemRect = rect; diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorgraphicsview.h b/src/plugins/qmldesigner/components/formeditor/formeditorgraphicsview.h index dd29d41e181..8b53691f0fc 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorgraphicsview.h +++ b/src/plugins/qmldesigner/components/formeditor/formeditorgraphicsview.h @@ -46,8 +46,12 @@ public: protected: void drawBackground(QPainter *painter, const QRectF &rect); void wheelEvent(QWheelEvent *event); - + void mousePressEvent(QMouseEvent *event); + void mouseMoveEvent(QMouseEvent *event); + void mouseReleaseEvent(QMouseEvent *event); private: + bool m_isPanning; + int m_panStartX, m_panStartY; QRectF m_rootItemRect; }; diff --git a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp index 17f556d15d7..8bfcd042065 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp @@ -91,7 +91,7 @@ void FormEditorItem::updateGeometry() prepareGeometryChange(); m_boundingRect = qmlItemNode().instanceBoundingRect().adjusted(0, 0, 1., 1.); m_paintedBoundingRect = qmlItemNode().instancePaintedBoundingRect().united(m_boundingRect); - setTransform(qmlItemNode().instanceTransform()); + setTransform(qmlItemNode().instanceTransformWithContentTransform()); setTransform(m_attentionTransform, true); //the property for zValue is called z in QGraphicsObject if (qmlItemNode().instanceValue("z").isValid()) @@ -142,7 +142,7 @@ void FormEditorItem::setAttentionScale(double sinusScale) m_attentionTransform.translate(-centerPoint.x(), -centerPoint.y()); m_inverseAttentionTransform = m_attentionTransform.inverted(); prepareGeometryChange(); - setTransform(qmlItemNode().instanceTransform()); + setTransform(qmlItemNode().instanceTransformWithContentTransform()); setTransform(m_attentionTransform, true); } else { m_attentionTransform.reset(); @@ -391,7 +391,7 @@ SnapLineMap FormEditorItem::rightSnappingOffsets() const void FormEditorItem::updateSnappingLines(const QList &exceptionList, FormEditorItem *transformationSpaceItem) { - m_snappingLineCreator.update(exceptionList, transformationSpaceItem); + m_snappingLineCreator.update(exceptionList, transformationSpaceItem, this); } diff --git a/src/plugins/qmldesigner/components/formeditor/movemanipulator.cpp b/src/plugins/qmldesigner/components/formeditor/movemanipulator.cpp index 4d353429241..b1e1800ddf9 100644 --- a/src/plugins/qmldesigner/components/formeditor/movemanipulator.cpp +++ b/src/plugins/qmldesigner/components/formeditor/movemanipulator.cpp @@ -116,8 +116,9 @@ void MoveManipulator::updateHashes() // foreach (FormEditorItem* item, m_itemList) // m_beginItemRectHash[item] = item->mapRectToParent(item->qmlItemNode().instanceBoundingRect()); + QTransform fromSceneToContentItemTransform = m_snapper.containerFormEditorItem()->qmlItemNode().instanceSceneContentItemTransform().inverted(); foreach (FormEditorItem* item, m_itemList) { - QPointF positionInParentSpace = m_snapper.containerFormEditorItem()->mapFromScene(m_beginPositionInSceneSpaceHash.value(item)); + QPointF positionInParentSpace = fromSceneToContentItemTransform.map(m_beginPositionInSceneSpaceHash.value(item)); m_beginItemRectHash[item].translate(positionInParentSpace - m_beginPositionHash.value(item)); m_beginPositionHash.insert(item, positionInParentSpace); } @@ -147,17 +148,19 @@ void MoveManipulator::begin(const QPointF &beginPoint) m_beginItemRectHash.insert(item, m_snapper.containerFormEditorItem()->mapRectFromItem(item, item->qmlItemNode().instanceBoundingRect())); } + QTransform fromContentItemToSceneTransform = m_snapper.containerFormEditorItem()->qmlItemNode().instanceSceneContentItemTransform(); foreach (FormEditorItem* item, m_itemList) { if (item && item->qmlItemNode().isValid()) { QPointF positionInParentSpace(item->qmlItemNode().instancePosition()); - QPointF positionInScenesSpace = m_snapper.containerFormEditorItem()->mapToScene(positionInParentSpace); + QPointF positionInScenesSpace = fromContentItemToSceneTransform.map(positionInParentSpace); m_beginPositionInSceneSpaceHash.insert(item, positionInScenesSpace); } } + QTransform fromSceneToContentItemTransform = m_snapper.containerFormEditorItem()->qmlItemNode().instanceSceneContentItemTransform().inverted(); foreach (FormEditorItem* item, m_itemList) { if (item && item->qmlItemNode().isValid()) { - QPointF positionInParentSpace = m_snapper.containerFormEditorItem()->mapFromScene(m_beginPositionInSceneSpaceHash.value(item)); + QPointF positionInParentSpace = fromSceneToContentItemTransform.map(m_beginPositionInSceneSpaceHash.value(item)); m_beginPositionHash.insert(item, positionInParentSpace); QmlAnchors anchors(item->qmlItemNode().anchors()); @@ -270,8 +273,9 @@ void MoveManipulator::update(const QPointF& updatePoint, Snapper::Snapping useSn if (m_itemList.isEmpty()) { return; } else { - QPointF updatePointInContainerSpace(m_snapper.containerFormEditorItem()->mapFromScene(updatePoint)); - QPointF beginPointInContainerSpace(m_snapper.containerFormEditorItem()->mapFromScene(m_beginPoint)); + QTransform fromSceneToContentItemTransform = m_snapper.containerFormEditorItem()->qmlItemNode().instanceSceneContentItemTransform().inverted(); + QPointF updatePointInContainerSpace(fromSceneToContentItemTransform.map(updatePoint)); + QPointF beginPointInContainerSpace(fromSceneToContentItemTransform.map(m_beginPoint)); QPointF offsetVector(updatePointInContainerSpace - beginPointInContainerSpace); diff --git a/src/plugins/qmldesigner/components/formeditor/resizemanipulator.cpp b/src/plugins/qmldesigner/components/formeditor/resizemanipulator.cpp index 5d92f0f4aa7..e35b2ede565 100644 --- a/src/plugins/qmldesigner/components/formeditor/resizemanipulator.cpp +++ b/src/plugins/qmldesigner/components/formeditor/resizemanipulator.cpp @@ -77,8 +77,9 @@ void ResizeManipulator::begin(const QPointF &/*beginPoint*/) if (m_resizeController.isValid()) { m_isActive = true; m_beginBoundingRect = m_resizeController.formEditorItem()->qmlItemNode().instanceBoundingRect(); - m_beginToSceneTransform = m_resizeController.formEditorItem()->qmlItemNode().instanceSceneTransform(); - m_beginFromSceneTransform = m_beginToSceneTransform.inverted(); + m_beginFromContentItemToSceneTransform = m_resizeController.formEditorItem()->qmlItemNode().instanceSceneContentItemTransform(); + m_beginFromSceneToContentItemTransform = m_beginFromContentItemToSceneTransform.inverted(); + m_beginFromItemToSceneTransform = m_resizeController.formEditorItem()->qmlItemNode().instanceSceneTransform(); m_beginToParentTransform = m_resizeController.formEditorItem()->qmlItemNode().instanceTransform(); m_rewriterTransaction = m_view->beginRewriterTransaction(); m_snapper.updateSnappingLines(m_resizeController.formEditorItem()); @@ -116,7 +117,7 @@ void ResizeManipulator::update(const QPointF& updatePoint, Snapper::Snapping use if (!containerItem) return; - QPointF updatePointInLocalSpace = m_beginFromSceneTransform.map(updatePoint); + QPointF updatePointInLocalSpace = m_beginFromSceneToContentItemTransform.map(updatePoint); QmlAnchors anchors(formEditorItem->qmlItemNode().anchors()); QRectF boundingRect(m_beginBoundingRect); @@ -372,7 +373,7 @@ void ResizeManipulator::update(const QPointF& updatePoint, Snapper::Snapping use if (snap) m_graphicsLineList = m_snapper.generateSnappingLines(boundingRect, m_layerItem.data(), - m_beginToSceneTransform); + m_beginFromItemToSceneTransform); } } @@ -484,8 +485,9 @@ void ResizeManipulator::clear() deleteSnapLines(); m_beginBoundingRect = QRectF(); - m_beginFromSceneTransform = QTransform(); - m_beginToSceneTransform = QTransform(); + m_beginFromSceneToContentItemTransform = QTransform(); + m_beginFromContentItemToSceneTransform = QTransform(); + m_beginFromItemToSceneTransform = QTransform(); m_beginToParentTransform = QTransform(); m_beginTopMargin = 0.0; m_beginLeftMargin = 0.0; diff --git a/src/plugins/qmldesigner/components/formeditor/resizemanipulator.h b/src/plugins/qmldesigner/components/formeditor/resizemanipulator.h index 61a8e23044e..2654a365989 100644 --- a/src/plugins/qmldesigner/components/formeditor/resizemanipulator.h +++ b/src/plugins/qmldesigner/components/formeditor/resizemanipulator.h @@ -72,8 +72,9 @@ private: QWeakPointer m_view; QList m_graphicsLineList; ResizeController m_resizeController; // hold the controller so that the handle cant be deleted - QTransform m_beginFromSceneTransform; - QTransform m_beginToSceneTransform; + QTransform m_beginFromSceneToContentItemTransform; + QTransform m_beginFromContentItemToSceneTransform; + QTransform m_beginFromItemToSceneTransform; QTransform m_beginToParentTransform; QRectF m_beginBoundingRect; QPointF m_beginBottomRightPoint; diff --git a/src/plugins/qmldesigner/components/formeditor/snappinglinecreator.cpp b/src/plugins/qmldesigner/components/formeditor/snappinglinecreator.cpp index 83ea59b3f52..0179af9d369 100644 --- a/src/plugins/qmldesigner/components/formeditor/snappinglinecreator.cpp +++ b/src/plugins/qmldesigner/components/formeditor/snappinglinecreator.cpp @@ -32,6 +32,8 @@ #include "formeditoritem.h" #include "formeditorview.h" +#include + namespace QmlDesigner { SnappingLineCreator::SnappingLineCreator(FormEditorItem *formEditorItem) @@ -117,7 +119,7 @@ void SnappingLineCreator::generateLines(const QList &exceptionL } } -void SnappingLineCreator::setContainerPadding(double containerPadding) +void SnappingLineCreator::setContainerPaddingByGloablPadding(double containerPadding) { m_topPadding = containerPadding; m_bottomPadding = containerPadding; @@ -125,6 +127,14 @@ void SnappingLineCreator::setContainerPadding(double containerPadding) m_rightPadding = containerPadding; } +void SnappingLineCreator::setContainerPaddingByContentItem(const QRectF &contentRectangle, const QRectF &itemBoundingRectangle) +{ + m_topPadding = contentRectangle.top() - itemBoundingRectangle.top(); + m_bottomPadding = itemBoundingRectangle.bottom() - contentRectangle.bottom(); + m_leftPadding = contentRectangle.left() - itemBoundingRectangle.left(); + m_rightPadding = itemBoundingRectangle.right() - contentRectangle.right(); +} + void SnappingLineCreator::setSpacing(double spacing) { m_topOffset = spacing; @@ -134,10 +144,11 @@ void SnappingLineCreator::setSpacing(double spacing) } void SnappingLineCreator::update(const QList &exceptionList, - FormEditorItem *transformationSpaceItem) + FormEditorItem *transformationSpaceItem, + FormEditorItem *containerFormEditorItem) { clearLines(); - setContainerPadding(m_formEditorItem->formEditorView()->containerPadding()); + setContainerPaddingItem(containerFormEditorItem); setSpacing(m_formEditorItem->formEditorView()->spacing()); generateLines(exceptionList, transformationSpaceItem); } @@ -192,4 +203,15 @@ SnapLineMap SnappingLineCreator::rightOffsets() const return m_rightOffsetMap; } +void SnappingLineCreator::setContainerPaddingItem(FormEditorItem *transformationSpaceItem) +{ + QmlItemNode containerItemNode = transformationSpaceItem->qmlItemNode(); + QRectF contentRect = containerItemNode.instanceContentItemBoundingRect(); + + if (contentRect.isValid()) + setContainerPaddingByContentItem(contentRect, containerItemNode.instanceBoundingRect()); + else + setContainerPaddingByGloablPadding(m_formEditorItem->formEditorView()->containerPadding()); +} + } diff --git a/src/plugins/qmldesigner/components/formeditor/snappinglinecreator.h b/src/plugins/qmldesigner/components/formeditor/snappinglinecreator.h index 7c6adc804b6..e3b4e7e2ac4 100644 --- a/src/plugins/qmldesigner/components/formeditor/snappinglinecreator.h +++ b/src/plugins/qmldesigner/components/formeditor/snappinglinecreator.h @@ -48,7 +48,8 @@ public: SnappingLineCreator(FormEditorItem *formEditorItem); void update(const QList &exceptionList, - FormEditorItem *transformationSpaceItem); + FormEditorItem *transformationSpaceItem, + FormEditorItem *containerFormEditorItem); SnapLineMap topLines() const; @@ -63,7 +64,9 @@ public: SnapLineMap leftOffsets() const; SnapLineMap rightOffsets() const; - void setContainerPadding(double containerPadding); + void setContainerPaddingItem(FormEditorItem *transformationSpaceItem); + void setContainerPaddingByGloablPadding(double containerPadding); + void setContainerPaddingByContentItem(const QRectF &contentRectangle, const QRectF &itemBoundingRectangle); void setSpacing(double spacing); protected: diff --git a/src/plugins/qmldesigner/components/integration/designdocument.cpp b/src/plugins/qmldesigner/components/integration/designdocument.cpp index 63c54a28e0e..9a93b93a01c 100644 --- a/src/plugins/qmldesigner/components/integration/designdocument.cpp +++ b/src/plugins/qmldesigner/components/integration/designdocument.cpp @@ -309,7 +309,7 @@ void DesignDocument::changeToSubComponent(const ModelNode &componentNode) void DesignDocument::changeToExternalSubComponent(const QString &fileName) { - Core::EditorManager::openEditor(fileName); + Core::EditorManager::openEditor(fileName, Core::Id(), Core::EditorManager::DoNotMakeVisible); } void DesignDocument::goIntoSelectedComponent() diff --git a/src/plugins/qmldesigner/components/integration/designdocument.h b/src/plugins/qmldesigner/components/integration/designdocument.h index 69ede61ee43..62604686b49 100644 --- a/src/plugins/qmldesigner/components/integration/designdocument.h +++ b/src/plugins/qmldesigner/components/integration/designdocument.h @@ -59,7 +59,7 @@ class CrumbleBarInfo; class ViewManager; class QmlModelView; -class DesignDocument: public QObject +class QMLDESIGNERCORE_EXPORT DesignDocument: public QObject { Q_OBJECT public: diff --git a/src/plugins/qmldesigner/components/navigator/navigatorview.cpp b/src/plugins/qmldesigner/components/navigator/navigatorview.cpp index 61ee53a0837..deec645b3ee 100644 --- a/src/plugins/qmldesigner/components/navigator/navigatorview.cpp +++ b/src/plugins/qmldesigner/components/navigator/navigatorview.cpp @@ -289,7 +289,8 @@ void NavigatorView::changeToComponent(const QModelIndex &index) if (index.isValid() && m_treeModel->data(index, Qt::UserRole).isValid()) { ModelNode doubleClickNode = m_treeModel->nodeForIndex(index); if (doubleClickNode.metaInfo().isFileComponent()) - Core::EditorManager::openEditor(doubleClickNode.metaInfo().componentFileName()); + Core::EditorManager::openEditor(doubleClickNode.metaInfo().componentFileName(), + Core::Id(), Core::EditorManager::DoNotMakeVisible); } } diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp index 1d071692e2e..f4a12681a4e 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp @@ -343,7 +343,7 @@ PropertyEditor::PropertyEditor(QWidget *parent) : m_setupCompleted(false), m_singleShotTimer(new QTimer(this)) { - m_updateShortcut = new QShortcut(QKeySequence("F5"), m_stackedWidget); + m_updateShortcut = new QShortcut(QKeySequence("F3"), m_stackedWidget); connect(m_updateShortcut, SIGNAL(activated()), this, SLOT(reloadQml())); m_stackedWidget->setStyleSheet( @@ -952,7 +952,7 @@ void PropertyEditor::scriptFunctionsChanged(const ModelNode &node, const QString void PropertyEditor::select(const ModelNode &node) { - if (QmlItemNode(node).isValid()) + if (QmlObjectNode(node).isValid()) m_selectedNode = node; else m_selectedNode = ModelNode(); @@ -1087,6 +1087,22 @@ QString PropertyEditor::locateQmlFile(const NodeMetaInfo &info, const QString &r static QDir resourcesDir(resourcePropertyEditorPath); QDir importDir(info.importDirectoryPath() + QLatin1String(Constants::QML_DESIGNER_SUBFOLDER)); + const QString versionString = QLatin1String("_") + QString::number(info.majorVersion()) + + QLatin1String("_") + + QString::number(info.minorVersion()); + + QString relativePathWithoutEnding = relativePath; + relativePathWithoutEnding.chop(4); + const QString relativePathWithVersion = relativePathWithoutEnding + versionString + QLatin1String(".qml"); + + //Check for qml files with versions first + if (importDir.exists(relativePathWithVersion)) + return importDir.absoluteFilePath(relativePathWithVersion); + if (fileSystemDir.exists(relativePathWithVersion)) + return fileSystemDir.absoluteFilePath(relativePathWithVersion); + if (resourcesDir.exists(relativePathWithVersion)) + return resourcesDir.absoluteFilePath(relativePathWithVersion); + if (importDir.exists(relativePath)) return importDir.absoluteFilePath(relativePath); if (fileSystemDir.exists(relativePath)) diff --git a/src/plugins/qmldesigner/componentsplugin/Controls/ButtonSpecifics.qml b/src/plugins/qmldesigner/componentsplugin/Controls/ButtonSpecifics.qml index 95101e35996..00c8eaba43d 100644 --- a/src/plugins/qmldesigner/componentsplugin/Controls/ButtonSpecifics.qml +++ b/src/plugins/qmldesigner/componentsplugin/Controls/ButtonSpecifics.qml @@ -130,12 +130,6 @@ QWidget { } } - ColorGroupBox { - caption: qsTr("Text color") - finished: finishedNotify - backendColor: backendValues.textColor - } - QWidget { layout: HorizontalLayout { Label { diff --git a/src/plugins/qmldesigner/designercore/include/nodeinstance.h b/src/plugins/qmldesigner/designercore/include/nodeinstance.h index 284059f103e..2f21d5cd1ed 100644 --- a/src/plugins/qmldesigner/designercore/include/nodeinstance.h +++ b/src/plugins/qmldesigner/designercore/include/nodeinstance.h @@ -59,6 +59,7 @@ public: bool isValid() const; void makeInvalid(); QRectF boundingRect() const; + QRectF contentItemBoundingRect() const; bool hasContent() const; bool isAnchoredBySibling() const; bool isAnchoredByChildren() const; @@ -66,6 +67,7 @@ public: bool isResizable() const; QTransform transform() const; QTransform contentTransform() const; + QTransform contentItemTransform() const; QTransform sceneTransform() const; bool isInLayoutable() const; QPointF position() const; @@ -93,8 +95,10 @@ protected: InformationName setInformationSize(const QSizeF &size); InformationName setInformationBoundingRect(const QRectF &rectangle); + InformationName setInformationContentItemBoundingRect(const QRectF &rectangle); InformationName setInformationTransform(const QTransform &transform); InformationName setInformationContentTransform(const QTransform &contentTransform); + InformationName setInformationContentItemTransform(const QTransform &contentItemTransform); InformationName setInformationPenWith(int penWidth); InformationName setInformationPosition(const QPointF &position); InformationName setInformationIsInLayoutable(bool isInLayoutable); diff --git a/src/plugins/qmldesigner/designercore/include/qmlitemnode.h b/src/plugins/qmldesigner/designercore/include/qmlitemnode.h index 1d37ad4416e..cebb50b5909 100644 --- a/src/plugins/qmldesigner/designercore/include/qmlitemnode.h +++ b/src/plugins/qmldesigner/designercore/include/qmlitemnode.h @@ -53,6 +53,8 @@ public: bool isValid() const; bool isRootNode() const; + static bool isItemOrWindow(const ModelNode &modelNode); + QmlModelStateGroup states() const; QList children() const; QList resources() const; @@ -75,8 +77,12 @@ public: QRectF instanceBoundingRect() const; QRectF instancePaintedBoundingRect() const; + QRectF instanceContentItemBoundingRect() const; QTransform instanceTransform() const; + QTransform instanceTransformWithContentTransform() const; + QTransform instanceTransformWithContentItemTransform() const; QTransform instanceSceneTransform() const; + QTransform instanceSceneContentItemTransform() const; QPointF instanceScenePosition() const; QPointF instancePosition() const; QSizeF instanceSize() const; diff --git a/src/plugins/qmldesigner/designercore/include/qmlobjectnode.h b/src/plugins/qmldesigner/designercore/include/qmlobjectnode.h index bbbecdbe6f5..092b19f6c0a 100644 --- a/src/plugins/qmldesigner/designercore/include/qmlobjectnode.h +++ b/src/plugins/qmldesigner/designercore/include/qmlobjectnode.h @@ -50,8 +50,10 @@ public: bool hasNodeParent() const; bool hasInstanceParent() const; + bool hasInstanceParentItem() const; void setParentProperty(const NodeAbstractProperty &parentProeprty); QmlObjectNode instanceParent() const; + QmlItemNode instanceParentItem() const; void setId(const QString &id); QString id() const; @@ -105,6 +107,7 @@ public: protected: NodeInstance nodeInstance() const; QmlObjectNode nodeForInstance(const NodeInstance &instance) const; + QmlItemNode itemForInstance(const NodeInstance &instance) const; protected: QList allDefinedStates() const; diff --git a/src/plugins/qmldesigner/designercore/instances/nodeinstance.cpp b/src/plugins/qmldesigner/designercore/instances/nodeinstance.cpp index e787d46c394..efc4ad080b6 100644 --- a/src/plugins/qmldesigner/designercore/instances/nodeinstance.cpp +++ b/src/plugins/qmldesigner/designercore/instances/nodeinstance.cpp @@ -53,10 +53,12 @@ public: qint32 parentInstanceId; ModelNode modelNode; QRectF boundingRect; + QRectF contentItemBoundingRect; QPointF position; QSizeF size; QTransform transform; QTransform contentTransform; + QTransform contentItemTransform; QTransform sceneTransform; int penWidth; bool isAnchoredBySibling; @@ -144,6 +146,14 @@ QRectF NodeInstance::boundingRect() const return QRectF(); } +QRectF NodeInstance::contentItemBoundingRect() const +{ + if (isValid()) + return d->contentItemBoundingRect; + else + return QRectF(); +} + bool NodeInstance::hasContent() const { if (isValid()) @@ -199,6 +209,14 @@ QTransform NodeInstance::contentTransform() const else return QTransform(); } + +QTransform NodeInstance::contentItemTransform() const +{ + if (isValid()) + return d->contentItemTransform; + else + return QTransform(); +} QTransform NodeInstance::sceneTransform() const { if (isValid()) @@ -333,6 +351,16 @@ InformationName NodeInstance::setInformationBoundingRect(const QRectF &rectangle return NoInformationChange; } +InformationName NodeInstance::setInformationContentItemBoundingRect(const QRectF &rectangle) +{ + if (d->contentItemBoundingRect != rectangle) { + d->contentItemBoundingRect = rectangle; + return ContentItemBoundingRect; + } + + return NoInformationChange; +} + InformationName NodeInstance::setInformationTransform(const QTransform &transform) { if (d->transform != transform) { @@ -353,6 +381,16 @@ InformationName NodeInstance::setInformationContentTransform(const QTransform &c return NoInformationChange; } +InformationName NodeInstance::setInformationContentItemTransform(const QTransform &contentItemTransform) +{ + if (d->contentItemTransform != contentItemTransform) { + d->contentItemTransform = contentItemTransform; + return ContentItemTransform; + } + + return NoInformationChange; +} + InformationName NodeInstance::setInformationPenWith(int penWidth) { if (d->penWidth != penWidth) { @@ -489,8 +527,10 @@ InformationName NodeInstance::setInformation(InformationName name, const QVarian switch (name) { case Size: return setInformationSize(information.toSizeF()); case BoundingRect: return setInformationBoundingRect(information.toRectF()); + case ContentItemBoundingRect: setInformationContentItemBoundingRect(information.toRectF()); case Transform: return setInformationTransform(information.value()); case ContentTransform: return setInformationContentTransform(information.value()); + case ContentItemTransform: return setInformationContentItemTransform(information.value()); case PenWidth: return setInformationPenWith(information.toInt()); case Position: return setInformationPosition(information.toPointF()); case IsInLayoutable: return setInformationIsInLayoutable(information.toBool()); diff --git a/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp b/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp index f9626b18fce..0da7a5445cd 100644 --- a/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp +++ b/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp @@ -37,9 +37,7 @@ namespace QmlDesigner { -namespace { - -bool isItemOrWindow(const ModelNode &modelNode) +bool QmlItemNode::isItemOrWindow(const ModelNode &modelNode) { if (modelNode.metaInfo().isSubclassOf("QtQuick.Item", -1, -1)) return true; @@ -50,8 +48,6 @@ bool isItemOrWindow(const ModelNode &modelNode) return false; } -} - bool QmlItemNode::isValid() const { return QmlModelNodeFacade::isValid() && modelNode().metaInfo().isValid() && isItemOrWindow(modelNode()); @@ -239,16 +235,36 @@ QRectF QmlItemNode::instancePaintedBoundingRect() const return nodeInstance().boundingRect(); } +QRectF QmlItemNode::instanceContentItemBoundingRect() const +{ + return nodeInstance().contentItemBoundingRect(); +} + QTransform QmlItemNode::instanceTransform() const { return nodeInstance().transform(); } +QTransform QmlItemNode::instanceTransformWithContentTransform() const +{ + return nodeInstance().transform() * nodeInstance().contentTransform(); +} + +QTransform QmlItemNode::instanceTransformWithContentItemTransform() const +{ + return nodeInstance().transform() * nodeInstance().contentItemTransform(); +} + QTransform QmlItemNode::instanceSceneTransform() const { return nodeInstance().sceneTransform(); } +QTransform QmlItemNode::instanceSceneContentItemTransform() const +{ + return nodeInstance().sceneTransform() * nodeInstance().contentItemTransform(); +} + QPointF QmlItemNode::instanceScenePosition() const { QmlItemNode parentNode = instanceParent().toQmlItemNode(); diff --git a/src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp b/src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp index 42643ed82fb..42c41dc6ab8 100644 --- a/src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp +++ b/src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp @@ -444,6 +444,11 @@ QmlObjectNode QmlObjectNode::nodeForInstance(const NodeInstance &instance) const return QmlObjectNode(ModelNode(instance.modelNode(), qmlModelView())); } +QmlItemNode QmlObjectNode::itemForInstance(const NodeInstance &instance) const +{ + return QmlItemNode(ModelNode(instance.modelNode(), qmlModelView())); +} + bool QmlObjectNode::hasNodeParent() const { return modelNode().hasParentProperty(); @@ -454,6 +459,13 @@ bool QmlObjectNode::hasInstanceParent() const return nodeInstance().parentId() >= 0 && qmlModelView()->nodeInstanceView()->hasInstanceForId(nodeInstance().parentId()); } +bool QmlObjectNode::hasInstanceParentItem() const +{ + return nodeInstance().parentId() >= 0 + && qmlModelView()->nodeInstanceView()->hasInstanceForId(nodeInstance().parentId()) + && QmlItemNode::isItemOrWindow(qmlModelView()->modelNodeForInternalId(nodeInstance().parentId())); +} + void QmlObjectNode::setParentProperty(const NodeAbstractProperty &parentProeprty) { @@ -468,6 +480,14 @@ QmlObjectNode QmlObjectNode::instanceParent() const return QmlObjectNode(); } +QmlItemNode QmlObjectNode::instanceParentItem() const +{ + if (hasInstanceParentItem()) + return itemForInstance(qmlModelView()->nodeInstanceView()->instanceForId(nodeInstance().parentId())); + + return QmlItemNode(); +} + void QmlObjectNode::setId(const QString &id) { modelNode().setId(id); diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp index 50120f9fa4f..9956ecab1a8 100644 --- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp +++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp @@ -47,6 +47,7 @@ #include #include #include +#include #include #include @@ -362,10 +363,17 @@ public: } else if (importInfo.isValid() && importInfo.type() == ImportInfo::DirectoryImport) { QString path = importInfo.path(); QDir dir(m_doc->path()); + // should probably try to make it relatve to some import path, not to the document path QString relativeDir = dir.relativeFilePath(path); QString name = relativeDir.replace(QLatin1Char('/'), QLatin1Char('.')); if (!name.isEmpty()) typeName.prepend(name + QLatin1Char('.')); + } else if (importInfo.isValid() && importInfo.type() == ImportInfo::QrcDirectoryImport) { + QString path = QrcParser::normalizedQrcDirectoryPath(importInfo.path()); + path = path.mid(1, path.size() - ((path.size() > 1) ? 2 : 1)); + const QString name = path.replace(QLatin1Char('/'), QLatin1Char('.')); + if (!name.isEmpty()) + typeName.prepend(name + QLatin1Char('.')); } } } diff --git a/src/plugins/qmldesigner/designersettings.cpp b/src/plugins/qmldesigner/designersettings.cpp index 029e5e082a0..874587a64c9 100644 --- a/src/plugins/qmldesigner/designersettings.cpp +++ b/src/plugins/qmldesigner/designersettings.cpp @@ -35,8 +35,7 @@ using namespace QmlDesigner; DesignerSettings::DesignerSettings() - : openDesignMode(QmlDesigner::Constants::QML_OPENDESIGNMODE_DEFAULT), - itemSpacing(0), + : itemSpacing(0), containerPadding(0), canvasWidth(10000), canvasHeight(10000), @@ -50,9 +49,6 @@ void DesignerSettings::fromSettings(QSettings *settings) { settings->beginGroup(QLatin1String(QmlDesigner::Constants::QML_SETTINGS_GROUP)); settings->beginGroup(QLatin1String(QmlDesigner::Constants::QML_DESIGNER_SETTINGS_GROUP)); - openDesignMode = settings->value( - QLatin1String(QmlDesigner::Constants::QML_OPENDESIGNMODE_SETTINGS_KEY), - bool(QmlDesigner::Constants::QML_OPENDESIGNMODE_DEFAULT)).toBool(); itemSpacing = settings->value( QLatin1String(QmlDesigner::Constants::QML_ITEMSPACING_KEY), QVariant(6)).toInt(); containerPadding = settings->value( @@ -76,7 +72,6 @@ void DesignerSettings::toSettings(QSettings *settings) const { settings->beginGroup(QLatin1String(QmlDesigner::Constants::QML_SETTINGS_GROUP)); settings->beginGroup(QLatin1String(QmlDesigner::Constants::QML_DESIGNER_SETTINGS_GROUP)); - settings->setValue(QLatin1String(QmlDesigner::Constants::QML_OPENDESIGNMODE_SETTINGS_KEY), openDesignMode); settings->setValue(QLatin1String(QmlDesigner::Constants::QML_ITEMSPACING_KEY), itemSpacing); settings->setValue(QLatin1String(QmlDesigner::Constants::QML_CONTAINERPADDING_KEY), containerPadding); settings->setValue(QLatin1String(QmlDesigner::Constants::QML_CANVASWIDTH_KEY), canvasWidth); @@ -92,8 +87,7 @@ void DesignerSettings::toSettings(QSettings *settings) const bool DesignerSettings::equals(const DesignerSettings &other) const { - return openDesignMode == other.openDesignMode - && containerPadding == other.containerPadding + return containerPadding == other.containerPadding && canvasWidth == other.canvasWidth && canvasHeight == other.canvasHeight && warningsInDesigner == other.warningsInDesigner diff --git a/src/plugins/qmldesigner/designersettings.h b/src/plugins/qmldesigner/designersettings.h index d38927a19b7..a42d47155a7 100644 --- a/src/plugins/qmldesigner/designersettings.h +++ b/src/plugins/qmldesigner/designersettings.h @@ -47,7 +47,6 @@ public: void toSettings(QSettings *) const; bool equals(const DesignerSettings &other) const; - bool openDesignMode; int itemSpacing; int containerPadding; int canvasWidth; diff --git a/src/plugins/qmldesigner/designmodewidget.cpp b/src/plugins/qmldesigner/designmodewidget.cpp index d01ae232b5e..b8df512dc7c 100644 --- a/src/plugins/qmldesigner/designmodewidget.cpp +++ b/src/plugins/qmldesigner/designmodewidget.cpp @@ -451,7 +451,8 @@ void DesignModeWidget::toolBarOnGoBackClicked() if (m_navigatorHistoryCounter > 0) { --m_navigatorHistoryCounter; m_keepNavigatorHistory = true; - Core::EditorManager::openEditor(m_navigatorHistory.at(m_navigatorHistoryCounter)); + Core::EditorManager::openEditor(m_navigatorHistory.at(m_navigatorHistoryCounter), + Core::Id(), Core::EditorManager::DoNotMakeVisible); m_keepNavigatorHistory = false; } } @@ -461,7 +462,8 @@ void DesignModeWidget::toolBarOnGoForwardClicked() if (m_navigatorHistoryCounter < (m_navigatorHistory.size() - 1)) { ++m_navigatorHistoryCounter; m_keepNavigatorHistory = true; - Core::EditorManager::openEditor(m_navigatorHistory.at(m_navigatorHistoryCounter)); + Core::EditorManager::openEditor(m_navigatorHistory.at(m_navigatorHistoryCounter), + Core::Id(), Core::EditorManager::DoNotMakeVisible); m_keepNavigatorHistory = false; } } diff --git a/src/plugins/qmldesigner/qmldesigner_dependencies.pri b/src/plugins/qmldesigner/qmldesigner_dependencies.pri index d341b0e0f6a..654b5cb1c63 100644 --- a/src/plugins/qmldesigner/qmldesigner_dependencies.pri +++ b/src/plugins/qmldesigner/qmldesigner_dependencies.pri @@ -10,6 +10,7 @@ QTC_PLUGIN_DEPENDS += \ qtsupport \ projectexplorer INCLUDEPATH *= \ + $$PWD \ $$PWD/../../../share/qtcreator/qml/qmlpuppet/interfaces \ $$PWD/designercore \ $$PWD/designercore/include \ diff --git a/src/plugins/qmldesigner/qmldesignerconstants.h b/src/plugins/qmldesigner/qmldesignerconstants.h index b083ee82913..366eef44490 100644 --- a/src/plugins/qmldesigner/qmldesignerconstants.h +++ b/src/plugins/qmldesigner/qmldesignerconstants.h @@ -53,7 +53,6 @@ const char GO_INTO_COMPONENT[] = "QmlDesigner.GoIntoComponent"; // This setting is also accessed by the QMlJsEditor. const char QML_SETTINGS_GROUP[] = "QML"; const char QML_DESIGNER_SETTINGS_GROUP[] = "Designer"; -const char QML_OPENDESIGNMODE_SETTINGS_KEY[] = "OpenDesignMode"; const char QML_ITEMSPACING_KEY[] = "ItemSpacing"; const char QML_CONTAINERPADDING_KEY[] = "ContainerPadding"; const char QML_CANVASWIDTH_KEY[] = "CanvasWidth"; @@ -64,7 +63,6 @@ const char QML_WARNIN_FOR_FEATURES_IN_DESIGNER_KEY[] = "WarnAboutQtQuickFeatures const char QML_WARNIN_FOR_DESIGNER_FEATURES_IN_EDITOR_KEY[] = "WarnAboutQtQuickDesignerFeaturesInCodeEditor"; const char QML_SHOW_DEBUGVIEW[] = "ShowQtQuickDesignerDebugView"; const char QML_ENABLE_DEBUGVIEW[] = "EnableQtQuickDesignerDebugView"; -enum { QML_OPENDESIGNMODE_DEFAULT = 0 }; // 0 for text mode, 1 for design mode const char SETTINGS_CATEGORY_QML_ICON[] = ":/core/images/category_qml.png"; diff --git a/src/plugins/qmljseditor/qmljseditor.pro b/src/plugins/qmljseditor/qmljseditor.pro index d6201be0523..9a40aa33eae 100644 --- a/src/plugins/qmljseditor/qmljseditor.pro +++ b/src/plugins/qmljseditor/qmljseditor.pro @@ -68,7 +68,6 @@ SOURCES += \ qmljswrapinloader.cpp RESOURCES += qmljseditor.qrc -OTHER_FILES += QmlJSEditor.mimetypes.xml FORMS += \ quicktoolbarsettingspage.ui \ diff --git a/src/plugins/qmljseditor/qmljseditor.qbs b/src/plugins/qmljseditor/qmljseditor.qbs index 32d3ef4d359..72c9294c143 100644 --- a/src/plugins/qmljseditor/qmljseditor.qbs +++ b/src/plugins/qmljseditor/qmljseditor.qbs @@ -17,7 +17,6 @@ QtcPlugin { Depends { name: "CPlusPlus" } files: [ - "QmlJSEditor.mimetypes.xml", "jsfilewizard.cpp", "jsfilewizard.h", "qmlexpressionundercursor.cpp", diff --git a/src/plugins/qmljseditor/qmljseditor.qrc b/src/plugins/qmljseditor/qmljseditor.qrc index 38e57bac808..35ecba5f6ee 100644 --- a/src/plugins/qmljseditor/qmljseditor.qrc +++ b/src/plugins/qmljseditor/qmljseditor.qrc @@ -1,6 +1,5 @@ - QmlJSEditor.mimetypes.xml images/qmlfile.png diff --git a/src/plugins/qmljseditor/qmljseditoreditable.cpp b/src/plugins/qmljseditor/qmljseditoreditable.cpp index ee75f356c1f..8af4f1a5cba 100644 --- a/src/plugins/qmljseditor/qmljseditoreditable.cpp +++ b/src/plugins/qmljseditor/qmljseditoreditable.cpp @@ -33,7 +33,6 @@ #include #include -#include #include #include @@ -52,41 +51,13 @@ QmlJSEditorEditable::QmlJSEditorEditable(QmlJSTextEditorWidget *editor) m_context.add(ProjectExplorer::Constants::LANG_QMLJS); } -// Use preferred mode from Bauhaus settings -static bool openInDesignMode() -{ - static bool bauhausDetected = false; - static bool bauhausPresent = false; - // Check if Bauhaus is loaded, that is, a Design mode widget is - // registered for the QML mime type. - if (!bauhausDetected) { - if (const Core::IMode *dm = Core::ModeManager::mode(Core::Constants::MODE_DESIGN)) - if (const Core::DesignMode *designMode = qobject_cast(dm)) - bauhausPresent = designMode->registeredMimeTypes().contains(QLatin1String(QmlJSTools::Constants::QML_MIMETYPE)); - bauhausDetected = true; - } - if (!bauhausPresent) - return false; - - return bool(QmlDesigner::Constants::QML_OPENDESIGNMODE_DEFAULT); -} - -Core::Id QmlJSEditorEditable::preferredModeType() const +bool QmlJSEditorEditable::isDesignModePreferred() const { + // stay in design mode if we are there Core::IMode *mode = Core::ModeManager::currentMode(); - if (mode && (mode->type() == Core::Constants::MODE_DESIGN_TYPE - || mode->type() == Core::Constants::MODE_EDIT_TYPE)) - { - return mode->type(); - } - - // if we are in other mode than edit or design, use the hard-coded default. - // because the editor opening decision is modal, it would be confusing to - // have the user also access to this failsafe setting. - if (editorWidget()->mimeType() == QLatin1String(QmlJSTools::Constants::QML_MIMETYPE) - && openInDesignMode()) - return Core::Id(Core::Constants::MODE_DESIGN_TYPE); - return Core::Id(); + if (mode && mode->id() == Core::Constants::MODE_DESIGN) + return true; + return false; } void QmlJSEditorEditable::setTextCodec(QTextCodec *codec, TextCodecReason reason) diff --git a/src/plugins/qmljseditor/qmljseditoreditable.h b/src/plugins/qmljseditor/qmljseditoreditable.h index ac7d161588a..07550c50e45 100644 --- a/src/plugins/qmljseditor/qmljseditoreditable.h +++ b/src/plugins/qmljseditor/qmljseditoreditable.h @@ -49,7 +49,7 @@ public: Core::Id id() const; bool isTemporary() const { return false; } bool open(QString *errorString, const QString &fileName, const QString &realFileName); - Core::Id preferredModeType() const; + bool isDesignModePreferred() const; void setTextCodec(QTextCodec *codec, TextCodecReason = TextCodecOtherReason); const Utils::CommentDefinition *commentDefinition() const; diff --git a/src/plugins/qmljseditor/qmljseditorplugin.cpp b/src/plugins/qmljseditor/qmljseditorplugin.cpp index 21044644d23..afaafd6c331 100644 --- a/src/plugins/qmljseditor/qmljseditorplugin.cpp +++ b/src/plugins/qmljseditor/qmljseditorplugin.cpp @@ -53,7 +53,6 @@ #include #include -#include #include #include #include @@ -114,9 +113,6 @@ QmlJSEditorPlugin::~QmlJSEditorPlugin() bool QmlJSEditorPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage) { - if (!Core::ICore::mimeDatabase()->addMimeTypes(QLatin1String(":/qmljseditor/QmlJSEditor.mimetypes.xml"), errorMessage)) - return false; - m_modelManager = QmlJS::ModelManagerInterface::instance(); addAutoReleasedObject(new QmlJSSnippetProvider); diff --git a/src/plugins/qmljseditor/qmljsfindreferences.cpp b/src/plugins/qmljseditor/qmljsfindreferences.cpp index 50ebf9a6b2c..af0d7b461b9 100644 --- a/src/plugins/qmljseditor/qmljsfindreferences.cpp +++ b/src/plugins/qmljseditor/qmljsfindreferences.cpp @@ -29,7 +29,6 @@ #include "qmljsfindreferences.h" -#include #include #include #include @@ -985,12 +984,10 @@ void FindReferences::setPaused(bool paused) void FindReferences::openEditor(const Find::SearchResultItem &item) { if (item.path.size() > 0) { - TextEditor::BaseTextEditorWidget::openEditorAt(QDir::fromNativeSeparators(item.path.first()), - item.lineNumber, item.textMarkPos, Core::Id(), - Core::EditorManager::ModeSwitch); + Core::EditorManager::openEditorAt(QDir::fromNativeSeparators(item.path.first()), + item.lineNumber, item.textMarkPos); } else { - Core::EditorManager::openEditor(QDir::fromNativeSeparators(item.text), - Core::Id(), Core::EditorManager::ModeSwitch); + Core::EditorManager::openEditor(QDir::fromNativeSeparators(item.text)); } } diff --git a/src/plugins/qmljseditor/qmljshoverhandler.cpp b/src/plugins/qmljseditor/qmljshoverhandler.cpp index 7e816cf3978..c33c1d13cdd 100644 --- a/src/plugins/qmljseditor/qmljshoverhandler.cpp +++ b/src/plugins/qmljseditor/qmljshoverhandler.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -134,9 +135,15 @@ static inline QString getModuleName(const ScopeChain &scopeChain, const Document } else if (importInfo.isValid() && importInfo.type() == ImportInfo::DirectoryImport) { const QString path = importInfo.path(); const QDir dir(qmlDocument->path()); + // should probably try to make it relatve to some import path, not to the document path QString relativeDir = dir.relativeFilePath(path); const QString name = relativeDir.replace(QLatin1Char('/'), QLatin1Char('.')); return name; + } else if (importInfo.isValid() && importInfo.type() == ImportInfo::QrcDirectoryImport) { + QString path = QrcParser::normalizedQrcDirectoryPath(importInfo.path()); + path = path.mid(1, path.size() - ((path.size() > 1) ? 2 : 1)); + const QString name = path.replace(QLatin1Char('/'), QLatin1Char('.')); + return name; } } return QString(); diff --git a/src/plugins/qmljseditor/QmlJSEditor.mimetypes.xml b/src/plugins/qmljstools/QmlJSTools.mimetypes.xml similarity index 100% rename from src/plugins/qmljseditor/QmlJSEditor.mimetypes.xml rename to src/plugins/qmljstools/QmlJSTools.mimetypes.xml diff --git a/src/plugins/qmljstools/qmlconsoleitemdelegate.cpp b/src/plugins/qmljstools/qmlconsoleitemdelegate.cpp index 03af88b55fe..def7176d3b3 100644 --- a/src/plugins/qmljstools/qmlconsoleitemdelegate.cpp +++ b/src/plugins/qmljstools/qmlconsoleitemdelegate.cpp @@ -34,6 +34,7 @@ #include #include #include +#include const char CONSOLE_LOG_BACKGROUND_COLOR[] = "#E8EEF2"; const char CONSOLE_WARNING_BACKGROUND_COLOR[] = "#F6F4EB"; @@ -216,6 +217,9 @@ void QmlConsoleItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem if (showFileLineInfo) { // Check for file info QString file = index.data(QmlConsoleItemModel::FileRole).toString(); + const QUrl fileUrl = QUrl(file); + if (fileUrl.isLocalFile()) + file = fileUrl.toLocalFile(); if (!file.isEmpty()) { QFontMetrics fm(option.font); // Paint FileArea diff --git a/src/plugins/qmljstools/qmlconsoleview.cpp b/src/plugins/qmljstools/qmlconsoleview.cpp index c44ddd7f45a..872b4ae8671 100644 --- a/src/plugins/qmljstools/qmlconsoleview.cpp +++ b/src/plugins/qmljstools/qmlconsoleview.cpp @@ -31,7 +31,7 @@ #include "qmlconsoleitemdelegate.h" #include "qmlconsoleitemmodel.h" -#include +#include #include #include @@ -44,6 +44,7 @@ #include #include #include +#include using namespace QmlJS; @@ -225,13 +226,15 @@ void QmlConsoleView::onRowActivated(const QModelIndex &index) return; // See if we have file and line Info - QString filePath = model()->data(index, - QmlConsoleItemModel::FileRole).toString(); + QString filePath = model()->data(index, QmlConsoleItemModel::FileRole).toString(); + const QUrl fileUrl = QUrl(filePath); + if (fileUrl.isLocalFile()) + filePath = fileUrl.toLocalFile(); if (!filePath.isEmpty()) { QFileInfo fi(filePath); if (fi.exists() && fi.isFile() && fi.isReadable()) { int line = model()->data(index, QmlConsoleItemModel::LineRole).toInt(); - TextEditor::BaseTextEditorWidget::openEditorAt(fi.canonicalFilePath(), line); + Core::EditorManager::openEditorAt(fi.canonicalFilePath(), line); } } } @@ -244,6 +247,9 @@ void QmlConsoleView::copyToClipboard(const QModelIndex &index) QString contents = model()->data(index, QmlConsoleItemModel::ExpressionRole).toString(); // See if we have file and line Info QString filePath = model()->data(index, QmlConsoleItemModel::FileRole).toString(); + const QUrl fileUrl = QUrl(filePath); + if (fileUrl.isLocalFile()) + filePath = fileUrl.toLocalFile(); if (!filePath.isEmpty()) { contents = QString(QLatin1String("%1 %2: %3")).arg(contents).arg(filePath).arg( model()->data(index, QmlConsoleItemModel::LineRole).toString()); @@ -259,6 +265,9 @@ bool QmlConsoleView::canShowItemInTextEditor(const QModelIndex &index) // See if we have file and line Info QString filePath = model()->data(index, QmlConsoleItemModel::FileRole).toString(); + const QUrl fileUrl = QUrl(filePath); + if (fileUrl.isLocalFile()) + filePath = fileUrl.toLocalFile(); if (!filePath.isEmpty()) { QFileInfo fi(filePath); if (fi.exists() && fi.isFile() && fi.isReadable()) diff --git a/src/plugins/qmljstools/qmljsfunctionfilter.cpp b/src/plugins/qmljstools/qmljsfunctionfilter.cpp index 3c500314c96..33c1eb93563 100644 --- a/src/plugins/qmljstools/qmljsfunctionfilter.cpp +++ b/src/plugins/qmljstools/qmljsfunctionfilter.cpp @@ -30,7 +30,7 @@ #include "qmljsfunctionfilter.h" #include "qmljslocatordata.h" -#include +#include #include @@ -111,6 +111,5 @@ QList FunctionFilter::matchesFor(QFutureInterface(selection.internalData); - TextEditor::BaseTextEditorWidget::openEditorAt(entry.fileName, entry.line, entry.column, - Core::Id(), Core::EditorManager::ModeSwitch); + Core::EditorManager::openEditorAt(entry.fileName, entry.line, entry.column); } diff --git a/src/plugins/qmljstools/qmljsmodelmanager.cpp b/src/plugins/qmljstools/qmljsmodelmanager.cpp index 07e9ec06c12..d2c25d49f75 100644 --- a/src/plugins/qmljstools/qmljsmodelmanager.cpp +++ b/src/plugins/qmljstools/qmljsmodelmanager.cpp @@ -58,6 +58,7 @@ #include #include #include +#include #include @@ -406,6 +407,114 @@ void ModelManager::removeFiles(const QStringList &files) } } +namespace { +bool pInfoLessThanActive(const ModelManager::ProjectInfo &p1, const ModelManager::ProjectInfo &p2) +{ + QStringList s1 = p1.activeResourceFiles; + QStringList s2 = p2.activeResourceFiles; + if (s1.size() < s2.size()) + return true; + if (s1.size() > s2.size()) + return false; + for (int i = 0; i < s1.size(); ++i) { + if (s1.at(i) < s2.at(i)) + return true; + else if (s1.at(i) > s2.at(i)) + return false; + } + return false; +} + +bool pInfoLessThanAll(const ModelManager::ProjectInfo &p1, const ModelManager::ProjectInfo &p2) +{ + QStringList s1 = p1.allResourceFiles; + QStringList s2 = p2.allResourceFiles; + if (s1.size() < s2.size()) + return true; + if (s1.size() > s2.size()) + return false; + for (int i = 0; i < s1.size(); ++i) { + if (s1.at(i) < s2.at(i)) + return true; + else if (s1.at(i) > s2.at(i)) + return false; + } + return false; +} +} + +QStringList ModelManager::filesAtQrcPath(const QString &path, const QLocale *locale, + ProjectExplorer::Project *project, + QrcResourceSelector resources) +{ + QString normPath = QrcParser::normalizedQrcFilePath(path); + QList pInfos; + if (project) + pInfos.append(projectInfo(project)); + else + pInfos = projectInfos(); + + QStringList res; + QSet pathsChecked; + foreach (const ModelManager::ProjectInfo &pInfo, pInfos) { + QStringList qrcFilePaths; + if (resources == ActiveQrcResources) + qrcFilePaths = pInfo.activeResourceFiles; + else + qrcFilePaths = pInfo.allResourceFiles; + foreach (const QString &qrcFilePath, qrcFilePaths) { + if (pathsChecked.contains(qrcFilePath)) + continue; + pathsChecked.insert(qrcFilePath); + QrcParser::ConstPtr qrcFile = m_qrcCache.parsedPath(qrcFilePath); + if (qrcFile.isNull()) + continue; + qrcFile->collectFilesAtPath(normPath, &res, locale); + } + } + res.sort(); // make the result predictable + return res; +} + +QMap ModelManager::filesInQrcPath(const QString &path, + const QLocale *locale, + ProjectExplorer::Project *project, + bool addDirs, + QrcResourceSelector resources) +{ + QString normPath = QrcParser::normalizedQrcDirectoryPath(path); + QList pInfos; + if (project) { + pInfos.append(projectInfo(project)); + } else { + pInfos = projectInfos(); + if (resources == ActiveQrcResources) // make the result predictable + qSort(pInfos.begin(), pInfos.end(), &pInfoLessThanActive); + else + qSort(pInfos.begin(), pInfos.end(), &pInfoLessThanAll); + } + QMap res; + QSet pathsChecked; + foreach (const ModelManager::ProjectInfo &pInfo, pInfos) { + QStringList qrcFilePaths; + if (resources == ActiveQrcResources) + qrcFilePaths = pInfo.activeResourceFiles; + else + qrcFilePaths = pInfo.allResourceFiles; + foreach (const QString &qrcFilePath, qrcFilePaths) { + if (pathsChecked.contains(qrcFilePath)) + continue; + pathsChecked.insert(qrcFilePath); + QrcParser::ConstPtr qrcFile = m_qrcCache.parsedPath(qrcFilePath); + + if (qrcFile.isNull()) + continue; + qrcFile->collectFilesInPath(normPath, &res, addDirs, locale); + } + } + return res; +} + QList ModelManager::projectInfos() const { QMutexLocker locker(&m_mutex); @@ -462,6 +571,12 @@ void ModelManager::updateProjectInfo(const ProjectInfo &pinfo) } updateSourceFiles(newFiles, false); + // update qrc cache + foreach (const QString &newQrc, pinfo.allResourceFiles) + m_qrcCache.addPath(newQrc); + foreach (const QString &oldQrc, oldInfo.allResourceFiles) + m_qrcCache.removePath(oldQrc); + // dump builtin types if the shipped definitions are probably outdated and the // Qt version ships qmlplugindump if (QtSupport::QtVersionNumber(pinfo.qtVersionString) > QtSupport::QtVersionNumber(4, 8, 5)) @@ -497,6 +612,11 @@ ModelManagerInterface::ProjectInfo ModelManager::projectInfoForPath(QString path void ModelManager::emitDocumentChangedOnDisk(Document::Ptr doc) { emit documentChangedOnDisk(doc); } +void ModelManager::updateQrcFile(const QString &path) +{ + m_qrcCache.updatePath(path); +} + void ModelManager::updateDocument(Document::Ptr doc) { { @@ -560,6 +680,23 @@ static void findNewFileImports(const Document::Ptr &doc, const Snapshot &snapsho scannedPaths->insert(importName); } } + } else if (import.type() == ImportInfo::QrcFileImport) { + QStringList importPaths = ModelManagerInterface::instance()->filesAtQrcPath(importName); + foreach (const QString &importPath, importPaths) { + if (! snapshot.document(importPath)) + *importedFiles += importPath; + } + } else if (import.type() == ImportInfo::QrcDirectoryImport) { + QMapIterator dirContents(ModelManagerInterface::instance()->filesInQrcPath(importName)); + while (dirContents.hasNext()) { + dirContents.next(); + if (Document::isQmlLikeOrJsLanguage(Document::guessLanguageFromSuffix(dirContents.key()))) { + foreach (const QString &filePath, dirContents.value()) { + if (! snapshot.document(filePath)) + *importedFiles += filePath; + } + } + } } } } @@ -697,8 +834,11 @@ void ModelManager::parse(QFutureInterface &future, const QString fileName = files.at(i); Document::Language language = languageOfFile(fileName); - if (language == Document::UnknownLanguage) + if (language == Document::UnknownLanguage) { + if (fileName.endsWith(QLatin1String(".qrc"))) + modelManager->updateQrcFile(fileName); continue; + } QString contents; int documentRevision = 0; diff --git a/src/plugins/qmljstools/qmljsmodelmanager.h b/src/plugins/qmljstools/qmljsmodelmanager.h index 3b0763f904a..1c42c038829 100644 --- a/src/plugins/qmljstools/qmljsmodelmanager.h +++ b/src/plugins/qmljstools/qmljsmodelmanager.h @@ -33,6 +33,7 @@ #include "qmljstools_global.h" #include +#include #include @@ -41,6 +42,7 @@ #include QT_FORWARD_DECLARE_CLASS(QTimer) +QT_FORWARD_DECLARE_CLASS(QLocale) namespace Core { class MimeType; @@ -50,6 +52,10 @@ namespace CPlusPlus { class CppModelManagerInterface; } +namespace QmlJS { +class QrcParser; +} + namespace QmlJSTools { QMLJSTOOLS_EXPORT QmlJS::Document::Language languageOfFile(const QString &fileName); @@ -77,6 +83,14 @@ public: bool emitDocumentOnDiskChanged); virtual void fileChangedOnDisk(const QString &path); virtual void removeFiles(const QStringList &files); + virtual QStringList filesAtQrcPath(const QString &path, const QLocale *locale = 0, + ProjectExplorer::Project *project = 0, + QrcResourceSelector resources = AllQrcResources); + virtual QMap filesInQrcPath(const QString &path, + const QLocale *locale = 0, + ProjectExplorer::Project *project = 0, + bool addDirs = false, + QrcResourceSelector resources = AllQrcResources); virtual QList projectInfos() const; virtual ProjectInfo projectInfo(ProjectExplorer::Project *project) const; @@ -87,6 +101,7 @@ public: void updateDocument(QmlJS::Document::Ptr doc); void updateLibraryInfo(const QString &path, const QmlJS::LibraryInfo &info); void emitDocumentChangedOnDisk(QmlJS::Document::Ptr doc); + void updateQrcFile(const QString &path); virtual QStringList importPaths() const; virtual QmlJS::QmlLanguageBundles activeBundles() const; @@ -147,6 +162,7 @@ private: QTimer *m_updateCppQmlTypesTimer; QHash > m_queuedCppDocuments; QFuture m_cppQmlTypesUpdater; + QmlJS::QrcCache m_qrcCache; CppDataHash m_cppDataHash; mutable QMutex m_cppDataMutex; diff --git a/src/plugins/qmljstools/qmljstools.pro b/src/plugins/qmljstools/qmljstools.pro index 93021dd6a87..c3fdd89e7d7 100644 --- a/src/plugins/qmljstools/qmljstools.pro +++ b/src/plugins/qmljstools/qmljstools.pro @@ -60,6 +60,9 @@ SOURCES += \ RESOURCES += \ qmljstools.qrc +OTHER_FILES += \ + QmlJSTools.mimetypes.xml + FORMS += \ $$PWD/qmljscodestylesettingspage.ui diff --git a/src/plugins/qmljstools/qmljstools.qbs b/src/plugins/qmljstools/qmljstools.qbs index 682dc34de17..dc8b1f78b2c 100644 --- a/src/plugins/qmljstools/qmljstools.qbs +++ b/src/plugins/qmljstools/qmljstools.qbs @@ -20,6 +20,7 @@ QtcPlugin { cpp.includePaths: base.concat("../../libs/3rdparty") files: [ + "QmlJSTools.mimetypes.xml", "qmljsbundleprovider.cpp", "qmljsbundleprovider.h", "qmljscodestylepreferencesfactory.cpp", diff --git a/src/plugins/qmljstools/qmljstools.qrc b/src/plugins/qmljstools/qmljstools.qrc index 9e396a3995a..ab7f6f798ca 100644 --- a/src/plugins/qmljstools/qmljstools.qrc +++ b/src/plugins/qmljstools/qmljstools.qrc @@ -6,5 +6,6 @@ images/log.png images/expand.png images/error.png + QmlJSTools.mimetypes.xml
diff --git a/src/plugins/qmljstools/qmljstoolsplugin.cpp b/src/plugins/qmljstools/qmljstoolsplugin.cpp index 0d2889019c0..50d76d84276 100644 --- a/src/plugins/qmljstools/qmljstoolsplugin.cpp +++ b/src/plugins/qmljstools/qmljstoolsplugin.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -72,6 +73,10 @@ bool QmlJSToolsPlugin::initialize(const QStringList &arguments, QString *error) Q_UNUSED(arguments) Q_UNUSED(error) + if (!Core::ICore::mimeDatabase() + ->addMimeTypes(QLatin1String(":/qmljstools/QmlJSTools.mimetypes.xml"), error)) + return false; + m_settings = new QmlJSToolsSettings(this); // force registration of qmljstools settings // Objects diff --git a/src/plugins/qmlprofiler/qmlprofilerengine.cpp b/src/plugins/qmlprofiler/qmlprofilerengine.cpp index 6b0185685f2..ce65ee8e497 100644 --- a/src/plugins/qmlprofiler/qmlprofilerengine.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerengine.cpp @@ -65,7 +65,7 @@ class QmlProfilerEngine::QmlProfilerEnginePrivate { public: QmlProfilerEnginePrivate(QmlProfilerEngine *qq, const AnalyzerStartParameters &sp) : q(qq), m_runner(0), sp(sp) {} - ~QmlProfilerEnginePrivate() { delete m_runner; } + ~QmlProfilerEnginePrivate() { m_runner->disconnect(); delete m_runner; } bool attach(const QString &address, uint port); AbstractQmlProfilerRunner *createRunner(ProjectExplorer::RunConfiguration *runConfiguration, @@ -161,6 +161,7 @@ bool QmlProfilerEngine::start() QTC_ASSERT(d->m_profilerState, return false); if (d->m_runner) { + d->m_runner->disconnect(); delete d->m_runner; d->m_runner = 0; } @@ -189,7 +190,7 @@ bool QmlProfilerEngine::start() } if (d->m_runner) { - connect(d->m_runner, SIGNAL(stopped()), this, SLOT(processEnded())); + connect(d->m_runner, SIGNAL(stopped()), this, SLOT(notifyRemoteFinished())); connect(d->m_runner, SIGNAL(appendMessage(QString,Utils::OutputFormat)), this, SLOT(logApplicationMessage(QString,Utils::OutputFormat))); d->m_runner->start(); @@ -230,13 +231,16 @@ void QmlProfilerEngine::stop() } } -void QmlProfilerEngine::processEnded() +void QmlProfilerEngine::notifyRemoteFinished(bool success) { QTC_ASSERT(d->m_profilerState, return); switch (d->m_profilerState->currentState()) { case QmlProfilerStateManager::AppRunning : { - d->m_profilerState->setCurrentState(QmlProfilerStateManager::AppDying); + if (success) + d->m_profilerState->setCurrentState(QmlProfilerStateManager::AppDying); + else + d->m_profilerState->setCurrentState(QmlProfilerStateManager::AppKilled); AnalyzerManager::stopTool(); emit finished(); @@ -374,6 +378,7 @@ void QmlProfilerEngine::profilerStateChanged() // (a new one will be created at start) d->m_noDebugOutputTimer.stop(); if (d->m_runner) { + d->m_runner->disconnect(); delete d->m_runner; d->m_runner = 0; } diff --git a/src/plugins/qmlprofiler/qmlprofilerengine.h b/src/plugins/qmlprofiler/qmlprofilerengine.h index fe8cc473137..2a7d24998f4 100644 --- a/src/plugins/qmlprofiler/qmlprofilerengine.h +++ b/src/plugins/qmlprofiler/qmlprofilerengine.h @@ -62,7 +62,7 @@ public slots: void stop(); private slots: - void processEnded(); + void notifyRemoteFinished(bool success = true); void cancelProcess(); void logApplicationMessage(const QString &msg, Utils::OutputFormat format); diff --git a/src/plugins/qnx/bardescriptoreditorfactory.cpp b/src/plugins/qnx/bardescriptoreditorfactory.cpp index da3a933dcee..ac300d3710c 100644 --- a/src/plugins/qnx/bardescriptoreditorfactory.cpp +++ b/src/plugins/qnx/bardescriptoreditorfactory.cpp @@ -61,12 +61,6 @@ QString BarDescriptorEditorFactory::displayName() const return tr("Bar descriptor editor"); } -Core::IDocument *BarDescriptorEditorFactory::open(const QString &fileName) -{ - Core::IEditor *iface = Core::EditorManager::instance()->openEditor(fileName, id()); - return iface ? iface->document() : 0; -} - Core::IEditor *BarDescriptorEditorFactory::createEditor(QWidget *parent) { BarDescriptorEditorWidget *editorWidget = new BarDescriptorEditorWidget(parent); diff --git a/src/plugins/qnx/bardescriptoreditorfactory.h b/src/plugins/qnx/bardescriptoreditorfactory.h index 1e49ac3247b..36bade0089b 100644 --- a/src/plugins/qnx/bardescriptoreditorfactory.h +++ b/src/plugins/qnx/bardescriptoreditorfactory.h @@ -48,7 +48,6 @@ public: QStringList mimeTypes() const; Core::Id id() const; QString displayName() const; - Core::IDocument *open(const QString &fileName); Core::IEditor *createEditor(QWidget *parent); diff --git a/src/plugins/qnx/blackberryapplicationrunner.cpp b/src/plugins/qnx/blackberryapplicationrunner.cpp index 1943a0374e3..1f24c5765f1 100644 --- a/src/plugins/qnx/blackberryapplicationrunner.cpp +++ b/src/plugins/qnx/blackberryapplicationrunner.cpp @@ -59,6 +59,7 @@ BlackBerryApplicationRunner::BlackBerryApplicationRunner(bool debugMode, BlackBe : QObject(parent) , m_debugMode(debugMode) , m_slog2infoFound(false) + , m_currentLogs(false) , m_pid(-1) , m_appId(QString()) , m_running(false) @@ -155,6 +156,7 @@ ProjectExplorer::RunControl::StopResult BlackBerryApplicationRunner::stop() return ProjectExplorer::RunControl::AsynchronousStop; m_stopping = true; + m_currentLogs = false; if (m_testSlog2Process && m_testSlog2Process->isProcessRunning()) { m_testSlog2Process->cancel(); @@ -312,19 +314,33 @@ void BlackBerryApplicationRunner::handleTailOutput() if (m_slog2infoFound) { const QStringList multiLine = message.split(QLatin1Char('\n')); Q_FOREACH (const QString &line, multiLine) { - QDateTime dateTime = QDateTime::fromString(line.split(m_appId).first().mid(4).trimmed(), - QString::fromLatin1("dd HH:mm:ss.zzz")); - if (dateTime >= m_launchDateTime) { - QStringList validLineBeginnings; - validLineBeginnings << QLatin1String("qt-msg 0 ") - << QLatin1String("qt-msg* 0 ") - << QLatin1String("default* 9000 ") - << QLatin1String("default 9000 ") - << QLatin1String(" 0 "); - Q_FOREACH (const QString &beginning, validLineBeginnings) { - if (showQtMessage(beginning, line)) - break; - } + // Check if logs are from the recent launch + // Note: This is useless if/once slog2info -b displays only logs from recent launches + if (!m_currentLogs) { + QDateTime dateTime = QDateTime::fromString(line.split(m_appId).first().mid(4).trimmed(), + QString::fromLatin1("dd HH:mm:ss.zzz")); + + m_currentLogs = dateTime >= m_launchDateTime; + if (!m_currentLogs) + continue; + } + + // The line could be a part of a previous log message that contains a '\n' + // In that case only the message body is displayed + if (!line.contains(m_appId) && !line.isEmpty()) { + emit output(line + QLatin1Char('\n'), Utils::StdOutFormat); + continue; + } + + QStringList validLineBeginnings; + validLineBeginnings << QLatin1String("qt-msg 0 ") + << QLatin1String("qt-msg* 0 ") + << QLatin1String("default* 9000 ") + << QLatin1String("default 9000 ") + << QLatin1String(" 0 "); + Q_FOREACH (const QString &beginning, validLineBeginnings) { + if (showQtMessage(beginning, line)) + break; } } return; diff --git a/src/plugins/qnx/blackberryapplicationrunner.h b/src/plugins/qnx/blackberryapplicationrunner.h index 3b8eec9097e..afe7bba7ee5 100644 --- a/src/plugins/qnx/blackberryapplicationrunner.h +++ b/src/plugins/qnx/blackberryapplicationrunner.h @@ -104,6 +104,7 @@ private: bool m_debugMode; bool m_slog2infoFound; + bool m_currentLogs; QDateTime m_launchDateTime; diff --git a/src/plugins/qnx/qnx.pro b/src/plugins/qnx/qnx.pro index 8f71ef4a232..16f02fa6f29 100644 --- a/src/plugins/qnx/qnx.pro +++ b/src/plugins/qnx/qnx.pro @@ -33,6 +33,8 @@ SOURCES += qnxplugin.cpp \ qnxdeviceconfigurationwizardpages.cpp \ qnxrunconfiguration.cpp \ qnxruncontrolfactory.cpp \ + qnxabstractrunsupport.cpp \ + qnxanalyzesupport.cpp \ qnxdebugsupport.cpp \ qnxdeploystepfactory.cpp \ qnxdeployconfigurationfactory.cpp \ @@ -90,7 +92,8 @@ SOURCES += qnxplugin.cpp \ bardescriptoreditorabstractpanelwidget.cpp \ blackberrysetupwizard.cpp \ blackberrysetupwizardpages.cpp \ - blackberryutils.cpp + blackberryutils.cpp \ + qnxdevicetester.cpp HEADERS += qnxplugin.h\ qnxconstants.h \ @@ -123,6 +126,8 @@ HEADERS += qnxplugin.h\ qnxdeviceconfigurationwizardpages.h \ qnxrunconfiguration.h \ qnxruncontrolfactory.h \ + qnxabstractrunsupport.h \ + qnxanalyzesupport.h \ qnxdebugsupport.h \ qnxdeploystepfactory.h \ qnxdeployconfigurationfactory.h \ @@ -180,7 +185,8 @@ HEADERS += qnxplugin.h\ bardescriptoreditorabstractpanelwidget.h \ blackberrysetupwizard.h \ blackberrysetupwizardpages.h \ - blackberryutils.h + blackberryutils.h \ + qnxdevicetester.h FORMS += \ blackberrydeviceconfigurationwizardsetuppage.ui \ diff --git a/src/plugins/qnx/qnx.qbs b/src/plugins/qnx/qnx.qbs index 530f180912c..214e43e3028 100644 --- a/src/plugins/qnx/qnx.qbs +++ b/src/plugins/qnx/qnx.qbs @@ -188,6 +188,10 @@ QtcPlugin { "qnxbaseqtconfigwidget.h", "qnxbaseqtconfigwidget.ui", "qnxconstants.h", + "qnxabstractrunsupport.cpp", + "qnxabstractrunsupport.h", + "qnxanalyzesupport.cpp", + "qnxanalyzesupport.h", "qnxdebugsupport.cpp", "qnxdebugsupport.h", "qnxdeployconfiguration.cpp", @@ -204,6 +208,8 @@ QtcPlugin { "qnxdeviceconfigurationwizard.h", "qnxdeviceconfigurationwizardpages.cpp", "qnxdeviceconfigurationwizardpages.h", + "qnxdevicetester.cpp", + "qnxdevicetester.h", "qnxplugin.cpp", "qnxplugin.h", "qnxqtversion.cpp", diff --git a/src/plugins/qnx/qnxabstractrunsupport.cpp b/src/plugins/qnx/qnxabstractrunsupport.cpp new file mode 100644 index 00000000000..cb97aa36f9a --- /dev/null +++ b/src/plugins/qnx/qnxabstractrunsupport.cpp @@ -0,0 +1,142 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#include "qnxabstractrunsupport.h" +#include "qnxrunconfiguration.h" + +#include +#include +#include +#include +#include +#include + +using namespace ProjectExplorer; +using namespace RemoteLinux; + +using namespace Qnx; +using namespace Qnx::Internal; + +QnxAbstractRunSupport::QnxAbstractRunSupport(QnxRunConfiguration *runConfig, QObject *parent) + : QObject(parent) + , m_remoteExecutable(runConfig->remoteExecutableFilePath()) + , m_commandPrefix(runConfig->commandPrefix()) + , m_device(DeviceKitInformation::device(runConfig->target()->kit())) + , m_state(Inactive) +{ + m_runner = new DeviceApplicationRunner(this); + m_portsGatherer = new DeviceUsedPortsGatherer(this); + + connect(m_portsGatherer, SIGNAL(error(QString)), SLOT(handleError(QString))); + connect(m_portsGatherer, SIGNAL(portListReady()), SLOT(handlePortListReady())); +} + +void QnxAbstractRunSupport::handleAdapterSetupRequested() +{ + QTC_ASSERT(m_state == Inactive, return); + + m_state = GatheringPorts; + m_portsGatherer->start(m_device); +} + +void QnxAbstractRunSupport::handlePortListReady() +{ + QTC_ASSERT(m_state == GatheringPorts, return); + m_portList = m_device->freePorts(); + startExecution(); +} + +void QnxAbstractRunSupport::handleRemoteProcessStarted() +{ + m_state = Running; +} + +void QnxAbstractRunSupport::handleRemoteProcessFinished(bool) +{ +} + +void QnxAbstractRunSupport::setFinished() +{ + if (m_state != GatheringPorts && m_state != Inactive) + m_runner->stop(m_device->processSupport()->killProcessByNameCommandLine(executable()).toUtf8()); + + m_state = Inactive; +} + +QnxAbstractRunSupport::State QnxAbstractRunSupport::state() const +{ + return m_state; +} + +void QnxAbstractRunSupport::setState(QnxAbstractRunSupport::State state) +{ + m_state = state; +} + +DeviceApplicationRunner *QnxAbstractRunSupport::appRunner() const +{ + return m_runner; +} + +QString QnxAbstractRunSupport::commandPrefix() const +{ + return m_commandPrefix; +} + +const IDevice::ConstPtr QnxAbstractRunSupport::device() const +{ + return m_device; +} + +void QnxAbstractRunSupport::handleProgressReport(const QString &) +{ +} + +void QnxAbstractRunSupport::handleRemoteOutput(const QByteArray &) +{ +} + +void QnxAbstractRunSupport::handleError(const QString &) +{ +} + +bool QnxAbstractRunSupport::setPort(int &port) +{ + port = m_portsGatherer->getNextFreePort(&m_portList); + if (port == -1) { + handleError(tr("Not enough free ports on device for debugging.")); + return false; + } + return true; +} + +QString QnxAbstractRunSupport::executable() const +{ + return m_remoteExecutable; +} diff --git a/src/plugins/qnx/qnxabstractrunsupport.h b/src/plugins/qnx/qnxabstractrunsupport.h new file mode 100644 index 00000000000..1e37059774b --- /dev/null +++ b/src/plugins/qnx/qnxabstractrunsupport.h @@ -0,0 +1,102 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#ifndef QNXABSTRACTRUNSUPPORT_H +#define QNXABSTRACTRUNSUPPORT_H + +#include +#include + +#include +#include + +namespace ProjectExplorer { +class DeviceApplicationRunner; +class DeviceUsedPortsGatherer; +} + +namespace Qnx { +namespace Internal { + +class QnxRunConfiguration; + +class QnxAbstractRunSupport : public QObject +{ + Q_OBJECT +protected: + enum State { + Inactive, + GatheringPorts, + StartingRemoteProcess, + Running + }; +public: + QnxAbstractRunSupport(QnxRunConfiguration *runConfig, QObject *parent = 0); + +protected: + bool setPort(int &port); + virtual void startExecution() = 0; + + virtual QString executable() const; + + void setFinished(); + + State state() const; + void setState(State state); + + ProjectExplorer::DeviceApplicationRunner *appRunner() const; + QString commandPrefix() const; + const ProjectExplorer::IDevice::ConstPtr device() const; + +protected slots: + virtual void handleAdapterSetupRequested(); + + virtual void handleRemoteProcessStarted(); + virtual void handleRemoteProcessFinished(bool); + virtual void handleProgressReport(const QString &progressOutput); + virtual void handleRemoteOutput(const QByteArray &output); + virtual void handleError(const QString &); + +private slots: + void handlePortListReady(); + +private: + ProjectExplorer::DeviceUsedPortsGatherer * m_portsGatherer; + Utils::PortList m_portList; + const QString m_remoteExecutable; + const QString m_commandPrefix; + ProjectExplorer::IDevice::ConstPtr m_device; + ProjectExplorer::DeviceApplicationRunner *m_runner; + State m_state; +}; + +} // namespace Internal +} // namespace Qnx + +#endif // QNXABSTRACTRUNSUPPORT_H diff --git a/src/plugins/qnx/qnxanalyzesupport.cpp b/src/plugins/qnx/qnxanalyzesupport.cpp new file mode 100644 index 00000000000..ac7cea766c9 --- /dev/null +++ b/src/plugins/qnx/qnxanalyzesupport.cpp @@ -0,0 +1,134 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#include "qnxanalyzesupport.h" + +#include +#include +#include + +#include + +using namespace ProjectExplorer; + +using namespace Qnx; +using namespace Qnx::Internal; + +QnxAnalyzeSupport::QnxAnalyzeSupport(QnxRunConfiguration *runConfig, + Analyzer::IAnalyzerEngine *engine) + : QnxAbstractRunSupport(runConfig, engine) + , m_engine(engine) + , m_qmlPort(-1) +{ + const DeviceApplicationRunner *runner = appRunner(); + connect(runner, SIGNAL(reportError(QString)), SLOT(handleError(QString))); + connect(runner, SIGNAL(remoteProcessStarted()), SLOT(handleRemoteProcessStarted())); + connect(runner, SIGNAL(finished(bool)), SLOT(handleRemoteProcessFinished(bool))); + connect(runner, SIGNAL(reportProgress(QString)), SLOT(handleProgressReport(QString))); + connect(runner, SIGNAL(remoteStdout(QByteArray)), SLOT(handleRemoteOutput(QByteArray))); + connect(runner, SIGNAL(remoteStderr(QByteArray)), SLOT(handleRemoteOutput(QByteArray))); + + connect(m_engine, SIGNAL(starting(const Analyzer::IAnalyzerEngine*)), + SLOT(handleAdapterSetupRequested())); +} + +void QnxAnalyzeSupport::handleAdapterSetupRequested() +{ + QTC_ASSERT(state() == Inactive, return); + + showMessage(tr("Preparing remote side...\n"), Utils::NormalMessageFormat); + QnxAbstractRunSupport::handleAdapterSetupRequested(); +} + +void QnxAnalyzeSupport::startExecution() +{ + if (state() == Inactive) + return; + + if (!setPort(m_qmlPort) && m_qmlPort == -1) + return; + + setState(StartingRemoteProcess); + + const QString args = m_engine->startParameters().debuggeeArgs + + QString::fromLatin1(" -qmljsdebugger=port:%1,block").arg(m_qmlPort); + const QString command = QString::fromLatin1("%1 %2 %3").arg(commandPrefix(), executable(), args); + appRunner()->start(device(), command.toUtf8()); +} + +void QnxAnalyzeSupport::handleRemoteProcessStarted() +{ + QnxAbstractRunSupport::handleRemoteProcessStarted(); + if (m_engine) + m_engine->notifyRemoteSetupDone(m_qmlPort); +} + +void QnxAnalyzeSupport::handleRemoteProcessFinished(bool success) +{ + if (m_engine || state() == Inactive) + return; + + if (!success) + showMessage(tr("The %1 process closed unexpectedly.").arg(executable()), + Utils::NormalMessageFormat); + m_engine->notifyRemoteFinished(success); +} + +void QnxAnalyzeSupport::handleProfilingFinished() +{ + setFinished(); +} + +void QnxAnalyzeSupport::handleProgressReport(const QString &progressOutput) +{ + showMessage(progressOutput + QLatin1Char('\n'), Utils::NormalMessageFormat); +} + +void QnxAnalyzeSupport::handleRemoteOutput(const QByteArray &output) +{ + QTC_ASSERT(state() == Inactive || state() == Running, return); + + showMessage(QString::fromUtf8(output), Utils::StdOutFormat); +} + +void QnxAnalyzeSupport::handleError(const QString &error) +{ + if (state() == Running) { + showMessage(error, Utils::ErrorMessageFormat); + } else if (state() != Inactive) { + showMessage(tr("Initial setup failed: %1").arg(error), Utils::NormalMessageFormat); + setFinished(); + } +} + +void QnxAnalyzeSupport::showMessage(const QString &msg, Utils::OutputFormat format) +{ + if (state() != Inactive && m_engine) + m_engine->logApplicationMessage(msg, format); +} diff --git a/src/plugins/qnx/qnxanalyzesupport.h b/src/plugins/qnx/qnxanalyzesupport.h new file mode 100644 index 00000000000..66fa580abd8 --- /dev/null +++ b/src/plugins/qnx/qnxanalyzesupport.h @@ -0,0 +1,74 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#ifndef QNXANALYZESUPPORT_H +#define QNXANALYZESUPPORT_H + +#include "qnxabstractrunsupport.h" + +#include +#include + +namespace Analyzer { class IAnalyzerEngine; } + +namespace Qnx { +namespace Internal { + +class QnxRunConfiguration; + +class QnxAnalyzeSupport : public QnxAbstractRunSupport +{ + Q_OBJECT +public: + QnxAnalyzeSupport(QnxRunConfiguration *runConfig, Analyzer::IAnalyzerEngine *engine); + +public slots: + void handleProfilingFinished(); + +private slots: + void handleAdapterSetupRequested(); + + void handleRemoteProcessStarted(); + void handleRemoteProcessFinished(bool success); + void handleProgressReport(const QString &progressOutput); + void handleRemoteOutput(const QByteArray &output); + void handleError(const QString &error); + +private: + void startExecution(); + void showMessage(const QString &, Utils::OutputFormat); + + Analyzer::IAnalyzerEngine *m_engine; + int m_qmlPort; +}; + +} // namespace Internal +} // namespace Qnx + +#endif // QNXANALYZESUPPORT_H diff --git a/src/plugins/qnx/qnxdebugsupport.cpp b/src/plugins/qnx/qnxdebugsupport.cpp index fdc7b447c0a..7b76080fc73 100644 --- a/src/plugins/qnx/qnxdebugsupport.cpp +++ b/src/plugins/qnx/qnxdebugsupport.cpp @@ -40,7 +40,6 @@ #include #include #include -#include #include using namespace ProjectExplorer; @@ -50,66 +49,44 @@ using namespace Qnx; using namespace Qnx::Internal; QnxDebugSupport::QnxDebugSupport(QnxRunConfiguration *runConfig, Debugger::DebuggerEngine *engine) - : QObject(engine) - , m_remoteExecutable(runConfig->remoteExecutableFilePath()) - , m_commandPrefix(runConfig->commandPrefix()) - , m_device(DeviceKitInformation::device(runConfig->target()->kit())) + : QnxAbstractRunSupport(runConfig, engine) , m_engine(engine) , m_pdebugPort(-1) , m_qmlPort(-1) , m_useCppDebugger(runConfig->extraAspect()->useCppDebugger()) , m_useQmlDebugger(runConfig->extraAspect()->useQmlDebugger()) - , m_state(Inactive) { - m_runner = new DeviceApplicationRunner(this); - m_portsGatherer = new DeviceUsedPortsGatherer(this); - - connect(m_portsGatherer, SIGNAL(error(QString)), SLOT(handleError(QString))); - connect(m_portsGatherer, SIGNAL(portListReady()), SLOT(handlePortListReady())); - - connect(m_runner, SIGNAL(reportError(QString)), SLOT(handleError(QString))); - connect(m_runner, SIGNAL(remoteProcessStarted()), this, SLOT(handleRemoteProcessStarted())); - connect(m_runner, SIGNAL(finished(bool)), SLOT(handleRemoteProcessFinished(bool))); - connect(m_runner, SIGNAL(reportProgress(QString)), this, SLOT(handleProgressReport(QString))); - connect(m_runner, SIGNAL(remoteStdout(QByteArray)), this, SLOT(handleRemoteOutput(QByteArray))); - connect(m_runner, SIGNAL(remoteStderr(QByteArray)), this, SLOT(handleRemoteOutput(QByteArray))); + const DeviceApplicationRunner *runner = appRunner(); + connect(runner, SIGNAL(reportError(QString)), SLOT(handleError(QString))); + connect(runner, SIGNAL(remoteProcessStarted()), SLOT(handleRemoteProcessStarted())); + connect(runner, SIGNAL(finished(bool)), SLOT(handleRemoteProcessFinished(bool))); + connect(runner, SIGNAL(reportProgress(QString)), SLOT(handleProgressReport(QString))); + connect(runner, SIGNAL(remoteStdout(QByteArray)), SLOT(handleRemoteOutput(QByteArray))); + connect(runner, SIGNAL(remoteStderr(QByteArray)), SLOT(handleRemoteOutput(QByteArray))); connect(m_engine, SIGNAL(requestRemoteSetup()), this, SLOT(handleAdapterSetupRequested())); } void QnxDebugSupport::handleAdapterSetupRequested() { - QTC_ASSERT(m_state == Inactive, return); + QTC_ASSERT(state() == Inactive, return); - m_state = GatheringPorts; if (m_engine) m_engine->showMessage(tr("Preparing remote side...\n"), Debugger::AppStuff); - m_portsGatherer->start(m_device); -} - -void QnxDebugSupport::handlePortListReady() -{ - QTC_ASSERT(m_state == GatheringPorts, return); - startExecution(); + QnxAbstractRunSupport::handleAdapterSetupRequested(); } void QnxDebugSupport::startExecution() { - if (m_state == Inactive) + if (state() == Inactive) return; - Utils::PortList portList = m_device->freePorts(); - if (m_useCppDebugger) - m_pdebugPort = m_portsGatherer->getNextFreePort(&portList); - if (m_useQmlDebugger) - m_qmlPort = m_portsGatherer->getNextFreePort(&portList); - - if ((m_useCppDebugger && m_pdebugPort == -1) || (m_useQmlDebugger && m_qmlPort == -1)) { - handleError(tr("Not enough free ports on device for debugging.")); + if (m_useCppDebugger && !setPort(m_pdebugPort)) + return; + if (m_useQmlDebugger && !setPort(m_qmlPort)) return; - } - m_state = StartingRemoteProcess; + setState(StartingRemoteProcess); if (m_useQmlDebugger) m_engine->startParameters().processArgs += QString::fromLocal8Bit(" -qmljsdebugger=port:%1,block").arg(m_qmlPort); @@ -117,27 +94,27 @@ void QnxDebugSupport::startExecution() QString remoteCommandLine; if (m_useCppDebugger) remoteCommandLine = QString::fromLatin1("%1 %2 %3") - .arg(m_commandPrefix, executable()).arg(m_pdebugPort); + .arg(commandPrefix(), executable()).arg(m_pdebugPort); else if (m_useQmlDebugger && !m_useCppDebugger) remoteCommandLine = QString::fromLatin1("%1 %2 %3") - .arg(m_commandPrefix, executable(), m_engine->startParameters().processArgs); + .arg(commandPrefix(), executable(), m_engine->startParameters().processArgs); - m_runner->start(m_device, remoteCommandLine.toUtf8()); + appRunner()->start(device(), remoteCommandLine.toUtf8()); } void QnxDebugSupport::handleRemoteProcessStarted() { - m_state = Debugging; + QnxAbstractRunSupport::handleRemoteProcessStarted(); if (m_engine) m_engine->notifyEngineRemoteSetupDone(m_pdebugPort, m_qmlPort); } void QnxDebugSupport::handleRemoteProcessFinished(bool success) { - if (m_engine || m_state == Inactive) + if (m_engine || state() == Inactive) return; - if (m_state == Debugging) { + if (state() == Running) { if (!success) m_engine->notifyInferiorIll(); @@ -152,17 +129,9 @@ void QnxDebugSupport::handleDebuggingFinished() setFinished(); } -void QnxDebugSupport::setFinished() -{ - if (m_state != GatheringPorts && m_state != Inactive) - m_runner->stop(m_device->processSupport()->killProcessByNameCommandLine(executable()).toUtf8()); - - m_state = Inactive; -} - QString QnxDebugSupport::executable() const { - return m_useCppDebugger? QLatin1String(Constants::QNX_DEBUG_EXECUTABLE) : m_remoteExecutable; + return m_useCppDebugger? QLatin1String(Constants::QNX_DEBUG_EXECUTABLE) : QnxAbstractRunSupport::executable(); } void QnxDebugSupport::handleProgressReport(const QString &progressOutput) @@ -173,7 +142,7 @@ void QnxDebugSupport::handleProgressReport(const QString &progressOutput) void QnxDebugSupport::handleRemoteOutput(const QByteArray &output) { - QTC_ASSERT(m_state == Inactive || m_state == Debugging, return); + QTC_ASSERT(state() == Inactive || state() == Running, return); if (m_engine) m_engine->showMessage(QString::fromUtf8(output), Debugger::AppOutput); @@ -181,12 +150,12 @@ void QnxDebugSupport::handleRemoteOutput(const QByteArray &output) void QnxDebugSupport::handleError(const QString &error) { - if (m_state == Debugging) { + if (state() == Running) { if (m_engine) { m_engine->showMessage(error, Debugger::AppError); m_engine->notifyInferiorIll(); } - } else if (m_state != Inactive) { + } else if (state() != Inactive) { setFinished(); if (m_engine) m_engine->notifyEngineRemoteSetupFailed(tr("Initial setup failed: %1").arg(error)); diff --git a/src/plugins/qnx/qnxdebugsupport.h b/src/plugins/qnx/qnxdebugsupport.h index 891b6acd87b..1bcb84016fe 100644 --- a/src/plugins/qnx/qnxdebugsupport.h +++ b/src/plugins/qnx/qnxdebugsupport.h @@ -32,23 +32,16 @@ #ifndef QNX_INTERNAL_QNXDEBUGSUPPORT_H #define QNX_INTERNAL_QNXDEBUGSUPPORT_H -#include - -#include -#include +#include "qnxabstractrunsupport.h" namespace Debugger { class DebuggerEngine; } -namespace ProjectExplorer { -class DeviceApplicationRunner; -class DeviceUsedPortsGatherer; -} namespace Qnx { namespace Internal { class QnxRunConfiguration; -class QnxDebugSupport : public QObject +class QnxDebugSupport : public QnxAbstractRunSupport { Q_OBJECT public: @@ -66,34 +59,18 @@ private slots: void handleProgressReport(const QString &progressOutput); void handleRemoteOutput(const QByteArray &output); void handleError(const QString &error); - void handlePortListReady(); private: void startExecution(); - void setFinished(); QString executable() const; - enum State { - Inactive, - GatheringPorts, - StartingRemoteProcess, - Debugging - }; - - const QString m_remoteExecutable; - const QString m_commandPrefix; - ProjectExplorer::IDevice::ConstPtr m_device; - ProjectExplorer::DeviceApplicationRunner *m_runner; - ProjectExplorer::DeviceUsedPortsGatherer * m_portsGatherer; Debugger::DebuggerEngine *m_engine; int m_pdebugPort; int m_qmlPort; bool m_useCppDebugger; bool m_useQmlDebugger; - - State m_state; }; } // namespace Internal diff --git a/src/plugins/qnx/qnxdeployconfigurationfactory.cpp b/src/plugins/qnx/qnxdeployconfigurationfactory.cpp index e84ea7552b7..f72e7c71430 100644 --- a/src/plugins/qnx/qnxdeployconfigurationfactory.cpp +++ b/src/plugins/qnx/qnxdeployconfigurationfactory.cpp @@ -35,6 +35,7 @@ #include "qnxdeployconfiguration.h" #include "qnxdeviceconfigurationfactory.h" +#include #include #include #include @@ -77,7 +78,9 @@ ProjectExplorer::DeployConfiguration *QnxDeployConfigurationFactory::create(Proj ProjectExplorer::DeployConfiguration * const dc = new QnxDeployConfiguration(parent, id, displayNameForId(id)); - dc->stepList()->insertStep(0, new RemoteLinux::GenericDirectUploadStep(dc->stepList(), + dc->stepList()->insertStep(0, new ProjectExplorer::DeviceCheckBuildStep(dc->stepList(), + ProjectExplorer::DeviceCheckBuildStep::stepId())); + dc->stepList()->insertStep(1, new RemoteLinux::GenericDirectUploadStep(dc->stepList(), RemoteLinux::GenericDirectUploadStep::stepId())); return dc; } diff --git a/src/plugins/qnx/qnxdeploystepfactory.cpp b/src/plugins/qnx/qnxdeploystepfactory.cpp index 579214cb979..3b053761e6f 100644 --- a/src/plugins/qnx/qnxdeploystepfactory.cpp +++ b/src/plugins/qnx/qnxdeploystepfactory.cpp @@ -34,6 +34,7 @@ #include "qnxdeviceconfigurationfactory.h" #include +#include #include #include #include @@ -56,13 +57,17 @@ QList QnxDeployStepFactory::availableCreationIds(ProjectExplorer::Buil if (deviceType != QnxDeviceConfigurationFactory::deviceType()) return QList(); - return QList() << RemoteLinux::GenericDirectUploadStep::stepId(); + return QList() << RemoteLinux::GenericDirectUploadStep::stepId() + << ProjectExplorer::DeviceCheckBuildStep::stepId(); } QString QnxDeployStepFactory::displayNameForId(const Core::Id id) const { if (id == RemoteLinux::GenericDirectUploadStep::stepId()) return RemoteLinux::GenericDirectUploadStep::displayName(); + else if (id == ProjectExplorer::DeviceCheckBuildStep::stepId()) + return ProjectExplorer::DeviceCheckBuildStep::stepDisplayName(); + return QString(); } @@ -75,7 +80,12 @@ ProjectExplorer::BuildStep *QnxDeployStepFactory::create(ProjectExplorer::BuildS { if (!canCreate(parent, id)) return 0; - return new RemoteLinux::GenericDirectUploadStep(parent, id); + + if (id == RemoteLinux::GenericDirectUploadStep::stepId()) + return new RemoteLinux::GenericDirectUploadStep(parent, id); + else if (id == ProjectExplorer::DeviceCheckBuildStep::stepId()) + return new ProjectExplorer::DeviceCheckBuildStep(parent, id); + return 0; } bool QnxDeployStepFactory::canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const @@ -103,5 +113,11 @@ ProjectExplorer::BuildStep *QnxDeployStepFactory::clone(ProjectExplorer::BuildSt { if (!canClone(parent, product)) return 0; - return new RemoteLinux::GenericDirectUploadStep(parent, static_cast(product)); + + if (RemoteLinux::GenericDirectUploadStep * const other = qobject_cast(product)) + return new RemoteLinux::GenericDirectUploadStep(parent, other); + else if (ProjectExplorer::DeviceCheckBuildStep * const other = qobject_cast(product)) + return new ProjectExplorer::DeviceCheckBuildStep(parent, other); + + return 0; } diff --git a/src/plugins/qnx/qnxdeviceconfiguration.cpp b/src/plugins/qnx/qnxdeviceconfiguration.cpp index 50cc3a89cd7..7fb16988a66 100644 --- a/src/plugins/qnx/qnxdeviceconfiguration.cpp +++ b/src/plugins/qnx/qnxdeviceconfiguration.cpp @@ -30,6 +30,7 @@ ****************************************************************************/ #include "qnxdeviceconfiguration.h" +#include "qnxdevicetester.h" #include @@ -185,3 +186,8 @@ ProjectExplorer::DeviceProcessList *QnxDeviceConfiguration::createProcessListMod { return new QnxDeviceProcessList(sharedFromThis(), parent); } + +RemoteLinux::AbstractLinuxDeviceTester *QnxDeviceConfiguration::createDeviceTester() const +{ + return new QnxDeviceTester; +} diff --git a/src/plugins/qnx/qnxdeviceconfiguration.h b/src/plugins/qnx/qnxdeviceconfiguration.h index f1645d6793d..1e2a9d0aefe 100644 --- a/src/plugins/qnx/qnxdeviceconfiguration.h +++ b/src/plugins/qnx/qnxdeviceconfiguration.h @@ -54,6 +54,8 @@ public: ProjectExplorer::PortsGatheringMethod::Ptr portsGatheringMethod() const; ProjectExplorer::DeviceProcessList *createProcessListModel(QObject *parent) const; + RemoteLinux::AbstractLinuxDeviceTester *createDeviceTester() const; + QString displayType() const; protected: diff --git a/src/plugins/qnx/qnxdeviceconfigurationwizard.cpp b/src/plugins/qnx/qnxdeviceconfigurationwizard.cpp index cc8b9929b03..c14d69530ca 100644 --- a/src/plugins/qnx/qnxdeviceconfigurationwizard.cpp +++ b/src/plugins/qnx/qnxdeviceconfigurationwizard.cpp @@ -38,7 +38,6 @@ #include #include #include -#include #include using namespace ProjectExplorer; @@ -77,8 +76,7 @@ IDevice::Ptr QnxDeviceConfigurationWizard::device() device->setSshParameters(sshParams); device->setFreePorts(Utils::PortList::fromString(QLatin1String("10000-10100"))); - RemoteLinux::GenericLinuxDeviceTester *devTester = new RemoteLinux::GenericLinuxDeviceTester(this); - RemoteLinux::LinuxDeviceTestDialog dlg(device, devTester, this); + RemoteLinux::LinuxDeviceTestDialog dlg(device, device->createDeviceTester(), this); dlg.exec(); return device; diff --git a/src/plugins/qnx/qnxdevicetester.cpp b/src/plugins/qnx/qnxdevicetester.cpp new file mode 100644 index 00000000000..c7ce3564833 --- /dev/null +++ b/src/plugins/qnx/qnxdevicetester.cpp @@ -0,0 +1,163 @@ +/************************************************************************** +** +** Copyright (C) 2011 - 2013 Research In Motion +** +** Contact: Research In Motion (blackberry-qt@qnx.com) +** Contact: KDAB (info@kdab.com) +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#include "qnxdevicetester.h" + +#include +#include + +using namespace Qnx; +using namespace Qnx::Internal; + +QnxDeviceTester::QnxDeviceTester(QObject *parent) + : RemoteLinux::AbstractLinuxDeviceTester(parent) + , m_result(TestSuccess) + , m_state(Inactive) + , m_currentCommandIndex(-1) +{ + m_genericTester = new RemoteLinux::GenericLinuxDeviceTester(this); + + m_processRunner = new QSsh::SshRemoteProcessRunner(this); + connect(m_processRunner, SIGNAL(connectionError()), SLOT(handleConnectionError())); + connect(m_processRunner, SIGNAL(processClosed(int)), SLOT(handleProcessFinished(int))); + + m_commandsToTest << QLatin1String("awk") + << QLatin1String("grep") + << QLatin1String("kill") + << QLatin1String("netstat") + << QLatin1String("print") + << QLatin1String("printf") + << QLatin1String("ps") + << QLatin1String("read") + << QLatin1String("sed") + << QLatin1String("sleep") + << QLatin1String("uname"); +} + +void QnxDeviceTester::testDevice(const ProjectExplorer::IDevice::ConstPtr &deviceConfiguration) +{ + QTC_ASSERT(m_state == Inactive, return); + + m_deviceConfiguration = deviceConfiguration; + + connect(m_genericTester, SIGNAL(progressMessage(QString)), SIGNAL(progressMessage(QString))); + connect(m_genericTester, SIGNAL(errorMessage(QString)), SIGNAL(errorMessage(QString))); + connect(m_genericTester, SIGNAL(finished(RemoteLinux::AbstractLinuxDeviceTester::TestResult)), + SLOT(handleGenericTestFinished(RemoteLinux::AbstractLinuxDeviceTester::TestResult))); + + m_state = GenericTest; + m_genericTester->testDevice(deviceConfiguration); +} + +void QnxDeviceTester::stopTest() +{ + QTC_ASSERT(m_state != Inactive, return); + + switch (m_state) { + case Inactive: + break; + case GenericTest: + m_genericTester->stopTest(); + break; + case CommandsTest: + m_processRunner->cancel(); + break; + } + + m_result = TestFailure; + setFinished(); +} + +void QnxDeviceTester::handleGenericTestFinished(RemoteLinux::AbstractLinuxDeviceTester::TestResult result) +{ + QTC_ASSERT(m_state == GenericTest, return); + + if (result == TestFailure) { + m_result = TestFailure; + setFinished(); + return; + } + + m_state = CommandsTest; + testNextCommand(); +} + +void QnxDeviceTester::handleProcessFinished(int exitStatus) +{ + QTC_ASSERT(m_state == CommandsTest, return); + + const QString command = m_commandsToTest[m_currentCommandIndex]; + if (exitStatus == QSsh::SshRemoteProcess::NormalExit) { + if (m_processRunner->processExitCode() == 0) { + emit progressMessage(tr("%1 found.\n").arg(command)); + } else { + emit errorMessage(tr("%1 not found.\n").arg(command)); + m_result = TestFailure; + } + } else { + emit errorMessage(tr("An error occurred checking for %1.\n").arg(command)); + m_result = TestFailure; + } + testNextCommand(); +} + +void QnxDeviceTester::handleConnectionError() +{ + QTC_ASSERT(m_state == CommandsTest, return); + + m_result = TestFailure; + emit errorMessage(tr("SSH connection error: %1\n").arg(m_processRunner->lastConnectionErrorString())); + setFinished(); +} + +void QnxDeviceTester::testNextCommand() +{ + ++m_currentCommandIndex; + + if (m_currentCommandIndex >= m_commandsToTest.size()) { + setFinished(); + return; + } + + QString command = m_commandsToTest[m_currentCommandIndex]; + emit progressMessage(tr("Checking for %1...").arg(command)); + + m_processRunner->run("command -v " + command.toLatin1(), m_deviceConfiguration->sshParameters()); +} + +void QnxDeviceTester::setFinished() +{ + m_state = Inactive; + disconnect(m_genericTester, 0, this, 0); + if (m_processRunner) + disconnect(m_processRunner, 0, this, 0); + emit finished(m_result); +} diff --git a/src/plugins/qnx/qnxdevicetester.h b/src/plugins/qnx/qnxdevicetester.h new file mode 100644 index 00000000000..ccec636f08f --- /dev/null +++ b/src/plugins/qnx/qnxdevicetester.h @@ -0,0 +1,84 @@ +/************************************************************************** +** +** Copyright (C) 2011 - 2013 Research In Motion +** +** Contact: Research In Motion (blackberry-qt@qnx.com) +** Contact: KDAB (info@kdab.com) +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#ifndef QNX_INTERNAL_QNXDEVICETESTER_H +#define QNX_INTERNAL_QNXDEVICETESTER_H + +#include + +#include + +namespace QSsh { +class SshRemoteProcessRunner; +} + +namespace Qnx { +namespace Internal { + +class QnxDeviceTester : public RemoteLinux::AbstractLinuxDeviceTester +{ + Q_OBJECT +public: + explicit QnxDeviceTester(QObject *parent = 0); + + void testDevice(const ProjectExplorer::IDevice::ConstPtr &deviceConfiguration); + void stopTest(); + +private slots: + void handleGenericTestFinished(RemoteLinux::AbstractLinuxDeviceTester::TestResult result); + + void handleProcessFinished(int exitStatus); + void handleConnectionError(); + +private: + enum State { + Inactive, + GenericTest, + CommandsTest + }; + + void testNextCommand(); + void setFinished(); + + RemoteLinux::GenericLinuxDeviceTester *m_genericTester; + ProjectExplorer::IDevice::ConstPtr m_deviceConfiguration; + TestResult m_result; + State m_state; + + int m_currentCommandIndex; + QStringList m_commandsToTest; + QSsh::SshRemoteProcessRunner *m_processRunner; +}; + +} // namespace Internal +} // namespace Qnx + +#endif // QNX_INTERNAL_QNXDEVICETESTER_H diff --git a/src/plugins/qnx/qnxruncontrolfactory.cpp b/src/plugins/qnx/qnxruncontrolfactory.cpp index 29f58f2715d..d80363b39ff 100644 --- a/src/plugins/qnx/qnxruncontrolfactory.cpp +++ b/src/plugins/qnx/qnxruncontrolfactory.cpp @@ -33,6 +33,7 @@ #include "qnxconstants.h" #include "qnxrunconfiguration.h" #include "qnxdebugsupport.h" +#include "qnxanalyzesupport.h" #include "qnxqtversion.h" #include "qnxruncontrol.h" #include "qnxutils.h" @@ -44,6 +45,10 @@ #include #include #include +#include +#include +#include +#include #include #include #include @@ -51,6 +56,7 @@ #include #include +using namespace Analyzer; using namespace Debugger; using namespace ProjectExplorer; using namespace Qnx; @@ -107,6 +113,32 @@ DebuggerStartParameters createStartParameters(const QnxRunConfiguration *runConf return params; } +AnalyzerStartParameters createAnalyzerStartParameters(const QnxRunConfiguration *runConfig, RunMode mode) +{ + AnalyzerStartParameters params; + Target *target = runConfig->target(); + Kit *k = target->kit(); + + const IDevice::ConstPtr device = DeviceKitInformation::device(k); + if (device.isNull()) + return params; + + if (mode == QmlProfilerRunMode) + params.startMode = StartQmlRemote; + params.debuggee = runConfig->remoteExecutableFilePath(); + params.debuggeeArgs = runConfig->arguments(); + params.connParams = DeviceKitInformation::device(runConfig->target()->kit())->sshParameters(); + params.analyzerCmdPrefix = runConfig->commandPrefix(); + params.displayName = runConfig->displayName(); + params.sysroot = SysRootKitInformation::sysRoot(runConfig->target()->kit()).toString(); + params.analyzerHost = params.connParams.host; + params.analyzerPort = params.connParams.port; + + if (EnvironmentAspect *environment = runConfig->extraAspect()) + params.environment = environment->environment(); + + return params; +} QnxRunControlFactory::QnxRunControlFactory(QObject *parent) : IRunControlFactory(parent) @@ -115,7 +147,7 @@ QnxRunControlFactory::QnxRunControlFactory(QObject *parent) bool QnxRunControlFactory::canRun(RunConfiguration *runConfiguration, RunMode mode) const { - if (mode != NormalRunMode && mode != DebugRunMode) + if (mode != NormalRunMode && mode != DebugRunMode && mode != QmlProfilerRunMode) return false; if (!runConfiguration->isEnabled() @@ -125,7 +157,7 @@ bool QnxRunControlFactory::canRun(RunConfiguration *runConfiguration, RunMode mo const QnxRunConfiguration * const rc = qobject_cast(runConfiguration); - if (mode == DebugRunMode) { + if (mode == DebugRunMode || mode == QmlProfilerRunMode) { const QnxDeviceConfiguration::ConstPtr dev = DeviceKitInformation::device(runConfiguration->target()->kit()) .dynamicCast(); if (dev.isNull()) @@ -141,16 +173,38 @@ RunControl *QnxRunControlFactory::create(RunConfiguration *runConfig, RunMode mo QnxRunConfiguration *rc = qobject_cast(runConfig); Q_ASSERT(rc); - if (mode == NormalRunMode) + switch (mode) { + case NormalRunMode: return new QnxRunControl(rc); + case DebugRunMode: { + const DebuggerStartParameters params = createStartParameters(rc); + DebuggerRunControl * const runControl = DebuggerPlugin::createDebugger(params, rc, errorMessage); + if (!runControl) + return 0; - const DebuggerStartParameters params = createStartParameters(rc); - DebuggerRunControl * const runControl = DebuggerPlugin::createDebugger(params, rc, errorMessage); - if (!runControl) - return 0; + QnxDebugSupport *debugSupport = new QnxDebugSupport(rc, runControl->engine()); + connect(runControl, SIGNAL(finished()), debugSupport, SLOT(handleDebuggingFinished())); - QnxDebugSupport *debugSupport = new QnxDebugSupport(rc, runControl->engine()); - connect(runControl, SIGNAL(finished()), debugSupport, SLOT(handleDebuggingFinished())); - - return runControl; + return runControl; + } + case QmlProfilerRunMode: { + IAnalyzerTool *tool = AnalyzerManager::toolFromRunMode(mode); + if (!tool) { + if (errorMessage) + *errorMessage = tr("No analyzer tool selected."); + return 0; + } + const AnalyzerStartParameters params = createAnalyzerStartParameters(rc, mode); + AnalyzerRunControl * const runControl = new AnalyzerRunControl(tool, params, runConfig); + QnxAnalyzeSupport * const analyzeSupport = new QnxAnalyzeSupport(rc, runControl->engine()); + connect(runControl, SIGNAL(finished()), analyzeSupport, SLOT(handleProfilingFinished())); + return runControl; + } + case NoRunMode: + case CallgrindRunMode: + case MemcheckRunMode: + case DebugRunModeWithBreakOnMain: + QTC_ASSERT(false, return 0); + } + return 0; } diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp index 92954b6be8e..26568c4dd61 100644 --- a/src/plugins/qt4projectmanager/qt4nodes.cpp +++ b/src/plugins/qt4projectmanager/qt4nodes.cpp @@ -56,6 +56,7 @@ #include #include #include +#include #include #include @@ -1135,8 +1136,9 @@ void Qt4PriFileNode::changeFiles(const FileType fileType, lines = contents.split(QLatin1Char('\n')); } + QMakeVfs vfs; QtSupport::ProMessageHandler handler; - QMakeParser parser(0, &handler); + QMakeParser parser(0, &vfs, &handler); includeFile = parser.parsedProBlock(contents, m_projectFilePath, 1); } @@ -1886,6 +1888,10 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async) QLatin1String("OBJECTIVE_HEADERS"), m_projectDir, buildDirectory); newVarValues[UiDirVar] = QStringList() << uiDirPath(m_readerExact); newVarValues[MocDirVar] = QStringList() << mocDirPath(m_readerExact); + newVarValues[ResourceVar] = fileListForVar(m_readerExact, m_readerCumulative, + QLatin1String("RESOURCES"), m_projectDir, buildDirectory); + newVarValues[ExactResourceVar] = fileListForVar(m_readerExact, 0, + QLatin1String("RESOURCES"), m_projectDir, buildDirectory); newVarValues[PkgConfigVar] = m_readerExact->values(QLatin1String("PKGCONFIG")); newVarValues[PrecompiledHeaderVar] = m_readerExact->absoluteFileValues(QLatin1String("PRECOMPILED_HEADER"), diff --git a/src/plugins/qt4projectmanager/qt4nodes.h b/src/plugins/qt4projectmanager/qt4nodes.h index c4d01190bbb..745b7459667 100644 --- a/src/plugins/qt4projectmanager/qt4nodes.h +++ b/src/plugins/qt4projectmanager/qt4nodes.h @@ -86,6 +86,8 @@ enum Qt4Variable { CppSourceVar, ObjCSourceVar, ObjCHeaderVar, + ResourceVar, + ExactResourceVar, UiDirVar, MocDirVar, PkgConfigVar, diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp index 123dbca22d7..aa811840313 100644 --- a/src/plugins/qt4projectmanager/qt4project.cpp +++ b/src/plugins/qt4projectmanager/qt4project.cpp @@ -46,6 +46,7 @@ #include #include #include +#include #include #include #include @@ -53,6 +54,7 @@ #include #include #include +#include #include #include @@ -344,6 +346,7 @@ Qt4Project::Qt4Project(Qt4Manager *manager, const QString& fileName) : m_nodesWatcher(new Internal::Qt4NodesWatcher(this)), m_fileInfo(new Qt4ProjectFile(fileName, this)), m_projectFiles(new Qt4ProjectFiles), + m_qmakeVfs(new QMakeVfs), m_qmakeGlobals(0), m_asyncUpdateFutureInterface(0), m_pendingEvaluateFuturesCount(0), @@ -358,6 +361,10 @@ Qt4Project::Qt4Project(Qt4Manager *manager, const QString& fileName) : m_asyncUpdateTimer.setSingleShot(true); m_asyncUpdateTimer.setInterval(3000); connect(&m_asyncUpdateTimer, SIGNAL(timeout()), this, SLOT(asyncUpdate())); + + connect(ProjectExplorerPlugin::instance()->buildManager(), + SIGNAL(buildQueueFinished(bool)), + SLOT(buildFinished(bool))); } Qt4Project::~Qt4Project() @@ -365,6 +372,7 @@ Qt4Project::~Qt4Project() m_codeModelFuture.cancel(); m_asyncUpdateState = ShuttingDown; m_manager->unregisterProject(this); + delete m_qmakeVfs; delete m_projectFiles; m_cancelEvaluate = true; // Deleting the root node triggers a few things, make sure rootProjectNode @@ -627,6 +635,8 @@ void Qt4Project::updateQmlJSCodeModel() bool hasQmlLib = false; foreach (Qt4ProFileNode *node, proFiles) { projectInfo.importPaths.append(node->variableValue(QmlImportPathVar)); + projectInfo.activeResourceFiles.append(node->variableValue(ExactResourceVar)); + projectInfo.allResourceFiles.append(node->variableValue(ResourceVar)); if (!hasQmlLib) { QStringList qtLibs = node->variableValue(QtVar); hasQmlLib = qtLibs.contains(QLatin1String("declarative")) || @@ -645,6 +655,8 @@ void Qt4Project::updateQmlJSCodeModel() setProjectLanguages(pl); projectInfo.importPaths.removeDuplicates(); + projectInfo.activeResourceFiles.removeDuplicates(); + projectInfo.allResourceFiles.removeDuplicates(); setProjectLanguage(ProjectExplorer::Constants::LANG_QMLJS, !projectInfo.sourceFiles.isEmpty()); @@ -843,6 +855,9 @@ void Qt4Project::asyncUpdate() { if (debug) qDebug()<<"async update, timer expired, doing now"; + + m_qmakeVfs->invalidateCache(); + Q_ASSERT(!m_asyncUpdateFutureInterface); m_asyncUpdateFutureInterface = new QFutureInterface(); @@ -873,6 +888,12 @@ void Qt4Project::asyncUpdate() m_asyncUpdateState = AsyncUpdateInProgress; } +void Qt4Project::buildFinished(bool success) +{ + if (success) + m_qmakeVfs->invalidateContents(); +} + ProjectExplorer::IProjectManager *Qt4Project::projectManager() const { return m_manager; @@ -998,7 +1019,7 @@ QtSupport::ProFileReader *Qt4Project::createProFileReader(const Qt4ProFileNode * } ++m_qmakeGlobalsRefCnt; - QtSupport::ProFileReader *reader = new QtSupport::ProFileReader(m_qmakeGlobals); + QtSupport::ProFileReader *reader = new QtSupport::ProFileReader(m_qmakeGlobals, m_qmakeVfs); reader->setOutputDir(qt4ProFileNode->buildDir()); diff --git a/src/plugins/qt4projectmanager/qt4project.h b/src/plugins/qt4projectmanager/qt4project.h index 2f402081536..a4bb93b1b3c 100644 --- a/src/plugins/qt4projectmanager/qt4project.h +++ b/src/plugins/qt4projectmanager/qt4project.h @@ -42,6 +42,7 @@ QT_BEGIN_NAMESPACE class ProFileGlobals; +class QMakeVfs; QT_END_NAMESPACE namespace ProjectExplorer { class DeploymentData; } @@ -158,6 +159,7 @@ protected: private slots: void asyncUpdate(); + void buildFinished(bool success); void activeTargetWasChanged(); @@ -198,6 +200,8 @@ private: // cached lists of all of files Internal::Qt4ProjectFiles *m_projectFiles; + QMakeVfs *m_qmakeVfs; + // cached data during project rescan ProFileGlobals *m_qmakeGlobals; int m_qmakeGlobalsRefCnt; diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.cpp b/src/plugins/qt4projectmanager/qt4projectmanager.cpp index 33926d23636..b3d2c3d0d99 100644 --- a/src/plugins/qt4projectmanager/qt4projectmanager.cpp +++ b/src/plugins/qt4projectmanager/qt4projectmanager.cpp @@ -247,7 +247,8 @@ void Qt4Manager::addLibrary(const QString &fileName, ProFileEditorWidget *editor editable = editor->editor(); } else { editable = qobject_cast - (Core::EditorManager::openEditor(fileName, Qt4ProjectManager::Constants::PROFILE_EDITOR_ID)); + (Core::EditorManager::openEditor(fileName, Qt4ProjectManager::Constants::PROFILE_EDITOR_ID, + Core::EditorManager::DoNotMakeVisible)); } if (!editable) return; diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp index d7ca07f3a1d..a6c5d62a8e3 100644 --- a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp +++ b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp @@ -283,7 +283,7 @@ bool AbstractMobileAppWizard::postGenerateFiles(const QWizard *w, if (success) { const QString fileToOpen = fileToOpenPostGeneration(); if (!fileToOpen.isEmpty()) { - Core::EditorManager::openEditor(fileToOpen, Core::Id(), Core::EditorManager::ModeSwitch); + Core::EditorManager::openEditor(fileToOpen); ProjectExplorer::ProjectExplorerPlugin::instance()->setCurrentFile(0, fileToOpen); } } diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index 093123caa8b..fcb447bf827 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -36,6 +36,7 @@ #include "qtversionmanager.h" #include "profilereader.h" +#include #include #include #include @@ -780,12 +781,13 @@ void BaseQtVersion::ensureMkSpecParsed() const if (mkspecPath().isEmpty()) return; + QMakeVfs vfs; ProFileGlobals option; option.setProperties(versionInfo()); ProMessageHandler msgHandler(true); ProFileCacheManager::instance()->incRefCount(); - QMakeParser parser(ProFileCacheManager::instance()->cache(), &msgHandler); - ProFileEvaluator evaluator(&option, &parser, &msgHandler); + QMakeParser parser(ProFileCacheManager::instance()->cache(), &vfs, &msgHandler); + ProFileEvaluator evaluator(&option, &parser, &vfs, &msgHandler); evaluator.loadNamedSpec(mkspecPath().toString(), false); parseMkSpec(&evaluator); diff --git a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp index c40aebeb048..0ad1763da3f 100644 --- a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp +++ b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp @@ -431,7 +431,7 @@ void ExamplesWelcomePage::openProject(const QString &projectFile, const QStringL Core::ICore::openFiles(filesToOpen); if (project->needsConfiguration()) project->configureAsExampleProject(platforms); - Core::ModeManager::activateModeType(Core::Constants::MODE_EDIT_TYPE); + Core::ModeManager::activateMode(Core::Constants::MODE_EDIT); if (help.isValid()) Core::ICore::helpManager()->handleHelpRequest(help.toString() + QLatin1String("?view=split")); } diff --git a/src/plugins/qtsupport/profilereader.cpp b/src/plugins/qtsupport/profilereader.cpp index b538c0e6cc3..747c4f14ff5 100644 --- a/src/plugins/qtsupport/profilereader.cpp +++ b/src/plugins/qtsupport/profilereader.cpp @@ -65,9 +65,9 @@ void ProMessageHandler::fileMessage(const QString &) } -ProFileReader::ProFileReader(ProFileGlobals *option) - : QMakeParser(ProFileCacheManager::instance()->cache(), this) - , ProFileEvaluator(option, this, this) +ProFileReader::ProFileReader(ProFileGlobals *option, QMakeVfs *vfs) + : QMakeParser(ProFileCacheManager::instance()->cache(), vfs, this) + , ProFileEvaluator(option, this, vfs, this) , m_ignoreLevel(0) { } diff --git a/src/plugins/qtsupport/profilereader.h b/src/plugins/qtsupport/profilereader.h index 2ba4c99aa67..3bd8a914b8c 100644 --- a/src/plugins/qtsupport/profilereader.h +++ b/src/plugins/qtsupport/profilereader.h @@ -69,7 +69,7 @@ class QTSUPPORT_EXPORT ProFileReader : public ProMessageHandler, public QMakePar Q_OBJECT public: - ProFileReader(ProFileGlobals *option); + ProFileReader(ProFileGlobals *option, QMakeVfs *vfs); ~ProFileReader(); QList includeFiles() const; diff --git a/src/plugins/qtsupport/qtoutputformatter.cpp b/src/plugins/qtsupport/qtoutputformatter.cpp index 34b7d38f1cb..1c4ffd624d3 100644 --- a/src/plugins/qtsupport/qtoutputformatter.cpp +++ b/src/plugins/qtsupport/qtoutputformatter.cpp @@ -29,11 +29,12 @@ #include "qtoutputformatter.h" -#include +#include #include -#include +#include #include +#include using namespace ProjectExplorer; using namespace QtSupport; @@ -195,7 +196,7 @@ void QtOutputFormatter::handleLink(const QString &href) const int line = qmlLineColumnLink.cap(2).toInt(); const int column = qmlLineColumnLink.cap(3).toInt(); - TextEditor::BaseTextEditorWidget::openEditorAt(m_projectFinder.findFile(fileUrl), line, column - 1); + Core::EditorManager::openEditorAt(m_projectFinder.findFile(fileUrl), line, column - 1); return; } @@ -206,7 +207,7 @@ void QtOutputFormatter::handleLink(const QString &href) if (qmlLineLink.indexIn(href) != -1) { const QUrl fileUrl = QUrl(qmlLineLink.cap(1)); const int line = qmlLineLink.cap(2).toInt(); - TextEditor::BaseTextEditorWidget::openEditorAt(m_projectFinder.findFile(fileUrl), line); + Core::EditorManager::openEditorAt(m_projectFinder.findFile(fileUrl), line); return; } @@ -233,7 +234,7 @@ void QtOutputFormatter::handleLink(const QString &href) if (!fileName.isEmpty()) { fileName = m_projectFinder.findFile(QUrl::fromLocalFile(fileName)); - TextEditor::BaseTextEditorWidget::openEditorAt(fileName, line, 0); + Core::EditorManager::openEditorAt(fileName, line); return; } } diff --git a/src/plugins/qtsupport/qtversionfactory.cpp b/src/plugins/qtsupport/qtversionfactory.cpp index 7ff99b6ff4f..cac661f629e 100644 --- a/src/plugins/qtsupport/qtversionfactory.cpp +++ b/src/plugins/qtsupport/qtversionfactory.cpp @@ -31,6 +31,8 @@ #include "profilereader.h" #include "baseqtversion.h" +#include + #include #include @@ -61,12 +63,13 @@ BaseQtVersion *QtVersionFactory::createQtVersionFromQMakePath(const Utils::FileN return 0; Utils::FileName mkspec = BaseQtVersion::mkspecFromVersionInfo(versionInfo); + QMakeVfs vfs; ProFileGlobals globals; globals.setProperties(versionInfo); ProMessageHandler msgHandler(true); ProFileCacheManager::instance()->incRefCount(); - QMakeParser parser(ProFileCacheManager::instance()->cache(), &msgHandler); - ProFileEvaluator evaluator(&globals, &parser, &msgHandler); + QMakeParser parser(ProFileCacheManager::instance()->cache(), &vfs, &msgHandler); + ProFileEvaluator evaluator(&globals, &parser, &vfs, &msgHandler); evaluator.loadNamedSpec(mkspec.toString(), false); QList factories = ExtensionSystem::PluginManager::getObjects(); diff --git a/src/plugins/remotelinux/linuxdevice.cpp b/src/plugins/remotelinux/linuxdevice.cpp index 70796e54cd4..8c530ac3ac3 100644 --- a/src/plugins/remotelinux/linuxdevice.cpp +++ b/src/plugins/remotelinux/linuxdevice.cpp @@ -214,7 +214,7 @@ void LinuxDevice::executeAction(Core::Id actionId, QWidget *parent) const QDialog *d = 0; const LinuxDevice::ConstPtr device = sharedFromThis().staticCast(); if (actionId == Constants::GenericTestDeviceActionId) - d = new LinuxDeviceTestDialog(device, new GenericLinuxDeviceTester, parent); + d = new LinuxDeviceTestDialog(device, createDeviceTester(), parent); else if (actionId == Constants::GenericDeployKeyToDeviceActionId) d = PublicKeyDeploymentDialog::createDialog(device, parent); if (d) @@ -264,4 +264,9 @@ DeviceProcessList *LinuxDevice::createProcessListModel(QObject *parent) const return new LinuxDeviceProcessList(sharedFromThis(), parent); } +AbstractLinuxDeviceTester *LinuxDevice::createDeviceTester() const +{ + return new GenericLinuxDeviceTester; +} + } // namespace RemoteLinux diff --git a/src/plugins/remotelinux/linuxdevice.h b/src/plugins/remotelinux/linuxdevice.h index 0daa95e58e8..0ec84cd44e0 100644 --- a/src/plugins/remotelinux/linuxdevice.h +++ b/src/plugins/remotelinux/linuxdevice.h @@ -41,6 +41,7 @@ namespace Utils { class PortList; } namespace RemoteLinux { namespace Internal { class LinuxDevicePrivate; } +class AbstractLinuxDeviceTester; class REMOTELINUX_EXPORT LinuxDeviceProcessSupport : public ProjectExplorer::DeviceProcessSupport { @@ -73,6 +74,7 @@ public: ProjectExplorer::PortsGatheringMethod::Ptr portsGatheringMethod() const; bool canCreateProcessModel() const { return true; } ProjectExplorer::DeviceProcessList *createProcessListModel(QObject *parent) const; + virtual AbstractLinuxDeviceTester *createDeviceTester() const; protected: LinuxDevice() {} diff --git a/src/plugins/subversion/subversionplugin.cpp b/src/plugins/subversion/subversionplugin.cpp index 1565adf1280..5d03160596e 100644 --- a/src/plugins/subversion/subversionplugin.cpp +++ b/src/plugins/subversion/subversionplugin.cpp @@ -572,7 +572,9 @@ void SubversionPlugin::svnDiff(const Subversion::Internal::SubversionDiffParamet QFileInfo(p.files.front()).fileName() : p.diffName; QStringList args(QLatin1String("diff")); - args.append(QLatin1String("--internal-diff")); + Version v = svnVersion(); + if (v.majorVersion >= 1 && v.minorVersion >= 7) // --internal-diff is new in v1.7.0 + args.append(QLatin1String("--internal-diff")); args.append(p.arguments); args << p.files; @@ -587,7 +589,7 @@ void SubversionPlugin::svnDiff(const Subversion::Internal::SubversionDiffParamet // Show in the same editor if diff has been executed before if (Core::IEditor *existingEditor = VcsBase::VcsBaseEditorWidget::locateEditorByTag(tag)) { existingEditor->createNew(response.stdOut); - Core::EditorManager::activateEditor(existingEditor, Core::EditorManager::ModeSwitch); + Core::EditorManager::activateEditor(existingEditor); setDiffBaseDirectory(existingEditor, p.workingDir); return; } @@ -611,8 +613,7 @@ void SubversionPlugin::svnDiff(const Subversion::Internal::SubversionDiffParamet SubversionSubmitEditor *SubversionPlugin::openSubversionSubmitEditor(const QString &fileName) { Core::IEditor *editor = Core::EditorManager::openEditor(fileName, - Constants::SUBVERSIONCOMMITEDITOR_ID, - Core::EditorManager::ModeSwitch); + Constants::SUBVERSIONCOMMITEDITOR_ID); SubversionSubmitEditor *submitEditor = qobject_cast(editor); QTC_CHECK(submitEditor); setSubmitEditor(submitEditor); @@ -899,7 +900,7 @@ void SubversionPlugin::filelog(const QString &workingDir, const QString tag = VcsBase::VcsBaseEditorWidget::editorTag(VcsBase::LogOutput, workingDir, files); if (Core::IEditor *editor = VcsBase::VcsBaseEditorWidget::locateEditorByTag(tag)) { editor->createNew(response.stdOut); - Core::EditorManager::activateEditor(editor, Core::EditorManager::ModeSwitch); + Core::EditorManager::activateEditor(editor); } else { const QString title = QString::fromLatin1("svn log %1").arg(id); const QString source = VcsBase::VcsBaseEditorWidget::getSource(workingDir, files); @@ -977,7 +978,7 @@ void SubversionPlugin::vcsAnnotate(const QString &workingDir, const QString &fil if (Core::IEditor *editor = VcsBase::VcsBaseEditorWidget::locateEditorByTag(tag)) { editor->createNew(response.stdOut); VcsBase::VcsBaseEditorWidget::gotoLineOfEditor(editor, lineNumber); - Core::EditorManager::activateEditor(editor, Core::EditorManager::ModeSwitch); + Core::EditorManager::activateEditor(editor); } else { const QString title = QString::fromLatin1("svn annotate %1").arg(id); Core::IEditor *newEditor = showOutputInEditor(title, response.stdOut, VcsBase::AnnotateOutput, source, codec); @@ -1042,7 +1043,7 @@ void SubversionPlugin::describe(const QString &source, const QString &changeNr) const QString tag = VcsBase::VcsBaseEditorWidget::editorTag(VcsBase::DiffOutput, source, QStringList(), changeNr); if (Core::IEditor *editor = VcsBase::VcsBaseEditorWidget::locateEditorByTag(tag)) { editor->createNew(description); - Core::EditorManager::activateEditor(editor, Core::EditorManager::ModeSwitch); + Core::EditorManager::activateEditor(editor); } else { const QString title = QString::fromLatin1("svn describe %1#%2").arg(fi.fileName(), changeNr); Core::IEditor *newEditor = showOutputInEditor(title, description, VcsBase::DiffOutput, source, codec); @@ -1110,6 +1111,32 @@ QStringList SubversionPlugin::addAuthenticationOptions(const QStringList &args, return rc; } +SubversionPlugin::Version SubversionPlugin::svnVersion() +{ + if (m_svnVersionBinary != m_settings.binaryPath()) { + QStringList args; + args << QLatin1String("--version") << QLatin1String("-q"); + const Utils::SynchronousProcessResponse response = + VcsBase::VcsBasePlugin::runVcs(QDir().absolutePath(), m_settings.binaryPath(), + args, m_settings.timeOutMs(), 0); + if (response.result == Utils::SynchronousProcessResponse::Finished && + response.exitCode == 0) { + m_svnVersionBinary = m_settings.binaryPath(); + m_svnVersion = response.stdOut.trimmed(); + } else { + m_svnVersionBinary.clear(); + m_svnVersion.clear(); + } + } + + SubversionPlugin::Version v; + if (::sscanf(m_svnVersion.toLatin1().constData(), "%d.%d.%d", + &v.majorVersion, &v.minorVersion, &v.patchVersion) != 3) + v.majorVersion = v.minorVersion = v.patchVersion = -1; + + return v; +} + SubversionResponse SubversionPlugin::runSvn(const QString &workingDir, const QString &userName, const QString &password, const QStringList &arguments, int timeOut, @@ -1161,7 +1188,7 @@ Core::IEditor *SubversionPlugin::showOutputInEditor(const QString &title, const if (codec) e->setCodec(codec); Core::IEditor *ie = e->editor(); - Core::EditorManager::activateEditor(ie, Core::EditorManager::ModeSwitch); + Core::EditorManager::activateEditor(ie); return ie; } @@ -1186,14 +1213,6 @@ SubversionPlugin *SubversionPlugin::instance() } bool SubversionPlugin::vcsAdd(const QString &workingDir, const QString &rawFileName) -{ - if (Utils::HostOsInfo::isMacHost()) // See below. - return vcsAdd14(workingDir, rawFileName); - return vcsAdd15(workingDir, rawFileName); -} - -// Post 1.4 add: Use "--parents" to add directories -bool SubversionPlugin::vcsAdd15(const QString &workingDir, const QString &rawFileName) { const QString file = QDir::toNativeSeparators(rawFileName); QStringList args; @@ -1204,40 +1223,6 @@ bool SubversionPlugin::vcsAdd15(const QString &workingDir, const QString &rawFil return !response.error; } -// Pre 1.5 add: Add directories in a loop. To be deprecated -// once Mac ships newer svn-versions -bool SubversionPlugin::vcsAdd14(const QString &workingDir, const QString &rawFileName) -{ - const QChar slash = QLatin1Char('/'); - const QStringList relativePath = rawFileName.split(slash); - // Add directories (dir1/dir2/file.cpp) in a loop. - if (relativePath.size() > 1) { - QString path; - const int lastDir = relativePath.size() - 1; - for (int p = 0; p < lastDir; p++) { - if (!path.isEmpty()) - path += slash; - path += relativePath.at(p); - if (!checkSVNSubDir(QDir(path))) { - QStringList addDirArgs; - addDirArgs << QLatin1String("add") << QLatin1String("--non-recursive") << QDir::toNativeSeparators(path); - const SubversionResponse addDirResponse = - runSvn(workingDir, addDirArgs, m_settings.timeOutMs(), - SshPasswordPrompt|ShowStdOutInLogWindow); - if (addDirResponse.error) - return false; - } - } - } - // Add file - QStringList args; - args << QLatin1String("add") << QDir::toNativeSeparators(rawFileName); - const SubversionResponse response = - runSvn(workingDir, args, m_settings.timeOutMs(), - SshPasswordPrompt|ShowStdOutInLogWindow); - return !response.error; -} - bool SubversionPlugin::vcsDelete(const QString &workingDir, const QString &rawFileName) { const QString file = QDir::toNativeSeparators(rawFileName); diff --git a/src/plugins/subversion/subversionplugin.h b/src/plugins/subversion/subversionplugin.h index 2020313a60c..b92e5309af7 100644 --- a/src/plugins/subversion/subversionplugin.h +++ b/src/plugins/subversion/subversionplugin.h @@ -93,8 +93,6 @@ public: // IVersionControl bool vcsAdd(const QString &workingDir, const QString &fileName); - bool vcsAdd14(const QString &workingDir, const QString &fileName); - bool vcsAdd15(const QString &workingDir, const QString &fileName); bool vcsDelete(const QString &workingDir, const QString &fileName); bool vcsMove(const QString &workingDir, const QString &from, const QString &to); bool managesDirectory(const QString &directory, QString *topLevel = 0) const; @@ -108,6 +106,15 @@ public: const QString &userName = QString(), const QString &password = QString()); + class Version { + public: + int majorVersion; + int minorVersion; + int patchVersion; + }; + + Version svnVersion(); + public slots: void vcsAnnotate(const QString &workingDir, const QString &file, const QString &revision = QString(), int lineNumber = -1); @@ -206,6 +213,9 @@ private: QAction *m_menuAction; bool m_submitActionTriggered; + QString m_svnVersionBinary; + QString m_svnVersion; + static SubversionPlugin *m_subversionPluginInstance; }; diff --git a/src/plugins/texteditor/basefilefind.cpp b/src/plugins/texteditor/basefilefind.cpp index 8f1ccf1e64f..250eae2ddcc 100644 --- a/src/plugins/texteditor/basefilefind.cpp +++ b/src/plugins/texteditor/basefilefind.cpp @@ -36,7 +36,8 @@ #include #include #include -#include +#include +#include #include #include #include @@ -309,14 +310,11 @@ void BaseFileFind::openEditor(const Find::SearchResultItem &item) SearchResult *result = qobject_cast(sender()); Core::IEditor *openedEditor = 0; if (item.path.size() > 0) { - openedEditor = TextEditor::BaseTextEditorWidget::openEditorAt(QDir::fromNativeSeparators(item.path.first()), - item.lineNumber, - item.textMarkPos, - Core::Id(), - Core::EditorManager::ModeSwitch); + openedEditor = Core::EditorManager::openEditorAt(QDir::fromNativeSeparators(item.path.first()), + item.lineNumber, + item.textMarkPos); } else { - openedEditor = Core::EditorManager::openEditor(QDir::fromNativeSeparators(item.text), - Core::Id(), Core::EditorManager::ModeSwitch); + openedEditor = Core::EditorManager::openEditor(QDir::fromNativeSeparators(item.text)); } if (d->m_currentFindSupport) d->m_currentFindSupport->clearResults(); diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 2b3f5eef3ab..a9aa9e97dd0 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -154,25 +154,6 @@ private: using namespace Internal; -Core::IEditor *BaseTextEditorWidget::openEditorAt(const QString &fileName, int line, int column, - Core::Id editorKind, - Core::EditorManager::OpenEditorFlags flags, - bool *newEditor) -{ - Core::EditorManager *editorManager = Core::EditorManager::instance(); - editorManager->cutForwardNavigationHistory(); - editorManager->addCurrentPositionToNavigationHistory(); - Core::IEditor *editor = Core::EditorManager::openEditor(fileName, editorKind, - flags, newEditor); - TextEditor::ITextEditor *texteditor = qobject_cast(editor); - if (texteditor && line != -1) { - texteditor->gotoLine(line, column); - return texteditor; - } - - return editor; -} - QString BaseTextEditorWidget::plainTextFromSelection(const QTextCursor &cursor) const { // Copy the selected text as plain text @@ -4910,8 +4891,6 @@ bool BaseTextEditorWidget::openLink(const Link &link, bool inNextSplit) Core::EditorManager *editorManager = Core::EditorManager::instance(); if (inNextSplit) { - if (!editorManager->hasSplitter()) - editorManager->splitSideBySide(); editorManager->gotoOtherSplit(); } else if (baseTextDocument()->fileName() == link.targetFileName) { editorManager->addCurrentPositionToNavigationHistory(); @@ -4920,9 +4899,7 @@ bool BaseTextEditorWidget::openLink(const Link &link, bool inNextSplit) return true; } - return openEditorAt(link.targetFileName, link.targetLine, link.targetColumn, Core::Id(), - Core::EditorManager::IgnoreNavigationHistory - | Core::EditorManager::ModeSwitch); + return Core::EditorManager::openEditorAt(link.targetFileName, link.targetLine, link.targetColumn); } void BaseTextEditorWidget::updateLink(QMouseEvent *e) diff --git a/src/plugins/texteditor/basetexteditor.h b/src/plugins/texteditor/basetexteditor.h index c109bc43960..4a1f17e571d 100644 --- a/src/plugins/texteditor/basetexteditor.h +++ b/src/plugins/texteditor/basetexteditor.h @@ -131,11 +131,6 @@ public: BaseTextEditorWidget(QWidget *parent); ~BaseTextEditorWidget(); - static Core::IEditor *openEditorAt(const QString &fileName, int line, int column = 0, - Core::Id editorId = Core::Id(), - Core::EditorManager::OpenEditorFlags flags = Core::EditorManager::IgnoreNavigationHistory, - bool *newEditor = 0); - const Utils::ChangeSet &changeSet() const; void setChangeSet(const Utils::ChangeSet &changeSet); diff --git a/src/plugins/texteditor/codeassist/basicproposalitemlistmodel.cpp b/src/plugins/texteditor/codeassist/basicproposalitemlistmodel.cpp index 2c0c1112ccb..b6c479b9c89 100644 --- a/src/plugins/texteditor/codeassist/basicproposalitemlistmodel.cpp +++ b/src/plugins/texteditor/codeassist/basicproposalitemlistmodel.cpp @@ -118,13 +118,11 @@ struct ContentLessThan } // Anonymous BasicProposalItemListModel::BasicProposalItemListModel() - : m_isSortingAllowed(true) {} BasicProposalItemListModel::BasicProposalItemListModel(const QList &items) : m_currentItems(items) , m_originalItems(items) - , m_isSortingAllowed(true) { mapPersistentIds(); } @@ -141,16 +139,6 @@ void BasicProposalItemListModel::loadContent(const QList &i mapPersistentIds(); } -void BasicProposalItemListModel::setSortingAllowed(bool isAllowed) -{ - m_isSortingAllowed = isAllowed; -} - -bool BasicProposalItemListModel::isSortingAllowed() const -{ - return m_isSortingAllowed; -} - void BasicProposalItemListModel::mapPersistentIds() { for (int i = 0; i < m_originalItems.size(); ++i) @@ -270,8 +258,6 @@ bool BasicProposalItemListModel::isSortable(const QString &prefix) const { Q_UNUSED(prefix); - if (!isSortingAllowed()) - return false; if (m_currentItems.size() < kMaxSort) return true; return false; diff --git a/src/plugins/texteditor/codeassist/basicproposalitemlistmodel.h b/src/plugins/texteditor/codeassist/basicproposalitemlistmodel.h index e9769a192f2..9de70b4374d 100644 --- a/src/plugins/texteditor/codeassist/basicproposalitemlistmodel.h +++ b/src/plugins/texteditor/codeassist/basicproposalitemlistmodel.h @@ -78,7 +78,6 @@ private: QHash m_idByText; QList m_originalItems; - bool m_isSortingAllowed; }; } // TextEditor diff --git a/src/plugins/texteditor/codeassist/codeassistant.cpp b/src/plugins/texteditor/codeassist/codeassistant.cpp index b4c0f9cb42a..8a57304e87b 100644 --- a/src/plugins/texteditor/codeassist/codeassistant.cpp +++ b/src/plugins/texteditor/codeassist/codeassistant.cpp @@ -40,7 +40,6 @@ #include #include #include -#include #include #include @@ -266,15 +265,8 @@ void CodeAssistantPrivate::requestProposal(AssistReason reason, } } - if (IAssistProposal *newProposal = processor->perform(assistInterface)) { - if (kind == QuickFix) { - TextEditor::BasicProposalItemListModel *proposalModel = - static_cast(newProposal->model()); - proposalModel->setSortingAllowed(false); - } - + if (IAssistProposal *newProposal = processor->perform(assistInterface)) displayProposal(newProposal, reason); - } delete processor; } diff --git a/src/plugins/texteditor/generichighlighter/highlightdefinitionmetadata.h b/src/plugins/texteditor/generichighlighter/highlightdefinitionmetadata.h index ed2309be212..a641fa5df2b 100644 --- a/src/plugins/texteditor/generichighlighter/highlightdefinitionmetadata.h +++ b/src/plugins/texteditor/generichighlighter/highlightdefinitionmetadata.h @@ -30,7 +30,6 @@ #ifndef HIGHLIGHTDEFINITIONMETADATA_H #define HIGHLIGHTDEFINITIONMETADATA_H -#include #include #include @@ -40,14 +39,7 @@ namespace Internal { class HighlightDefinitionMetaData { public: - HighlightDefinitionMetaData(); - - static const QLatin1String kPriority; - static const QLatin1String kName; - static const QLatin1String kExtensions; - static const QLatin1String kMimeType; - static const QLatin1String kVersion; - static const QLatin1String kUrl; + HighlightDefinitionMetaData() : priority(0) {} public: int priority; diff --git a/src/plugins/texteditor/generichighlighter/manager.cpp b/src/plugins/texteditor/generichighlighter/manager.cpp index 167256f1e7f..109b667387a 100644 --- a/src/plugins/texteditor/generichighlighter/manager.cpp +++ b/src/plugins/texteditor/generichighlighter/manager.cpp @@ -67,6 +67,13 @@ using namespace TextEditor; using namespace Internal; +const char kPriority[] = "priority"; +const char kName[] = "name"; +const char kExtensions[] = "extensions"; +const char kMimeType[] = "mimetype"; +const char kVersion[] = "version"; +const char kUrl[] = "url"; + Manager::Manager() : m_isDownloadingDefinitionsSpec(false), m_hasQueuedRegistration(false) @@ -360,14 +367,13 @@ QSharedPointer Manager::parseMetadata(const QFileIn metaData->fileName = fileInfo.fileName(); metaData->id = fileInfo.absoluteFilePath(); - metaData->name = atts.value(HighlightDefinitionMetaData::kName).toString(); - metaData->version = atts.value(HighlightDefinitionMetaData::kVersion).toString(); - metaData->priority = atts.value(HighlightDefinitionMetaData::kPriority).toString() - .toInt(); - metaData->patterns = atts.value(HighlightDefinitionMetaData::kExtensions) + metaData->name = atts.value(QLatin1String(kName)).toString(); + metaData->version = atts.value(QLatin1String(kVersion)).toString(); + metaData->priority = atts.value(QLatin1String(kPriority)).toString().toInt(); + metaData->patterns = atts.value(QLatin1String(kExtensions)) .toString().split(kSemiColon, QString::SkipEmptyParts); - QStringList mimeTypes = atts.value(HighlightDefinitionMetaData::kMimeType). + QStringList mimeTypes = atts.value(QLatin1String(kMimeType)). toString().split(kSemiColon, QString::SkipEmptyParts); if (mimeTypes.isEmpty()) { // There are definitions which do not specify a MIME type, but specify file @@ -400,9 +406,9 @@ QList Manager::parseAvailableDefinitionsList(QIODev const QXmlStreamAttributes &atts = reader.attributes(); HighlightDefinitionMetaData metaData; - metaData.name = atts.value(HighlightDefinitionMetaData::kName).toString(); - metaData.version = atts.value(HighlightDefinitionMetaData::kVersion).toString(); - QString url(atts.value(HighlightDefinitionMetaData::kUrl).toString()); + metaData.name = atts.value(QLatin1String(kName)).toString(); + metaData.version = atts.value(QLatin1String(kVersion)).toString(); + QString url = atts.value(QLatin1String(kUrl)).toString(); metaData.url = QUrl(url); const int slash = url.lastIndexOf(kSlash); if (slash != -1) diff --git a/src/plugins/texteditor/itexteditor.cpp b/src/plugins/texteditor/itexteditor.cpp index beb34d75a68..75248dd1b30 100644 --- a/src/plugins/texteditor/itexteditor.cpp +++ b/src/plugins/texteditor/itexteditor.cpp @@ -29,8 +29,6 @@ #include "itexteditor.h" -#include - #include using namespace TextEditor; @@ -66,7 +64,6 @@ QMap TextEditor::ITextEditor::openedTextEditorsEncodings( return workingCopy; } - ITextEditorDocument *ITextEditor::textDocument() { return qobject_cast(document()); diff --git a/src/plugins/texteditor/itexteditor.h b/src/plugins/texteditor/itexteditor.h index 2e1ae06e38b..dd9a3fcb7fa 100644 --- a/src/plugins/texteditor/itexteditor.h +++ b/src/plugins/texteditor/itexteditor.h @@ -35,6 +35,7 @@ #include "itextmark.h" #include +#include #include #include diff --git a/src/plugins/texteditor/linenumberfilter.cpp b/src/plugins/texteditor/linenumberfilter.cpp index bec075131da..b6dd394ceab 100644 --- a/src/plugins/texteditor/linenumberfilter.cpp +++ b/src/plugins/texteditor/linenumberfilter.cpp @@ -97,9 +97,7 @@ void LineNumberFilter::accept(FilterEntry selection) const data.first = currLine; } editor->gotoLine(data.first, data.second); - editor->widget()->setFocus(); - ICore::raiseWindow(editor->widget()); - Core::ModeManager::activateModeType(Id(Core::Constants::MODE_EDIT_TYPE)); + Core::EditorManager::activateEditor(editor); } } diff --git a/src/plugins/texteditor/refactoringchanges.cpp b/src/plugins/texteditor/refactoringchanges.cpp index f5638ae6005..e8b73f582a1 100644 --- a/src/plugins/texteditor/refactoringchanges.cpp +++ b/src/plugins/texteditor/refactoringchanges.cpp @@ -136,12 +136,12 @@ BaseTextEditorWidget *RefactoringChanges::openEditor(const QString &fileName, bo { Core::EditorManager::OpenEditorFlags flags = Core::EditorManager::IgnoreNavigationHistory; if (!activate) - flags |= Core::EditorManager::NoActivate; + flags |= Core::EditorManager::DoNotChangeCurrentEditor; if (line != -1) { // openEditorAt uses a 1-based line and a 0-based column! column -= 1; } - Core::IEditor *editor = BaseTextEditorWidget::openEditorAt( + Core::IEditor *editor = Core::EditorManager::openEditorAt( fileName, line, column, Core::Id(), flags); if (editor) diff --git a/src/plugins/texteditor/syntaxhighlighter.cpp b/src/plugins/texteditor/syntaxhighlighter.cpp index ed75207816f..de9c5acd092 100644 --- a/src/plugins/texteditor/syntaxhighlighter.cpp +++ b/src/plugins/texteditor/syntaxhighlighter.cpp @@ -553,8 +553,6 @@ void SyntaxHighlighter::applyFormatToSpaces(const QString &text, const QTextChar } /*! - \fn QTextCharFormat SyntaxHighlighter::format(int position) const - Returns the format at \a position inside the syntax highlighter's current text block. */ diff --git a/src/plugins/texteditor/texteditor.pro b/src/plugins/texteditor/texteditor.pro index a5193ff8620..eaca9ab8d9c 100644 --- a/src/plugins/texteditor/texteditor.pro +++ b/src/plugins/texteditor/texteditor.pro @@ -56,7 +56,6 @@ SOURCES += texteditorplugin.cpp \ generichighlighter/highlightersettingspage.cpp \ generichighlighter/highlightersettings.cpp \ generichighlighter/managedefinitionsdialog.cpp \ - generichighlighter/highlightdefinitionmetadata.cpp \ generichighlighter/definitiondownloader.cpp \ refactoringchanges.cpp \ refactoroverlay.cpp \ diff --git a/src/plugins/texteditor/texteditor.qbs b/src/plugins/texteditor/texteditor.qbs index 9792f6a884f..6998dbf478e 100644 --- a/src/plugins/texteditor/texteditor.qbs +++ b/src/plugins/texteditor/texteditor.qbs @@ -212,7 +212,6 @@ QtcPlugin { "highlightdefinition.h", "highlightdefinitionhandler.cpp", "highlightdefinitionhandler.h", - "highlightdefinitionmetadata.cpp", "highlightdefinitionmetadata.h", "highlighter.cpp", "highlighter.h", diff --git a/src/plugins/texteditor/texteditorplugin.cpp b/src/plugins/texteditor/texteditorplugin.cpp index e47a3504246..ce2da09161f 100644 --- a/src/plugins/texteditor/texteditorplugin.cpp +++ b/src/plugins/texteditor/texteditorplugin.cpp @@ -137,7 +137,7 @@ void ScratchFileWizard::createFile() file.setAutoRemove(false); QTC_ASSERT(file.open(), return; ); file.close(); - Core::EditorManager::openEditor(file.fileName(), Core::Id(), Core::EditorManager::ModeSwitch); + Core::EditorManager::openEditor(file.fileName()); } // ExtensionSystem::PluginInterface diff --git a/src/plugins/valgrind/callgrindtool.cpp b/src/plugins/valgrind/callgrindtool.cpp index 48f5f1d7f57..efaaba214db 100644 --- a/src/plugins/valgrind/callgrindtool.cpp +++ b/src/plugins/valgrind/callgrindtool.cpp @@ -62,7 +62,7 @@ #include #include #include -#include +#include #include #include @@ -322,7 +322,7 @@ void CallgrindToolPrivate::selectFunction(const Function *func) if (QFile::exists(func->file())) { ///TODO: custom position support? int line = func->lineNumber(); - TextEditor::BaseTextEditorWidget::openEditorAt(func->file(), qMax(line, 0)); + Core::EditorManager::openEditorAt(func->file(), qMax(line, 0)); } } diff --git a/src/plugins/valgrind/memcheckerrorview.cpp b/src/plugins/valgrind/memcheckerrorview.cpp index 8943616975b..3f421b280ad 100644 --- a/src/plugins/valgrind/memcheckerrorview.cpp +++ b/src/plugins/valgrind/memcheckerrorview.cpp @@ -41,9 +41,9 @@ #include "xmlprotocol/suppression.h" #include -#include +#include #include -#include +#include #include #include @@ -52,6 +52,7 @@ #include #include #include +#include #include #include #include @@ -59,6 +60,7 @@ #include #include #include +#include #include using namespace Valgrind::XmlProtocol; @@ -432,7 +434,7 @@ void MemcheckErrorDelegate::openLinkInEditor(const QString &link) const int pathEnd = link.lastIndexOf(QLatin1Char(':')); const QString path = link.mid(pathStart, pathEnd - pathStart); const int line = link.mid(pathEnd + 1).toInt(0); - TextEditor::BaseTextEditorWidget::openEditorAt(path, qMax(line, 0)); + Core::EditorManager::openEditorAt(path, qMax(line, 0)); } MemcheckErrorView::MemcheckErrorView(QWidget *parent) diff --git a/src/plugins/valgrind/memchecktool.cpp b/src/plugins/valgrind/memchecktool.cpp index 5e82687068e..39e91f9bc07 100644 --- a/src/plugins/valgrind/memchecktool.cpp +++ b/src/plugins/valgrind/memchecktool.cpp @@ -54,15 +54,14 @@ #include #include -#include -#include -#include #include +#include #include +#include +#include +#include #include -#include - #include #include #include @@ -502,7 +501,7 @@ void MemcheckTool::suppressionActionTriggered() const QString file = action->data().toString(); QTC_ASSERT(!file.isEmpty(), return); - TextEditor::BaseTextEditorWidget::openEditorAt(file, 0); + Core::EditorManager::openEditorAt(file, 0); } void MemcheckTool::parserError(const Valgrind::XmlProtocol::Error &error) diff --git a/src/plugins/valgrind/suppressiondialog.cpp b/src/plugins/valgrind/suppressiondialog.cpp index b235bdf0e4d..8e1a4c25a47 100644 --- a/src/plugins/valgrind/suppressiondialog.cpp +++ b/src/plugins/valgrind/suppressiondialog.cpp @@ -203,9 +203,11 @@ void SuppressionDialog::accept() QTC_ASSERT(!m_suppressionEdit->toPlainText().trimmed().isEmpty(), return); Utils::FileSaver saver(path, QIODevice::Append); - QTextStream stream(saver.file()); - stream << m_suppressionEdit->toPlainText(); - saver.setResult(&stream); + if (!saver.hasError()) { + QTextStream stream(saver.file()); + stream << m_suppressionEdit->toPlainText(); + saver.setResult(&stream); + } if (!saver.finalize(this)) return; diff --git a/src/plugins/vcsbase/cleandialog.cpp b/src/plugins/vcsbase/cleandialog.cpp index ed8a46bd78f..b5366102ae3 100644 --- a/src/plugins/vcsbase/cleandialog.cpp +++ b/src/plugins/vcsbase/cleandialog.cpp @@ -279,7 +279,7 @@ void CleanDialog::slotDoubleClicked(const QModelIndex &index) if (const QStandardItem *item = d->m_filesModel->itemFromIndex(index)) if (!item->data(Internal::isDirectoryRole).toBool()) { const QString fname = item->data(Internal::fileNameRole).toString(); - Core::EditorManager::openEditor(fname, Core::Id(), Core::EditorManager::ModeSwitch); + Core::EditorManager::openEditor(fname); } } diff --git a/src/plugins/vcsbase/vcsbaseclient.cpp b/src/plugins/vcsbase/vcsbaseclient.cpp index 059dff26c0f..bf4b8ce6e13 100644 --- a/src/plugins/vcsbase/vcsbaseclient.cpp +++ b/src/plugins/vcsbase/vcsbaseclient.cpp @@ -576,7 +576,7 @@ VcsBase::VcsBaseEditorWidget *VcsBaseClient::createVcsEditor(Core::Id kind, QStr } baseEditor->setForceReadOnly(true); - Core::EditorManager::activateEditor(outputEditor, Core::EditorManager::ModeSwitch); + Core::EditorManager::activateEditor(outputEditor); return baseEditor; } diff --git a/src/plugins/vcsbase/vcsbaseeditor.cpp b/src/plugins/vcsbase/vcsbaseeditor.cpp index ecf43b20056..321cca7e32d 100644 --- a/src/plugins/vcsbase/vcsbaseeditor.cpp +++ b/src/plugins/vcsbase/vcsbaseeditor.cpp @@ -297,14 +297,6 @@ void ChangeTextCursorHandler::fillContextMenu(QMenu *menu, EditorContentType typ { VcsBaseEditorWidget *widget = editorWidget(); switch (type) { - case LogOutput: { // Describe current / Annotate file of current - menu->addSeparator(); - menu->addAction(createCopyRevisionAction(m_currentChange)); - menu->addAction(createDescribeAction(m_currentChange)); - if (widget->isFileLogAnnotateEnabled()) - menu->addAction(createAnnotateAction(m_currentChange, false)); - break; - } case AnnotateOutput: { // Describe current / annotate previous bool currentValid = widget->isValidRevision(m_currentChange); menu->addSeparator(); @@ -321,7 +313,12 @@ void ChangeTextCursorHandler::fillContextMenu(QMenu *menu, EditorContentType typ } break; } - default: + default: // Describe current / Annotate file of current + menu->addSeparator(); + menu->addAction(createCopyRevisionAction(m_currentChange)); + menu->addAction(createDescribeAction(m_currentChange)); + if (widget->isFileLogAnnotateEnabled()) + menu->addAction(createAnnotateAction(m_currentChange, false)); break; } widget->addChangeActions(menu, m_currentChange); @@ -663,6 +660,17 @@ void VcsBaseEditorWidget::setLogEntryPattern(const QRegExp &pattern) d->m_logEntryPattern = pattern; } +bool VcsBaseEditorWidget::supportChangeLinks() const +{ + switch (d->m_parameters->type) { + case LogOutput: + case AnnotateOutput: + return true; + default: + return false; + } +} + void VcsBaseEditorWidget::init() { d->m_editor = editor(); @@ -910,17 +918,13 @@ void VcsBaseEditorWidget::contextMenuEvent(QContextMenuEvent *e) { QPointer menu = createStandardContextMenu(); // 'click on change-interaction' - switch (d->m_parameters->type) { - case LogOutput: - case AnnotateOutput: { + if (supportChangeLinks()) { const QTextCursor cursor = cursorForPosition(e->pos()); - Internal::AbstractTextCursorHandler *handler = d->findTextCursorHandler(cursor); - if (handler != 0) + if (Internal::AbstractTextCursorHandler *handler = d->findTextCursorHandler(cursor)) handler->fillContextMenu(menu, d->m_parameters->type); - // Fall-through for log (might have diff) - if (d->m_parameters->type != LogOutput) - break; } + switch (d->m_parameters->type) { + case LogOutput: // log might have diff case DiffOutput: { menu->addSeparator(); connect(menu->addAction(tr("Send to CodePaster...")), SIGNAL(triggered()), @@ -963,7 +967,7 @@ void VcsBaseEditorWidget::mouseMoveEvent(QMouseEvent *e) bool overrideCursor = false; Qt::CursorShape cursorShape; - if (d->m_parameters->type == LogOutput || d->m_parameters->type == AnnotateOutput) { + if (supportChangeLinks()) { // Link emulation behaviour for 'click on change-interaction' const QTextCursor cursor = cursorForPosition(e->pos()); Internal::AbstractTextCursorHandler *handler = d->findTextCursorHandler(cursor); @@ -987,7 +991,7 @@ void VcsBaseEditorWidget::mouseReleaseEvent(QMouseEvent *e) { const bool wasDragging = d->m_mouseDragging; d->m_mouseDragging = false; - if (!wasDragging && (d->m_parameters->type == LogOutput || d->m_parameters->type == AnnotateOutput)) { + if (!wasDragging && supportChangeLinks()) { if (e->button() == Qt::LeftButton &&!(e->modifiers() & Qt::ShiftModifier)) { const QTextCursor cursor = cursorForPosition(e->pos()); Internal::AbstractTextCursorHandler *handler = d->findTextCursorHandler(cursor); @@ -1111,7 +1115,7 @@ void VcsBaseEditorWidget::jumpToChangeFromDiff(QTextCursor cursor) if (!exists) return; - Core::IEditor *ed = Core::EditorManager::openEditor(fileName, Core::Id(), Core::EditorManager::ModeSwitch); + Core::IEditor *ed = Core::EditorManager::openEditor(fileName); if (TextEditor::ITextEditor *editor = qobject_cast(ed)) editor->gotoLine(chunkStart + lineCount); } diff --git a/src/plugins/vcsbase/vcsbaseeditor.h b/src/plugins/vcsbase/vcsbaseeditor.h index 955c194d901..6971b701cf5 100644 --- a/src/plugins/vcsbase/vcsbaseeditor.h +++ b/src/plugins/vcsbase/vcsbaseeditor.h @@ -103,6 +103,7 @@ protected: void setDiffFilePattern(const QRegExp &pattern); // Pattern for log entry. hash/revision number must be in the first capture group void setLogEntryPattern(const QRegExp &pattern); + virtual bool supportChangeLinks() const; public: virtual void init(); diff --git a/src/plugins/vcsbase/vcsbaseoutputwindow.cpp b/src/plugins/vcsbase/vcsbaseoutputwindow.cpp index 3728253f556..9dd32497ed7 100644 --- a/src/plugins/vcsbase/vcsbaseoutputwindow.cpp +++ b/src/plugins/vcsbase/vcsbaseoutputwindow.cpp @@ -189,7 +189,7 @@ void OutputWindowPlainTextEdit::contextMenuEvent(QContextMenuEvent *event) } if (action == openAction) { const QString fileName = action->data().toString(); - Core::EditorManager::openEditor(fileName, Core::Id(), Core::EditorManager::ModeSwitch); + Core::EditorManager::openEditor(fileName); } } delete menu; diff --git a/src/plugins/vcsbase/vcsbaseplugin.cpp b/src/plugins/vcsbase/vcsbaseplugin.cpp index 7193f0deff5..c572e5d5420 100644 --- a/src/plugins/vcsbase/vcsbaseplugin.cpp +++ b/src/plugins/vcsbase/vcsbaseplugin.cpp @@ -405,15 +405,6 @@ QString VcsBasePluginState::topLevel() const return hasFile() ? data->m_state.currentFileTopLevel : data->m_state.currentProjectTopLevel; } -QString VcsBasePluginState::currentDirectoryOrTopLevel() const -{ - if (hasFile()) - return data->m_state.currentFileDirectory; - else if (data->m_state.hasProject()) - return data->m_state.currentProjectTopLevel; - return QString(); -} - bool VcsBasePluginState::equals(const Internal::State &rhs) const { return data->m_state.equals(rhs); @@ -549,6 +540,9 @@ void VcsBasePlugin::initializeVcs(Core::IVersionControl *vc) SIGNAL(stateChanged(VcsBase::Internal::State,Core::IVersionControl*)), this, SLOT(slotStateChanged(VcsBase::Internal::State,Core::IVersionControl*))); + // VCSes might have become (un-)available, so clear the VCS directory cache + connect(vc, SIGNAL(configurationChanged()), + Core::ICore::vcsManager(), SLOT(clearVersionControlCache())); } void VcsBasePlugin::extensionsInitialized() @@ -688,9 +682,7 @@ bool VcsBasePlugin::raiseSubmitEditor() const { if (!d->m_submitEditor) return false; - Core::EditorManager::activateEditor( - d->m_submitEditor, - Core::EditorManager::IgnoreNavigationHistory | Core::EditorManager::ModeSwitch); + Core::EditorManager::activateEditor(d->m_submitEditor, Core::EditorManager::IgnoreNavigationHistory); return true; } diff --git a/src/plugins/vcsbase/vcsbaseplugin.h b/src/plugins/vcsbase/vcsbaseplugin.h index 630f1d907a5..092d4be727f 100644 --- a/src/plugins/vcsbase/vcsbaseplugin.h +++ b/src/plugins/vcsbase/vcsbaseplugin.h @@ -102,7 +102,6 @@ public: // the file one. QString topLevel() const; - QString currentDirectoryOrTopLevel() const; bool equals(const VcsBasePluginState &rhs) const; friend VCSBASE_EXPORT QDebug operator<<(QDebug in, const VcsBasePluginState &state); diff --git a/src/plugins/vcsbase/vcsbasesubmiteditor.cpp b/src/plugins/vcsbase/vcsbasesubmiteditor.cpp index d71c8866f9a..b4c7e3e2d5c 100644 --- a/src/plugins/vcsbase/vcsbasesubmiteditor.cpp +++ b/src/plugins/vcsbase/vcsbasesubmiteditor.cpp @@ -573,8 +573,7 @@ VcsBaseSubmitEditor::PromptSubmitResult { SubmitEditorWidget *submitWidget = static_cast(this->widget()); - Core::EditorManager::activateEditor( - this, Core::EditorManager::IgnoreNavigationHistory | Core::EditorManager::ModeSwitch); + Core::EditorManager::activateEditor(this, Core::EditorManager::IgnoreNavigationHistory); QString errorMessage; QMessageBox::StandardButton answer = QMessageBox::Yes; diff --git a/src/plugins/welcome/welcomeplugin.cpp b/src/plugins/welcome/welcomeplugin.cpp index 36c53cda764..8e5b1ddfa95 100644 --- a/src/plugins/welcome/welcomeplugin.cpp +++ b/src/plugins/welcome/welcomeplugin.cpp @@ -143,7 +143,6 @@ WelcomeMode::WelcomeMode() : setIcon(qtLogo); setPriority(Core::Constants::P_MODE_WELCOME); setId(Core::Constants::MODE_WELCOME); - setType(Core::Constants::MODE_WELCOME_TYPE); setContextHelpId(QLatin1String("Qt Creator Manual")); setContext(Core::Context(Core::Constants::C_WELCOME_MODE)); diff --git a/src/shared/proparser/ioutils.cpp b/src/shared/proparser/ioutils.cpp index 6706f80bee3..79a336fa1d7 100644 --- a/src/shared/proparser/ioutils.cpp +++ b/src/shared/proparser/ioutils.cpp @@ -76,6 +76,11 @@ bool IoUtils::isRelativePath(const QString &path) return true; } +QStringRef IoUtils::pathName(const QString &fileName) +{ + return fileName.leftRef(fileName.lastIndexOf(QLatin1Char('/')) + 1); +} + QStringRef IoUtils::fileName(const QString &fileName) { return fileName.midRef(fileName.lastIndexOf(QLatin1Char('/')) + 1); diff --git a/src/shared/proparser/ioutils.h b/src/shared/proparser/ioutils.h index 865e4a7511c..e4773ca50db 100644 --- a/src/shared/proparser/ioutils.h +++ b/src/shared/proparser/ioutils.h @@ -52,6 +52,7 @@ public: static bool exists(const QString &fileName) { return fileType(fileName) != FileNotFound; } static bool isRelativePath(const QString &fileName); static bool isAbsolutePath(const QString &fileName) { return !isRelativePath(fileName); } + static QStringRef pathName(const QString &fileName); // Requires normalized path static QStringRef fileName(const QString &fileName); // Requires normalized path static QString resolvePath(const QString &baseDir, const QString &fileName); static QString shellQuoteUnix(const QString &arg); diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp index 47012d99fdd..c9558519281 100644 --- a/src/shared/proparser/profileevaluator.cpp +++ b/src/shared/proparser/profileevaluator.cpp @@ -43,9 +43,9 @@ void ProFileEvaluator::initialize() QMakeEvaluator::initStatics(); } -ProFileEvaluator::ProFileEvaluator(ProFileGlobals *option, QMakeParser *parser, +ProFileEvaluator::ProFileEvaluator(ProFileGlobals *option, QMakeParser *parser, QMakeVfs *vfs, QMakeHandler *handler) - : d(new QMakeEvaluator(option, parser, handler)) + : d(new QMakeEvaluator(option, parser, vfs, handler)) { } diff --git a/src/shared/proparser/profileevaluator.h b/src/shared/proparser/profileevaluator.h index a172536411d..8d6fec86c3d 100644 --- a/src/shared/proparser/profileevaluator.h +++ b/src/shared/proparser/profileevaluator.h @@ -40,6 +40,7 @@ QT_BEGIN_NAMESPACE +class QMakeVfs; class QMakeParser; class QMakeEvaluator; class QMakeHandler; @@ -65,7 +66,8 @@ public: // Call this from a concurrency-free context static void initialize(); - ProFileEvaluator(ProFileGlobals *option, QMakeParser *parser, QMakeHandler *handler); + ProFileEvaluator(ProFileGlobals *option, QMakeParser *parser, QMakeVfs *vfs, + QMakeHandler *handler); ~ProFileEvaluator(); ProFileEvaluator::TemplateType templateType() const; diff --git a/src/shared/proparser/proparser.pri b/src/shared/proparser/proparser.pri index 900151d75f9..a3667e52919 100644 --- a/src/shared/proparser/proparser.pri +++ b/src/shared/proparser/proparser.pri @@ -14,6 +14,7 @@ HEADERS += \ profileevaluator.h \ proitems.h \ prowriter.h \ + qmakevfs.h \ ioutils.h SOURCES += \ @@ -24,6 +25,7 @@ SOURCES += \ qmakebuiltins.cpp \ proitems.cpp \ prowriter.cpp \ + qmakevfs.cpp \ ioutils.cpp RESOURCES += proparser.qrc diff --git a/src/shared/proparser/qmakebuiltins.cpp b/src/shared/proparser/qmakebuiltins.cpp index 6e2cd8afcde..eb58632c84b 100644 --- a/src/shared/proparser/qmakebuiltins.cpp +++ b/src/shared/proparser/qmakebuiltins.cpp @@ -32,6 +32,7 @@ #include "qmakeevaluator_p.h" #include "qmakeglobals.h" #include "qmakeparser.h" +#include "qmakevfs.h" #include "ioutils.h" #include @@ -269,46 +270,17 @@ quoteValue(const ProString &val) return ret; } -static bool -doWriteFile(const QString &name, QIODevice::OpenMode mode, const QString &contents, QString *errStr) -{ - QByteArray bytes = contents.toLocal8Bit(); - QFile cfile(name); - if (!(mode & QIODevice::Append) && cfile.open(QIODevice::ReadOnly | QIODevice::Text)) { - if (cfile.readAll() == bytes) - return true; - cfile.close(); - } - if (!cfile.open(mode | QIODevice::WriteOnly | QIODevice::Text)) { - *errStr = cfile.errorString(); - return false; - } - cfile.write(bytes); - cfile.close(); - if (cfile.error() != QFile::NoError) { - *errStr = cfile.errorString(); - return false; - } - return true; -} - QMakeEvaluator::VisitReturn QMakeEvaluator::writeFile(const QString &ctx, const QString &fn, QIODevice::OpenMode mode, const QString &contents) { - QFileInfo qfi(fn); - if (!QDir::current().mkpath(qfi.path())) { - evalError(fL1S("Cannot create %1directory %2.") - .arg(ctx, QDir::toNativeSeparators(qfi.path()))); - return ReturnFalse; - } QString errStr; - if (!doWriteFile(qfi.filePath(), mode, contents, &errStr)) { + if (!m_vfs->writeFile(fn, mode, contents, &errStr)) { evalError(fL1S("Cannot write %1file %2: %3.") - .arg(ctx, QDir::toNativeSeparators(qfi.filePath()), errStr)); + .arg(ctx, QDir::toNativeSeparators(fn), errStr)); return ReturnFalse; } - m_parser->discardFileFromCache(qfi.filePath()); + m_parser->discardFileFromCache(fn); return ReturnTrue; } @@ -1413,6 +1385,9 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( } const QString &file = resolvePath(m_option->expandEnvVars(args.at(0).toQString(m_tmp1))); + // Don't use VFS here: + // - it supports neither listing nor even directories + // - it's unlikely that somebody would test for files they created themselves if (IoUtils::exists(file)) return ReturnTrue; int slsh = file.lastIndexOf(QLatin1Char('/')); @@ -1444,7 +1419,6 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( evalError(fL1S("write_file(name, [content var, [append]]) requires one to three arguments.")); return ReturnFalse; } -#ifdef PROEVALUATOR_FULL QIODevice::OpenMode mode = QIODevice::Truncate; QString contents; if (args.count() >= 2) { @@ -1456,9 +1430,6 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( mode = QIODevice::Append; } return writeFile(QString(), resolvePath(args.at(0).toQString(m_tmp1)), mode, contents); -#else - return ReturnTrue; -#endif } case T_TOUCH: { if (args.count() != 2) { @@ -1510,7 +1481,6 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( evalError(fL1S("cache(var, [set|add|sub] [transient] [super], [srcvar]) requires one to three arguments.")); return ReturnFalse; } -#ifdef PROEVALUATOR_FULL bool persist = true; bool super = false; enum { CacheSet, CacheAdd, CacheSub } mode = CacheSet; @@ -1636,9 +1606,6 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( fn = m_cachefile; } return writeFile(fL1S("cache "), fn, QIODevice::Append, varstr); -#else - return ReturnTrue; -#endif } default: evalError(fL1S("Function '%1' is not implemented.").arg(function.toQString(m_tmp1))); diff --git a/src/shared/proparser/qmakeevaluator.cpp b/src/shared/proparser/qmakeevaluator.cpp index 9ba0d70b16a..db6af6f7308 100644 --- a/src/shared/proparser/qmakeevaluator.cpp +++ b/src/shared/proparser/qmakeevaluator.cpp @@ -32,6 +32,7 @@ #include "qmakeglobals.h" #include "qmakeparser.h" +#include "qmakevfs.h" #include "ioutils.h" #include @@ -162,13 +163,13 @@ const ProKey &QMakeEvaluator::map(const ProKey &var) } -QMakeEvaluator::QMakeEvaluator(QMakeGlobals *option, - QMakeParser *parser, QMakeHandler *handler) +QMakeEvaluator::QMakeEvaluator(QMakeGlobals *option, QMakeParser *parser, QMakeVfs *vfs, + QMakeHandler *handler) : #ifdef PROEVALUATOR_DEBUG m_debugLevel(option->debugLevel), #endif - m_option(option), m_parser(parser), m_handler(handler) + m_option(option), m_parser(parser), m_handler(handler), m_vfs(vfs) { // So that single-threaded apps don't have to call initialize() for now. initStatics(); @@ -921,7 +922,7 @@ void QMakeEvaluator::visitProVariable( if (varName == statics.strTEMPLATE) setTemplate(); else if (varName == statics.strQMAKE_PLATFORM) - updateFeaturePaths(); + m_featureRoots = 0; #ifdef PROEVALUATOR_FULL else if (varName == statics.strREQUIRES) checkRequirements(values(varName)); @@ -1049,7 +1050,7 @@ bool QMakeEvaluator::prepareProject(const QString &inDir) superdir = m_outputDir; forever { QString superfile = superdir + QLatin1String("/.qmake.super"); - if (IoUtils::exists(superfile)) { + if (m_vfs->exists(superfile)) { m_superfile = QDir::cleanPath(superfile); break; } @@ -1064,10 +1065,10 @@ bool QMakeEvaluator::prepareProject(const QString &inDir) QString dir = m_outputDir; forever { conffile = sdir + QLatin1String("/.qmake.conf"); - if (!IoUtils::exists(conffile)) + if (!m_vfs->exists(conffile)) conffile.clear(); cachefile = dir + QLatin1String("/.qmake.cache"); - if (!IoUtils::exists(cachefile)) + if (!m_vfs->exists(cachefile)) cachefile.clear(); if (!conffile.isEmpty() || !cachefile.isEmpty()) { if (dir != sdir) @@ -1145,6 +1146,7 @@ bool QMakeEvaluator::loadSpecInternal() #endif valuesRef(ProKey("QMAKESPEC")) << ProString(m_qmakespec); m_qmakespecName = IoUtils::fileName(m_qmakespec).toString(); + // This also ensures that m_featureRoots is valid. if (evaluateFeatureFile(QLatin1String("spec_post.prf")) != ReturnTrue) return false; // The MinGW and x-build specs may change the separator; $$shell_{path,quote}() need it @@ -1158,7 +1160,7 @@ bool QMakeEvaluator::loadSpec() m_hostBuild ? m_option->qmakespec : m_option->xqmakespec); { - QMakeEvaluator evaluator(m_option, m_parser, m_handler); + QMakeEvaluator evaluator(m_option, m_parser, m_vfs, m_handler); if (!m_superfile.isEmpty()) { valuesRef(ProKey("_QMAKE_SUPER_CACHE_")) << ProString(m_superfile); if (evaluator.evaluateFile( @@ -1315,7 +1317,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::visitProFile( locker.unlock(); #endif - QMakeEvaluator *baseEval = new QMakeEvaluator(m_option, m_parser, m_handler); + QMakeEvaluator *baseEval = new QMakeEvaluator(m_option, m_parser, m_vfs, m_handler); baseEnv->evaluator = baseEval; baseEval->m_superfile = m_superfile; baseEval->m_conffile = m_conffile; @@ -1481,7 +1483,7 @@ void QMakeEvaluator::updateFeaturePaths() foreach (const QString &root, feature_roots) if (IoUtils::exists(root)) ret << root; - m_featureRoots = ret; + m_featureRoots = new QMakeFeatureRoots(ret); } ProString QMakeEvaluator::propertyValue(const ProKey &name) const @@ -1810,7 +1812,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFile( #endif return ok; } else { - if (!(flags & LoadSilent) && !IoUtils::exists(fileName)) + if (!(flags & LoadSilent) && !m_vfs->exists(fileName)) evalError(fL1S("WARNING: Include file %1 not found").arg(fileName)); return ReturnFalse; } @@ -1839,34 +1841,55 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFeatureFile( if (!fn.endsWith(QLatin1String(".prf"))) fn += QLatin1String(".prf"); - if (m_featureRoots.isEmpty()) + if (!m_featureRoots) updateFeaturePaths(); - int start_root = 0; - QString currFn = currentFileName(); - if (IoUtils::fileName(currFn) == IoUtils::fileName(fn)) { - for (int root = 0; root < m_featureRoots.size(); ++root) - if (currFn == m_featureRoots.at(root) + fn) { - start_root = root + 1; - break; - } - } - for (int root = start_root; root < m_featureRoots.size(); ++root) { - QString fname = m_featureRoots.at(root) + fn; - if (IoUtils::exists(fname)) { - fn = fname; - goto cool; - } - } -#ifdef QMAKE_BUILTIN_PRFS - fn.prepend(QLatin1String(":/qmake/features/")); - if (QFileInfo(fn).exists()) - goto cool; +#ifdef PROEVALUATOR_THREAD_SAFE + m_featureRoots->mutex.lock(); #endif - if (!silent) - evalError(fL1S("Cannot find feature %1").arg(fileName)); - return ReturnFalse; + QString currFn = currentFileName(); + if (IoUtils::fileName(currFn) != IoUtils::fileName(fn)) + currFn.clear(); + // Null values cannot regularly exist in the hash, so they indicate that the value still + // needs to be determined. Failed lookups are represented via non-null empty strings. + QString *fnp = &m_featureRoots->cache[qMakePair(fn, currFn)]; + if (fnp->isNull()) { + int start_root = 0; + const QStringList &paths = m_featureRoots->paths; + if (!currFn.isEmpty()) { + QStringRef currPath = IoUtils::pathName(currFn); + for (int root = 0; root < paths.size(); ++root) + if (currPath == paths.at(root)) { + start_root = root + 1; + break; + } + } + for (int root = start_root; root < paths.size(); ++root) { + QString fname = paths.at(root) + fn; + if (IoUtils::exists(fname)) { + fn = fname; + goto cool; + } + } +#ifdef QMAKE_BUILTIN_PRFS + fn.prepend(QLatin1String(":/qmake/features/")); + if (QFileInfo(fn).exists()) + goto cool; +#endif + fn = QLatin1String(""); // Indicate failed lookup. See comment above. - cool: + cool: + *fnp = fn; + } else { + fn = *fnp; + } +#ifdef PROEVALUATOR_THREAD_SAFE + m_featureRoots->mutex.unlock(); +#endif + if (fn.isEmpty()) { + if (!silent) + evalError(fL1S("Cannot find feature %1").arg(fileName)); + return ReturnFalse; + } ProStringList &already = valuesRef(ProKey("QMAKE_INTERNAL_INCLUDED_FEATURES")); ProString afn(fn); if (already.contains(afn)) { @@ -1893,7 +1916,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFeatureFile( QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFileInto( const QString &fileName, ProValueMap *values, LoadFlags flags) { - QMakeEvaluator visitor(m_option, m_parser, m_handler); + QMakeEvaluator visitor(m_option, m_parser, m_vfs, m_handler); visitor.m_caller = this; visitor.m_outputDir = m_outputDir; visitor.m_featureRoots = m_featureRoots; diff --git a/src/shared/proparser/qmakeevaluator.h b/src/shared/proparser/qmakeevaluator.h index 63d34e8f764..188b8c05ce5 100644 --- a/src/shared/proparser/qmakeevaluator.h +++ b/src/shared/proparser/qmakeevaluator.h @@ -43,9 +43,13 @@ #include #include #include +#include #ifndef QT_BOOTSTRAPPED # include #endif +#ifdef PROEVALUATOR_THREAD_SAFE +# include +#endif QT_BEGIN_NAMESPACE @@ -71,6 +75,20 @@ public: virtual void doneWithEval(ProFile *parent) = 0; }; +typedef QPair QMakeFeatureKey; // key, parent +typedef QHash QMakeFeatureHash; + +class QMAKE_EXPORT QMakeFeatureRoots : public QSharedData +{ +public: + QMakeFeatureRoots(const QStringList &_paths) : paths(_paths) {} + const QStringList paths; + mutable QMakeFeatureHash cache; +#ifdef PROEVALUATOR_THREAD_SAFE + mutable QMutex mutex; +#endif +}; + // We use a QLinkedList based stack instead of a QVector based one (QStack), so that // the addresses of value maps stay constant. The qmake generators rely on that. class QMAKE_EXPORT ProValueMapStack : public QLinkedList @@ -96,7 +114,7 @@ public: static void initStatics(); static void initFunctionStatics(); - QMakeEvaluator(QMakeGlobals *option, QMakeParser *parser, + QMakeEvaluator(QMakeGlobals *option, QMakeParser *parser, QMakeVfs *vfs, QMakeHandler *handler); ~QMakeEvaluator(); @@ -271,7 +289,7 @@ public: QStringList m_qmakepath; QStringList m_qmakefeatures; QStringList m_mkspecPaths; - QStringList m_featureRoots; + QExplicitlySharedDataPointer m_featureRoots; ProString m_dirSep; ProFunctionDefs m_functionDefs; ProStringList m_returnValue; @@ -282,6 +300,7 @@ public: QMakeGlobals *m_option; QMakeParser *m_parser; QMakeHandler *m_handler; + QMakeVfs *m_vfs; }; Q_DECLARE_OPERATORS_FOR_FLAGS(QMakeEvaluator::LoadFlags) diff --git a/src/shared/proparser/qmakeparser.cpp b/src/shared/proparser/qmakeparser.cpp index ae0fdd0fac5..9dd10ac448e 100644 --- a/src/shared/proparser/qmakeparser.cpp +++ b/src/shared/proparser/qmakeparser.cpp @@ -29,6 +29,7 @@ #include "qmakeparser.h" +#include "qmakevfs.h" #include "ioutils.h" using namespace QMakeInternal; @@ -130,9 +131,10 @@ void QMakeParser::initialize() statics.strLITERAL_WHITESPACE = QLatin1String("LITERAL_WHITESPACE"); } -QMakeParser::QMakeParser(ProFileCache *cache, QMakeParserHandler *handler) +QMakeParser::QMakeParser(ProFileCache *cache, QMakeVfs *vfs, QMakeParserHandler *handler) : m_cache(cache) , m_handler(handler) + , m_vfs(vfs) { // So that single-threaded apps don't have to call initialize() for now. initialize(); @@ -218,24 +220,14 @@ void QMakeParser::discardFileFromCache(const QString &fileName) bool QMakeParser::read(ProFile *pro) { - QFile file(pro->fileName()); - if (!file.open(QIODevice::ReadOnly)) { - if (m_handler && IoUtils::exists(pro->fileName())) + QString content; + QString errStr; + if (!m_vfs->readFile(pro->fileName(), &content, &errStr)) { + if (m_handler && m_vfs->exists(pro->fileName())) m_handler->message(QMakeParserHandler::ParserIoError, - fL1S("Cannot read %1: %2").arg(pro->fileName(), file.errorString())); + fL1S("Cannot read %1: %2").arg(pro->fileName(), errStr)); return false; } - - QByteArray bcont = file.readAll(); - if (bcont.startsWith("\xef\xbb\xbf")) { - // UTF-8 BOM will cause subtle errors - m_handler->message(QMakeParserHandler::ParserIoError, - fL1S("Unexpected UTF-8 BOM in %1").arg(pro->fileName())); - return false; - } - QString content(QString::fromLocal8Bit(bcont)); - bcont.clear(); - file.close(); return read(pro, content, 1, FullGrammar); } diff --git a/src/shared/proparser/qmakeparser.h b/src/shared/proparser/qmakeparser.h index 6fc599f617d..87cd8c2244a 100644 --- a/src/shared/proparser/qmakeparser.h +++ b/src/shared/proparser/qmakeparser.h @@ -67,6 +67,7 @@ public: }; class ProFileCache; +class QMakeVfs; class QMAKE_EXPORT QMakeParser { @@ -74,7 +75,7 @@ public: // Call this from a concurrency-free context static void initialize(); - QMakeParser(ProFileCache *cache, QMakeParserHandler *handler); + QMakeParser(ProFileCache *cache, QMakeVfs *vfs, QMakeParserHandler *handler); enum SubGrammar { FullGrammar, TestGrammar, ValueGrammar }; // fileName is expected to be absolute and cleanPath()ed. @@ -163,6 +164,7 @@ private: ProFileCache *m_cache; QMakeParserHandler *m_handler; + QMakeVfs *m_vfs; // This doesn't help gcc 3.3 ... template friend class QTypeInfo; diff --git a/src/shared/proparser/qmakevfs.cpp b/src/shared/proparser/qmakevfs.cpp new file mode 100644 index 00000000000..69373c4a9e4 --- /dev/null +++ b/src/shared/proparser/qmakevfs.cpp @@ -0,0 +1,178 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#include "qmakevfs.h" + +#include "ioutils.h" +using namespace QMakeInternal; + +#include +#include +#include + +#define fL1S(s) QString::fromLatin1(s) + +QMakeVfs::QMakeVfs() +#ifndef PROEVALUATOR_FULL + : m_magicMissing(fL1S("missing")) + , m_magicExisting(fL1S("existing")) +#endif +{ +} + +bool QMakeVfs::writeFile(const QString &fn, QIODevice::OpenMode mode, const QString &contents, + QString *errStr) +{ +#ifndef PROEVALUATOR_FULL +# ifdef PROEVALUATOR_THREAD_SAFE + QMutexLocker locker(&m_mutex); +# endif + QString *cont = &m_files[fn]; + if (mode & QIODevice::Append) + *cont += contents; + else + *cont = contents; + Q_UNUSED(errStr) + return true; +#else + QFileInfo qfi(fn); + if (!QDir::current().mkpath(qfi.path())) { + *errStr = fL1S("Cannot create parent directory"); + return false; + } + QByteArray bytes = contents.toLocal8Bit(); + QFile cfile(fn); + if (!(mode & QIODevice::Append) && cfile.open(QIODevice::ReadOnly | QIODevice::Text)) { + if (cfile.readAll() == bytes) + return true; + cfile.close(); + } + if (!cfile.open(mode | QIODevice::WriteOnly | QIODevice::Text)) { + *errStr = cfile.errorString(); + return false; + } + cfile.write(bytes); + cfile.close(); + if (cfile.error() != QFile::NoError) { + *errStr = cfile.errorString(); + return false; + } + return true; +#endif +} + +bool QMakeVfs::readFile(const QString &fn, QString *contents, QString *errStr) +{ +#ifndef PROEVALUATOR_FULL +# ifdef PROEVALUATOR_THREAD_SAFE + QMutexLocker locker(&m_mutex); +# endif + QHash::ConstIterator it = m_files.constFind(fn); + if (it != m_files.constEnd()) { + if (it->constData() == m_magicMissing.constData()) { + *errStr = fL1S("No such file or directory"); + return false; + } + if (it->constData() != m_magicExisting.constData()) { + *contents = *it; + return true; + } + } +#endif + + QFile file(fn); + if (!file.open(QIODevice::ReadOnly)) { +#ifndef PROEVALUATOR_FULL + if (!IoUtils::exists(fn)) { + m_files[fn] = m_magicMissing; + *errStr = fL1S("No such file or directory"); + } else +#endif + *errStr = file.errorString(); + return false; + } +#ifndef PROEVALUATOR_FULL + m_files[fn] = m_magicExisting; +#endif + + QByteArray bcont = file.readAll(); + if (bcont.startsWith("\xef\xbb\xbf")) { + // UTF-8 BOM will cause subtle errors + *errStr = fL1S("Unexpected UTF-8 BOM"); + return false; + } + *contents = QString::fromLocal8Bit(bcont); + return true; +} + +bool QMakeVfs::exists(const QString &fn) +{ +#ifndef PROEVALUATOR_FULL +# ifdef PROEVALUATOR_THREAD_SAFE + QMutexLocker locker(&m_mutex); +# endif + QHash::ConstIterator it = m_files.constFind(fn); + if (it != m_files.constEnd()) + return it->constData() != m_magicMissing.constData(); +#endif + bool ex = IoUtils::exists(fn); +#ifndef PROEVALUATOR_FULL + m_files[fn] = ex ? m_magicExisting : m_magicMissing; +#endif + return ex; +} + +#ifndef PROEVALUATOR_FULL +// This should be called when the sources may have changed (e.g., VCS update). +void QMakeVfs::invalidateCache() +{ +# ifdef PROEVALUATOR_THREAD_SAFE + QMutexLocker locker(&m_mutex); +# endif + QHash::Iterator it = m_files.begin(), eit = m_files.end(); + while (it != eit) { + if (it->constData() == m_magicMissing.constData() + ||it->constData() == m_magicExisting.constData()) + it = m_files.erase(it); + else + ++it; + } +} + +// This should be called when generated files may have changed (e.g., actual build). +void QMakeVfs::invalidateContents() +{ +# ifdef PROEVALUATOR_THREAD_SAFE + QMutexLocker locker(&m_mutex); +# endif + m_files.clear(); +} +#endif + +QT_END_NAMESPACE diff --git a/src/plugins/texteditor/generichighlighter/highlightdefinitionmetadata.cpp b/src/shared/proparser/qmakevfs.h similarity index 63% rename from src/plugins/texteditor/generichighlighter/highlightdefinitionmetadata.cpp rename to src/shared/proparser/qmakevfs.h index f29daa6c84f..045765a3629 100644 --- a/src/plugins/texteditor/generichighlighter/highlightdefinitionmetadata.cpp +++ b/src/shared/proparser/qmakevfs.h @@ -27,17 +27,47 @@ ** ****************************************************************************/ -#include "highlightdefinitionmetadata.h" +#ifndef QMAKEVFS_H +#define QMAKEVFS_H -using namespace TextEditor; -using namespace Internal; +#include "qmake_global.h" -const QLatin1String HighlightDefinitionMetaData::kPriority("priority"); -const QLatin1String HighlightDefinitionMetaData::kName("name"); -const QLatin1String HighlightDefinitionMetaData::kExtensions("extensions"); -const QLatin1String HighlightDefinitionMetaData::kMimeType("mimetype"); -const QLatin1String HighlightDefinitionMetaData::kVersion("version"); -const QLatin1String HighlightDefinitionMetaData::kUrl("url"); +# include +#ifndef PROEVALUATOR_FULL +# include +# include +# ifdef PROEVALUATOR_THREAD_SAFE +# include +# endif +#endif -HighlightDefinitionMetaData::HighlightDefinitionMetaData() : priority(0) -{} +QT_BEGIN_NAMESPACE + +class QMAKE_EXPORT QMakeVfs +{ +public: + QMakeVfs(); + + bool writeFile(const QString &fn, QIODevice::OpenMode mode, const QString &contents, QString *errStr); + bool readFile(const QString &fn, QString *contents, QString *errStr); + bool exists(const QString &fn); + +#ifndef PROEVALUATOR_FULL + void invalidateCache(); + void invalidateContents(); +#endif + +private: +#ifndef PROEVALUATOR_FULL +# ifdef PROEVALUATOR_THREAD_SAFE + QMutex m_mutex; +# endif + QHash m_files; + QString m_magicMissing; + QString m_magicExisting; +#endif +}; + +QT_END_NAMESPACE + +#endif // QMAKEVFS_H diff --git a/src/shared/qtsingleapplication/qtlocalpeer.cpp b/src/shared/qtsingleapplication/qtlocalpeer.cpp index c1c68938af5..07cfc74ed0a 100644 --- a/src/shared/qtsingleapplication/qtlocalpeer.cpp +++ b/src/shared/qtsingleapplication/qtlocalpeer.cpp @@ -46,7 +46,7 @@ static PProcessIdToSessionId pProcessIdToSessionId = 0; namespace SharedTools { -const char *QtLocalPeer::ack = "ack"; +static const char ack[] = "ack"; QtLocalPeer::QtLocalPeer(QObject *parent, const QString &appId) : QObject(parent), id(appId) diff --git a/src/shared/qtsingleapplication/qtlocalpeer.h b/src/shared/qtsingleapplication/qtlocalpeer.h index e721a05de9a..fad6501790d 100644 --- a/src/shared/qtsingleapplication/qtlocalpeer.h +++ b/src/shared/qtsingleapplication/qtlocalpeer.h @@ -57,9 +57,6 @@ protected: QString socketName; QLocalServer* server; QtLockedFile lockFile; - -private: - static const char* ack; }; } // namespace SharedTools diff --git a/tests/auto/cplusplus/codeformatter/tst_codeformatter.cpp b/tests/auto/cplusplus/codeformatter/tst_codeformatter.cpp index ba0eb2dfff8..b132e3c9ba7 100644 --- a/tests/auto/cplusplus/codeformatter/tst_codeformatter.cpp +++ b/tests/auto/cplusplus/codeformatter/tst_codeformatter.cpp @@ -126,6 +126,7 @@ private Q_SLOTS: void blockBraces1(); void functionDefaultArgument(); void attributeInAccessSpecifier(); + void braceReturn(); }; struct Line { @@ -2097,6 +2098,19 @@ void tst_CodeFormatter::attributeInAccessSpecifier() checkIndent(data); } +void tst_CodeFormatter::braceReturn() +{ + QList data; + data << Line("class X {") + << Line(" void the_answer() {") + << Line(" return {42};") + << Line(" }") + << Line(" int x;") + << Line("};") + ; + checkIndent(data); +} + QTEST_MAIN(tst_CodeFormatter) #include "tst_codeformatter.moc" diff --git a/tests/auto/cplusplus/lookup/tst_lookup.cpp b/tests/auto/cplusplus/lookup/tst_lookup.cpp index a0df89de24f..c1d448b62bd 100644 --- a/tests/auto/cplusplus/lookup/tst_lookup.cpp +++ b/tests/auto/cplusplus/lookup/tst_lookup.cpp @@ -87,6 +87,7 @@ class tst_Lookup: public QObject private Q_SLOTS: void base_class_defined_1(); + void document_functionAt_1(); // Objective-C void simple_class_1(); @@ -153,6 +154,30 @@ void tst_Lookup::base_class_defined_1() QVERIFY(classToAST.value(derivedClass) != 0); } +void tst_Lookup::document_functionAt_1() +{ + const QByteArray source = "\n" + "void Foo::Bar() {\n" // line 1 + " \n" // line 2 + " for (int i=0; i < 10; ++i) {\n" + " \n" // line 4 + " }\n" + "}\n"; // line 7 + + Document::Ptr doc = Document::create("document_functionAt_1"); + doc->setUtf8Source(source); + doc->parse(); + doc->check(); + + QVERIFY(doc->diagnosticMessages().isEmpty()); + QCOMPARE(doc->functionAt(1, 2), QString()); + QCOMPARE(doc->functionAt(1, 11), QString(QLatin1String("Foo::Bar"))); + QCOMPARE(doc->functionAt(2, 2), QString(QLatin1String("Foo::Bar"))); + QCOMPARE(doc->functionAt(3, 10), QString(QLatin1String("Foo::Bar"))); + QCOMPARE(doc->functionAt(4, 3), QString(QLatin1String("Foo::Bar"))); + QCOMPARE(doc->functionAt(6, 1), QString(QLatin1String("Foo::Bar"))); +} + void tst_Lookup::simple_class_1() { const QByteArray source = "\n" diff --git a/tests/auto/cplusplus/preprocessor/data/empty-macro.2.cpp b/tests/auto/cplusplus/preprocessor/data/empty-macro.2.cpp index 389eef523ca..8afb10a6cb3 100644 --- a/tests/auto/cplusplus/preprocessor/data/empty-macro.2.cpp +++ b/tests/auto/cplusplus/preprocessor/data/empty-macro.2.cpp @@ -10,4 +10,3 @@ private: public: Test(); }; - diff --git a/tests/auto/cplusplus/preprocessor/data/identifier-expansion.5.out.cpp b/tests/auto/cplusplus/preprocessor/data/identifier-expansion.5.out.cpp index 3d328fe2513..bdae3153b59 100644 --- a/tests/auto/cplusplus/preprocessor/data/identifier-expansion.5.out.cpp +++ b/tests/auto/cplusplus/preprocessor/data/identifier-expansion.5.out.cpp @@ -1 +1,9 @@ # 1 "data/identifier-expansion.5.cpp" + + + + + + + + diff --git a/tests/auto/cplusplus/preprocessor/data/macro-test.out.cpp b/tests/auto/cplusplus/preprocessor/data/macro-test.out.cpp index d13e2c5b0b3..fd938150162 100644 --- a/tests/auto/cplusplus/preprocessor/data/macro-test.out.cpp +++ b/tests/auto/cplusplus/preprocessor/data/macro-test.out.cpp @@ -10,3 +10,8 @@ void thisFunctionIsEnabled(); void thisFunctionIsEnabled2(); # 31 "data/macro-test.cpp" void thisFunctionIsEnabled3(); + + + + + diff --git a/tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp b/tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp index 7a4db38b60a..bb08b578aea 100644 --- a/tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp +++ b/tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp @@ -353,6 +353,8 @@ private slots: void skip_unknown_directives_data(); void include_guard(); void include_guard_data(); + void empty_trailing_lines(); + void empty_trailing_lines_data(); }; // Remove all #... lines, and 'simplify' string, to allow easily comparing the result @@ -1507,7 +1509,13 @@ void tst_Preprocessor::skip_unknown_directives_data() "# 10 \"file.cpp\"\n" "# ()\n" "#\n"; - expected = "# 1 \"\"\n"; + expected = + "# 1 \"\"\n" + "\n" + "\n" + "\n" + "\n" + ; QTest::newRow("case 1") << original << expected; } @@ -1593,6 +1601,74 @@ void tst_Preprocessor::include_guard_data() ; } +void tst_Preprocessor::empty_trailing_lines() +{ + compare_input_output(); +} + +void tst_Preprocessor::empty_trailing_lines_data() +{ + // Test if the number of lines at the end of a file is correct. This is important to make the + // EOF token for the end up at the correct line. + + QTest::addColumn("input"); + QTest::addColumn("output"); + + QByteArray original; + QByteArray expected; + + original = + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + ; + expected = "# 1 \"\"\n" + original; + QTest::newRow("9 empty lines") << original << expected; + + original = + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n" + ; + expected = + "# 1 \"\"\n" + "# 11 \"\"\n" + ; + QTest::newRow("11 empty lines") << original << expected; + + original = + "#include \n" + ; + expected = + "# 1 \"\"\n" + "\n" + ; + QTest::newRow("1 include") << original << expected; + + original = + "#include \n" + "\n" + ; + expected = + "# 1 \"\"\n" + "\n" + "\n" + ; + QTest::newRow("1 empty line with 1 include") << original << expected; +} + void tst_Preprocessor::compare_input_output(bool keepComments) { QFETCH(QByteArray, input); @@ -1602,7 +1678,7 @@ void tst_Preprocessor::compare_input_output(bool keepComments) Preprocessor preprocess(0, &env); preprocess.setKeepComments(keepComments); QByteArray prep = preprocess.run(QLatin1String(""), input); - QCOMPARE(output, prep); + QCOMPARE(prep.constData(), output.constData()); } QTEST_APPLESS_MAIN(tst_Preprocessor) diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp index 0d2ac55e918..1f61720f8e2 100644 --- a/tests/auto/debugger/tst_dumpers.cpp +++ b/tests/auto/debugger/tst_dumpers.cpp @@ -332,6 +332,9 @@ struct Cxx11Profile : public Profile Cxx11Profile() : Profile("QMAKE_CXXFLAGS += -std=c++0x") {} }; +struct GdbOnly {}; +struct LldbOnly {}; + struct GdbVersion { // Minimum and maximum are inclusive. @@ -349,6 +352,23 @@ struct GdbVersion int max; }; +struct LldbVersion +{ + // Minimum and maximum are inclusive. + LldbVersion(int minimum = 0, int maximum = 0) + { + if (minimum && !maximum) + maximum = minimum; + if (maximum == 0) + maximum = INT_MAX; + + max = maximum; + min = minimum; + } + int min; + int max; +}; + struct ForceC {}; struct CoreProfile {}; @@ -357,11 +377,14 @@ struct GuiProfile {}; struct DataBase { - DataBase() : useQt(false), forceC(false), neededGdbVersion() {} + DataBase() : useQt(false), forceC(false), gdbOnly(false), lldbOnly(false) {} mutable bool useQt; mutable bool forceC; + mutable bool gdbOnly; + mutable bool lldbOnly; mutable GdbVersion neededGdbVersion; + mutable LldbVersion neededLldbVersion; }; class Data : public DataBase @@ -392,6 +415,24 @@ public: return *this; } + const Data &operator%(const LldbVersion &lldbVersion) const + { + neededLldbVersion = lldbVersion; + return *this; + } + + const Data &operator%(const LldbOnly &) const + { + lldbOnly = true; + return *this; + } + + const Data &operator%(const GdbOnly &) const + { + gdbOnly = true; + return *this; + } + const Data &operator%(const CoreProfile &) const { profileExtra += @@ -471,7 +512,7 @@ public: tst_Dumpers() { t = 0; - m_keepTemp = false; + m_keepTemp = true; m_gdbVersion = 0; m_gdbBuildVersion = 0; m_lldbVersion = 0; @@ -512,12 +553,10 @@ void tst_Dumpers::initTestCase() if (m_debuggerBinary.endsWith("cdb.exe")) m_debuggerEngine = DumpTestCdbEngine; - if (m_debuggerBinary.endsWith("lldb") - || m_debuggerBinary.endsWith("lbridge.py") - || m_debuggerBinary.contains("/lldb-")) + if (m_debuggerBinary.endsWith("lldb")) m_debuggerEngine = DumpTestLldbEngine; - m_qmakeBinary = qgetenv("QTC_QMAKE_PATH"); + m_qmakeBinary = qgetenv("QTC_QMAKE_PATH_FOR_TEST"); if (m_qmakeBinary.isEmpty()) m_qmakeBinary = "qmake"; @@ -572,8 +611,12 @@ void tst_Dumpers::initTestCase() output += debugger.readAllStandardError(); output = output.trimmed(); // Should be something like LLDB-178 - m_lldbVersion = output.mid(5).toInt(); - qDebug() << "Lldb version " << output << m_lldbVersion; + QByteArray ba = output.mid(output.indexOf('-') + 1); + int pos = ba.indexOf('.'); + if (pos >= 0) + ba = ba.left(pos); + m_lldbVersion = ba.toInt(); + qDebug() << "Lldb version " << output << ba << m_lldbVersion; QVERIFY(m_lldbVersion); } m_env = utilsEnv.toProcessEnvironment(); @@ -600,9 +643,26 @@ void tst_Dumpers::dumper() if (m_debuggerEngine == DumpTestGdbEngine) { if (data.neededGdbVersion.min > m_gdbVersion) - MSKIP_SINGLE("Need minimum GDB version " + QByteArray::number(data.neededGdbVersion.min)); + MSKIP_SINGLE("Need minimum GDB version " + + QByteArray::number(data.neededGdbVersion.min)); if (data.neededGdbVersion.max < m_gdbVersion) - MSKIP_SINGLE("Need maximum GDB version " + QByteArray::number(data.neededGdbVersion.max)); + MSKIP_SINGLE("Need maximum GDB version " + + QByteArray::number(data.neededGdbVersion.max)); + } else { + if (data.gdbOnly) + MSKIP_SINGLE("Test is GDB specific"); + } + + if (m_debuggerEngine == DumpTestLldbEngine) { + if (data.neededLldbVersion.min > m_gdbVersion) + MSKIP_SINGLE("Need minimum LLDB version " + + QByteArray::number(data.neededLldbVersion.min)); + if (data.neededLldbVersion.max < m_gdbVersion) + MSKIP_SINGLE("Need maximum LLDB version " + + QByteArray::number(data.neededLldbVersion.max)); + } else { + if (data.lldbOnly) + MSKIP_SINGLE("Test is LLDB specific"); } QString cmd; @@ -616,6 +676,7 @@ void tst_Dumpers::dumper() proFile.write("SOURCES = "); proFile.write(mainFile); proFile.write("\nTARGET = doit\n"); + proFile.write("\nCONFIG -= app_bundle\n"); proFile.write("\nCONFIG -= release\n"); proFile.write("\nCONFIG += debug\n"); if (data.useQt) @@ -748,13 +809,16 @@ void tst_Dumpers::dumper() sortediNames << QString::fromLatin1(iName); sortediNames.sort(); foreach (QString iName, sortediNames) - cmds += "!qtcreatorcdbext.locals -t " + QByteArray::number(++token) + " -c 0 " + iName.toLatin1() + "\n"; + cmds += "!qtcreatorcdbext.locals -t " + QByteArray::number(++token) + + " -c 0 " + iName.toLatin1() + "\n"; cmds += "q\n"; } else if (m_debuggerEngine == DumpTestLldbEngine) { exe = "python"; args << QLatin1String(dumperDir + "/lbridge.py") << QString::fromUtf8(m_debuggerBinary) - << t->buildPath + QLatin1String("/doit"); + << t->buildPath + QLatin1String("/doit") + << QString::fromUtf8(expanded); + //qDebug() << exe.constData() << ' ' << qPrintable(args.join(QLatin1Char(' '))); } t->input = cmds; @@ -799,6 +863,21 @@ void tst_Dumpers::dumper() if (context.nameSpace == "::") context.nameSpace.clear(); contents.replace("\\\"", "\""); + } else if (m_debuggerEngine == DumpTestLldbEngine) { + //qDebug() << "GOT OUTPUT: " << output; + QVERIFY(output.startsWith("data=")); + contents = output; + + //int posNameSpaceStart = output.indexOf("@NS@"); + //QVERIFY(posNameSpaceStart != -1); + //posNameSpaceStart += sizeof("@NS@") - 1; + //int posNameSpaceEnd = output.indexOf("@", posNameSpaceStart); + //QVERIFY(posNameSpaceEnd != -1); + //context.nameSpace = output.mid(posNameSpaceStart, posNameSpaceEnd - posNameSpaceStart); + //qDebug() << "FOUND NS: " << context.nameSpace; + if (context.nameSpace == "::") + context.nameSpace.clear(); + contents.replace("\\\"", "\""); } else { const QByteArray locals = "|locals|"; int pos1 = output.indexOf(locals); @@ -1970,8 +2049,8 @@ void tst_Dumpers::dumper_data() "QPointF s0, s;\n" "s = QPointF(100, 200);\n") % CoreProfile() - % Check("s0", "(0, 0)", "@QPointF") - % Check("s", "(100, 200)", "@QPointF"); + % Check("s0", "(0.0, 0.0)", "@QPointF") + % Check("s", "(100.0, 200.0)", "@QPointF"); QTest::newRow("QRect") << Data("#include \n" @@ -2665,6 +2744,18 @@ void tst_Dumpers::dumper_data() % Check("v", "<2 items>", "std::vector") % Check("v.0", "[0]", "\"foo\"", "std::string"); + QTest::newRow("StdVector0") + << Data("#include \n", + "std::vector v0, v;\n" + "v.push_back(1);\n" + "v.push_back(0);\n" + "v.push_back(2);\n") + % Check("v0", "<0 items>", "std::vector") + % Check("v", "<3 items>", "std::vector") + % Check("v.0", "[0]", "1", "double") + % Check("v.1", "[1]", "0", "double") + % Check("v.2", "[2]", "2", "double"); + QTest::newRow("StdVector1") << Data("#include \n", "std::vector v0, v;\n" @@ -3898,8 +3989,8 @@ void tst_Dumpers::dumper_data() % Check("n@2", "1", "int"); - QTest::newRow("RValueReference") - << Data("#include \n" + const Data rvalueData = Data( + "#include \n" "struct X { X() : a(2), b(3) {} int a, b; };\n" "X testRValueReferenceHelper1() { return X(); }\n" "X testRValueReferenceHelper2(X &&x) { return x; }\n", @@ -3911,13 +4002,24 @@ void tst_Dumpers::dumper_data() "X y3 = testRValueReferenceHelper2(testRValueReferenceHelper1());\n" "unused(&x1, &x2, &x3, &y1, &y2, &y3);\n") % Cxx11Profile() - % Check("x1", "", "X &") - % Check("x2", "", "X &") - % Check("x3", "", "X &") % Check("y1", "", "X") % Check("y2", "", "X") % Check("y3", "", "X"); + QTest::newRow("RValueReferenceGdb") + << Data(rvalueData) + % GdbOnly() + % Check("x1", "", "X &") + % Check("x2", "", "X &") + % Check("x3", "", "X &"); + + QTest::newRow("RValueReferenceLldb") + << Data(rvalueData) + % LldbOnly() + % Check("x1", "", "X &&") + % Check("x2", "", "X &&") + % Check("x3", "", "X &&"); + QTest::newRow("SSE") << Data("#include \n" "#include \n", diff --git a/tests/auto/profilewriter/tst_profilewriter.cpp b/tests/auto/profilewriter/tst_profilewriter.cpp index cf31b48efe5..4dd71629b8e 100644 --- a/tests/auto/profilewriter/tst_profilewriter.cpp +++ b/tests/auto/profilewriter/tst_profilewriter.cpp @@ -27,6 +27,7 @@ ** ****************************************************************************/ +#include #include #include @@ -449,7 +450,8 @@ void tst_ProFileWriter::adds() QStringList lines = input.isEmpty() ? QStringList() : input.split(QLatin1String("\n")); QString var = QLatin1String("SOURCES"); - QMakeParser parser(0, &parseHandler); + QMakeVfs vfs; + QMakeParser parser(0, &vfs, &parseHandler); ProFile *proFile = parser.parsedProBlock(input, QLatin1String(BASE_DIR "/test.pro"), 1); QVERIFY(proFile); PW::putVarValues(proFile, &lines, values, var, PW::PutFlags(flags), scope); @@ -619,7 +621,8 @@ void tst_ProFileWriter::removes() QStringList lines = input.split(QLatin1String("\n")); QStringList vars; vars << QLatin1String("SOURCES"); - QMakeParser parser(0, &parseHandler); + QMakeVfs vfs; + QMakeParser parser(0, &vfs, &parseHandler); ProFile *proFile = parser.parsedProBlock(input, QLatin1String(BASE_DIR "/test.pro"), 1); QVERIFY(proFile); Qt4ProjectManager::Internal::ProWriter::removeVarValues(proFile, &lines, values, vars); @@ -647,7 +650,8 @@ void tst_ProFileWriter::multiVar() << QString::fromLatin1(BASE_DIR "/bak"); QStringList vars; vars << QLatin1String("SOURCES") << QLatin1String("HEADERS"); - QMakeParser parser(0, &parseHandler); + QMakeVfs vfs; + QMakeParser parser(0, &vfs, &parseHandler); ProFile *proFile = parser.parsedProBlock(input, QLatin1String(BASE_DIR "/test.pro"), 1); QVERIFY(proFile); Qt4ProjectManager::Internal::ProWriter::removeFiles(proFile, &lines, baseDir, files, vars); @@ -667,7 +671,8 @@ void tst_ProFileWriter::addFiles() " sub/bar.cpp" ); - QMakeParser parser(0, &parseHandler); + QMakeVfs vfs; + QMakeParser parser(0, &vfs, &parseHandler); ProFile *proFile = parser.parsedProBlock(input, QLatin1String(BASE_DIR "/test.pro"), 1); QVERIFY(proFile); Qt4ProjectManager::Internal::ProWriter::addFiles(proFile, &lines, QDir(BASE_DIR), @@ -688,7 +693,8 @@ void tst_ProFileWriter::removeFiles() "SOURCES = foo.cpp" ); - QMakeParser parser(0, &parseHandler); + QMakeVfs vfs; + QMakeParser parser(0, &vfs, &parseHandler); ProFile *proFile = parser.parsedProBlock(input, QLatin1String(BASE_DIR "/test.pro"), 1); QVERIFY(proFile); Qt4ProjectManager::Internal::ProWriter::removeFiles(proFile, &lines, QDir(BASE_DIR), diff --git a/tests/auto/qml/qml.pro b/tests/auto/qml/qml.pro index 466be4b27b9..5b320abd5e6 100644 --- a/tests/auto/qml/qml.pro +++ b/tests/auto/qml/qml.pro @@ -4,4 +4,5 @@ SUBDIRS += qmldesigner \ qmleditor \ qmlprojectmanager \ codemodel \ - reformatter + reformatter \ + qrcparser diff --git a/tests/auto/qml/qrcparser/qrcparser.pro b/tests/auto/qml/qrcparser/qrcparser.pro new file mode 100644 index 00000000000..a051c8926c8 --- /dev/null +++ b/tests/auto/qml/qrcparser/qrcparser.pro @@ -0,0 +1,11 @@ +#include(../shared/shared.pri) +QTC_PLUGIN_DEPENDS += qmljstools +include(../../qttest.pri) +#DEFINES+=CPLUSPLUS_BUILD_STATIC_LIB +include($$IDE_SOURCE_TREE/src/rpath.pri) + +LIBS += -L$$IDE_PLUGIN_PATH/QtProject +#DEFINES += Q_PLUGIN_PATH=\"\\\"$$IDE_PLUGIN_PATH/QtProject\\\"\" + +DEFINES += TESTSRCDIR=\\\"$$PWD\\\" +SOURCES += $$PWD/tst_qrcparser.cpp diff --git a/tests/auto/qml/qrcparser/simple.qrc b/tests/auto/qml/qrcparser/simple.qrc new file mode 100644 index 00000000000..add0b4e0cf6 --- /dev/null +++ b/tests/auto/qml/qrcparser/simple.qrc @@ -0,0 +1,17 @@ + + + images/copy.png + images/cut.png + images/new.png + images/open.png + images/paste.png + images/save.png + cut.jpg + + + cut_fr.jpg + + + images/cut.png + + \ No newline at end of file diff --git a/tests/auto/qml/qrcparser/tst_qrcparser.cpp b/tests/auto/qml/qrcparser/tst_qrcparser.cpp new file mode 100644 index 00000000000..b642e5a163f --- /dev/null +++ b/tests/auto/qml/qrcparser/tst_qrcparser.cpp @@ -0,0 +1,196 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** 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 Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#include +#include +#include + +#include + +using namespace QmlJS; + +class tst_QrcParser: public QObject +{ + Q_OBJECT +public: + void readInData(); + QStringList allPaths(QrcParser::ConstPtr p); +private slots: + void firstAtTest_data() { readInData(); } + void firstInTest_data() { readInData(); } + void cacheTest_data() { readInData(); } + void firstAtTest(); + void firstInTest(); + void cacheTest(); + void simpleTest(); + void cleanupTestCase(); +private: + QLocale m_locale; + QrcCache m_cache; +}; + +void tst_QrcParser::readInData() +{ + QTest::addColumn("path"); + + QDirIterator it(TESTSRCDIR, QStringList("*.qrc"), QDir::Files); + while (it.hasNext()) { + const QString fileName = it.next(); + QTest::newRow(fileName.toLatin1()) << it.filePath(); + } +} + +QStringList tst_QrcParser::allPaths(QrcParser::ConstPtr p) +{ + QStringList res; + res << QLatin1String("/"); + int iPos = 0; + while (iPos < res.size()) { + QString pAtt = res.at(iPos++); + if (!pAtt.endsWith(QLatin1Char('/'))) + continue; + QMap content; + p->collectFilesInPath(pAtt, &content, true); + foreach (const QString &fileName, content.keys()) + res.append(pAtt+fileName); + } + return res; +} + +void tst_QrcParser::firstAtTest() +{ + QFETCH(QString, path); + QrcParser::Ptr p = QrcParser::parseQrcFile(path); + foreach (const QString &qrcPath, allPaths(p)) { + QString s1 = p->firstFileAtPath(qrcPath, m_locale); + if (s1.isEmpty()) + continue; + QStringList l; + p->collectFilesAtPath(qrcPath, &l, &m_locale); + QCOMPARE(l.value(0), s1); + l.clear(); + p->collectFilesAtPath(qrcPath, &l); + QVERIFY(l.contains(s1)); + } +} + +void tst_QrcParser::firstInTest() +{ + QFETCH(QString, path); + QrcParser::Ptr p = QrcParser::parseQrcFile(path); + foreach (const QString &qrcPath, allPaths(p)) { + if (!qrcPath.endsWith(QLatin1Char('/'))) + continue; + for (int addDirs = 0; addDirs < 2; ++addDirs) { + QMap s1; + p->collectFilesInPath(qrcPath, &s1, addDirs, &m_locale); + foreach (const QString &k, s1.keys()) { + if (!k.endsWith(QLatin1Char('/'))) { + QCOMPARE(s1.value(k).value(0), p->firstFileAtPath(qrcPath + k, m_locale)); + } + } + QMap s2; + p->collectFilesInPath(qrcPath, &s2, addDirs); + foreach (const QString &k, s1.keys()) { + if (!k.endsWith(QLatin1Char('/'))) { + QVERIFY(s2.value(k).contains(s1.value(k).at(0))); + } else { + QVERIFY(s2.contains(k)); + } + } + foreach (const QString &k, s2.keys()) { + if (!k.endsWith(QLatin1Char('/'))) { + QStringList l; + p->collectFilesAtPath(qrcPath + k, &l); + QCOMPARE(s2.value(k), l); + } else { + QVERIFY(s2.value(k).isEmpty()); + } + } + } + } +} + +void tst_QrcParser::cacheTest() +{ + QFETCH(QString, path); + QVERIFY(m_cache.parsedPath(path).isNull()); + QrcParser::ConstPtr p0 = m_cache.addPath(path); + QVERIFY(!p0.isNull()); + QrcParser::ConstPtr p1 = m_cache.parsedPath(path); + QVERIFY(p1.data() == p0.data()); + QrcParser::ConstPtr p2 = m_cache.addPath(path); + QVERIFY(p2.data() == p1.data()); + QrcParser::ConstPtr p3 = m_cache.parsedPath(path); + QVERIFY(p3.data() == p2.data()); + QrcParser::ConstPtr p4 = m_cache.updatePath(path); + QVERIFY(p4.data() != p3.data()); + QrcParser::ConstPtr p5 = m_cache.parsedPath(path); + QVERIFY(p5.data() == p4.data()); + m_cache.removePath(path); + QrcParser::ConstPtr p6 = m_cache.parsedPath(path); + QVERIFY(p6.data() == p5.data()); + m_cache.removePath(path); + QrcParser::ConstPtr p7 = m_cache.parsedPath(path); + QVERIFY(p7.isNull()); +} + +void tst_QrcParser::simpleTest() +{ + QrcParser::Ptr p = QrcParser::parseQrcFile(QString::fromLatin1(TESTSRCDIR).append(QLatin1String("/simple.qrc"))); + QStringList paths = allPaths(p); + paths.sort(); + QVERIFY(paths == QStringList() + << QLatin1String("/") + << QLatin1String("/cut.jpg") + << QLatin1String("/images/") + << QLatin1String("/images/copy.png") + << QLatin1String("/images/cut.png") + << QLatin1String("/images/new.png") + << QLatin1String("/images/open.png") + << QLatin1String("/images/paste.png") + << QLatin1String("/images/save.png") + << QLatin1String("/myresources/") + << QLatin1String("/myresources/cut-img.png")); + QString frPath = p->firstFileAtPath(QLatin1String("/cut.jpg"), QLocale(QLatin1String("fr_FR"))); + QString refFrPath = QString::fromLatin1(TESTSRCDIR).append(QLatin1String("/cut_fr.jpg")); + QCOMPARE(frPath, refFrPath); + QString dePath = p->firstFileAtPath(QLatin1String("/cut.jpg"), QLocale(QLatin1String("de_DE"))); + QString refDePath = QString::fromLatin1(TESTSRCDIR).append(QLatin1String("/cut.jpg")); + QCOMPARE(dePath, refDePath); +} + +void tst_QrcParser::cleanupTestCase() +{ + m_cache.clear(); +} + +QTEST_APPLESS_MAIN(tst_QrcParser) + +#include "tst_qrcparser.moc" diff --git a/tests/manual/proparser/main.cpp b/tests/manual/proparser/main.cpp index 36ee676106c..c7b5d972327 100644 --- a/tests/manual/proparser/main.cpp +++ b/tests/manual/proparser/main.cpp @@ -28,6 +28,7 @@ ****************************************************************************/ #include "qmakeglobals.h" +#include "qmakevfs.h" #include "qmakeparser.h" #include "qmakeevaluator.h" #include "profileevaluator.h" @@ -69,14 +70,15 @@ public: static EvalHandler evalHandler; static int evaluate(const QString &fileName, const QString &in_pwd, const QString &out_pwd, - bool cumulative, ProFileGlobals *option, QMakeParser *parser, int level) + bool cumulative, ProFileGlobals *option, QMakeParser *parser, QMakeVfs *vfs, + int level) { static QSet visited; if (visited.contains(fileName)) return 0; visited.insert(fileName); - ProFileEvaluator visitor(option, parser, &evalHandler); + ProFileEvaluator visitor(option, parser, vfs, &evalHandler); #ifdef PROEVALUATOR_CUMULATIVE visitor.setCumulative(cumulative); #endif @@ -130,7 +132,7 @@ static int evaluate(const QString &fileName, const QString &in_pwd, const QStrin fflush(stdout); nlevel++; } - evaluate(inFile, inPwd, outPwd, cumulative, option, parser, nlevel); + evaluate(inFile, inPwd, outPwd, cumulative, option, parser, vfs, nlevel); } } @@ -195,6 +197,7 @@ int main(int argc, char **argv) out_pwd = in_pwd; option.setDirectories(in_pwd, out_pwd); - QMakeParser parser(0, &evalHandler); - return evaluate(file, in_pwd, out_pwd, cumulative, &option, &parser, level); + QMakeVfs vfs; + QMakeParser parser(0, &vfs, &evalHandler); + return evaluate(file, in_pwd, out_pwd, cumulative, &option, &parser, &vfs, level); } diff --git a/tests/manual/proparser/testreader.pro b/tests/manual/proparser/testreader.pro index 6d58c9e257d..022ac67667c 100644 --- a/tests/manual/proparser/testreader.pro +++ b/tests/manual/proparser/testreader.pro @@ -15,8 +15,27 @@ build_all:!build_pass { CONFIG += release } -SOURCES = main.cpp qmakeglobals.cpp qmakeparser.cpp qmakeevaluator.cpp profileevaluator.cpp qmakebuiltins.cpp proitems.cpp ioutils.cpp -HEADERS = qmakeglobals.h qmakeparser.h profileevaluator.h qmakeevaluator.h qmakeevaluator_p.h proitems.h ioutils.h +SOURCES += \ + main.cpp \ + qmakeglobals.cpp \ + qmakeparser.cpp \ + qmakeevaluator.cpp \ + profileevaluator.cpp \ + qmakebuiltins.cpp \ + proitems.cpp \ + qmakevfs.cpp \ + ioutils.cpp + +HEADERS += \ + qmake_global.h \ + qmakeglobals.h \ + qmakeparser.h \ + qmakeevaluator.h \ + qmakeevaluator_p.h \ + profileevaluator.h \ + proitems.h \ + qmakevfs.h \ + ioutils.h RESOURCES += proparser.qrc DEFINES += QMAKE_BUILTIN_PRFS