forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/2.8'
This commit is contained in:
231
dist/changes-2.8.0
vendored
Normal file
231
dist/changes-2.8.0
vendored
Normal file
@@ -0,0 +1,231 @@
|
||||
Qt Creator version 2.8 contains bug fixes and new features.
|
||||
|
||||
There is a total of about 1250 changes by 60 individual contributors.
|
||||
|
||||
The most important changes are listed in this document. For a complete
|
||||
list of changes, see the Git log for the Qt Creator sources that
|
||||
you can check out from the public Git repository. For example:
|
||||
|
||||
git clone git://gitorious.org/qt-creator/qt-creator.git
|
||||
git log --cherry-pick --pretty=oneline v2.7.1..origin/2.8
|
||||
|
||||
General
|
||||
* Moved progress information from mode selector to the bottom-right
|
||||
of the main window
|
||||
* Added option to hide detailed progress information and show
|
||||
summary progress bar instead
|
||||
* Added "-block" command line option that opens files in a running
|
||||
Qt Creator and blocks the command line until the editors are closed
|
||||
* Made mode selector hideable (Window > Show Mode Selector)
|
||||
|
||||
Editing
|
||||
* Added option to open extra editor windows (Window > Split New Window)
|
||||
* Fixed that mouse cursor was hidden when pressing modifier key
|
||||
* Added support for jumping to column with locator and Go to Line menu
|
||||
* Added that clicking on line and column display opens locator with line and column filter
|
||||
(QTCREATORBUG-8811)
|
||||
* Added option to show file encoding next to line and column display
|
||||
(QTCREATORBUG-8376)
|
||||
|
||||
Managing Projects
|
||||
* Fixed opening projects created with wizard even if version control
|
||||
creation fails (QTCREATORBUG-8892)
|
||||
|
||||
Compilers
|
||||
* Fixed detection of PowerPC ABI
|
||||
* Fixed detection of ARM-based Windows CE ABI
|
||||
* Fixed compile output parsers cutting off last character (QTCREATORBUG-9032)
|
||||
* Added support for new warnings and errors in compile output from GCC 4.8
|
||||
|
||||
Devices
|
||||
* Fixed setting default device (QTCREATORBUG-7812)
|
||||
* Added support for configuring Desktop device
|
||||
(for example free ports for debugging)
|
||||
|
||||
QMake Projects
|
||||
* Added support for OBJECTIVE_HEADERS
|
||||
|
||||
CMake Projects
|
||||
* Fixed sorting of build targets
|
||||
* Fixed CXXFLAGS detection when Ninja is used (QTCREATORBUG-9047)
|
||||
|
||||
Qbs Projects
|
||||
* Fixed defines that are passed to the C++ code model
|
||||
* Added install build step
|
||||
* Fixed several issues with project tree
|
||||
* Added run configuration for products in the project
|
||||
* Added building of single files
|
||||
|
||||
Autotools Projects
|
||||
* Added parsing of defines and C++ flags from Makefile
|
||||
|
||||
Generic Projects
|
||||
* Added filtering for files to add instead of only filtering for files to ignore when
|
||||
importing projects (QTCREATORBUG-8805)
|
||||
|
||||
Debugging
|
||||
* GDB
|
||||
* Added option to load system GDB pretty printers
|
||||
* Made adding tasks for missing debug info packages optional
|
||||
(QTCREATORBUG-8949)
|
||||
* CDB
|
||||
* Fixed stepping out of disassembled function
|
||||
* Added warning when debugging release build
|
||||
* Fixed and added nice display of several data types
|
||||
(QPixmap, QChar, 64bit integers in containers, QString in QVariant)
|
||||
* Fixed that debugger would sometimes stop at disabled breakpoints (QTCREATORBUG-9295)
|
||||
* LLDB
|
||||
* Added experimental support
|
||||
* QML
|
||||
* Fixed that a fixed port was used instead of using port from device settings
|
||||
* Added support for IPv6
|
||||
|
||||
Analyzer
|
||||
* Fixed that a fixed port was used instead of using port from device settings
|
||||
* Added support for IPv6
|
||||
* Fixed attaching profiler to QML applications to use kits
|
||||
|
||||
C++ Support
|
||||
* Added refactoring action that moves function definition from header to
|
||||
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
|
||||
* 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)
|
||||
|
||||
Python Support
|
||||
* Added an editor with highlighter and indenter
|
||||
* Added file and class wizards
|
||||
|
||||
Diff Viewer
|
||||
* Enabled by default
|
||||
* Added folding of skipped lines
|
||||
* Added folding of files
|
||||
* Added jumping to original file on double-click
|
||||
* 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
|
||||
* Added support for updating submodules
|
||||
* Added support for checking out commit
|
||||
* Added continue and abort for operations in progress
|
||||
(rebase, cherry-pick etc.)
|
||||
* Added support for fixing up previous commit
|
||||
* Moved all change related actions to a single dialog
|
||||
* Improved stash handling
|
||||
* Added dialog for pushing to Gerrit
|
||||
* Added tags to branches dialog
|
||||
* Added ability to save repository location for Gerrit
|
||||
* Added graph toggle button for log viewer
|
||||
* ClearCase
|
||||
* Removed useless hijack button for dynamic view
|
||||
|
||||
FakeVim
|
||||
* Fixed movement between views with Ctrl+W, Arrow
|
||||
* Added setting for .vimrc location (QTCREATORBUG-8748)
|
||||
* Fixed z., zz, zb and z- commands
|
||||
* Added support for Vim macro recording
|
||||
|
||||
Platform Specific
|
||||
|
||||
Linux
|
||||
* Made crash handler for debug builds optional
|
||||
|
||||
Qt Support
|
||||
* Fixed that Qt Creator preferred Qt 4 qmake over the system default
|
||||
(QTCREATORBUG-9068)
|
||||
|
||||
QNX
|
||||
* Added warning for too big icons and splash screens
|
||||
* Added more application permissions to bar descriptor editor
|
||||
* Added check for device development mode before deploying
|
||||
* Fixed certificate marshalling with newer BlackBerry NDKs
|
||||
* Added auto-detection of device PIN for new debug tokens (QTCREATORBUG-9062)
|
||||
* Enabled QML debugging for pure QNX devices
|
||||
* Fixed that key generation locked up UI (QTCREATORBUG-9078)
|
||||
* Added option to sign packages when creating them
|
||||
|
||||
Android
|
||||
* Fixed that Android device would show up even when no Android SDK
|
||||
was configured
|
||||
* Added support for mixed C++/QML debugging
|
||||
* Added support for QML profiling
|
||||
* Added more sanity checks for package names (QTCREATORBUG-9200)
|
||||
* Added visual editor for Android manifest files
|
||||
|
||||
Credits for these changes go to:
|
||||
|
||||
Aaron McCarthy
|
||||
Adrien Bustany
|
||||
Alan Alpert
|
||||
Alessandro Portale
|
||||
Andreas Holzammer
|
||||
André Hartmann
|
||||
André Pönitz
|
||||
Andrey M. Tokarev
|
||||
Aurindam Jana
|
||||
Christian Kandeler
|
||||
Christian Stenger
|
||||
Christian Strømme
|
||||
Daniel Teske
|
||||
David Schulz
|
||||
Debao Zhang
|
||||
Dmitry Savchenko
|
||||
Eike Ziller
|
||||
El Mehdi Fekari
|
||||
Erik Verbruggen
|
||||
Eskil Abrahamsen Blomfeldt
|
||||
Fawzi Mohamed
|
||||
Friedemann Kleint
|
||||
Lukas Holecek
|
||||
Hugues Delorme
|
||||
Jaroslaw Kobus
|
||||
Jesper K. Pedersen
|
||||
Jörg Bornemann
|
||||
J-P Nurmi
|
||||
Kai Köhne
|
||||
Knut Petter Svendsen
|
||||
Laurent Montel
|
||||
Leena Miettinen
|
||||
Lorenz Haas
|
||||
Lukas Holecek
|
||||
Marc Mutz
|
||||
Marco Bubke
|
||||
Martin T. H. Sandsmark
|
||||
Michal Klocek
|
||||
Mitch Curtis
|
||||
Montel Laurent
|
||||
Morten Johan Sørvig
|
||||
Nikolai Kosjar
|
||||
Orgad Shaneh
|
||||
Oswald Buddenhagen
|
||||
Pawel Faron
|
||||
Petar Perisin
|
||||
Przemyslaw Gorszkowski
|
||||
Rafael Roquetto
|
||||
Robert Löhning
|
||||
Sergey Belyashov
|
||||
Sergey Shambir
|
||||
Shane Peelar
|
||||
Thiago Macieira
|
||||
Thomas Hartmann
|
||||
Tim Jenssen
|
||||
Timo Jyrinki
|
||||
Tobias Hunger
|
||||
Tobias Nätterlund
|
||||
Tor Arne Vestbø
|
||||
Victor Ostashevsky
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 26 KiB |
@@ -92,8 +92,8 @@
|
||||
\image qtcreator-deploy-android.png "Deploy configurations"
|
||||
|
||||
To copy Qt libraries and files to the project directory and to bundle them
|
||||
as part of the APK, select the \gui {Use Qt libraries from device} option
|
||||
and the \gui {Use local Qt libraries} check box. This is the default option
|
||||
as part of the APK, select the \gui {Bundle Qt libraries in APK} option.
|
||||
This is the default option
|
||||
when developing with Qt 5.
|
||||
|
||||
\section1 Using Ministro to Install Qt Libraries
|
||||
@@ -111,7 +111,7 @@
|
||||
created by \QC.
|
||||
|
||||
To use Ministro to install the Qt libraries, select the
|
||||
\gui {Use Qt libraries from device} option (without any other options).
|
||||
\gui {Use Ministro service to install Qt} option.
|
||||
|
||||
This is the default option when developing with Qt 4.
|
||||
|
||||
@@ -128,11 +128,16 @@
|
||||
during development.
|
||||
|
||||
Select \gui Projects > \gui Run > \gui {Deploy configurations} >
|
||||
\gui Details, and then select the \gui {Deploy local Qt libraries} option
|
||||
and the \gui {Use local Qt libraries} check box to deploy Qt libraries to
|
||||
\gui Details, and then select the
|
||||
\gui {Deploy local Qt libraries to temporary directory} option to deploy
|
||||
Qt libraries to
|
||||
the \c{/data/local/tmp/qt} folder on the device and to run the application
|
||||
against them.
|
||||
|
||||
To deploy new Qt libraries to the device, select
|
||||
\gui {Clean Temporary Libraries Directory on Device}. The next time you
|
||||
deploy the application, Qt libraries are copied to the device again.
|
||||
|
||||
\section1 Installing Ministro
|
||||
|
||||
The easiest way to install Ministro is to do it on the device via Google
|
||||
@@ -143,8 +148,7 @@
|
||||
from the Google Market or from the
|
||||
\l{http://necessitas.kde.org/necessitas/ministro.php}{Ministro} home page.
|
||||
|
||||
Then select the \gui {Install Ministro, system-wide Qt shared
|
||||
libraries installer} option in \gui Projects > \gui Run >
|
||||
Then select \gui {Install Ministro from APK} in \gui Projects > \gui Run >
|
||||
\gui {Deploy configurations} > \gui Details.
|
||||
|
||||
You can use this option also to install any Android package (.apk).
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
!isEmpty(QTCREATOR_PRI_INCLUDED):error("qtcreator.pri already included")
|
||||
QTCREATOR_PRI_INCLUDED = 1
|
||||
|
||||
QTCREATOR_VERSION = 2.7.81
|
||||
QTCREATOR_VERSION = 2.7.82
|
||||
|
||||
isEqual(QT_MAJOR_VERSION, 5) {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Project {
|
||||
|
||||
property string ide_version_major: '2'
|
||||
property string ide_version_minor: '7'
|
||||
property string ide_version_release: '81'
|
||||
property string ide_version_release: '82'
|
||||
property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.' + ide_version_release
|
||||
property string ide_app_path: qbs.targetOS == "mac" ? "" : "bin"
|
||||
property string ide_app_target: qbs.targetOS == "mac" ? "Qt Creator" : "qtcreator"
|
||||
|
||||
@@ -325,7 +325,7 @@ lldb.SBType.unqualified = lambda self: self.GetUnqualifiedType()
|
||||
lldb.SBType.pointer = lambda self: self.GetPointerType()
|
||||
lldb.SBType.code = lambda self: self.GetTypeClass()
|
||||
lldb.SBType.sizeof = property(lambda self: self.GetByteSize())
|
||||
lldb.SBType.strip_typedefs = lambda self: self
|
||||
lldb.SBType.strip_typedefs = lambda self: self.GetCanonicalType()
|
||||
|
||||
def simpleEncoding(typeobj):
|
||||
code = typeobj.GetTypeClass()
|
||||
@@ -504,6 +504,8 @@ class Dumper:
|
||||
self.useLldbDumpers = False
|
||||
self.ns = ""
|
||||
self.autoDerefPointers = True
|
||||
self.useDynamicType = True
|
||||
self.useLoop = True
|
||||
|
||||
self.currentIName = None
|
||||
self.currentValuePriority = -100
|
||||
@@ -517,11 +519,13 @@ class Dumper:
|
||||
self.currentChildType = None
|
||||
self.currentChildNumChild = None
|
||||
|
||||
self.executable_ = None
|
||||
self.charType_ = None
|
||||
self.intType_ = None
|
||||
self.sizetType_ = None
|
||||
self.charPtrType_ = None
|
||||
self.voidType_ = None
|
||||
self.isShuttingDown_ = False
|
||||
|
||||
def extractTemplateArgument(self, typename, index):
|
||||
level = 0
|
||||
@@ -564,12 +568,12 @@ class Dumper:
|
||||
|
||||
def intType(self):
|
||||
if self.intType_ is None:
|
||||
self.intType_ = self.target.GetModuleAtIndex(0).FindFirstType('int')
|
||||
self.intType_ = self.target.FindFirstType('int')
|
||||
return self.intType_
|
||||
|
||||
def charType(self):
|
||||
if self.charType_ is None:
|
||||
self.charType_ = self.target.GetModuleAtIndex(0).FindFirstType('char')
|
||||
self.charType_ = self.target.FindFirstType('char')
|
||||
return self.charType_
|
||||
|
||||
def charPtrType(self):
|
||||
@@ -578,9 +582,11 @@ class Dumper:
|
||||
return self.charPtrType_
|
||||
|
||||
def voidPtrType(self):
|
||||
return None
|
||||
return self.charPtrType() # FIXME
|
||||
|
||||
def voidPtrSize(self):
|
||||
return None
|
||||
return self.charPtrType().GetByteSize()
|
||||
|
||||
def sizetType(self):
|
||||
@@ -676,43 +682,46 @@ class Dumper:
|
||||
return xrange(min(self.currentMaxNumChild, self.currentNumChild))
|
||||
|
||||
def lookupType(self, name):
|
||||
#warn("LOOKUP: %s" % self.target.GetModuleAtIndex(0).FindFirstType(name))
|
||||
return self.target.GetModuleAtIndex(0).FindFirstType(name)
|
||||
#warn("LOOKUP: %s" % self.target.FindFirstType(name))
|
||||
return self.target.FindFirstType(name)
|
||||
|
||||
def setupInferior(self, args):
|
||||
fileName = args['executable']
|
||||
executable = args['executable']
|
||||
self.executable_ = executable
|
||||
error = lldb.SBError()
|
||||
self.target = self.debugger.CreateTarget(fileName, None, None, True, error)
|
||||
if self.target.IsValid():
|
||||
self.report('state="inferiorsetupok",msg="%s",exe="%s"' % (error, fileName))
|
||||
else:
|
||||
self.report('state="inferiorsetupfailed",msg="%s",exe="%s"' % (error, fileName))
|
||||
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():
|
||||
self.report('state="inferiorsetupok",msg="%s",exe="%s"' % (error, executable))
|
||||
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()
|
||||
#launchInfo = lldb.SBLaunchInfo(["-s"])
|
||||
#self.process = self.target.Launch(self.listener, None, None,
|
||||
# None, '/tmp/stdout.txt', None,
|
||||
# None, 0, True, error)
|
||||
self.listener = lldb.SBListener("event_Listener")
|
||||
self.process = self.target.Launch(self.listener, None, None,
|
||||
None, None, None,
|
||||
os.getcwd(),
|
||||
lldb.eLaunchFlagExec
|
||||
+ lldb.eLaunchFlagDebug
|
||||
#+ lldb.eLaunchFlagDebug
|
||||
#+ lldb.eLaunchFlagStopAtEntry
|
||||
#+ lldb.eLaunchFlagDisableSTDIO
|
||||
#+ lldb.eLaunchFlagLaunchInSeparateProcessGroup
|
||||
, False, error)
|
||||
self.reportError(error)
|
||||
self.pid = self.process.GetProcessID()
|
||||
self.report('pid="%s"' % self.pid)
|
||||
self.report('state="enginerunok"')
|
||||
self.consumeEvents()
|
||||
error = self.process.Continue()
|
||||
self.consumeEvents()
|
||||
self.reportError(error)
|
||||
|
||||
s = threading.Thread(target=self.loop, args=[])
|
||||
s.start()
|
||||
self.report('state="enginerunandinferiorrunok"')
|
||||
|
||||
if self.useLoop:
|
||||
s = threading.Thread(target=self.loop, args=[])
|
||||
s.start()
|
||||
|
||||
def describeError(self, error):
|
||||
desc = lldb.SBStream()
|
||||
@@ -809,15 +818,16 @@ class Dumper:
|
||||
self.currentType = str(type)
|
||||
self.currentTypePriority = self.currentTypePriority + 1
|
||||
|
||||
|
||||
def readRawMemory(self, base, size):
|
||||
error = lldb.SBError()
|
||||
if size == 0:
|
||||
return ""
|
||||
#warn("BASE: %s " % base)
|
||||
#warn("SIZE: %s " % size)
|
||||
base = int(base) & 0xFFFFFFFFFFFFFFFF
|
||||
size = int(size) & 0xFFFFFFFF
|
||||
#warn("BASEX: %s " % base)
|
||||
#warn("SIZEX: %s " % size)
|
||||
error = lldb.SBError()
|
||||
contents = self.process.ReadMemory(base, size, error)
|
||||
return binascii.hexlify(contents)
|
||||
|
||||
@@ -1010,18 +1020,26 @@ class Dumper:
|
||||
if state != self.eventState:
|
||||
self.report('state="%s"' % stateNames[state])
|
||||
self.eventState = state
|
||||
#if state == lldb.eStateExited:
|
||||
# warn("PROCESS EXITED. %d: %s"
|
||||
# % (self.process.GetExitStatus(), self.process.GetExitDescription()))
|
||||
if state == lldb.eStateExited:
|
||||
if self.isShuttingDown_:
|
||||
self.report('state="inferiorshutdownok"')
|
||||
else:
|
||||
self.report('state="inferiorexited"')
|
||||
self.report('exited={status="%s",desc="%s"}'
|
||||
% (self.process.GetExitStatus(), self.process.GetExitDescription()))
|
||||
if type == lldb.SBProcess.eBroadcastBitStateChanged:
|
||||
#if state == lldb.eStateStopped:
|
||||
self.reportData()
|
||||
elif type == lldb.SBProcess.eBroadcastBitInterrupt:
|
||||
pass
|
||||
elif type == lldb.SBProcess.eBroadcastBitSTDOUT:
|
||||
pass
|
||||
# FIXME: Size?
|
||||
msg = self.process.GetSTDOUT(1024)
|
||||
self.report('output={channel="stdout",data="%s"}'
|
||||
% binascii.hexlify(msg))
|
||||
elif type == lldb.SBProcess.eBroadcastBitSTDERR:
|
||||
pass
|
||||
msg = self.process.GetSTDERR(1024)
|
||||
self.report('output={channel="stdout",data="%s"}'
|
||||
% binascii.hexlify(msg))
|
||||
elif type == lldb.SBProcess.eBroadcastBitProfileData:
|
||||
pass
|
||||
|
||||
@@ -1127,7 +1145,8 @@ class Dumper:
|
||||
|
||||
def listModules(self, args):
|
||||
result = 'modules=['
|
||||
for module in self.target.modules:
|
||||
for i in xrange(self.target.GetNumModules()):
|
||||
module = self.target.GetModuleAtIndex(i)
|
||||
result += '{file="%s"' % module.file.fullpath
|
||||
result += ',name="%s"' % module.file.basename
|
||||
result += ',addrsize="%s"' % module.addr_size
|
||||
@@ -1146,7 +1165,8 @@ class Dumper:
|
||||
moduleName = args['module']
|
||||
#file = lldb.SBFileSpec(moduleName)
|
||||
#module = self.target.FindModule(file)
|
||||
for module in self.target.modules:
|
||||
for i in xrange(self.target.GetNumModules()):
|
||||
module = self.target.GetModuleAtIndex(i)
|
||||
if module.file.fullpath == moduleName:
|
||||
break
|
||||
result = 'symbols={module="%s"' % moduleName
|
||||
@@ -1174,8 +1194,13 @@ class Dumper:
|
||||
def executeStep(self, _ = None):
|
||||
self.currentThread().StepInto()
|
||||
|
||||
def shutdownInferior(self, _ = None):
|
||||
self.isShuttingDown_ = True
|
||||
self.process.Kill()
|
||||
|
||||
def quit(self, _ = None):
|
||||
self.debugger.Terminate()
|
||||
self.report('state="engineshutdownok"')
|
||||
self.process.Kill()
|
||||
|
||||
def executeStepI(self, _ = None):
|
||||
self.currentThread().StepInstruction(lldb.eOnlyThisThread)
|
||||
@@ -1202,8 +1227,9 @@ class Dumper:
|
||||
self.currentThread().SetSelectedFrame(args['index'])
|
||||
self.reportData()
|
||||
|
||||
def selectThread(self, thread):
|
||||
self.handleCommand("thread select " + thread)
|
||||
def selectThread(self, args):
|
||||
self.process.SetSelectedThreadByID(args['id'])
|
||||
self.reportData()
|
||||
|
||||
def requestModuleSymbols(self, frame):
|
||||
self.handleCommand("target module list " + frame)
|
||||
@@ -1213,12 +1239,8 @@ class Dumper:
|
||||
command = args['command']
|
||||
self.debugger.GetCommandInterpreter().HandleCommand(command, result)
|
||||
success = result.Succeeded()
|
||||
if success:
|
||||
output = result.GetOutput()
|
||||
error = ''
|
||||
else:
|
||||
output = ''
|
||||
error = str(result.GetError())
|
||||
output = result.GetOutput()
|
||||
error = str(result.GetError())
|
||||
self.report('success="%d",output="%s",error="%s"' % (success, output, error))
|
||||
|
||||
def setOptions(self, args):
|
||||
@@ -1226,6 +1248,10 @@ class Dumper:
|
||||
|
||||
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']
|
||||
self.reportData()
|
||||
|
||||
def disassemble(self, args):
|
||||
@@ -1279,19 +1305,42 @@ class Dumper:
|
||||
def execute(self, args):
|
||||
getattr(self, args['cmd'])(args)
|
||||
self.report('token="%s"' % args['token'])
|
||||
try:
|
||||
if 'continuation' in args:
|
||||
cont = args['continuation']
|
||||
self.report('continuation="%s"' % cont)
|
||||
except:
|
||||
pass
|
||||
|
||||
def consumeEvents(self):
|
||||
event = lldb.SBEvent()
|
||||
if self.listener and self.listener.PeekAtNextEvent(event):
|
||||
self.listener.GetNextEvent(event)
|
||||
self.handleEvent(event)
|
||||
|
||||
|
||||
currentDir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
|
||||
execfile(os.path.join(currentDir, "qttypes.py"))
|
||||
|
||||
|
||||
def doit():
|
||||
def doit1():
|
||||
|
||||
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:
|
||||
@@ -1304,9 +1353,9 @@ def doit():
|
||||
db.execute(eval(line[3:]))
|
||||
|
||||
|
||||
|
||||
def testit():
|
||||
db = Dumper()
|
||||
db.useLoop = False
|
||||
|
||||
error = lldb.SBError()
|
||||
db.target = db.debugger.CreateTarget(sys.argv[2], None, None, True, error)
|
||||
@@ -1344,4 +1393,4 @@ def testit():
|
||||
if len(sys.argv) > 2:
|
||||
testit()
|
||||
else:
|
||||
doit()
|
||||
doit2()
|
||||
|
||||
@@ -83,10 +83,9 @@ void AndroidDeployStep::ctor()
|
||||
setDefaultDisplayName(tr("Deploy to Android device"));
|
||||
m_deployAction = NoDeploy;
|
||||
|
||||
m_useLocalQtLibs = false;
|
||||
if (QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(target()->kit()))
|
||||
if (qt->qtVersion() >= QtSupport::QtVersionNumber(5, 0, 0))
|
||||
m_useLocalQtLibs = true;
|
||||
m_deployAction = BundleLibraries;
|
||||
}
|
||||
|
||||
bool AndroidDeployStep::init()
|
||||
@@ -118,7 +117,6 @@ bool AndroidDeployStep::init()
|
||||
m_apkPathDebug = AndroidManager::apkPath(target(), AndroidManager::DebugBuild).toString();
|
||||
m_apkPathRelease = AndroidManager::apkPath(target(), AndroidManager::ReleaseBuildSigned).toString();
|
||||
m_buildDirectory = static_cast<Qt4Project *>(target()->project())->rootQt4ProjectNode()->buildDir();
|
||||
m_runQASIPackagePath = m_QASIPackagePath;
|
||||
m_runDeployAction = m_deployAction;
|
||||
ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit());
|
||||
if (!tc || tc->type() != QLatin1String(Constants::ANDROID_TOOLCHAIN_TYPE)) {
|
||||
@@ -148,15 +146,15 @@ AndroidDeployStep::AndroidDeployAction AndroidDeployStep::deployAction()
|
||||
return m_deployAction;
|
||||
}
|
||||
|
||||
bool AndroidDeployStep::useLocalQtLibs()
|
||||
{
|
||||
return m_useLocalQtLibs;
|
||||
}
|
||||
|
||||
bool AndroidDeployStep::fromMap(const QVariantMap &map)
|
||||
{
|
||||
m_useLocalQtLibs = map.value(QLatin1String(USE_LOCAL_QT_KEY), false).toBool();
|
||||
m_deployAction = AndroidDeployAction(map.value(QLatin1String(DEPLOY_ACTION_KEY), NoDeploy).toInt());
|
||||
QVariant useLocalQt = map.value(QLatin1String(USE_LOCAL_QT_KEY));
|
||||
if (useLocalQt.isValid()) { // old settings
|
||||
if (useLocalQt.toBool() && m_deployAction == NoDeploy)
|
||||
m_deployAction = BundleLibraries;
|
||||
}
|
||||
|
||||
if (m_deployAction == InstallQASI)
|
||||
m_deployAction = NoDeploy;
|
||||
return ProjectExplorer::BuildStep::fromMap(map);
|
||||
@@ -165,7 +163,6 @@ bool AndroidDeployStep::fromMap(const QVariantMap &map)
|
||||
QVariantMap AndroidDeployStep::toMap() const
|
||||
{
|
||||
QVariantMap map = ProjectExplorer::BuildStep::toMap();
|
||||
map.insert(QLatin1String(USE_LOCAL_QT_KEY), m_useLocalQtLibs);
|
||||
map.insert(QLatin1String(DEPLOY_ACTION_KEY), m_deployAction);
|
||||
return map;
|
||||
}
|
||||
@@ -184,7 +181,7 @@ void AndroidDeployStep::cleanLibsOnDevice()
|
||||
QProcess *process = new QProcess(this);
|
||||
QStringList arguments = AndroidDeviceInfo::adbSelector(deviceSerialNumber);
|
||||
arguments << QLatin1String("shell") << QLatin1String("rm") << QLatin1String("-r") << QLatin1String("/data/local/tmp/qt");
|
||||
connect(process, SIGNAL(finished(int)), this, SLOT(cleanLibsFinished()));
|
||||
connect(process, SIGNAL(finished(int)), this, SLOT(processFinished()));
|
||||
const QString adb = AndroidConfigurations::instance().adbToolPath().toString();
|
||||
Core::MessageManager::instance()->printToOutputPane(adb + QLatin1String(" ")
|
||||
+ arguments.join(QLatin1String(" ")),
|
||||
@@ -194,7 +191,7 @@ void AndroidDeployStep::cleanLibsOnDevice()
|
||||
delete process;
|
||||
}
|
||||
|
||||
void AndroidDeployStep::cleanLibsFinished()
|
||||
void AndroidDeployStep::processFinished()
|
||||
{
|
||||
QProcess *process = qobject_cast<QProcess *>(sender());
|
||||
QTC_ASSERT(process, return);
|
||||
@@ -204,6 +201,31 @@ void AndroidDeployStep::cleanLibsFinished()
|
||||
process->deleteLater();
|
||||
}
|
||||
|
||||
void AndroidDeployStep::installQASIPackage(const QString &packagePath)
|
||||
{
|
||||
const QString targetArch = AndroidManager::targetArch(target());
|
||||
const QString targetSDK = AndroidManager::targetSDK(target());
|
||||
int deviceAPILevel = targetSDK.mid(targetSDK.indexOf(QLatin1Char('-')) + 1).toInt();
|
||||
QString deviceSerialNumber = AndroidConfigurations::instance().getDeployDeviceSerialNumber(&deviceAPILevel, targetArch);
|
||||
if (!deviceSerialNumber.length()) {
|
||||
Core::MessageManager::instance()->printToOutputPane(tr("Could not run adb. No device found."), Core::MessageManager::NoModeSwitch);
|
||||
return;
|
||||
}
|
||||
|
||||
QProcess *process = new QProcess(this);
|
||||
QStringList arguments = AndroidDeviceInfo::adbSelector(deviceSerialNumber);
|
||||
arguments << QLatin1String("install") << QLatin1String("-r ") << packagePath;
|
||||
|
||||
connect(process, SIGNAL(finished(int)), this, SLOT(processFinished()));
|
||||
const QString adb = AndroidConfigurations::instance().adbToolPath().toString();
|
||||
Core::MessageManager::instance()->printToOutputPane(adb + QLatin1String(" ")
|
||||
+ arguments.join(QLatin1String(" ")),
|
||||
Core::MessageManager::NoModeSwitch);
|
||||
process->start(adb, arguments);
|
||||
if (!process->waitForFinished(500))
|
||||
delete process;
|
||||
}
|
||||
|
||||
void AndroidDeployStep::setDeployAction(AndroidDeployStep::AndroidDeployAction deploy)
|
||||
{
|
||||
m_deployAction = deploy;
|
||||
@@ -211,18 +233,6 @@ void AndroidDeployStep::setDeployAction(AndroidDeployStep::AndroidDeployAction d
|
||||
AndroidManager::updateDeploymentSettings(target());
|
||||
}
|
||||
|
||||
void AndroidDeployStep::setDeployQASIPackagePath(const QString &package)
|
||||
{
|
||||
m_QASIPackagePath = package;
|
||||
setDeployAction(InstallQASI);
|
||||
}
|
||||
|
||||
void AndroidDeployStep::setUseLocalQtLibs(bool useLocal)
|
||||
{
|
||||
m_useLocalQtLibs = useLocal;
|
||||
AndroidManager::updateDeploymentSettings(target());
|
||||
}
|
||||
|
||||
bool AndroidDeployStep::runCommand(QProcess *buildProc,
|
||||
const QString &program, const QStringList &arguments)
|
||||
{
|
||||
@@ -453,17 +463,6 @@ bool AndroidDeployStep::deployPackage()
|
||||
AndroidPackageCreationStep::removeDirectory(tempPath);
|
||||
}
|
||||
|
||||
if (m_runDeployAction == InstallQASI) {
|
||||
if (!runCommand(deployProc, AndroidConfigurations::instance().adbToolPath().toString(),
|
||||
AndroidDeviceInfo::adbSelector(m_deviceSerialNumber)
|
||||
<< QLatin1String("install") << QLatin1String("-r ") << m_runQASIPackagePath)) {
|
||||
raiseError(tr("Qt Android smart installer installation failed"));
|
||||
disconnect(deployProc, 0, this, 0);
|
||||
deployProc->deleteLater();
|
||||
return false;
|
||||
}
|
||||
emit resetDelopyAction();
|
||||
}
|
||||
deployProc->setWorkingDirectory(m_androidDirPath.toString());
|
||||
|
||||
writeOutput(tr("Installing package onto %1.").arg(m_deviceSerialNumber));
|
||||
|
||||
@@ -75,9 +75,10 @@ class AndroidDeployStep : public ProjectExplorer::BuildStep
|
||||
public:
|
||||
enum AndroidDeployAction
|
||||
{
|
||||
NoDeploy,
|
||||
NoDeploy, // use ministro
|
||||
DeployLocal,
|
||||
InstallQASI
|
||||
InstallQASI, // unused old value
|
||||
BundleLibraries
|
||||
};
|
||||
|
||||
public:
|
||||
@@ -89,28 +90,25 @@ public:
|
||||
int deviceAPILevel();
|
||||
|
||||
AndroidDeployAction deployAction();
|
||||
bool useLocalQtLibs();
|
||||
|
||||
bool fromMap(const QVariantMap &map);
|
||||
QVariantMap toMap() const;
|
||||
|
||||
void cleanLibsOnDevice();
|
||||
void installQASIPackage(const QString &packagePath);
|
||||
|
||||
public slots:
|
||||
void setDeployAction(AndroidDeployAction deploy);
|
||||
void setDeployQASIPackagePath(const QString &package);
|
||||
void setUseLocalQtLibs(bool useLocal);
|
||||
|
||||
signals:
|
||||
void done();
|
||||
void error();
|
||||
void resetDelopyAction();
|
||||
|
||||
private slots:
|
||||
bool deployPackage();
|
||||
void handleBuildOutput();
|
||||
void handleBuildError();
|
||||
void cleanLibsFinished();
|
||||
void processFinished();
|
||||
|
||||
private:
|
||||
AndroidDeployStep(ProjectExplorer::BuildStepList *bc,
|
||||
@@ -140,7 +138,6 @@ private:
|
||||
|
||||
QString m_QASIPackagePath;
|
||||
AndroidDeployAction m_deployAction;
|
||||
bool m_useLocalQtLibs;
|
||||
|
||||
// members to transfer data from init() to run
|
||||
QString m_packageName;
|
||||
|
||||
@@ -47,21 +47,26 @@ AndroidDeployStepWidget::AndroidDeployStepWidget(AndroidDeployStep *step) :
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->useLocalQtLibs->setChecked(m_step->useLocalQtLibs());
|
||||
switch (m_step->deployAction()) {
|
||||
case AndroidDeployStep::NoDeploy:
|
||||
ui->ministroOption->setChecked(true);
|
||||
break;
|
||||
case AndroidDeployStep::DeployLocal:
|
||||
ui->deployQtLibs->setChecked(true);
|
||||
ui->temporaryQtOption->setChecked(true);
|
||||
break;
|
||||
case AndroidDeployStep::BundleLibraries:
|
||||
ui->bundleQtOption->setChecked(true);
|
||||
break;
|
||||
default:
|
||||
ui->devicesQtLibs->setChecked(true);
|
||||
ui->ministroOption->setChecked(true);
|
||||
break;
|
||||
}
|
||||
|
||||
connect(m_step, SIGNAL(resetDelopyAction()), SLOT(resetAction()));
|
||||
connect(ui->devicesQtLibs, SIGNAL(clicked()), SLOT(resetAction()));
|
||||
connect(ui->deployQtLibs, SIGNAL(clicked()), SLOT(setDeployLocalQtLibs()));
|
||||
connect(ui->ministroOption, SIGNAL(clicked()), SLOT(setMinistro()));
|
||||
connect(ui->temporaryQtOption, SIGNAL(clicked()), SLOT(setDeployLocalQtLibs()));
|
||||
connect(ui->bundleQtOption, SIGNAL(clicked()), SLOT(setBundleQtLibs()));
|
||||
|
||||
connect(ui->chooseButton, SIGNAL(clicked()), SLOT(setQASIPackagePath()));
|
||||
connect(ui->useLocalQtLibs, SIGNAL(stateChanged(int)), SLOT(useLocalQtLibsStateChanged(int)));
|
||||
connect(ui->cleanLibsPushButton, SIGNAL(clicked()), SLOT(cleanLibsOnDevice()));
|
||||
}
|
||||
|
||||
@@ -80,9 +85,8 @@ QString AndroidDeployStepWidget::summaryText() const
|
||||
return displayName();
|
||||
}
|
||||
|
||||
void AndroidDeployStepWidget::resetAction()
|
||||
void AndroidDeployStepWidget::setMinistro()
|
||||
{
|
||||
ui->devicesQtLibs->setChecked(true);
|
||||
m_step->setDeployAction(AndroidDeployStep::NoDeploy);
|
||||
}
|
||||
|
||||
@@ -91,19 +95,20 @@ void AndroidDeployStepWidget::setDeployLocalQtLibs()
|
||||
m_step->setDeployAction(AndroidDeployStep::DeployLocal);
|
||||
}
|
||||
|
||||
void AndroidDeployStepWidget::setBundleQtLibs()
|
||||
{
|
||||
m_step->setDeployAction(AndroidDeployStep::BundleLibraries);
|
||||
}
|
||||
|
||||
void AndroidDeployStepWidget::setQASIPackagePath()
|
||||
{
|
||||
QString packagePath =
|
||||
QFileDialog::getOpenFileName(this, tr("Qt Android Smart Installer"),
|
||||
QDir::homePath(), tr("Android package (*.apk)"));
|
||||
if (packagePath.length())
|
||||
m_step->setDeployQASIPackagePath(packagePath);
|
||||
if (!packagePath.isEmpty())
|
||||
m_step->installQASIPackage(packagePath);
|
||||
}
|
||||
|
||||
void AndroidDeployStepWidget::useLocalQtLibsStateChanged(int state)
|
||||
{
|
||||
m_step->setUseLocalQtLibs(state == Qt::Checked);
|
||||
}
|
||||
|
||||
void AndroidDeployStepWidget::cleanLibsOnDevice()
|
||||
{
|
||||
|
||||
@@ -49,10 +49,11 @@ public:
|
||||
~AndroidDeployStepWidget();
|
||||
|
||||
private slots:
|
||||
void resetAction();
|
||||
void setMinistro();
|
||||
void setDeployLocalQtLibs();
|
||||
void setBundleQtLibs();
|
||||
|
||||
void setQASIPackagePath();
|
||||
void useLocalQtLibsStateChanged(int);
|
||||
void cleanLibsOnDevice();
|
||||
|
||||
private:
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>560</width>
|
||||
<height>145</height>
|
||||
<width>678</width>
|
||||
<height>155</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@@ -19,138 +19,88 @@
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QRadioButton" name="devicesQtLibs">
|
||||
<property name="toolTip">
|
||||
<string>Use Qt libraries from device</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use Qt libraries from device</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Qt Deployment</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="ministroOption">
|
||||
<property name="toolTip">
|
||||
<string>Use the external Ministro application to download and maintain Qt libraries.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use Ministro service to install Qt</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="temporaryQtOption">
|
||||
<property name="toolTip">
|
||||
<string>Push local Qt libraries to device. You must have Qt libraries compiled for that platform.
|
||||
The APK will not be usable on any other device.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Deploy local Qt libraries to temporary directory</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="bundleQtOption">
|
||||
<property name="toolTip">
|
||||
<string>Creates a standalone APK.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Bundle Qt libraries in APK</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="deployQtLibs">
|
||||
<property name="toolTip">
|
||||
<string>Push local Qt libraries to device.
|
||||
You must have Qt libraries compiled for that platform</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Deploy local Qt libraries</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="useLocalQtLibs">
|
||||
<property name="toolTip">
|
||||
<string>Check this option to force the application to use local Qt libraries instead of system libraries.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Use local Qt libraries</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cleanLibsPushButton">
|
||||
<property name="text">
|
||||
<string>Clean Libs on Device</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="installQASI">
|
||||
<property name="toolTip">
|
||||
<string>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).</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Install Ministro, system-wide Qt shared libraries installer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="chooseButton">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Choose APK</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>Advanced Actions</string>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>41</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="cleanLibsPushButton">
|
||||
<property name="text">
|
||||
<string>Clean Temporary Libraries Directory on Device</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="chooseButton">
|
||||
<property name="text">
|
||||
<string>Install Ministro from APK</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>installQASI</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>chooseButton</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>119</x>
|
||||
<y>68</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>272</x>
|
||||
<y>64</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>deployQtLibs</sender>
|
||||
<signal>clicked(bool)</signal>
|
||||
<receiver>useLocalQtLibs</receiver>
|
||||
<slot>setChecked(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>138</x>
|
||||
<y>43</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>343</x>
|
||||
<y>44</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
@@ -319,8 +319,7 @@ bool AndroidManager::bundleQt(ProjectExplorer::Target *target)
|
||||
AndroidRunConfiguration *androidRunConfiguration = qobject_cast<AndroidRunConfiguration *>(runConfiguration);
|
||||
if (androidRunConfiguration != 0) {
|
||||
AndroidDeployStep *deployStep = androidRunConfiguration->deployStep();
|
||||
return deployStep->deployAction() == AndroidDeployStep::NoDeploy
|
||||
&& deployStep->useLocalQtLibs();
|
||||
return deployStep->deployAction() == AndroidDeployStep::BundleLibraries;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -340,9 +339,10 @@ bool AndroidManager::updateDeploymentSettings(ProjectExplorer::Target *target)
|
||||
return false;
|
||||
|
||||
AndroidDeployStep *deployStep = androidRunConfiguration->deployStep();
|
||||
bool useLocalLibs = deployStep->useLocalQtLibs();
|
||||
bool deployQtLibs = deployStep->deployAction() != AndroidDeployStep::NoDeploy;
|
||||
bool bundleQtLibs = useLocalLibs && !deployQtLibs;
|
||||
AndroidDeployStep::AndroidDeployAction deployAction = deployStep->deployAction();
|
||||
bool useLocalLibs = deployAction == AndroidDeployStep::DeployLocal
|
||||
|| deployAction == AndroidDeployStep::BundleLibraries;
|
||||
bool bundleQtLibs = deployAction == AndroidDeployStep::BundleLibraries;
|
||||
|
||||
QDomDocument doc;
|
||||
if (!openManifest(target, doc))
|
||||
|
||||
@@ -338,7 +338,7 @@ void AndroidPackageCreationStep::checkRequiredLibrariesForRun()
|
||||
QMetaObject::invokeMethod(this, "setQtLibs",Qt::BlockingQueuedConnection,
|
||||
Q_ARG(QStringList, m_qtLibsWithDependencies));
|
||||
|
||||
QMetaObject::invokeMethod(this, "getBundleInformation");
|
||||
QMetaObject::invokeMethod(this, "getBundleInformation", Qt::BlockingQueuedConnection);
|
||||
|
||||
emit updateRequiredLibrariesModels();
|
||||
}
|
||||
|
||||
@@ -234,7 +234,8 @@ void AndroidPackageCreationWidget::setQtLibs(QModelIndex, QModelIndex)
|
||||
{
|
||||
AndroidManager::setQtLibs(m_step->target(), m_qtLibsModel->checkedItems());
|
||||
AndroidDeployStep * const deployStep = AndroidGlobal::buildStep<AndroidDeployStep>(m_step->target()->activeDeployConfiguration());
|
||||
if (deployStep->useLocalQtLibs())
|
||||
if (deployStep->deployAction() == AndroidDeployStep::DeployLocal
|
||||
|| deployStep->deployAction() == AndroidDeployStep::BundleLibraries)
|
||||
AndroidManager::updateDeploymentSettings(m_step->target());
|
||||
}
|
||||
|
||||
@@ -242,7 +243,8 @@ void AndroidPackageCreationWidget::setPrebundledLibs(QModelIndex, QModelIndex)
|
||||
{
|
||||
AndroidManager::setPrebundledLibs(m_step->target(), m_prebundledLibs->checkedItems());
|
||||
AndroidDeployStep * const deployStep = AndroidGlobal::buildStep<AndroidDeployStep>(m_step->target()->activeDeployConfiguration());
|
||||
if (deployStep->useLocalQtLibs())
|
||||
if (deployStep->deployAction() == AndroidDeployStep::DeployLocal
|
||||
|| deployStep->deployAction() == AndroidDeployStep::BundleLibraries)
|
||||
AndroidManager::updateDeploymentSettings(m_step->target());
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,9 @@ AndroidRunner::AndroidRunner(QObject *parent,
|
||||
}
|
||||
ProjectExplorer::Target *target = runConfig->target();
|
||||
AndroidDeployStep *ds = runConfig->deployStep();
|
||||
if ((m_useLocalQtLibs = ds->useLocalQtLibs())) {
|
||||
m_useLocalQtLibs = ds->deployAction() == AndroidDeployStep::DeployLocal
|
||||
|| ds->deployAction() == AndroidDeployStep::BundleLibraries;
|
||||
if (m_useLocalQtLibs) {
|
||||
m_localLibs = AndroidManager::loadLocalLibs(target, ds->deviceAPILevel());
|
||||
m_localJars = AndroidManager::loadLocalJars(target, ds->deviceAPILevel());
|
||||
m_localJarsInitClasses = AndroidManager::loadLocalJarsInitClasses(target, ds->deviceAPILevel());
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
|
||||
#include <texteditor/fontsettings.h>
|
||||
#include <texteditor/texteditorconstants.h>
|
||||
#include <texteditor/texteditorsettings.h>
|
||||
#include <coreplugin/editormanager/ieditor.h>
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/qtcassert.h>
|
||||
@@ -85,7 +86,7 @@ static QByteArray calculateHexPattern(const QByteArray &pattern)
|
||||
|
||||
namespace BINEditor {
|
||||
|
||||
BinEditor::BinEditor(QWidget *parent)
|
||||
BinEditorWidget::BinEditorWidget(QWidget *parent)
|
||||
: QAbstractScrollArea(parent)
|
||||
{
|
||||
m_bytesPerLine = 16;
|
||||
@@ -106,13 +107,20 @@ BinEditor::BinEditor(QWidget *parent)
|
||||
m_canRequestNewWindow = false;
|
||||
setFocusPolicy(Qt::WheelFocus);
|
||||
setFrameStyle(QFrame::Plain);
|
||||
|
||||
// Font settings
|
||||
TextEditor::TextEditorSettings *settings = TextEditor::TextEditorSettings::instance();
|
||||
setFontSettings(settings->fontSettings());
|
||||
connect(settings, SIGNAL(fontSettingsChanged(TextEditor::FontSettings)),
|
||||
this, SLOT(setFontSettings(TextEditor::FontSettings)));
|
||||
|
||||
}
|
||||
|
||||
BinEditor::~BinEditor()
|
||||
BinEditorWidget::~BinEditorWidget()
|
||||
{
|
||||
}
|
||||
|
||||
void BinEditor::init()
|
||||
void BinEditorWidget::init()
|
||||
{
|
||||
const int addressStringWidth =
|
||||
2*m_addressBytes + (m_addressBytes - 1) / 2;
|
||||
@@ -162,7 +170,7 @@ void BinEditor::init()
|
||||
}
|
||||
|
||||
|
||||
void BinEditor::addData(quint64 block, const QByteArray &data)
|
||||
void BinEditorWidget::addData(quint64 block, const QByteArray &data)
|
||||
{
|
||||
QTC_ASSERT(data.size() == m_blockSize, return);
|
||||
const quint64 addr = block * m_blockSize;
|
||||
@@ -176,7 +184,7 @@ void BinEditor::addData(quint64 block, const QByteArray &data)
|
||||
}
|
||||
}
|
||||
|
||||
bool BinEditor::requestDataAt(int pos) const
|
||||
bool BinEditorWidget::requestDataAt(int pos) const
|
||||
{
|
||||
int block = pos / m_blockSize;
|
||||
BlockMap::const_iterator it = m_modifiedData.find(block);
|
||||
@@ -187,27 +195,27 @@ bool BinEditor::requestDataAt(int pos) const
|
||||
return true;
|
||||
if (!m_requests.contains(block)) {
|
||||
m_requests.insert(block);
|
||||
emit const_cast<BinEditor*>(this)->
|
||||
dataRequested(editor(), m_baseAddr / m_blockSize + block);
|
||||
emit const_cast<BinEditorWidget*>(this)->
|
||||
dataRequested(m_baseAddr / m_blockSize + block);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool BinEditor::requestOldDataAt(int pos) const
|
||||
bool BinEditorWidget::requestOldDataAt(int pos) const
|
||||
{
|
||||
int block = pos / m_blockSize;
|
||||
BlockMap::const_iterator it = m_oldData.find(block);
|
||||
return it != m_oldData.end();
|
||||
}
|
||||
|
||||
char BinEditor::dataAt(int pos, bool old) const
|
||||
char BinEditorWidget::dataAt(int pos, bool old) const
|
||||
{
|
||||
int block = pos / m_blockSize;
|
||||
return blockData(block, old).at(pos - block*m_blockSize);
|
||||
}
|
||||
|
||||
void BinEditor::changeDataAt(int pos, char c)
|
||||
void BinEditorWidget::changeDataAt(int pos, char c)
|
||||
{
|
||||
int block = pos / m_blockSize;
|
||||
BlockMap::iterator it = m_modifiedData.find(block);
|
||||
@@ -222,10 +230,10 @@ void BinEditor::changeDataAt(int pos, char c)
|
||||
}
|
||||
}
|
||||
|
||||
emit dataChanged(editor(), m_baseAddr + pos, QByteArray(1, c));
|
||||
emit dataChanged(m_baseAddr + pos, QByteArray(1, c));
|
||||
}
|
||||
|
||||
QByteArray BinEditor::dataMid(int from, int length, bool old) const
|
||||
QByteArray BinEditorWidget::dataMid(int from, int length, bool old) const
|
||||
{
|
||||
int end = from + length;
|
||||
int block = from / m_blockSize;
|
||||
@@ -239,7 +247,7 @@ QByteArray BinEditor::dataMid(int from, int length, bool old) const
|
||||
return data.mid(from - ((from / m_blockSize) * m_blockSize), length);
|
||||
}
|
||||
|
||||
QByteArray BinEditor::blockData(int block, bool old) const
|
||||
QByteArray BinEditorWidget::blockData(int block, bool old) const
|
||||
{
|
||||
if (old) {
|
||||
BlockMap::const_iterator it = m_modifiedData.find(block);
|
||||
@@ -251,12 +259,12 @@ QByteArray BinEditor::blockData(int block, bool old) const
|
||||
? it.value() : m_data.value(block, m_emptyBlock);
|
||||
}
|
||||
|
||||
void BinEditor::setFontSettings(const TextEditor::FontSettings &fs)
|
||||
void BinEditorWidget::setFontSettings(const TextEditor::FontSettings &fs)
|
||||
{
|
||||
setFont(fs.toTextCharFormat(TextEditor::C_TEXT).font());
|
||||
}
|
||||
|
||||
void BinEditor::setBlinkingCursorEnabled(bool enable)
|
||||
void BinEditorWidget::setBlinkingCursorEnabled(bool enable)
|
||||
{
|
||||
if (enable && QApplication::cursorFlashTime() > 0)
|
||||
m_cursorBlinkTimer.start(QApplication::cursorFlashTime() / 2, this);
|
||||
@@ -266,17 +274,17 @@ void BinEditor::setBlinkingCursorEnabled(bool enable)
|
||||
updateLines();
|
||||
}
|
||||
|
||||
void BinEditor::focusInEvent(QFocusEvent *)
|
||||
void BinEditorWidget::focusInEvent(QFocusEvent *)
|
||||
{
|
||||
setBlinkingCursorEnabled(true);
|
||||
}
|
||||
|
||||
void BinEditor::focusOutEvent(QFocusEvent *)
|
||||
void BinEditorWidget::focusOutEvent(QFocusEvent *)
|
||||
{
|
||||
setBlinkingCursorEnabled(false);
|
||||
}
|
||||
|
||||
void BinEditor::timerEvent(QTimerEvent *e)
|
||||
void BinEditorWidget::timerEvent(QTimerEvent *e)
|
||||
{
|
||||
if (e->timerId() == m_autoScrollTimer.timerId()) {
|
||||
QRect visible = viewport()->rect();
|
||||
@@ -314,7 +322,7 @@ void BinEditor::timerEvent(QTimerEvent *e)
|
||||
}
|
||||
|
||||
|
||||
void BinEditor::setModified(bool modified)
|
||||
void BinEditorWidget::setModified(bool modified)
|
||||
{
|
||||
int unmodifiedState = modified ? -1 : m_undoStack.size();
|
||||
if (unmodifiedState == m_unmodifiedState)
|
||||
@@ -323,22 +331,22 @@ void BinEditor::setModified(bool modified)
|
||||
emit modificationChanged(m_undoStack.size() != m_unmodifiedState);
|
||||
}
|
||||
|
||||
bool BinEditor::isModified() const
|
||||
bool BinEditorWidget::isModified() const
|
||||
{
|
||||
return (m_undoStack.size() != m_unmodifiedState);
|
||||
}
|
||||
|
||||
void BinEditor::setReadOnly(bool readOnly)
|
||||
void BinEditorWidget::setReadOnly(bool readOnly)
|
||||
{
|
||||
m_readOnly = readOnly;
|
||||
}
|
||||
|
||||
bool BinEditor::isReadOnly() const
|
||||
bool BinEditorWidget::isReadOnly() const
|
||||
{
|
||||
return m_readOnly;
|
||||
}
|
||||
|
||||
bool BinEditor::save(QString *errorString, const QString &oldFileName, const QString &newFileName)
|
||||
bool BinEditorWidget::save(QString *errorString, const QString &oldFileName, const QString &newFileName)
|
||||
{
|
||||
if (oldFileName != newFileName) {
|
||||
QString tmpName;
|
||||
@@ -381,7 +389,7 @@ bool BinEditor::save(QString *errorString, const QString &oldFileName, const QSt
|
||||
return true;
|
||||
}
|
||||
|
||||
void BinEditor::setSizes(quint64 startAddr, int range, int blockSize)
|
||||
void BinEditorWidget::setSizes(quint64 startAddr, int range, int blockSize)
|
||||
{
|
||||
int newBlockSize = blockSize;
|
||||
QTC_ASSERT((blockSize/m_bytesPerLine) * m_bytesPerLine == blockSize,
|
||||
@@ -423,23 +431,23 @@ void BinEditor::setSizes(quint64 startAddr, int range, int blockSize)
|
||||
viewport()->update();
|
||||
}
|
||||
|
||||
void BinEditor::resizeEvent(QResizeEvent *)
|
||||
void BinEditorWidget::resizeEvent(QResizeEvent *)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
||||
void BinEditor::scrollContentsBy(int dx, int dy)
|
||||
void BinEditorWidget::scrollContentsBy(int dx, int dy)
|
||||
{
|
||||
viewport()->scroll(isRightToLeft() ? -dx : dx, dy * m_lineHeight);
|
||||
const QScrollBar * const scrollBar = verticalScrollBar();
|
||||
const int scrollPos = scrollBar->value();
|
||||
if (dy <= 0 && scrollPos == scrollBar->maximum())
|
||||
emit newRangeRequested(editor(), baseAddress() + m_size);
|
||||
emit newRangeRequested(baseAddress() + m_size);
|
||||
else if (dy >= 0 && scrollPos == scrollBar->minimum())
|
||||
emit newRangeRequested(editor(), baseAddress());
|
||||
emit newRangeRequested(baseAddress());
|
||||
}
|
||||
|
||||
void BinEditor::changeEvent(QEvent *e)
|
||||
void BinEditorWidget::changeEvent(QEvent *e)
|
||||
{
|
||||
QAbstractScrollArea::changeEvent(e);
|
||||
if (e->type() == QEvent::ActivationChange) {
|
||||
@@ -451,7 +459,7 @@ void BinEditor::changeEvent(QEvent *e)
|
||||
}
|
||||
|
||||
|
||||
void BinEditor::wheelEvent(QWheelEvent *e)
|
||||
void BinEditorWidget::wheelEvent(QWheelEvent *e)
|
||||
{
|
||||
if (e->modifiers() & Qt::ControlModifier) {
|
||||
const int delta = e->delta();
|
||||
@@ -466,7 +474,7 @@ void BinEditor::wheelEvent(QWheelEvent *e)
|
||||
|
||||
|
||||
|
||||
QRect BinEditor::cursorRect() const
|
||||
QRect BinEditorWidget::cursorRect() const
|
||||
{
|
||||
int topLine = verticalScrollBar()->value();
|
||||
int line = m_cursorPosition / m_bytesPerLine;
|
||||
@@ -481,7 +489,7 @@ QRect BinEditor::cursorRect() const
|
||||
return QRect(x, y, w, m_lineHeight);
|
||||
}
|
||||
|
||||
int BinEditor::posAt(const QPoint &pos) const
|
||||
int BinEditorWidget::posAt(const QPoint &pos) const
|
||||
{
|
||||
int xoffset = horizontalScrollBar()->value();
|
||||
int x = xoffset + pos.x() - m_margin - m_labelWidth;
|
||||
@@ -508,19 +516,19 @@ int BinEditor::posAt(const QPoint &pos) const
|
||||
return qMin(m_size, qMin(m_numLines, topLine + line) * m_bytesPerLine) + column;
|
||||
}
|
||||
|
||||
bool BinEditor::inTextArea(const QPoint &pos) const
|
||||
bool BinEditorWidget::inTextArea(const QPoint &pos) const
|
||||
{
|
||||
int xoffset = horizontalScrollBar()->value();
|
||||
int x = xoffset + pos.x() - m_margin - m_labelWidth;
|
||||
return (x > m_bytesPerLine * m_columnWidth + m_charWidth/2);
|
||||
}
|
||||
|
||||
void BinEditor::updateLines()
|
||||
void BinEditorWidget::updateLines()
|
||||
{
|
||||
updateLines(m_cursorPosition, m_cursorPosition);
|
||||
}
|
||||
|
||||
void BinEditor::updateLines(int fromPosition, int toPosition)
|
||||
void BinEditorWidget::updateLines(int fromPosition, int toPosition)
|
||||
{
|
||||
int topLine = verticalScrollBar()->value();
|
||||
int firstLine = qMin(fromPosition, toPosition) / m_bytesPerLine;
|
||||
@@ -531,7 +539,7 @@ void BinEditor::updateLines(int fromPosition, int toPosition)
|
||||
viewport()->update(0, y, viewport()->width(), h);
|
||||
}
|
||||
|
||||
int BinEditor::dataIndexOf(const QByteArray &pattern, int from, bool caseSensitive) const
|
||||
int BinEditorWidget::dataIndexOf(const QByteArray &pattern, int from, bool caseSensitive) const
|
||||
{
|
||||
int trailing = pattern.size();
|
||||
if (trailing > m_blockSize)
|
||||
@@ -564,7 +572,7 @@ int BinEditor::dataIndexOf(const QByteArray &pattern, int from, bool caseSensiti
|
||||
return end == m_size ? -1 : -2;
|
||||
}
|
||||
|
||||
int BinEditor::dataLastIndexOf(const QByteArray &pattern, int from, bool caseSensitive) const
|
||||
int BinEditorWidget::dataLastIndexOf(const QByteArray &pattern, int from, bool caseSensitive) const
|
||||
{
|
||||
int trailing = pattern.size();
|
||||
if (trailing > m_blockSize)
|
||||
@@ -596,7 +604,7 @@ int BinEditor::dataLastIndexOf(const QByteArray &pattern, int from, bool caseSen
|
||||
}
|
||||
|
||||
|
||||
int BinEditor::find(const QByteArray &pattern_arg, int from,
|
||||
int BinEditorWidget::find(const QByteArray &pattern_arg, int from,
|
||||
QTextDocument::FindFlags findFlags)
|
||||
{
|
||||
if (pattern_arg.isEmpty())
|
||||
@@ -633,7 +641,7 @@ int BinEditor::find(const QByteArray &pattern_arg, int from,
|
||||
return pos;
|
||||
}
|
||||
|
||||
int BinEditor::findPattern(const QByteArray &data, const QByteArray &dataHex,
|
||||
int BinEditorWidget::findPattern(const QByteArray &data, const QByteArray &dataHex,
|
||||
int from, int offset, int *match)
|
||||
{
|
||||
if (m_searchPattern.isEmpty())
|
||||
@@ -658,7 +666,7 @@ int BinEditor::findPattern(const QByteArray &data, const QByteArray &dataHex,
|
||||
}
|
||||
|
||||
|
||||
void BinEditor::drawItems(QPainter *painter, int x, int y, const QString &itemString)
|
||||
void BinEditorWidget::drawItems(QPainter *painter, int x, int y, const QString &itemString)
|
||||
{
|
||||
if (m_isMonospacedFont) {
|
||||
painter->drawText(x, y, itemString);
|
||||
@@ -668,7 +676,7 @@ void BinEditor::drawItems(QPainter *painter, int x, int y, const QString &itemSt
|
||||
}
|
||||
}
|
||||
|
||||
void BinEditor::drawChanges(QPainter *painter, int x, int y, const char *changes)
|
||||
void BinEditorWidget::drawChanges(QPainter *painter, int x, int y, const char *changes)
|
||||
{
|
||||
const QBrush red(QColor(250, 150, 150));
|
||||
for (int i = 0; i < m_bytesPerLine; ++i) {
|
||||
@@ -679,7 +687,7 @@ void BinEditor::drawChanges(QPainter *painter, int x, int y, const char *changes
|
||||
}
|
||||
}
|
||||
|
||||
QString BinEditor::addressString(quint64 address)
|
||||
QString BinEditorWidget::addressString(quint64 address)
|
||||
{
|
||||
QChar *addressStringData = m_addressString.data();
|
||||
const char *hex = "0123456789abcdef";
|
||||
@@ -698,7 +706,7 @@ QString BinEditor::addressString(quint64 address)
|
||||
return m_addressString;
|
||||
}
|
||||
|
||||
void BinEditor::paintEvent(QPaintEvent *e)
|
||||
void BinEditorWidget::paintEvent(QPaintEvent *e)
|
||||
{
|
||||
QPainter painter(viewport());
|
||||
const int topLine = verticalScrollBar()->value();
|
||||
@@ -930,12 +938,12 @@ void BinEditor::paintEvent(QPaintEvent *e)
|
||||
}
|
||||
|
||||
|
||||
int BinEditor::cursorPosition() const
|
||||
int BinEditorWidget::cursorPosition() const
|
||||
{
|
||||
return m_cursorPosition;
|
||||
}
|
||||
|
||||
void BinEditor::setCursorPosition(int pos, MoveMode moveMode)
|
||||
void BinEditorWidget::setCursorPosition(int pos, MoveMode moveMode)
|
||||
{
|
||||
pos = qMin(m_size-1, qMax(0, pos));
|
||||
int oldCursorPosition = m_cursorPosition;
|
||||
@@ -957,7 +965,7 @@ void BinEditor::setCursorPosition(int pos, MoveMode moveMode)
|
||||
}
|
||||
|
||||
|
||||
void BinEditor::ensureCursorVisible()
|
||||
void BinEditorWidget::ensureCursorVisible()
|
||||
{
|
||||
QRect cr = cursorRect();
|
||||
QRect vr = viewport()->rect();
|
||||
@@ -969,7 +977,7 @@ void BinEditor::ensureCursorVisible()
|
||||
}
|
||||
}
|
||||
|
||||
void BinEditor::mousePressEvent(QMouseEvent *e)
|
||||
void BinEditorWidget::mousePressEvent(QMouseEvent *e)
|
||||
{
|
||||
if (e->button() != Qt::LeftButton)
|
||||
return;
|
||||
@@ -982,7 +990,7 @@ void BinEditor::mousePressEvent(QMouseEvent *e)
|
||||
}
|
||||
}
|
||||
|
||||
void BinEditor::mouseMoveEvent(QMouseEvent *e)
|
||||
void BinEditorWidget::mouseMoveEvent(QMouseEvent *e)
|
||||
{
|
||||
if (!(e->buttons() & Qt::LeftButton))
|
||||
return;
|
||||
@@ -998,7 +1006,7 @@ void BinEditor::mouseMoveEvent(QMouseEvent *e)
|
||||
m_autoScrollTimer.start(100, this);
|
||||
}
|
||||
|
||||
void BinEditor::mouseReleaseEvent(QMouseEvent *)
|
||||
void BinEditorWidget::mouseReleaseEvent(QMouseEvent *)
|
||||
{
|
||||
if (m_autoScrollTimer.isActive()) {
|
||||
m_autoScrollTimer.stop();
|
||||
@@ -1006,13 +1014,13 @@ void BinEditor::mouseReleaseEvent(QMouseEvent *)
|
||||
}
|
||||
}
|
||||
|
||||
void BinEditor::selectAll()
|
||||
void BinEditorWidget::selectAll()
|
||||
{
|
||||
setCursorPosition(0);
|
||||
setCursorPosition(m_size-1, KeepAnchor);
|
||||
}
|
||||
|
||||
void BinEditor::clear()
|
||||
void BinEditorWidget::clear()
|
||||
{
|
||||
m_baseAddr = 0;
|
||||
m_data.clear();
|
||||
@@ -1034,7 +1042,7 @@ void BinEditor::clear()
|
||||
viewport()->update();
|
||||
}
|
||||
|
||||
bool BinEditor::event(QEvent *e)
|
||||
bool BinEditorWidget::event(QEvent *e)
|
||||
{
|
||||
switch (e->type()) {
|
||||
case QEvent::KeyPress:
|
||||
@@ -1050,7 +1058,7 @@ bool BinEditor::event(QEvent *e)
|
||||
const QScrollBar * const scrollBar = verticalScrollBar();
|
||||
const int maximum = scrollBar->maximum();
|
||||
if (maximum && scrollBar->value() >= maximum - 1) {
|
||||
emit newRangeRequested(editor(), baseAddress() + m_size);
|
||||
emit newRangeRequested(baseAddress() + m_size);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
@@ -1075,7 +1083,7 @@ bool BinEditor::event(QEvent *e)
|
||||
return QAbstractScrollArea::event(e);
|
||||
}
|
||||
|
||||
QString BinEditor::toolTip(const QHelpEvent *helpEvent) const
|
||||
QString BinEditorWidget::toolTip(const QHelpEvent *helpEvent) const
|
||||
{
|
||||
// Selection if mouse is in, else 1 byte at cursor
|
||||
int selStart = selectionStart();
|
||||
@@ -1257,7 +1265,7 @@ QString BinEditor::toolTip(const QHelpEvent *helpEvent) const
|
||||
return msg;
|
||||
}
|
||||
|
||||
void BinEditor::keyPressEvent(QKeyEvent *e)
|
||||
void BinEditorWidget::keyPressEvent(QKeyEvent *e)
|
||||
{
|
||||
|
||||
if (e == QKeySequence::SelectAll) {
|
||||
@@ -1356,7 +1364,7 @@ void BinEditor::keyPressEvent(QKeyEvent *e)
|
||||
e->accept();
|
||||
}
|
||||
|
||||
void BinEditor::zoomIn(int range)
|
||||
void BinEditorWidget::zoomIn(int range)
|
||||
{
|
||||
QFont f = font();
|
||||
const int newSize = f.pointSize() + range;
|
||||
@@ -1366,12 +1374,12 @@ void BinEditor::zoomIn(int range)
|
||||
setFont(f);
|
||||
}
|
||||
|
||||
void BinEditor::zoomOut(int range)
|
||||
void BinEditorWidget::zoomOut(int range)
|
||||
{
|
||||
zoomIn(-range);
|
||||
}
|
||||
|
||||
void BinEditor::copy(bool raw)
|
||||
void BinEditorWidget::copy(bool raw)
|
||||
{
|
||||
int selStart = selectionStart();
|
||||
int selEnd = selectionEnd();
|
||||
@@ -1400,7 +1408,7 @@ void BinEditor::copy(bool raw)
|
||||
QApplication::clipboard()->setText(hexString);
|
||||
}
|
||||
|
||||
void BinEditor::highlightSearchResults(const QByteArray &pattern, QTextDocument::FindFlags findFlags)
|
||||
void BinEditorWidget::highlightSearchResults(const QByteArray &pattern, QTextDocument::FindFlags findFlags)
|
||||
{
|
||||
if (m_searchPattern == pattern)
|
||||
return;
|
||||
@@ -1412,7 +1420,7 @@ void BinEditor::highlightSearchResults(const QByteArray &pattern, QTextDocument:
|
||||
viewport()->update();
|
||||
}
|
||||
|
||||
void BinEditor::changeData(int position, uchar character, bool highNibble)
|
||||
void BinEditorWidget::changeData(int position, uchar character, bool highNibble)
|
||||
{
|
||||
if (!requestDataAt(position))
|
||||
return;
|
||||
@@ -1444,7 +1452,7 @@ void BinEditor::changeData(int position, uchar character, bool highNibble)
|
||||
}
|
||||
|
||||
|
||||
void BinEditor::undo()
|
||||
void BinEditorWidget::undo()
|
||||
{
|
||||
if (m_undoStack.isEmpty())
|
||||
return;
|
||||
@@ -1464,7 +1472,7 @@ void BinEditor::undo()
|
||||
emit redoAvailable(true);
|
||||
}
|
||||
|
||||
void BinEditor::redo()
|
||||
void BinEditorWidget::redo()
|
||||
{
|
||||
if (m_redoStack.isEmpty())
|
||||
return;
|
||||
@@ -1483,7 +1491,7 @@ void BinEditor::redo()
|
||||
emit redoAvailable(false);
|
||||
}
|
||||
|
||||
void BinEditor::contextMenuEvent(QContextMenuEvent *event)
|
||||
void BinEditorWidget::contextMenuEvent(QContextMenuEvent *event)
|
||||
{
|
||||
const int selStart = selectionStart();
|
||||
const int byteCount = selectionEnd() - selStart + 1;
|
||||
@@ -1545,7 +1553,7 @@ void BinEditor::contextMenuEvent(QContextMenuEvent *event)
|
||||
delete contextMenu;
|
||||
}
|
||||
|
||||
void BinEditor::setupJumpToMenuAction(QMenu *menu, QAction *actionHere,
|
||||
void BinEditorWidget::setupJumpToMenuAction(QMenu *menu, QAction *actionHere,
|
||||
QAction *actionNew, quint64 addr)
|
||||
{
|
||||
actionHere->setText(tr("Jump to Address 0x%1 in This Window")
|
||||
@@ -1558,34 +1566,34 @@ void BinEditor::setupJumpToMenuAction(QMenu *menu, QAction *actionHere,
|
||||
actionNew->setEnabled(false);
|
||||
}
|
||||
|
||||
void BinEditor::jumpToAddress(quint64 address)
|
||||
void BinEditorWidget::jumpToAddress(quint64 address)
|
||||
{
|
||||
if (address >= m_baseAddr && address < m_baseAddr + m_size)
|
||||
setCursorPosition(address - m_baseAddr);
|
||||
else
|
||||
emit newRangeRequested(editor(), address);
|
||||
emit newRangeRequested(address);
|
||||
}
|
||||
|
||||
void BinEditor::setNewWindowRequestAllowed(bool c)
|
||||
void BinEditorWidget::setNewWindowRequestAllowed(bool c)
|
||||
{
|
||||
m_canRequestNewWindow = c;
|
||||
}
|
||||
|
||||
void BinEditor::updateContents()
|
||||
void BinEditorWidget::updateContents()
|
||||
{
|
||||
m_oldData = m_data;
|
||||
m_data.clear();
|
||||
setSizes(baseAddress() + cursorPosition(), m_size, m_blockSize);
|
||||
}
|
||||
|
||||
QPoint BinEditor::offsetToPos(int offset) const
|
||||
QPoint BinEditorWidget::offsetToPos(int offset) const
|
||||
{
|
||||
const int x = m_labelWidth + (offset % m_bytesPerLine) * m_columnWidth;
|
||||
const int y = (offset / m_bytesPerLine - verticalScrollBar()->value()) * m_lineHeight;
|
||||
return QPoint(x, y);
|
||||
}
|
||||
|
||||
void BinEditor::asFloat(int offset, float &value, bool old) const
|
||||
void BinEditorWidget::asFloat(int offset, float &value, bool old) const
|
||||
{
|
||||
value = 0;
|
||||
const QByteArray data = dataMid(offset, sizeof(float), old);
|
||||
@@ -1594,7 +1602,7 @@ void BinEditor::asFloat(int offset, float &value, bool old) const
|
||||
value = *f;
|
||||
}
|
||||
|
||||
void BinEditor::asDouble(int offset, double &value, bool old) const
|
||||
void BinEditorWidget::asDouble(int offset, double &value, bool old) const
|
||||
{
|
||||
value = 0;
|
||||
const QByteArray data = dataMid(offset, sizeof(double), old);
|
||||
@@ -1603,7 +1611,7 @@ void BinEditor::asDouble(int offset, double &value, bool old) const
|
||||
value = *f;
|
||||
}
|
||||
|
||||
void BinEditor::asIntegers(int offset, int count, quint64 &bigEndianValue,
|
||||
void BinEditorWidget::asIntegers(int offset, int count, quint64 &bigEndianValue,
|
||||
quint64 &littleEndianValue, bool old) const
|
||||
{
|
||||
bigEndianValue = littleEndianValue = 0;
|
||||
@@ -1615,12 +1623,12 @@ void BinEditor::asIntegers(int offset, int count, quint64 &bigEndianValue,
|
||||
}
|
||||
}
|
||||
|
||||
bool BinEditor::isMemoryView() const
|
||||
bool BinEditorWidget::isMemoryView() const
|
||||
{
|
||||
return editor()->property("MemoryView").toBool();
|
||||
}
|
||||
|
||||
void BinEditor::setMarkup(const QList<Markup> &markup)
|
||||
void BinEditorWidget::setMarkup(const QList<Markup> &markup)
|
||||
{
|
||||
m_markup = markup;
|
||||
viewport()->update();
|
||||
|
||||
@@ -55,16 +55,17 @@ class FontSettings;
|
||||
|
||||
namespace BINEditor {
|
||||
|
||||
class BinEditor : public QAbstractScrollArea
|
||||
class BinEditorWidget : public QAbstractScrollArea
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool modified READ isModified WRITE setModified DESIGNABLE false)
|
||||
Q_PROPERTY(bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE false)
|
||||
Q_PROPERTY(QList<BINEditor::Markup> markup READ markup WRITE setMarkup DESIGNABLE false)
|
||||
Q_PROPERTY(bool newWindowRequestAllowed READ newWindowRequestAllowed WRITE setNewWindowRequestAllowed DESIGNABLE false)
|
||||
|
||||
public:
|
||||
BinEditor(QWidget *parent = 0);
|
||||
~BinEditor();
|
||||
BinEditorWidget(QWidget *parent = 0);
|
||||
~BinEditorWidget();
|
||||
|
||||
quint64 baseAddress() const { return m_baseAddr; }
|
||||
|
||||
@@ -138,11 +139,11 @@ Q_SIGNALS:
|
||||
void redoAvailable(bool);
|
||||
void cursorPositionChanged(int position);
|
||||
|
||||
void dataRequested(Core::IEditor *editor, quint64 block);
|
||||
void dataRequested(quint64 block);
|
||||
void newWindowRequested(quint64 address);
|
||||
void newRangeRequested(Core::IEditor *, quint64 address);
|
||||
void newRangeRequested(quint64 address);
|
||||
void addWatchpointRequested(quint64 address, uint size);
|
||||
void dataChanged(Core::IEditor *, quint64 address, const QByteArray &data);
|
||||
void dataChanged(quint64 address, const QByteArray &data);
|
||||
|
||||
protected:
|
||||
void scrollContentsBy(int dx, int dy);
|
||||
|
||||
@@ -58,8 +58,6 @@
|
||||
#include <coreplugin/mimedatabase.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <find/ifindsupport.h>
|
||||
#include <texteditor/fontsettings.h>
|
||||
#include <texteditor/texteditorsettings.h>
|
||||
#include <utils/reloadpromptutils.h>
|
||||
#include <utils/qtcassert.h>
|
||||
|
||||
@@ -70,15 +68,18 @@ using namespace BINEditor::Internal;
|
||||
class BinEditorFind : public Find::IFindSupport
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
BinEditorFind(BinEditor *editor)
|
||||
BinEditorFind(BinEditorWidget *widget)
|
||||
{
|
||||
m_editor = editor;
|
||||
m_widget = widget;
|
||||
m_incrementalStartPos = m_contPos = -1;
|
||||
}
|
||||
~BinEditorFind() {}
|
||||
|
||||
bool supportsReplace() const { return false; }
|
||||
QString currentFindString() const { return QString(); }
|
||||
QString completedFindString() const { return QString(); }
|
||||
|
||||
Find::FindFlags supportedFindFlags() const
|
||||
{
|
||||
return Find::FindBackward | Find::FindCaseSensitively;
|
||||
@@ -91,21 +92,22 @@ public:
|
||||
|
||||
virtual void highlightAll(const QString &txt, Find::FindFlags findFlags)
|
||||
{
|
||||
m_editor->highlightSearchResults(txt.toLatin1(), Find::textDocumentFlagsForFindFlags(findFlags));
|
||||
m_widget->highlightSearchResults(txt.toLatin1(), Find::textDocumentFlagsForFindFlags(findFlags));
|
||||
}
|
||||
|
||||
void clearResults() { m_editor->highlightSearchResults(QByteArray()); }
|
||||
QString currentFindString() const { return QString(); }
|
||||
QString completedFindString() const { return QString(); }
|
||||
void clearResults()
|
||||
{
|
||||
m_widget->highlightSearchResults(QByteArray());
|
||||
}
|
||||
|
||||
|
||||
int find(const QByteArray &pattern, int pos, Find::FindFlags findFlags) {
|
||||
int find(const QByteArray &pattern, int pos, Find::FindFlags findFlags)
|
||||
{
|
||||
if (pattern.isEmpty()) {
|
||||
m_editor->setCursorPosition(pos);
|
||||
m_widget->setCursorPosition(pos);
|
||||
return pos;
|
||||
}
|
||||
|
||||
return m_editor->find(pattern, pos, Find::textDocumentFlagsForFindFlags(findFlags));
|
||||
return m_widget->find(pattern, pos, Find::textDocumentFlagsForFindFlags(findFlags));
|
||||
}
|
||||
|
||||
Result findIncremental(const QString &txt, Find::FindFlags findFlags) {
|
||||
@@ -114,25 +116,25 @@ public:
|
||||
resetIncrementalSearch(); // Because we don't search for nibbles.
|
||||
m_lastPattern = pattern;
|
||||
if (m_incrementalStartPos < 0)
|
||||
m_incrementalStartPos = m_editor->selectionStart();
|
||||
m_incrementalStartPos = m_widget->selectionStart();
|
||||
if (m_contPos == -1)
|
||||
m_contPos = m_incrementalStartPos;
|
||||
int found = find(pattern, m_contPos, findFlags);
|
||||
Result result;
|
||||
if (found >= 0) {
|
||||
result = Found;
|
||||
m_editor->highlightSearchResults(pattern, Find::textDocumentFlagsForFindFlags(findFlags));
|
||||
m_widget->highlightSearchResults(pattern, Find::textDocumentFlagsForFindFlags(findFlags));
|
||||
m_contPos = -1;
|
||||
} else {
|
||||
if (found == -2) {
|
||||
result = NotYetFound;
|
||||
m_contPos +=
|
||||
findFlags & Find::FindBackward
|
||||
? -BinEditor::SearchStride : BinEditor::SearchStride;
|
||||
? -BinEditorWidget::SearchStride : BinEditorWidget::SearchStride;
|
||||
} else {
|
||||
result = NotFound;
|
||||
m_contPos = -1;
|
||||
m_editor->highlightSearchResults(QByteArray(), 0);
|
||||
m_widget->highlightSearchResults(QByteArray(), 0);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
@@ -142,9 +144,9 @@ public:
|
||||
QByteArray pattern = txt.toLatin1();
|
||||
bool wasReset = (m_incrementalStartPos < 0);
|
||||
if (m_contPos == -1) {
|
||||
m_contPos = m_editor->cursorPosition();
|
||||
m_contPos = m_widget->cursorPosition();
|
||||
if (findFlags & Find::FindBackward)
|
||||
m_contPos = m_editor->selectionStart()-1;
|
||||
m_contPos = m_widget->selectionStart()-1;
|
||||
}
|
||||
int found = find(pattern, m_contPos, findFlags);
|
||||
Result result;
|
||||
@@ -153,11 +155,11 @@ public:
|
||||
m_incrementalStartPos = found;
|
||||
m_contPos = -1;
|
||||
if (wasReset)
|
||||
m_editor->highlightSearchResults(pattern, Find::textDocumentFlagsForFindFlags(findFlags));
|
||||
m_widget->highlightSearchResults(pattern, Find::textDocumentFlagsForFindFlags(findFlags));
|
||||
} else if (found == -2) {
|
||||
result = NotYetFound;
|
||||
m_contPos += findFlags & Find::FindBackward
|
||||
? -BinEditor::SearchStride : BinEditor::SearchStride;
|
||||
? -BinEditorWidget::SearchStride : BinEditorWidget::SearchStride;
|
||||
} else {
|
||||
result = NotFound;
|
||||
m_contPos = -1;
|
||||
@@ -167,7 +169,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
BinEditor *m_editor;
|
||||
BinEditorWidget *m_widget;
|
||||
int m_incrementalStartPos;
|
||||
int m_contPos; // Only valid if last result was NotYetFound.
|
||||
QByteArray m_lastPattern;
|
||||
@@ -178,14 +180,14 @@ class BinEditorDocument : public Core::IDocument
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
BinEditorDocument(BinEditor *parent) :
|
||||
BinEditorDocument(BinEditorWidget *parent) :
|
||||
Core::IDocument(parent)
|
||||
{
|
||||
m_editor = parent;
|
||||
connect(m_editor, SIGNAL(dataRequested(Core::IEditor*,quint64)),
|
||||
this, SLOT(provideData(Core::IEditor*,quint64)));
|
||||
connect(m_editor, SIGNAL(newRangeRequested(Core::IEditor*,quint64)),
|
||||
this, SLOT(provideNewRange(Core::IEditor*,quint64)));
|
||||
m_widget = parent;
|
||||
connect(m_widget, SIGNAL(dataRequested(quint64)),
|
||||
this, SLOT(provideData(quint64)));
|
||||
connect(m_widget, SIGNAL(newRangeRequested(quint64)),
|
||||
this, SLOT(provideNewRange(quint64)));
|
||||
}
|
||||
~BinEditorDocument() {}
|
||||
|
||||
@@ -198,9 +200,9 @@ public:
|
||||
QTC_ASSERT(!autoSave, return true); // bineditor does not support autosave - it would be a bit expensive
|
||||
const QString fileNameToUse
|
||||
= fileName.isEmpty() ? m_fileName : fileName;
|
||||
if (m_editor->save(errorString, m_fileName, fileNameToUse)) {
|
||||
if (m_widget->save(errorString, m_fileName, fileNameToUse)) {
|
||||
m_fileName = fileNameToUse;
|
||||
m_editor->editor()->setDisplayName(QFileInfo(fileNameToUse).fileName());
|
||||
m_widget->editor()->setDisplayName(QFileInfo(fileNameToUse).fileName());
|
||||
emit changed();
|
||||
return true;
|
||||
} else {
|
||||
@@ -210,7 +212,7 @@ public:
|
||||
|
||||
void rename(const QString &newName) {
|
||||
m_fileName = newName;
|
||||
m_editor->editor()->setDisplayName(QFileInfo(fileName()).fileName());
|
||||
m_widget->editor()->setDisplayName(QFileInfo(fileName()).fileName());
|
||||
emit changed();
|
||||
}
|
||||
|
||||
@@ -230,8 +232,8 @@ public:
|
||||
if (file.open(QIODevice::ReadOnly)) {
|
||||
file.close();
|
||||
m_fileName = fileName;
|
||||
m_editor->setSizes(offset, file.size());
|
||||
m_editor->editor()->setDisplayName(QFileInfo(fileName).fileName());
|
||||
m_widget->setSizes(offset, file.size());
|
||||
m_widget->editor()->setDisplayName(QFileInfo(fileName).fileName());
|
||||
return true;
|
||||
}
|
||||
QString errStr = tr("Cannot open %1: %2").arg(
|
||||
@@ -244,19 +246,20 @@ public:
|
||||
}
|
||||
|
||||
private slots:
|
||||
void provideData(Core::IEditor *, quint64 block) {
|
||||
void provideData(quint64 block)
|
||||
{
|
||||
if (m_fileName.isEmpty())
|
||||
return;
|
||||
QFile file(m_fileName);
|
||||
if (file.open(QIODevice::ReadOnly)) {
|
||||
int blockSize = m_editor->dataBlockSize();
|
||||
int blockSize = m_widget->dataBlockSize();
|
||||
file.seek(block * blockSize);
|
||||
QByteArray data = file.read(blockSize);
|
||||
file.close();
|
||||
const int dataSize = data.size();
|
||||
if (dataSize != blockSize)
|
||||
data += QByteArray(blockSize - dataSize, 0);
|
||||
m_editor->addData(block, data);
|
||||
m_widget->addData(block, data);
|
||||
} else {
|
||||
QMessageBox::critical(Core::ICore::mainWindow(), tr("File Error"),
|
||||
tr("Cannot open %1: %2").arg(
|
||||
@@ -264,7 +267,8 @@ private slots:
|
||||
}
|
||||
}
|
||||
|
||||
void provideNewRange(Core::IEditor *, quint64 offset) {
|
||||
void provideNewRange(quint64 offset)
|
||||
{
|
||||
open(0, m_fileName, offset);
|
||||
}
|
||||
|
||||
@@ -280,10 +284,10 @@ public:
|
||||
|
||||
QString suggestedFileName() const { return QString(); }
|
||||
|
||||
bool isModified() const { return m_editor->isMemoryView() ? false : m_editor->isModified(); }
|
||||
bool isModified() const { return m_widget->isMemoryView() ? false : m_widget->isModified(); }
|
||||
|
||||
bool isFileReadOnly() const {
|
||||
if (m_editor->isMemoryView() || m_fileName.isEmpty())
|
||||
if (m_widget->isMemoryView() || m_fileName.isEmpty())
|
||||
return false;
|
||||
const QFileInfo fi(m_fileName);
|
||||
return !fi.isWritable();
|
||||
@@ -306,19 +310,19 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
BinEditor *m_editor;
|
||||
BinEditorWidget *m_widget;
|
||||
QString m_fileName;
|
||||
};
|
||||
|
||||
class BinEditorInterface : public Core::IEditor
|
||||
class BinEditor : public Core::IEditor
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
BinEditorInterface(BinEditor *editor)
|
||||
BinEditor(BinEditorWidget *widget)
|
||||
{
|
||||
setWidget(editor);
|
||||
m_editor = editor;
|
||||
m_file = new BinEditorDocument(m_editor);
|
||||
setWidget(widget);
|
||||
m_widget = widget;
|
||||
m_file = new BinEditorDocument(m_widget);
|
||||
m_context.add(Core::Constants::K_DEFAULT_BINARY_EDITOR_ID);
|
||||
m_context.add(Constants::C_BINEDITOR);
|
||||
m_addressEdit = new QLineEdit;
|
||||
@@ -339,19 +343,21 @@ public:
|
||||
m_toolBar->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
||||
m_toolBar->addWidget(w);
|
||||
|
||||
connect(m_editor, SIGNAL(cursorPositionChanged(int)), this,
|
||||
SLOT(updateCursorPosition(int)));
|
||||
connect(m_file, SIGNAL(changed()), this, SIGNAL(changed()));
|
||||
connect(m_addressEdit, SIGNAL(editingFinished()), this,
|
||||
SLOT(jumpToAddress()));
|
||||
updateCursorPosition(m_editor->cursorPosition());
|
||||
widget->setEditor(this);
|
||||
|
||||
connect(m_widget, SIGNAL(cursorPositionChanged(int)), SLOT(updateCursorPosition(int)));
|
||||
connect(m_file, SIGNAL(changed()), SIGNAL(changed()));
|
||||
connect(m_addressEdit, SIGNAL(editingFinished()), SLOT(jumpToAddress()));
|
||||
connect(m_widget, SIGNAL(modificationChanged(bool)), SIGNAL(changed()));
|
||||
updateCursorPosition(m_widget->cursorPosition());
|
||||
}
|
||||
~BinEditorInterface() {
|
||||
delete m_editor;
|
||||
|
||||
~BinEditor() {
|
||||
delete m_widget;
|
||||
}
|
||||
|
||||
bool createNew(const QString & /* contents */ = QString()) {
|
||||
m_editor->clear();
|
||||
m_widget->clear();
|
||||
m_file->setFilename(QString());
|
||||
return true;
|
||||
}
|
||||
@@ -366,20 +372,20 @@ public:
|
||||
|
||||
QWidget *toolBar() { return m_toolBar; }
|
||||
|
||||
bool isTemporary() const { return m_editor->isMemoryView(); }
|
||||
bool isTemporary() const { return m_widget->isMemoryView(); }
|
||||
|
||||
private slots:
|
||||
void updateCursorPosition(int position) {
|
||||
m_addressEdit->setText(QString::number(m_editor->baseAddress() + position, 16));
|
||||
m_addressEdit->setText(QString::number(m_widget->baseAddress() + position, 16));
|
||||
}
|
||||
|
||||
void jumpToAddress() {
|
||||
m_editor->jumpToAddress(m_addressEdit->text().toULongLong(0, 16));
|
||||
updateCursorPosition(m_editor->cursorPosition());
|
||||
m_widget->jumpToAddress(m_addressEdit->text().toULongLong(0, 16));
|
||||
updateCursorPosition(m_widget->cursorPosition());
|
||||
}
|
||||
|
||||
private:
|
||||
BinEditor *m_editor;
|
||||
BinEditorWidget *m_widget;
|
||||
QString m_displayName;
|
||||
BinEditorDocument *m_file;
|
||||
QToolBar *m_toolBar;
|
||||
@@ -408,9 +414,11 @@ QString BinEditorFactory::displayName() const
|
||||
|
||||
Core::IEditor *BinEditorFactory::createEditor(QWidget *parent)
|
||||
{
|
||||
BinEditor *editor = new BinEditor(parent);
|
||||
m_owner->initializeEditor(editor);
|
||||
return editor->editor();
|
||||
BinEditorWidget *widget = new BinEditorWidget(parent);
|
||||
BinEditor *editor = new BinEditor(widget);
|
||||
|
||||
m_owner->initializeEditor(widget);
|
||||
return editor;
|
||||
}
|
||||
|
||||
QStringList BinEditorFactory::mimeTypes() const
|
||||
@@ -433,7 +441,7 @@ BinEditorWidgetFactory::BinEditorWidgetFactory(QObject *parent) :
|
||||
|
||||
QWidget *BinEditorWidgetFactory::createWidget(QWidget *parent)
|
||||
{
|
||||
return new BinEditor(parent);
|
||||
return new BinEditorWidget(parent);
|
||||
}
|
||||
|
||||
///////////////////////////////// BinEditorPlugin //////////////////////////////////
|
||||
@@ -467,12 +475,8 @@ QAction *BinEditorPlugin::registerNewAction(Core::Id id,
|
||||
return rc;
|
||||
}
|
||||
|
||||
void BinEditorPlugin::initializeEditor(BinEditor *editor)
|
||||
void BinEditorPlugin::initializeEditor(BinEditorWidget *widget)
|
||||
{
|
||||
BinEditorInterface *editorInterface = new BinEditorInterface(editor);
|
||||
QObject::connect(editor, SIGNAL(modificationChanged(bool)), editorInterface, SIGNAL(changed()));
|
||||
editor->setEditor(editorInterface);
|
||||
|
||||
m_context.add(Constants::C_BINEDITOR);
|
||||
if (!m_undoAction) {
|
||||
m_undoAction = registerNewAction(Core::Constants::UNDO, this, SLOT(undoAction()), tr("&Undo"));
|
||||
@@ -481,19 +485,13 @@ void BinEditorPlugin::initializeEditor(BinEditor *editor)
|
||||
m_selectAllAction = registerNewAction(Core::Constants::SELECTALL, this, SLOT(selectAllAction()));
|
||||
}
|
||||
|
||||
// Font settings
|
||||
TextEditor::TextEditorSettings *settings = TextEditor::TextEditorSettings::instance();
|
||||
editor->setFontSettings(settings->fontSettings());
|
||||
connect(settings, SIGNAL(fontSettingsChanged(TextEditor::FontSettings)),
|
||||
editor, SLOT(setFontSettings(TextEditor::FontSettings)));
|
||||
|
||||
QObject::connect(editor, SIGNAL(undoAvailable(bool)), this, SLOT(updateActions()));
|
||||
QObject::connect(editor, SIGNAL(redoAvailable(bool)), this, SLOT(updateActions()));
|
||||
QObject::connect(widget, SIGNAL(undoAvailable(bool)), this, SLOT(updateActions()));
|
||||
QObject::connect(widget, SIGNAL(redoAvailable(bool)), this, SLOT(updateActions()));
|
||||
|
||||
Aggregation::Aggregate *aggregate = new Aggregation::Aggregate;
|
||||
BinEditorFind *binEditorFind = new BinEditorFind(editor);
|
||||
BinEditorFind *binEditorFind = new BinEditorFind(widget);
|
||||
aggregate->add(binEditorFind);
|
||||
aggregate->add(editor);
|
||||
aggregate->add(widget);
|
||||
}
|
||||
|
||||
bool BinEditorPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
@@ -515,9 +513,9 @@ void BinEditorPlugin::extensionsInitialized()
|
||||
|
||||
void BinEditorPlugin::updateCurrentEditor(Core::IEditor *editor)
|
||||
{
|
||||
BinEditor *binEditor = 0;
|
||||
BinEditorWidget *binEditor = 0;
|
||||
if (editor)
|
||||
binEditor = qobject_cast<BinEditor *>(editor->widget());
|
||||
binEditor = qobject_cast<BinEditorWidget *>(editor->widget());
|
||||
if (m_currentEditor == binEditor)
|
||||
return;
|
||||
m_currentEditor = binEditor;
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <QAction>
|
||||
|
||||
namespace BINEditor {
|
||||
class BinEditor;
|
||||
class BinEditorWidget;
|
||||
|
||||
class BinEditorWidgetFactory : public QObject
|
||||
{
|
||||
@@ -67,7 +67,7 @@ public:
|
||||
void extensionsInitialized();
|
||||
|
||||
// Connect editor to settings changed signals.
|
||||
void initializeEditor(BinEditor *editor);
|
||||
void initializeEditor(BinEditorWidget *editor);
|
||||
|
||||
private slots:
|
||||
void undoAction();
|
||||
@@ -92,7 +92,7 @@ private:
|
||||
Core::IEditor *createEditor(QWidget *parent);
|
||||
|
||||
BinEditorFactory *m_factory;
|
||||
QPointer<BinEditor> m_currentEditor;
|
||||
QPointer<BinEditorWidget> m_currentEditor;
|
||||
};
|
||||
|
||||
class BinEditorFactory : public Core::IEditorFactory
|
||||
|
||||
@@ -123,14 +123,11 @@ void NavigationWidgetFactory::saveSettings(int position, QWidget *widget)
|
||||
NavigationWidget *pw = qobject_cast<NavigationWidget *>(widget);
|
||||
QTC_ASSERT(pw, return);
|
||||
|
||||
QSettings *settings = Core::ICore::settings();
|
||||
QTC_ASSERT(settings, return);
|
||||
|
||||
// .beginGroup is not used - to prevent simultaneous access
|
||||
QString group = settingsPrefix(position);
|
||||
|
||||
// save settings
|
||||
settings->setValue(group, pw->flatMode());
|
||||
// Save settings
|
||||
Core::ICore::settings()->setValue(group, pw->flatMode());
|
||||
}
|
||||
|
||||
void NavigationWidgetFactory::restoreSettings(int position, QWidget *widget)
|
||||
@@ -138,14 +135,11 @@ void NavigationWidgetFactory::restoreSettings(int position, QWidget *widget)
|
||||
NavigationWidget *pw = qobject_cast<NavigationWidget *>(widget);
|
||||
QTC_ASSERT(pw, return);
|
||||
|
||||
QSettings *settings = Core::ICore::settings();
|
||||
QTC_ASSERT(settings, return);
|
||||
|
||||
// .beginGroup is not used - to prevent simultaneous access
|
||||
QString group = settingsPrefix(position);
|
||||
|
||||
// load settings
|
||||
pw->setFlatMode(settings->value(group, false).toBool());
|
||||
// Load settings
|
||||
pw->setFlatMode(Core::ICore::settings()->value(group, false).toBool());
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
@@ -248,7 +248,7 @@ int ReadOnlyFilesDialog::exec()
|
||||
if (QDialog::exec() != QDialog::Accepted)
|
||||
return RO_Cancel;
|
||||
|
||||
ReadOnlyResult result;
|
||||
ReadOnlyResult result = RO_Cancel;
|
||||
QStringList failedToMakeWritable;
|
||||
foreach (ReadOnlyFilesDialogPrivate::ButtonGroupForFile buttengroup, d->buttonGroups) {
|
||||
result = static_cast<ReadOnlyResult>(buttengroup.group->checkedId());
|
||||
@@ -313,7 +313,7 @@ void ReadOnlyFilesDialog::setAll(int index)
|
||||
return;
|
||||
|
||||
// Get the selected type from the select all combo box.
|
||||
ReadOnlyFilesTreeColumn type;
|
||||
ReadOnlyFilesTreeColumn type = NumberOfColumns;
|
||||
if (index == d->setAllIndexForOperation[MakeWritable])
|
||||
type = MakeWritable;
|
||||
else if (index == d->setAllIndexForOperation[OpenWithVCS])
|
||||
|
||||
@@ -107,14 +107,12 @@ QWidget *GeneralSettings::createPage(QWidget *parent)
|
||||
m_widget = new QWidget(parent);
|
||||
m_page->setupUi(m_widget);
|
||||
|
||||
QSettings *settings = Core::ICore::settings();
|
||||
Q_UNUSED(settings) // Windows
|
||||
|
||||
fillLanguageBox();
|
||||
|
||||
m_page->colorButton->setColor(StyleHelper::requestedBaseColor());
|
||||
m_page->reloadBehavior->setCurrentIndex(EditorManager::instance()->reloadSetting());
|
||||
if (HostOsInfo::isAnyUnixHost()) {
|
||||
QSettings *settings = Core::ICore::settings();
|
||||
const QStringList availableTerminals = ConsoleProcess::availableTerminalEmulators();
|
||||
const QString currentTerminal = ConsoleProcess::terminalEmulator(settings, false);
|
||||
const QString currentTerminalExplicit = ConsoleProcess::terminalEmulator(settings, true);
|
||||
@@ -128,6 +126,7 @@ QWidget *GeneralSettings::createPage(QWidget *parent)
|
||||
}
|
||||
|
||||
if (HostOsInfo::isAnyUnixHost() && !HostOsInfo::isMacHost()) {
|
||||
QSettings *settings = Core::ICore::settings();
|
||||
m_page->externalFileBrowserEdit->setText(UnixUtils::fileBrowser(settings));
|
||||
} else {
|
||||
m_page->externalFileBrowserLabel->hide();
|
||||
|
||||
@@ -52,11 +52,8 @@ CodePasterSettingsPage::CodePasterSettingsPage()
|
||||
setDisplayCategory(QCoreApplication::translate("CodePaster",
|
||||
Constants::CPASTER_SETTINGS_TR_CATEGORY));
|
||||
|
||||
m_settings = Core::ICore::settings();
|
||||
if (m_settings) {
|
||||
const QString keyRoot = QLatin1String(settingsGroupC) + QLatin1Char('/');
|
||||
m_host = m_settings->value(keyRoot + QLatin1String(serverKeyC), QString()).toString();
|
||||
}
|
||||
const QString keyRoot = QLatin1String(settingsGroupC) + QLatin1Char('/');
|
||||
m_host = Core::ICore::settings()->value(keyRoot + QLatin1String(serverKeyC), QString()).toString();
|
||||
}
|
||||
|
||||
QWidget *CodePasterSettingsPage::createPage(QWidget *parent)
|
||||
@@ -83,12 +80,11 @@ QWidget *CodePasterSettingsPage::createPage(QWidget *parent)
|
||||
|
||||
void CodePasterSettingsPage::apply()
|
||||
{
|
||||
if (!m_settings)
|
||||
return;
|
||||
|
||||
m_settings->beginGroup(QLatin1String(settingsGroupC));
|
||||
m_settings->setValue(QLatin1String(serverKeyC), m_host);
|
||||
m_settings->endGroup();
|
||||
QSettings *settings = Core::ICore::settings();
|
||||
const QString keyRoot = QLatin1String(settingsGroupC) + QLatin1Char('/');
|
||||
settings->beginGroup(QLatin1String(settingsGroupC));
|
||||
settings->setValue(QLatin1String(serverKeyC), m_host);
|
||||
settings->endGroup();
|
||||
}
|
||||
|
||||
void CodePasterSettingsPage::serverChanged(const QString &host)
|
||||
|
||||
@@ -55,7 +55,6 @@ public slots:
|
||||
void serverChanged(const QString &host);
|
||||
|
||||
private:
|
||||
QSettings *m_settings;
|
||||
QString m_host;
|
||||
};
|
||||
|
||||
|
||||
@@ -590,18 +590,15 @@ void CppCodeStyleSettingsPage::apply()
|
||||
CppCodeStylePreferences *originalCppCodeStylePreferences = CppToolsSettings::instance()->cppCodeStyle();
|
||||
if (originalCppCodeStylePreferences->codeStyleSettings() != m_pageCppCodeStylePreferences->codeStyleSettings()) {
|
||||
originalCppCodeStylePreferences->setCodeStyleSettings(m_pageCppCodeStylePreferences->codeStyleSettings());
|
||||
if (s)
|
||||
originalCppCodeStylePreferences->toSettings(QLatin1String(CppTools::Constants::CPP_SETTINGS_ID), s);
|
||||
originalCppCodeStylePreferences->toSettings(QLatin1String(CppTools::Constants::CPP_SETTINGS_ID), s);
|
||||
}
|
||||
if (originalCppCodeStylePreferences->tabSettings() != m_pageCppCodeStylePreferences->tabSettings()) {
|
||||
originalCppCodeStylePreferences->setTabSettings(m_pageCppCodeStylePreferences->tabSettings());
|
||||
if (s)
|
||||
originalCppCodeStylePreferences->toSettings(QLatin1String(CppTools::Constants::CPP_SETTINGS_ID), s);
|
||||
originalCppCodeStylePreferences->toSettings(QLatin1String(CppTools::Constants::CPP_SETTINGS_ID), s);
|
||||
}
|
||||
if (originalCppCodeStylePreferences->currentDelegate() != m_pageCppCodeStylePreferences->currentDelegate()) {
|
||||
originalCppCodeStylePreferences->setCurrentDelegate(m_pageCppCodeStylePreferences->currentDelegate());
|
||||
if (s)
|
||||
originalCppCodeStylePreferences->toSettings(QLatin1String(CppTools::Constants::CPP_SETTINGS_ID), s);
|
||||
originalCppCodeStylePreferences->toSettings(QLatin1String(CppTools::Constants::CPP_SETTINGS_ID), s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,25 +79,25 @@ void ProjectPart::evaluateToolchain(const ToolChain *tc,
|
||||
ToolChain::CompilerFlags c = (cxxflags == cflags)
|
||||
? cxx : tc->compilerFlags(cflags);
|
||||
|
||||
if (c | ToolChain::StandardC11)
|
||||
if (c & ToolChain::StandardC11)
|
||||
cVersion = C11;
|
||||
else if (c | ToolChain::StandardC99)
|
||||
else if (c & ToolChain::StandardC99)
|
||||
cVersion = C99;
|
||||
else
|
||||
cVersion = C89;
|
||||
|
||||
if (cxx | ToolChain::StandardCxx11)
|
||||
if (cxx & ToolChain::StandardCxx11)
|
||||
cxxVersion = CXX11;
|
||||
else
|
||||
cxxVersion = CXX98;
|
||||
|
||||
if (cxx | ToolChain::BorlandExtensions)
|
||||
if (cxx & ToolChain::BorlandExtensions)
|
||||
cxxExtensions |= BorlandExtensions;
|
||||
if (cxx | ToolChain::GnuExtensions)
|
||||
if (cxx & ToolChain::GnuExtensions)
|
||||
cxxExtensions |= GnuExtensions;
|
||||
if (cxx | ToolChain::MicrosoftExtensions)
|
||||
if (cxx & ToolChain::MicrosoftExtensions)
|
||||
cxxExtensions |= MicrosoftExtensions;
|
||||
if (cxx | ToolChain::OpenMP)
|
||||
if (cxx & ToolChain::OpenMP)
|
||||
cxxExtensions |= OpenMP;
|
||||
|
||||
cWarningFlags = tc->warningFlags(cflags);
|
||||
|
||||
@@ -172,7 +172,7 @@ CppToolsSettings::CppToolsSettings(QObject *parent)
|
||||
|
||||
// load global settings (after built-in settings are added to the pool)
|
||||
QSettings *s = Core::ICore::settings();
|
||||
d->m_globalCodeStyle->fromSettings(QLatin1String(CppTools::Constants::CPP_SETTINGS_ID), Core::ICore::settings());
|
||||
d->m_globalCodeStyle->fromSettings(QLatin1String(CppTools::Constants::CPP_SETTINGS_ID), s);
|
||||
|
||||
// legacy handling start (Qt Creator Version < 2.4)
|
||||
const bool legacyTransformed =
|
||||
|
||||
@@ -233,8 +233,7 @@ bool CvsPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
if (!ICore::mimeDatabase()->addMimeTypes(QLatin1String(":/trolltech.cvs/CVS.mimetypes.xml"), errorMessage))
|
||||
return false;
|
||||
|
||||
if (QSettings *settings = ICore::settings())
|
||||
m_settings.fromSettings(settings);
|
||||
m_settings.fromSettings(ICore::settings());
|
||||
|
||||
addAutoReleasedObject(new SettingsPage);
|
||||
|
||||
@@ -1299,8 +1298,7 @@ void CvsPlugin::setSettings(const CvsSettings &s)
|
||||
{
|
||||
if (s != m_settings) {
|
||||
m_settings = s;
|
||||
if (QSettings *settings = ICore::settings())
|
||||
m_settings.toSettings(settings);
|
||||
m_settings.toSettings(ICore::settings());
|
||||
cvsVersionControl()->emitConfigurationChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -261,6 +261,7 @@ bool CdbOptionsPage::matches(const QString &s) const
|
||||
|
||||
class CdbPathsPageWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Utils::SavedActionSet group;
|
||||
|
||||
@@ -346,3 +347,5 @@ bool CdbPathsPage::matches(const QString &searchKeyWord) const
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Debugger
|
||||
|
||||
#include "cdboptionspage.moc"
|
||||
|
||||
@@ -552,8 +552,6 @@ QWidget *DebuggerMainWindow::createContents(IMode *mode)
|
||||
void DebuggerMainWindow::writeSettings() const
|
||||
{
|
||||
QSettings *settings = ICore::settings();
|
||||
QTC_ASSERT(settings, return);
|
||||
|
||||
settings->beginGroup(QLatin1String("DebugMode.CppMode"));
|
||||
QHashIterator<QString, QVariant> it(d->m_dockWidgetActiveStateCpp);
|
||||
while (it.hasNext()) {
|
||||
@@ -574,8 +572,6 @@ void DebuggerMainWindow::writeSettings() const
|
||||
void DebuggerMainWindow::readSettings()
|
||||
{
|
||||
QSettings *settings = ICore::settings();
|
||||
QTC_ASSERT(settings, return);
|
||||
|
||||
d->m_dockWidgetActiveStateCpp.clear();
|
||||
d->m_dockWidgetActiveStateQmlCpp.clear();
|
||||
|
||||
|
||||
@@ -84,6 +84,17 @@ LldbEngine::LldbEngine(const DebuggerStartParameters &startParameters)
|
||||
m_lastAgentId = 0;
|
||||
m_lastToken = 0;
|
||||
setObjectName(QLatin1String("LldbEngine"));
|
||||
|
||||
connect(debuggerCore()->action(AutoDerefPointers), SIGNAL(valueChanged(QVariant)),
|
||||
SLOT(updateLocals()));
|
||||
connect(debuggerCore()->action(CreateFullBacktrace), SIGNAL(triggered()),
|
||||
SLOT(updateAll()));
|
||||
connect(debuggerCore()->action(UseDebuggingHelpers), SIGNAL(valueChanged(QVariant)),
|
||||
SLOT(updateLocals()));
|
||||
connect(debuggerCore()->action(UseDynamicType), SIGNAL(valueChanged(QVariant)),
|
||||
SLOT(updateLocals()));
|
||||
connect(debuggerCore()->action(IntelFlavor), SIGNAL(valueChanged(QVariant)),
|
||||
SLOT(updateAll()));
|
||||
}
|
||||
|
||||
LldbEngine::~LldbEngine()
|
||||
@@ -108,7 +119,7 @@ void LldbEngine::runCommand(const Command &command)
|
||||
void LldbEngine::shutdownInferior()
|
||||
{
|
||||
QTC_ASSERT(state() == InferiorShutdownRequested, qDebug() << state());
|
||||
notifyInferiorShutdownOk();
|
||||
runCommand(Command("shutdownInferior"));
|
||||
}
|
||||
|
||||
void LldbEngine::shutdownEngine()
|
||||
@@ -249,6 +260,8 @@ void LldbEngine::handleResponse(const QByteArray &response)
|
||||
refreshSymbols(item);
|
||||
else if (name == "bkpts")
|
||||
refreshBreakpoints(item);
|
||||
else if (name == "output")
|
||||
refreshOutput(item);
|
||||
else if (name == "disassembly")
|
||||
refreshDisassembly(item);
|
||||
else if (name == "memory")
|
||||
@@ -483,6 +496,18 @@ void LldbEngine::refreshMemory(const GdbMi &data)
|
||||
}
|
||||
}
|
||||
|
||||
void LldbEngine::refreshOutput(const GdbMi &output)
|
||||
{
|
||||
QByteArray channel = output["channel"].data();
|
||||
QByteArray data = QByteArray::fromHex(output["data"].data());
|
||||
LogChannel ch = AppStuff;
|
||||
if (channel == "stdout")
|
||||
ch = AppOutput;
|
||||
else if (channel == "stderr")
|
||||
ch = AppError;
|
||||
showMessage(QString::fromUtf8(data), ch);
|
||||
}
|
||||
|
||||
void LldbEngine::refreshBreakpoints(const GdbMi &bkpts)
|
||||
{
|
||||
BreakHandler *handler = breakHandler();
|
||||
@@ -640,6 +665,10 @@ bool LldbEngine::setToolTipExpression(const QPoint &mousePos,
|
||||
return false;
|
||||
}
|
||||
|
||||
void LldbEngine::updateAll()
|
||||
{
|
||||
updateLocals();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -663,6 +692,11 @@ void LldbEngine::updateWatchData(const WatchData &data, const WatchUpdateFlags &
|
||||
{
|
||||
Q_UNUSED(data);
|
||||
Q_UNUSED(flags);
|
||||
updateLocals();
|
||||
}
|
||||
|
||||
void LldbEngine::updateLocals()
|
||||
{
|
||||
WatchHandler *handler = watchHandler();
|
||||
|
||||
Command cmd("updateData");
|
||||
@@ -787,7 +821,7 @@ void LldbEngine::readLldbStandardError()
|
||||
qDebug() << "\nLLDB STDERR" << err;
|
||||
//qWarning() << "Unexpected lldb stderr:" << err;
|
||||
showMessage(_("Lldb stderr: " + err));
|
||||
//handleOutput(err);
|
||||
m_lldbProc.kill();
|
||||
}
|
||||
|
||||
void LldbEngine::readLldbStandardOutput()
|
||||
@@ -859,11 +893,6 @@ QByteArray LldbEngine::currentOptions() const
|
||||
return result;
|
||||
}
|
||||
|
||||
void LldbEngine::updateAll()
|
||||
{
|
||||
runCommand("reportData");
|
||||
}
|
||||
|
||||
void LldbEngine::refreshLocals(const GdbMi &vars)
|
||||
{
|
||||
//const bool partial = response.cookie.toBool();
|
||||
@@ -985,8 +1014,20 @@ void LldbEngine::refreshState(const GdbMi &reportedState)
|
||||
notifyInferiorSpontaneousStop();
|
||||
else if (newState == "inferiorsetupok")
|
||||
notifyInferiorSetupOk();
|
||||
else if (newState == "enginerunok")
|
||||
else if (newState == "enginerunandinferiorrunok")
|
||||
notifyEngineRunAndInferiorRunOk();
|
||||
else if (newState == "enginerunandinferiorstopok")
|
||||
notifyEngineRunAndInferiorStopOk();
|
||||
else if (newState == "inferiorshutdownok")
|
||||
notifyInferiorShutdownOk();
|
||||
else if (newState == "inferiorshutdownfailed")
|
||||
notifyInferiorShutdownFailed();
|
||||
else if (newState == "engineshutdownok")
|
||||
notifyEngineShutdownOk();
|
||||
else if (newState == "engineshutdownfailed")
|
||||
notifyEngineShutdownFailed();
|
||||
else if (newState == "inferiorexited")
|
||||
notifyInferiorExited();
|
||||
}
|
||||
|
||||
void LldbEngine::refreshLocation(const GdbMi &reportedLocation)
|
||||
|
||||
@@ -153,21 +153,22 @@ private:
|
||||
Q_SLOT void readLldbStandardError();
|
||||
Q_SLOT void handleResponse(const QByteArray &data);
|
||||
Q_SLOT void runEngine2();
|
||||
Q_SLOT void updateAll();
|
||||
Q_SLOT void updateLocals();
|
||||
void refreshAll(const GdbMi &all);
|
||||
void refreshThreads(const GdbMi &threads);
|
||||
void refreshStack(const GdbMi &stack);
|
||||
void refreshRegisters(const GdbMi &stack);
|
||||
void refreshRegisters(const GdbMi ®isters);
|
||||
void refreshLocals(const GdbMi &vars);
|
||||
void refreshTypeInfo(const GdbMi &typeInfo);
|
||||
void refreshState(const GdbMi &state);
|
||||
void refreshLocation(const GdbMi &location);
|
||||
void refreshModules(const GdbMi &modules);
|
||||
void refreshSymbols(const GdbMi &symbols);
|
||||
void refreshOutput(const GdbMi &output);
|
||||
void refreshBreakpoints(const GdbMi &bkpts);
|
||||
void runContinuation(const GdbMi &data);
|
||||
|
||||
void updateAll();
|
||||
|
||||
typedef void (LldbEngine::*LldbCommandContinuation)();
|
||||
|
||||
QByteArray currentOptions() const;
|
||||
|
||||
@@ -129,24 +129,12 @@ void MemoryAgent::updateMemoryView(quint64 address, quint64 length)
|
||||
|
||||
void MemoryAgent::connectBinEditorWidget(QWidget *w)
|
||||
{
|
||||
connect(w,
|
||||
SIGNAL(dataRequested(Core::IEditor*,quint64)),
|
||||
SLOT(fetchLazyData(Core::IEditor*,quint64)));
|
||||
connect(w,
|
||||
SIGNAL(newWindowRequested(quint64)),
|
||||
SLOT(createBinEditor(quint64)));
|
||||
connect(w,
|
||||
SIGNAL(newRangeRequested(Core::IEditor*,quint64)),
|
||||
SLOT(provideNewRange(Core::IEditor*,quint64)));
|
||||
connect(w,
|
||||
SIGNAL(dataChanged(Core::IEditor*,quint64,QByteArray)),
|
||||
SLOT(handleDataChanged(Core::IEditor*,quint64,QByteArray)));
|
||||
connect(w,
|
||||
SIGNAL(dataChanged(Core::IEditor*,quint64,QByteArray)),
|
||||
SLOT(handleDataChanged(Core::IEditor*,quint64,QByteArray)));
|
||||
connect(w,
|
||||
SIGNAL(addWatchpointRequested(quint64,uint)),
|
||||
SLOT(handleWatchpointRequest(quint64,uint)));
|
||||
connect(w, SIGNAL(dataRequested(quint64)), SLOT(fetchLazyData(quint64)));
|
||||
connect(w, SIGNAL(newWindowRequested(quint64)), SLOT(createBinEditor(quint64)));
|
||||
connect(w, SIGNAL(newRangeRequested(quint64)), SLOT(provideNewRange(quint64)));
|
||||
connect(w, SIGNAL(dataChanged(quint64,QByteArray)), SLOT(handleDataChanged(quint64,QByteArray)));
|
||||
connect(w, SIGNAL(dataChanged(quint64,QByteArray)), SLOT(handleDataChanged(quint64,QByteArray)));
|
||||
connect(w, SIGNAL(addWatchpointRequested(quint64,uint)), SLOT(handleWatchpointRequest(quint64,uint)));
|
||||
}
|
||||
|
||||
bool MemoryAgent::doCreateBinEditor(quint64 addr, unsigned flags,
|
||||
@@ -222,7 +210,7 @@ void MemoryAgent::createBinEditor(quint64 addr)
|
||||
createBinEditor(addr, 0, QList<MemoryMarkup>(), QPoint(), QString(), 0);
|
||||
}
|
||||
|
||||
void MemoryAgent::fetchLazyData(IEditor *, quint64 block)
|
||||
void MemoryAgent::fetchLazyData(quint64 block)
|
||||
{
|
||||
m_engine->fetchMemory(this, sender(), BinBlockSize * block, BinBlockSize);
|
||||
}
|
||||
@@ -235,15 +223,14 @@ void MemoryAgent::addLazyData(QObject *editorToken, quint64 addr,
|
||||
MemoryView::binEditorAddData(w, addr, ba);
|
||||
}
|
||||
|
||||
void MemoryAgent::provideNewRange(IEditor *, quint64 address)
|
||||
void MemoryAgent::provideNewRange(quint64 address)
|
||||
{
|
||||
QWidget *w = qobject_cast<QWidget *>(sender());
|
||||
QTC_ASSERT(w, return);
|
||||
MemoryView::setBinEditorRange(w, address, DataRange, BinBlockSize);
|
||||
}
|
||||
|
||||
void MemoryAgent::handleDataChanged(IEditor *,
|
||||
quint64 addr, const QByteArray &data)
|
||||
void MemoryAgent::handleDataChanged(quint64 addr, const QByteArray &data)
|
||||
{
|
||||
m_engine->changeMemory(this, sender(), addr, data);
|
||||
}
|
||||
|
||||
@@ -95,10 +95,9 @@ public slots:
|
||||
void closeViews();
|
||||
|
||||
private slots:
|
||||
void fetchLazyData(Core::IEditor *, quint64 block);
|
||||
void provideNewRange(Core::IEditor *editor, quint64 address);
|
||||
void handleDataChanged(Core::IEditor *editor, quint64 address,
|
||||
const QByteArray &data);
|
||||
void fetchLazyData(quint64 block);
|
||||
void provideNewRange(quint64 address);
|
||||
void handleDataChanged(quint64 address, const QByteArray &data);
|
||||
void handleWatchpointRequest(quint64 address, uint size);
|
||||
void updateMemoryView(quint64 address, quint64 length);
|
||||
void engineStateChanged(Debugger::DebuggerState s);
|
||||
|
||||
@@ -44,11 +44,7 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><html><head/><body>
|
||||
<p>The debugger is not configured to use the public Microsoft Symbol Server.<br>This is recommended for retrieval of the symbols of the operating system libraries.</p>
|
||||
<p><span style=" font-style:italic;">Note:</span> It is recommended, that if you use the Microsoft Symbol Server, to also use a local symbol cache.<br>Also, a fast internet connection is required for this to work smoothly,<br>and a delay might occur when connecting for the first time, when caching the symbols for the first time.</p>
|
||||
<p>Would you like to set it up?</p>
|
||||
</body></html></string>
|
||||
<string><html><head/><body><p>The debugger is not configured to use the public Microsoft Symbol Server.<br/>This is recommended for retrieval of the symbols of the operating system libraries.</p><p><span style=" font-style:italic;">Note:</span> It is recommended, that if you use the Microsoft Symbol Server, to also use a local symbol cache.<br/>A fast internet connection is required for this to work smoothly,<br/>and a delay might occur when connecting for the first time and caching the symbols.</p><p>What would you like to set up?</p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
|
||||
@@ -37,61 +37,40 @@
|
||||
|
||||
using namespace Designer::Internal;
|
||||
|
||||
static inline QSettings *coreSettings()
|
||||
{
|
||||
if (Core::ICore::instance())
|
||||
return Core::ICore::settings();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SettingsManager::beginGroup(const QString &prefix)
|
||||
{
|
||||
QSettings *settings = coreSettings();
|
||||
QTC_ASSERT(settings, return);
|
||||
settings->beginGroup(addPrefix(prefix));
|
||||
Core::ICore::settings()->beginGroup(addPrefix(prefix));
|
||||
}
|
||||
|
||||
void SettingsManager::endGroup()
|
||||
{
|
||||
QSettings *settings = coreSettings();
|
||||
QTC_ASSERT(settings, return);
|
||||
settings->endGroup();
|
||||
Core::ICore::settings()->endGroup();
|
||||
}
|
||||
|
||||
bool SettingsManager::contains(const QString &key) const
|
||||
{
|
||||
const QSettings *settings = coreSettings();
|
||||
QTC_ASSERT(settings, return false);
|
||||
return settings->contains(addPrefix(key));
|
||||
return Core::ICore::settings()->contains(addPrefix(key));
|
||||
}
|
||||
|
||||
void SettingsManager::setValue(const QString &key, const QVariant &value)
|
||||
{
|
||||
QSettings *settings = coreSettings();
|
||||
QTC_ASSERT(settings, return);
|
||||
settings->setValue(addPrefix(key), value);
|
||||
Core::ICore::settings()->setValue(addPrefix(key), value);
|
||||
}
|
||||
|
||||
QVariant SettingsManager::value(const QString &key, const QVariant &defaultValue) const
|
||||
{
|
||||
const QSettings *settings = coreSettings();
|
||||
QTC_ASSERT(settings, return QVariant());
|
||||
return settings->value(addPrefix(key), defaultValue);
|
||||
return Core::ICore::settings()->value(addPrefix(key), defaultValue);
|
||||
}
|
||||
|
||||
void SettingsManager::remove(const QString &key)
|
||||
{
|
||||
QSettings *settings = coreSettings();
|
||||
QTC_ASSERT(settings, return);
|
||||
settings->remove(addPrefix(key));
|
||||
Core::ICore::settings()->remove(addPrefix(key));
|
||||
}
|
||||
|
||||
QString SettingsManager::addPrefix(const QString &name) const
|
||||
{
|
||||
const QSettings *settings = coreSettings();
|
||||
QTC_ASSERT(settings, return name);
|
||||
QString result = name;
|
||||
if (settings->group().isEmpty())
|
||||
if (Core::ICore::settings()->group().isEmpty())
|
||||
result.prepend(QLatin1String("Designer"));
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -508,11 +508,9 @@ void SearchResultWindow::handleExpandCollapseToolButton(bool checked)
|
||||
void SearchResultWindow::readSettings()
|
||||
{
|
||||
QSettings *s = Core::ICore::settings();
|
||||
if (s) {
|
||||
s->beginGroup(QLatin1String(SETTINGSKEYSECTIONNAME));
|
||||
d->m_expandCollapseAction->setChecked(s->value(QLatin1String(SETTINGSKEYEXPANDRESULTS), d->m_initiallyExpand).toBool());
|
||||
s->endGroup();
|
||||
}
|
||||
s->beginGroup(QLatin1String(SETTINGSKEYSECTIONNAME));
|
||||
d->m_expandCollapseAction->setChecked(s->value(QLatin1String(SETTINGSKEYEXPANDRESULTS), d->m_initiallyExpand).toBool());
|
||||
s->endGroup();
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -521,11 +519,9 @@ void SearchResultWindow::readSettings()
|
||||
void SearchResultWindow::writeSettings()
|
||||
{
|
||||
QSettings *s = Core::ICore::settings();
|
||||
if (s) {
|
||||
s->beginGroup(QLatin1String(SETTINGSKEYSECTIONNAME));
|
||||
s->setValue(QLatin1String(SETTINGSKEYEXPANDRESULTS), d->m_expandCollapseAction->isChecked());
|
||||
s->endGroup();
|
||||
}
|
||||
s->beginGroup(QLatin1String(SETTINGSKEYSECTIONNAME));
|
||||
s->setValue(QLatin1String(SETTINGSKEYEXPANDRESULTS), d->m_expandCollapseAction->isChecked());
|
||||
s->endGroup();
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -511,21 +511,19 @@ void GerritPlugin::fetch(const QSharedPointer<Gerrit::Internal::GerritChange> &c
|
||||
}
|
||||
}
|
||||
|
||||
if (!verifiedRepository && QFile::exists(repository + QLatin1String("/.gitmodules"))) {
|
||||
QMap<QString,QString> submodules = gitClient->synchronousSubmoduleList(repository);
|
||||
|
||||
QMap<QString,QString>::const_iterator i = submodules.constBegin();
|
||||
while (i != submodules.constEnd()) {
|
||||
QString remote = i.value();
|
||||
if (!verifiedRepository) {
|
||||
Git::Internal::SubmoduleDataMap submodules = gitClient->submoduleList(repository);
|
||||
foreach (const Git::Internal::SubmoduleData &submoduleData, submodules) {
|
||||
QString remote = submoduleData.url;
|
||||
if (remote.endsWith(QLatin1String(".git")))
|
||||
remote.chop(4);
|
||||
if (remote.contains(m_parameters->host) && remote.endsWith(change->project)
|
||||
&& QFile::exists(repository + QLatin1Char('/') + i.key())) {
|
||||
repository = QDir::cleanPath(repository + QLatin1Char('/') + i.key());
|
||||
&& QFile::exists(repository + QLatin1Char('/') + submoduleData.dir)) {
|
||||
repository = QDir::cleanPath(repository + QLatin1Char('/')
|
||||
+ submoduleData.dir);
|
||||
verifiedRepository = true;
|
||||
break;
|
||||
}
|
||||
++i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1962,22 +1962,60 @@ QMap<QString,QString> GitClient::synchronousRemotesList(const QString &workingDi
|
||||
return result;
|
||||
}
|
||||
|
||||
// function returns submodules in format path=url
|
||||
QMap<QString,QString> GitClient::synchronousSubmoduleList(const QString &workingDirectory)
|
||||
SubmoduleDataMap GitClient::submoduleList(const QString &workingDirectory)
|
||||
{
|
||||
QMap<QString,QString> result;
|
||||
if (!QFile::exists(workingDirectory + QLatin1String("/.gitmodules")))
|
||||
SubmoduleDataMap result;
|
||||
QString gitmodulesFileName = workingDirectory + QLatin1String("/.gitmodules");
|
||||
if (!QFile::exists(gitmodulesFileName))
|
||||
return result;
|
||||
|
||||
QSettings gitmodulesFile(workingDirectory + QLatin1String("/.gitmodules"), QSettings::IniFormat);
|
||||
static QMap<QString, SubmoduleDataMap> cachedSubmoduleData;
|
||||
|
||||
foreach (const QString &submoduleGroup, gitmodulesFile.childGroups()) {
|
||||
gitmodulesFile.beginGroup(submoduleGroup);
|
||||
result.insertMulti(gitmodulesFile.value(QLatin1String("path")).toString(),
|
||||
gitmodulesFile.value(QLatin1String("url")).toString());
|
||||
gitmodulesFile.endGroup();
|
||||
if (cachedSubmoduleData.contains(workingDirectory))
|
||||
return cachedSubmoduleData.value(workingDirectory);
|
||||
QStringList args(QLatin1String("-l"));
|
||||
|
||||
QStringList allConfigs = readConfig(workingDirectory, args).split(QLatin1Char('\n'));
|
||||
const QString submoduleLineStart = QLatin1String("submodule.");
|
||||
foreach (const QString &configLine, allConfigs) {
|
||||
if (!configLine.startsWith(submoduleLineStart))
|
||||
continue;
|
||||
|
||||
int nameStart = submoduleLineStart.size();
|
||||
int nameEnd = configLine.indexOf(QLatin1Char('.'), nameStart);
|
||||
|
||||
QString submoduleName = configLine.mid(nameStart, nameEnd - nameStart);
|
||||
|
||||
SubmoduleData submoduleData;
|
||||
if (result.contains(submoduleName))
|
||||
submoduleData = result[submoduleName];
|
||||
|
||||
if (configLine.mid(nameEnd, 5) == QLatin1String(".url="))
|
||||
submoduleData.url = configLine.mid(nameEnd + 5);
|
||||
else if (configLine.mid(nameEnd, 8) == QLatin1String(".ignore="))
|
||||
submoduleData.ignore = configLine.mid(nameEnd + 8);
|
||||
else
|
||||
continue;
|
||||
|
||||
result.insert(submoduleName, submoduleData);
|
||||
}
|
||||
|
||||
// if config found submodules
|
||||
if (!result.isEmpty()) {
|
||||
QSettings gitmodulesFile(gitmodulesFileName, QSettings::IniFormat);
|
||||
|
||||
foreach (const QString &submoduleName, result.keys()) {
|
||||
gitmodulesFile.beginGroup(QLatin1String("submodule \"") +
|
||||
submoduleName + QLatin1Char('"'));
|
||||
result[submoduleName].dir = gitmodulesFile.value(QLatin1String("path")).toString();
|
||||
QString ignore = gitmodulesFile.value(QLatin1String("ignore")).toString();
|
||||
if (!ignore.isEmpty() && result[submoduleName].ignore.isEmpty())
|
||||
result[submoduleName].ignore = ignore;
|
||||
gitmodulesFile.endGroup();
|
||||
}
|
||||
}
|
||||
cachedSubmoduleData.insert(workingDirectory, result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -2172,7 +2210,7 @@ void GitClient::submoduleUpdate(const QString &workingDirectory)
|
||||
|
||||
void GitClient::promptSubmoduleUpdate(const QString &workingDirectory)
|
||||
{
|
||||
if (!QFile::exists(workingDirectory + QLatin1String("/.gitmodules")))
|
||||
if (submoduleList(workingDirectory).isEmpty())
|
||||
return;
|
||||
|
||||
if (QMessageBox::question(Core::ICore::mainWindow(), tr("Submodules Found"),
|
||||
|
||||
@@ -86,6 +86,16 @@ enum StashFlag {
|
||||
NoPrompt = 0x02
|
||||
};
|
||||
|
||||
class SubmoduleData
|
||||
{
|
||||
public:
|
||||
QString dir;
|
||||
QString url;
|
||||
QString ignore;
|
||||
};
|
||||
|
||||
typedef QMap<QString, SubmoduleData> SubmoduleDataMap;
|
||||
|
||||
class GitClient : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -200,7 +210,7 @@ public:
|
||||
|
||||
QMap<QString,QString> synchronousRemotesList(const QString &workingDirectory,
|
||||
QString *errorMessage = 0);
|
||||
QMap<QString,QString> synchronousSubmoduleList(const QString &workingDirectory);
|
||||
SubmoduleDataMap submoduleList(const QString &workingDirectory);
|
||||
bool synchronousShow(const QString &workingDirectory, const QString &id,
|
||||
QString *output, QString *errorMessage);
|
||||
|
||||
|
||||
@@ -233,7 +233,8 @@ ActionCommandPair
|
||||
{
|
||||
QAction *action = new QAction(text, this);
|
||||
Core::Command *command = Core::ActionManager::registerAction(action, id, context);
|
||||
ac->addAction(command);
|
||||
if (ac)
|
||||
ac->addAction(command);
|
||||
m_repositoryActions.push_back(action);
|
||||
if (addToLocator)
|
||||
m_commandLocator->appendCommand(command);
|
||||
@@ -439,7 +440,7 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
globalcontext, false, SLOT(resetRepository()));
|
||||
|
||||
createRepositoryAction(localRepositoryMenu,
|
||||
tr("Interactive Rebase..."), Core::Id("Git.Rebase"),
|
||||
tr("Interactive Rebase..."), Core::Id("Git.InteractiveRebase"),
|
||||
globalcontext, true, SLOT(startRebase()));
|
||||
|
||||
createRepositoryAction(localRepositoryMenu,
|
||||
@@ -591,6 +592,29 @@ bool GitPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
|
||||
// --------------
|
||||
|
||||
/* Actions only in locator */
|
||||
createRepositoryAction(0, tr("Show..."), Core::Id("Git.Show"),
|
||||
globalcontext, true, SLOT(startChangeRelatedAction()));
|
||||
|
||||
createRepositoryAction(0, tr("Revert..."), Core::Id("Git.Revert"),
|
||||
globalcontext, true, SLOT(startChangeRelatedAction()));
|
||||
|
||||
createRepositoryAction(0, tr("Cherry Pick..."), Core::Id("Git.CherryPick"),
|
||||
globalcontext, true, SLOT(startChangeRelatedAction()));
|
||||
|
||||
createRepositoryAction(0, tr("Checkout..."), Core::Id("Git.Checkout"),
|
||||
globalcontext, true, SLOT(startChangeRelatedAction()));
|
||||
|
||||
createRepositoryAction(0, tr("Rebase..."), Core::Id("Git.Rebase"),
|
||||
globalcontext, true, SLOT(branchList()));
|
||||
|
||||
createRepositoryAction(0, tr("Merge..."), Core::Id("Git.Merge"),
|
||||
globalcontext, true, SLOT(branchList()));
|
||||
|
||||
/* \Actions only in locator */
|
||||
|
||||
// --------------
|
||||
|
||||
/* "Git Tools" menu */
|
||||
Core::ActionContainer *gitToolsMenu = Core::ActionManager::createMenu(Core::Id("Git.GitToolsMenu"));
|
||||
gitToolsMenu->menu()->setTitle(tr("Git &Tools"));
|
||||
@@ -1323,8 +1347,9 @@ void GitPlugin::updateActions(VcsBase::VcsBasePlugin::ActionState as)
|
||||
|
||||
foreach (QAction *repositoryAction, m_repositoryActions)
|
||||
repositoryAction->setEnabled(repositoryEnabled);
|
||||
|
||||
m_submoduleUpdateAction->setVisible(repositoryEnabled
|
||||
&& QFile::exists(currentState().topLevel() + QLatin1String("/.gitmodules")));
|
||||
&& !m_gitClient->submoduleList(currentState().topLevel()).isEmpty());
|
||||
|
||||
updateContinueAndAbortCommands();
|
||||
updateRepositoryBrowserAction();
|
||||
|
||||
@@ -1274,37 +1274,35 @@ void ProjectExplorerPlugin::savePersistentSettings()
|
||||
}
|
||||
|
||||
QSettings *s = Core::ICore::settings();
|
||||
if (s) {
|
||||
s->setValue(QLatin1String("ProjectExplorer/StartupSession"), d->m_session->activeSession());
|
||||
s->remove(QLatin1String("ProjectExplorer/RecentProjects/Files"));
|
||||
s->setValue(QLatin1String("ProjectExplorer/StartupSession"), d->m_session->activeSession());
|
||||
s->remove(QLatin1String("ProjectExplorer/RecentProjects/Files"));
|
||||
|
||||
QStringList fileNames;
|
||||
QStringList displayNames;
|
||||
QList<QPair<QString, QString> >::const_iterator it, end;
|
||||
end = d->m_recentProjects.constEnd();
|
||||
for (it = d->m_recentProjects.constBegin(); it != end; ++it) {
|
||||
fileNames << (*it).first;
|
||||
displayNames << (*it).second;
|
||||
}
|
||||
|
||||
s->setValue(QLatin1String("ProjectExplorer/RecentProjects/FileNames"), fileNames);
|
||||
s->setValue(QLatin1String("ProjectExplorer/RecentProjects/DisplayNames"), displayNames);
|
||||
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/BuildBeforeDeploy"), d->m_projectExplorerSettings.buildBeforeDeploy);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/DeployBeforeRun"), d->m_projectExplorerSettings.deployBeforeRun);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/SaveBeforeBuild"), d->m_projectExplorerSettings.saveBeforeBuild);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/ShowCompilerOutput"), d->m_projectExplorerSettings.showCompilerOutput);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/ShowRunOutput"), d->m_projectExplorerSettings.showRunOutput);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/ShowDebugOutput"), d->m_projectExplorerSettings.showDebugOutput);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/CleanOldAppOutput"), d->m_projectExplorerSettings.cleanOldAppOutput);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/MergeStdErrAndStdOut"), d->m_projectExplorerSettings.mergeStdErrAndStdOut);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/WrapAppOutput"), d->m_projectExplorerSettings.wrapAppOutput);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/UseJom"), d->m_projectExplorerSettings.useJom);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/AutoRestoreLastSession"), d->m_projectExplorerSettings.autorestoreLastSession);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/PromptToStopRunControl"), d->m_projectExplorerSettings.prompToStopRunControl);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/MaxAppOutputLines"), d->m_projectExplorerSettings.maxAppOutputLines);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/EnvironmentId"), d->m_projectExplorerSettings.environmentId.toByteArray());
|
||||
QStringList fileNames;
|
||||
QStringList displayNames;
|
||||
QList<QPair<QString, QString> >::const_iterator it, end;
|
||||
end = d->m_recentProjects.constEnd();
|
||||
for (it = d->m_recentProjects.constBegin(); it != end; ++it) {
|
||||
fileNames << (*it).first;
|
||||
displayNames << (*it).second;
|
||||
}
|
||||
|
||||
s->setValue(QLatin1String("ProjectExplorer/RecentProjects/FileNames"), fileNames);
|
||||
s->setValue(QLatin1String("ProjectExplorer/RecentProjects/DisplayNames"), displayNames);
|
||||
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/BuildBeforeDeploy"), d->m_projectExplorerSettings.buildBeforeDeploy);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/DeployBeforeRun"), d->m_projectExplorerSettings.deployBeforeRun);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/SaveBeforeBuild"), d->m_projectExplorerSettings.saveBeforeBuild);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/ShowCompilerOutput"), d->m_projectExplorerSettings.showCompilerOutput);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/ShowRunOutput"), d->m_projectExplorerSettings.showRunOutput);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/ShowDebugOutput"), d->m_projectExplorerSettings.showDebugOutput);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/CleanOldAppOutput"), d->m_projectExplorerSettings.cleanOldAppOutput);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/MergeStdErrAndStdOut"), d->m_projectExplorerSettings.mergeStdErrAndStdOut);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/WrapAppOutput"), d->m_projectExplorerSettings.wrapAppOutput);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/UseJom"), d->m_projectExplorerSettings.useJom);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/AutoRestoreLastSession"), d->m_projectExplorerSettings.autorestoreLastSession);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/PromptToStopRunControl"), d->m_projectExplorerSettings.prompToStopRunControl);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/MaxAppOutputLines"), d->m_projectExplorerSettings.maxAppOutputLines);
|
||||
s->setValue(QLatin1String("ProjectExplorer/Settings/EnvironmentId"), d->m_projectExplorerSettings.environmentId.toByteArray());
|
||||
}
|
||||
|
||||
void ProjectExplorerPlugin::openProjectWelcomePage(const QString &fileName)
|
||||
|
||||
@@ -319,8 +319,6 @@ QtcPlugin {
|
||||
"images/targetleftbutton.png",
|
||||
"images/targetpanel_bottom.png",
|
||||
"images/targetpanel_gradient.png",
|
||||
"images/targetremovebutton.png",
|
||||
"images/targetremovebuttondark.png",
|
||||
"images/targetrightbutton.png",
|
||||
"images/targetrunselected.png",
|
||||
"images/targetseparatorbackground.png",
|
||||
|
||||
@@ -658,8 +658,10 @@ void Target::updateDefaultRunConfigurations()
|
||||
}
|
||||
|
||||
// Do actual changes:
|
||||
foreach (RunConfiguration *rc, toRemove)
|
||||
foreach (RunConfiguration *rc, toRemove) {
|
||||
removeRunConfiguration(rc);
|
||||
existingConfigured.removeOne(rc); // make sure to also remove them from existingConfigured!
|
||||
}
|
||||
|
||||
if (removeExistingUnconfigured) {
|
||||
foreach (RunConfiguration *rc, existingUnconfigured)
|
||||
|
||||
@@ -45,10 +45,13 @@ public:
|
||||
TaskHub();
|
||||
virtual ~TaskHub();
|
||||
|
||||
public slots:
|
||||
void addCategory(const Core::Id &categoryId, const QString &displayName, bool visible = true);
|
||||
void addTask(Task task);
|
||||
void addTask(ProjectExplorer::Task task);
|
||||
void clearTasks(const Core::Id &categoryId = Core::Id());
|
||||
void removeTask(const Task &task);
|
||||
void removeTask(const ProjectExplorer::Task &task);
|
||||
|
||||
public:
|
||||
void updateTaskFileName(unsigned int id, const QString &fileName);
|
||||
void updateTaskLineNumber(unsigned int id, int line);
|
||||
void taskMarkClicked(unsigned int id);
|
||||
@@ -58,6 +61,7 @@ public:
|
||||
void requestPopup();
|
||||
|
||||
QIcon taskTypeIcon(ProjectExplorer::Task::TaskType t) const;
|
||||
|
||||
signals:
|
||||
void categoryAdded(const Core::Id &categoryId, const QString &displayName, bool visible);
|
||||
void taskAdded(const ProjectExplorer::Task &task);
|
||||
|
||||
@@ -3,7 +3,7 @@ include(../../qtcreatorplugin.pri)
|
||||
DEFINES += \
|
||||
PYTHONEDITOR_LIBRARY
|
||||
|
||||
OTHER_FILES += PythonEditor.pluginspec.in \
|
||||
OTHER_FILES += \
|
||||
pythoneditor.mimetypes.xml
|
||||
|
||||
RESOURCES += \
|
||||
|
||||
@@ -135,8 +135,6 @@ void QbsBuildStep::run(QFutureInterface<bool> &fi)
|
||||
this, SLOT(handleProgress(int)));
|
||||
connect(m_job, SIGNAL(reportCommandDescription(QString,QString)),
|
||||
this, SLOT(handleCommandDescriptionReport(QString,QString)));
|
||||
connect(m_job, SIGNAL(reportWarning(qbs::Error)),
|
||||
this, SLOT(handleWarningReport(qbs::Error)));
|
||||
connect(m_job, SIGNAL(reportProcessResult(qbs::ProcessResult)),
|
||||
this, SLOT(handleProcessResultReport(qbs::ProcessResult)));
|
||||
}
|
||||
@@ -248,14 +246,6 @@ void QbsBuildStep::handleProgress(int value)
|
||||
m_fi->setProgressValue(m_progressBase + value);
|
||||
}
|
||||
|
||||
void QbsBuildStep::handleWarningReport(const qbs::Error &error)
|
||||
{
|
||||
foreach (const qbs::ErrorData &data, error.entries()) {
|
||||
createTaskAndOutput(ProjectExplorer::Task::Warning, data.description(),
|
||||
data.codeLocation().fileName(), data.codeLocation().line());
|
||||
}
|
||||
}
|
||||
|
||||
void QbsBuildStep::handleCommandDescriptionReport(const QString &highlight, const QString &message)
|
||||
{
|
||||
Q_UNUSED(highlight);
|
||||
|
||||
@@ -79,7 +79,6 @@ private slots:
|
||||
void buildingDone(bool success);
|
||||
void handleTaskStarted(const QString &desciption, int max);
|
||||
void handleProgress(int value);
|
||||
void handleWarningReport(const qbs::Error &error);
|
||||
void handleCommandDescriptionReport(const QString &highlight, const QString &message);
|
||||
void handleProcessResultReport(const qbs::ProcessResult &result);
|
||||
|
||||
|
||||
@@ -32,6 +32,9 @@
|
||||
#include <qbs.h>
|
||||
|
||||
#include <coreplugin/messagemanager.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/taskhub.h>
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QMutexLocker>
|
||||
@@ -46,6 +49,9 @@ namespace Internal {
|
||||
|
||||
QbsLogSink::QbsLogSink(QObject *parent) : QObject(parent)
|
||||
{
|
||||
ProjectExplorer::TaskHub *hub = ProjectExplorer::ProjectExplorerPlugin::instance()->taskHub();
|
||||
connect(this, SIGNAL(newTask(ProjectExplorer::Task)),
|
||||
hub, SLOT(addTask(ProjectExplorer::Task)), Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
void QbsLogSink::sendMessages()
|
||||
@@ -62,6 +68,16 @@ void QbsLogSink::sendMessages()
|
||||
mm->printToOutputPane(msg, Core::MessageManager::NoModeSwitch);
|
||||
}
|
||||
|
||||
void QbsLogSink::doPrintWarning(const qbs::Error &warning)
|
||||
{
|
||||
foreach (const qbs::ErrorData &data, warning.entries())
|
||||
emit newTask(ProjectExplorer::Task(ProjectExplorer::Task::Warning,
|
||||
data.description(),
|
||||
Utils::FileName::fromString(data.codeLocation().fileName()),
|
||||
data.codeLocation().line(),
|
||||
ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
|
||||
}
|
||||
|
||||
void QbsLogSink::doPrintMessage(qbs::LoggerLevel level, const QString &message, const QString &tag)
|
||||
{
|
||||
Q_UNUSED(tag);
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
#ifndef QBSLOGSINK_H
|
||||
#define QBSLOGSINK_H
|
||||
|
||||
#include <projectexplorer/task.h>
|
||||
|
||||
#include <qbs.h>
|
||||
|
||||
#include <QMutex>
|
||||
@@ -45,10 +47,14 @@ class QbsLogSink : public QObject, public qbs::ILogSink
|
||||
public:
|
||||
QbsLogSink(QObject *parent = 0);
|
||||
|
||||
signals:
|
||||
void newTask(const ProjectExplorer::Task &task);
|
||||
|
||||
private slots:
|
||||
void sendMessages();
|
||||
|
||||
private:
|
||||
void doPrintWarning(const qbs::Error &warning);
|
||||
void doPrintMessage(qbs::LoggerLevel level, const QString &message, const QString &tag);
|
||||
|
||||
QStringList m_messages;
|
||||
|
||||
@@ -86,6 +86,21 @@ QWidget {
|
||||
}
|
||||
}
|
||||
|
||||
QWidget {
|
||||
layout: HorizontalLayout {
|
||||
Label {
|
||||
text: qsTr("Enabled")
|
||||
toolTip: qsTr("Determines whether the button is enabled or not.")
|
||||
}
|
||||
CheckBox {
|
||||
text: backendValues.enabled.value
|
||||
backendValue: backendValues.enabled
|
||||
baseStateFlag: isBaseState
|
||||
checkable: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QWidget {
|
||||
layout: HorizontalLayout {
|
||||
Label {
|
||||
|
||||
@@ -42,6 +42,7 @@ GroupBox {
|
||||
LineEdit {
|
||||
backendValue: backendValues.text
|
||||
baseStateFlag: isBaseState
|
||||
translation: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@ GroupBox {
|
||||
LineEdit {
|
||||
backendValue: backendValues.text
|
||||
baseStateFlag: isBaseState
|
||||
translation: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +72,8 @@ public:
|
||||
bool instanceHasBinding(const PropertyName &name) const;
|
||||
bool propertyAffectedByCurrentState(const PropertyName &name) const;
|
||||
QVariant modelValue(const PropertyName &name) const;
|
||||
bool isTranslatableText(const PropertyName &name) const;
|
||||
QString stripedTranslatableText(const PropertyName &name) const;
|
||||
QString expression(const PropertyName &name) const;
|
||||
bool isInBaseState() const;
|
||||
QmlPropertyChanges propertyChangeForCurrentState() const;
|
||||
@@ -98,6 +100,8 @@ public:
|
||||
|
||||
static QVariant instanceValue(const ModelNode &modelNode, const PropertyName &name);
|
||||
|
||||
static QString generateTranslatableText(const QString& text);
|
||||
|
||||
protected:
|
||||
NodeInstance nodeInstance() const;
|
||||
QmlObjectNode nodeForInstance(const NodeInstance &instance) const;
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
class RewritingException: public Exception
|
||||
class QMLDESIGNERCORE_EXPORT RewritingException: public Exception
|
||||
{
|
||||
public:
|
||||
RewritingException(int line,
|
||||
|
||||
@@ -156,11 +156,15 @@ NodeInstanceServerProxy::NodeInstanceServerProxy(NodeInstanceView *nodeInstanceV
|
||||
if (!envImportPath.isEmpty())
|
||||
applicationPath = envImportPath;
|
||||
|
||||
QProcessEnvironment enviroment = QProcessEnvironment::systemEnvironment();
|
||||
QProcessEnvironment environment = QProcessEnvironment::systemEnvironment();
|
||||
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) && (defined(Q_OS_MAC) || defined(Q_OS_LINUX))
|
||||
environment.insert(QLatin1String("DESIGNER_DONT_USE_SHARED_MEMORY"), QLatin1String("1"));
|
||||
#endif
|
||||
|
||||
if (QFileInfo(applicationPath).exists()) {
|
||||
m_qmlPuppetEditorProcess = new QProcess;
|
||||
m_qmlPuppetEditorProcess->setProcessEnvironment(enviroment);
|
||||
m_qmlPuppetEditorProcess->setProcessEnvironment(environment);
|
||||
m_qmlPuppetEditorProcess->setObjectName("EditorProcess");
|
||||
connect(m_qmlPuppetEditorProcess.data(), SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(processFinished(int,QProcess::ExitStatus)));
|
||||
connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()), m_qmlPuppetEditorProcess.data(), SLOT(kill()));
|
||||
@@ -171,7 +175,7 @@ NodeInstanceServerProxy::NodeInstanceServerProxy(NodeInstanceView *nodeInstanceV
|
||||
|
||||
if (runModus == NormalModus) {
|
||||
m_qmlPuppetPreviewProcess = new QProcess;
|
||||
m_qmlPuppetPreviewProcess->setProcessEnvironment(enviroment);
|
||||
m_qmlPuppetPreviewProcess->setProcessEnvironment(environment);
|
||||
m_qmlPuppetPreviewProcess->setObjectName("PreviewProcess");
|
||||
connect(m_qmlPuppetPreviewProcess.data(), SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(processFinished(int,QProcess::ExitStatus)));
|
||||
connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()), m_qmlPuppetPreviewProcess.data(), SLOT(kill()));
|
||||
@@ -180,7 +184,7 @@ NodeInstanceServerProxy::NodeInstanceServerProxy(NodeInstanceView *nodeInstanceV
|
||||
m_qmlPuppetPreviewProcess->start(applicationPath, QStringList() << socketToken << "previewmode" << "-graphicssystem raster");
|
||||
|
||||
m_qmlPuppetRenderProcess = new QProcess;
|
||||
m_qmlPuppetRenderProcess->setProcessEnvironment(enviroment);
|
||||
m_qmlPuppetRenderProcess->setProcessEnvironment(environment);
|
||||
m_qmlPuppetRenderProcess->setObjectName("RenderProcess");
|
||||
connect(m_qmlPuppetRenderProcess.data(), SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(processFinished(int,QProcess::ExitStatus)));
|
||||
connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()), m_qmlPuppetRenderProcess.data(), SLOT(kill()));
|
||||
|
||||
@@ -175,6 +175,34 @@ QVariant QmlObjectNode::modelValue(const PropertyName &name) const
|
||||
return propertyChanges.modelNode().variantProperty(name).value();
|
||||
}
|
||||
|
||||
bool QmlObjectNode::isTranslatableText(const PropertyName &name) const
|
||||
{
|
||||
if (modelNode().metaInfo().isValid() && modelNode().metaInfo().hasProperty(name))
|
||||
if (modelNode().metaInfo().propertyTypeName(name) == "QString" || modelNode().metaInfo().propertyTypeName(name) == "string") {
|
||||
if (modelNode().hasBindingProperty(name)) {
|
||||
static QRegExp regularExpressionPatter("qsTr\\((\".*\")\\)");
|
||||
return regularExpressionPatter.exactMatch(modelNode().bindingProperty(name).expression());
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
QString QmlObjectNode::stripedTranslatableText(const PropertyName &name) const
|
||||
{
|
||||
if (modelNode().hasBindingProperty(name)) {
|
||||
static QRegExp regularExpressionPatter("qsTr\\(\"(.*)\"\\)");
|
||||
if (regularExpressionPatter.exactMatch(modelNode().bindingProperty(name).expression()))
|
||||
return regularExpressionPatter.cap(1);
|
||||
} else {
|
||||
return modelNode().variantProperty(name).value().toString();
|
||||
}
|
||||
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString QmlObjectNode::expression(const PropertyName &name) const
|
||||
{
|
||||
if (!isValid())
|
||||
@@ -387,6 +415,11 @@ QVariant QmlObjectNode::instanceValue(const ModelNode &modelNode, const Property
|
||||
return modelView->instanceForModelNode(modelNode).property(name);
|
||||
}
|
||||
|
||||
QString QmlObjectNode::generateTranslatableText(const QString &text)
|
||||
{
|
||||
return QString("qsTr(\"%1\")").arg(text);
|
||||
}
|
||||
|
||||
TypeName QmlObjectNode::instanceType(const PropertyName &name) const
|
||||
{
|
||||
return nodeInstance().instanceType(name);
|
||||
|
||||
@@ -196,13 +196,11 @@ void QmlJSCodeStyleSettingsPage::apply()
|
||||
TextEditor::SimpleCodeStylePreferences *originalTabPreferences = QmlJSToolsSettings::globalCodeStyle();
|
||||
if (originalTabPreferences->tabSettings() != m_pageTabPreferences->tabSettings()) {
|
||||
originalTabPreferences->setTabSettings(m_pageTabPreferences->tabSettings());
|
||||
if (s)
|
||||
originalTabPreferences->toSettings(QLatin1String(QmlJSTools::Constants::QML_JS_SETTINGS_ID), s);
|
||||
originalTabPreferences->toSettings(QLatin1String(QmlJSTools::Constants::QML_JS_SETTINGS_ID), s);
|
||||
}
|
||||
if (originalTabPreferences->currentDelegate() != m_pageTabPreferences->currentDelegate()) {
|
||||
originalTabPreferences->setCurrentDelegate(m_pageTabPreferences->currentDelegate());
|
||||
if (s)
|
||||
originalTabPreferences->toSettings(QLatin1String(QmlJSTools::Constants::QML_JS_SETTINGS_ID), s);
|
||||
originalTabPreferences->toSettings(QLatin1String(QmlJSTools::Constants::QML_JS_SETTINGS_ID), s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -925,6 +925,7 @@ void ModelManager::updateCppQmlTypes(QFutureInterface<void> &interface,
|
||||
|
||||
FindExportedCppTypes finder(snapshot);
|
||||
|
||||
bool hasNewInfo = false;
|
||||
typedef QPair<CPlusPlus::Document::Ptr, bool> DocScanPair;
|
||||
foreach (const DocScanPair &pair, documents) {
|
||||
if (interface.isCanceled())
|
||||
@@ -934,7 +935,7 @@ void ModelManager::updateCppQmlTypes(QFutureInterface<void> &interface,
|
||||
const bool scan = pair.second;
|
||||
const QString fileName = doc->fileName();
|
||||
if (!scan) {
|
||||
newData.remove(fileName);
|
||||
hasNewInfo = hasNewInfo || newData.remove(fileName) > 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -943,9 +944,11 @@ void ModelManager::updateCppQmlTypes(QFutureInterface<void> &interface,
|
||||
QList<LanguageUtils::FakeMetaObject::ConstPtr> exported = finder.exportedTypes();
|
||||
QHash<QString, QString> contextProperties = finder.contextProperties();
|
||||
if (exported.isEmpty() && contextProperties.isEmpty()) {
|
||||
newData.remove(fileName);
|
||||
hasNewInfo = hasNewInfo || newData.remove(fileName) > 0;
|
||||
} else {
|
||||
CppData &data = newData[fileName];
|
||||
// currently we have no simple way to compare, so we assume the worse
|
||||
hasNewInfo = true;
|
||||
data.exportedTypes = exported;
|
||||
data.contextProperties = contextProperties;
|
||||
}
|
||||
@@ -955,6 +958,9 @@ void ModelManager::updateCppQmlTypes(QFutureInterface<void> &interface,
|
||||
|
||||
QMutexLocker locker(&qmlModelManager->m_cppDataMutex);
|
||||
qmlModelManager->m_cppDataHash = newData;
|
||||
if (hasNewInfo)
|
||||
// one could get away with re-linking the cpp types...
|
||||
QMetaObject::invokeMethod(qmlModelManager, "resetCodeModel");
|
||||
}
|
||||
|
||||
ModelManager::CppDataHash ModelManager::cppData() const
|
||||
|
||||
@@ -131,7 +131,7 @@ bool BlackBerryConfiguration::refresh()
|
||||
|
||||
void BlackBerryConfiguration::loadCertificates()
|
||||
{
|
||||
QSettings *settings = Core::ICore::instance()->settings();
|
||||
QSettings *settings = Core::ICore::settings();
|
||||
|
||||
settings->beginGroup(SettingsGroup);
|
||||
settings->beginGroup(CertificateGroup);
|
||||
@@ -158,7 +158,7 @@ void BlackBerryConfiguration::loadCertificates()
|
||||
|
||||
void BlackBerryConfiguration::loadNdkSettings()
|
||||
{
|
||||
QSettings *settings = Core::ICore::instance()->settings();
|
||||
QSettings *settings = Core::ICore::settings();
|
||||
|
||||
settings->beginGroup(SettingsGroup);
|
||||
setNdkPath(settings->value(NDKLocationKey).toString());
|
||||
@@ -167,7 +167,7 @@ void BlackBerryConfiguration::loadNdkSettings()
|
||||
|
||||
void BlackBerryConfiguration::saveCertificates()
|
||||
{
|
||||
QSettings *settings = Core::ICore::instance()->settings();
|
||||
QSettings *settings = Core::ICore::settings();
|
||||
|
||||
settings->beginGroup(SettingsGroup);
|
||||
settings->beginGroup(CertificateGroup);
|
||||
@@ -194,7 +194,7 @@ void BlackBerryConfiguration::saveNdkSettings()
|
||||
if (m_config.ndkPath.isEmpty())
|
||||
return;
|
||||
|
||||
QSettings *settings = Core::ICore::instance()->settings();
|
||||
QSettings *settings = Core::ICore::settings();
|
||||
settings->beginGroup(SettingsGroup);
|
||||
settings->setValue(NDKLocationKey, m_config.ndkPath);
|
||||
settings->endGroup();
|
||||
@@ -396,7 +396,7 @@ void BlackBerryConfiguration::saveSettings()
|
||||
|
||||
void BlackBerryConfiguration::clearNdkSettings()
|
||||
{
|
||||
QSettings *settings = Core::ICore::instance()->settings();
|
||||
QSettings *settings = Core::ICore::settings();
|
||||
settings->beginGroup(SettingsGroup);
|
||||
settings->remove(NDKLocationKey);
|
||||
settings->endGroup();
|
||||
|
||||
@@ -572,6 +572,7 @@ void SubversionPlugin::svnDiff(const Subversion::Internal::SubversionDiffParamet
|
||||
QFileInfo(p.files.front()).fileName() : p.diffName;
|
||||
|
||||
QStringList args(QLatin1String("diff"));
|
||||
args.append(QLatin1String("--internal-diff"));
|
||||
args.append(p.arguments);
|
||||
args << p.files;
|
||||
|
||||
|
||||
@@ -188,7 +188,6 @@ QtcPlugin {
|
||||
"ifunctionhintproposalmodel.h",
|
||||
"igenericproposalmodel.cpp",
|
||||
"igenericproposalmodel.h",
|
||||
"ikeywords.h",
|
||||
"keywordscompletionassist.cpp",
|
||||
"keywordscompletionassist.h",
|
||||
"quickfixassistprocessor.cpp",
|
||||
|
||||
Submodule src/shared/qbs updated: 32ae53690c...5df624fa58
@@ -33,14 +33,14 @@ def handleDebuggerWarnings(config, isMsvcBuild=False):
|
||||
if isMsvcBuild:
|
||||
try:
|
||||
popup = waitForObject("{name='msgLabel' text?='<html><head/><body>*' type='QLabel' visible='1' window=':Dialog_Debugger::Internal::SymbolPathsDialog'}", 10000)
|
||||
symServerNotConfiged = ("<html><head/><body>\n<p>The debugger is not configured to use the public "
|
||||
"Microsoft Symbol Server.<br>"
|
||||
"This is recommended for retrieval of the symbols of the operating system libraries.</p>\n"
|
||||
"<p><span style=\" font-style:italic;\">Note:</span> It is recommended, that if you use the Microsoft Symbol Server, "
|
||||
"to also use a local symbol cache.<br>"
|
||||
"Also, a fast internet connection is required for this to work smoothly,<br>"
|
||||
"and a delay might occur when connecting for the first time, when caching the symbols for the first time.</p>\n"
|
||||
"<p>Would you like to set it up?</p>\n</body></html>")
|
||||
symServerNotConfiged = ("<html><head/><body><p>The debugger is not configured to use the public "
|
||||
"Microsoft Symbol Server.<br/>"
|
||||
"This is recommended for retrieval of the symbols of the operating system libraries.</p>"
|
||||
"<p><span style=\" font-style:italic;\">Note:</span> It is recommended, that if you use the Microsoft Symbol Server, "
|
||||
"to also use a local symbol cache.<br/>"
|
||||
"A fast internet connection is required for this to work smoothly,<br/>"
|
||||
"and a delay might occur when connecting for the first time and caching the symbols.</p>"
|
||||
"<p>What would you like to set up?</p></body></html>")
|
||||
if popup.text == symServerNotConfiged:
|
||||
test.log("Creator warned about the debugger not being configured to use the public Microsoft Symbol Server.")
|
||||
else:
|
||||
|
||||
@@ -50,9 +50,15 @@ def changeFilePermissions(dirPath, readPerm, writePerm, excludeFileNames=None):
|
||||
return False
|
||||
filePaths = [os.path.join(dirPath, fileName) for fileName in os.listdir(dirPath)
|
||||
if fileName not in excludeFileNames]
|
||||
result = True
|
||||
for filePath in filter(os.path.isfile, filePaths):
|
||||
os.chmod(filePath, permission)
|
||||
return True
|
||||
try:
|
||||
os.chmod(filePath, permission)
|
||||
except:
|
||||
t,v = sys.exc_info()[:2]
|
||||
test.log("Error: %s(%s)" % (str(t), str(v)))
|
||||
result = False
|
||||
return result
|
||||
|
||||
def isWritable(pathToFile):
|
||||
if os.path.exists(pathToFile):
|
||||
|
||||
@@ -647,3 +647,6 @@ def readFile(filename):
|
||||
content = f.read()
|
||||
f.close()
|
||||
return content
|
||||
|
||||
def simpleFileName(navigatorFileName):
|
||||
return ".".join(navigatorFileName.split(".")[-2:]).replace("\\","")
|
||||
|
||||
@@ -149,9 +149,6 @@ def checkUnsavedChangesContains(model, filePaths):
|
||||
test.compare(set(foundItems), set(filePaths),
|
||||
"Verifying whether modified (unsaved) files do match expected.")
|
||||
|
||||
def simpleFileName(navigatorFileName):
|
||||
return ".".join(navigatorFileName.split(".")[-2:]).replace("\\","")
|
||||
|
||||
def cleanup():
|
||||
global testFolder
|
||||
if testFolder:
|
||||
|
||||
@@ -166,6 +166,3 @@ def revertChanges(files):
|
||||
"Maybe it has not been changed at all.")
|
||||
else:
|
||||
test.fail("Could not open %s for reverting changes" % simpleName)
|
||||
|
||||
def simpleFileName(navigatorFileName):
|
||||
return ".".join(navigatorFileName.split(".")[-2:]).replace("\\","")
|
||||
|
||||
@@ -140,6 +140,3 @@ def compareFileToOriginal(fileName):
|
||||
origFile.close()
|
||||
test.compare(originalContent, currentContent,
|
||||
"Comparing original to reverted file content for '%s'" % fileName)
|
||||
|
||||
def simpleFileName(navigatorFileName):
|
||||
return ".".join(navigatorFileName.split(".")[-2:]).replace("\\","")
|
||||
|
||||
@@ -147,6 +147,3 @@ def verifyOutline(outlinePseudoTree, datasetFileName):
|
||||
return
|
||||
test.passes("All nodes (%d) inside outline match expected nodes for '%s'."
|
||||
% (len(expected), fileName))
|
||||
|
||||
def simpleFileName(navigatorFileName):
|
||||
return ".".join(navigatorFileName.split(".")[-2:]).replace("\\", "")
|
||||
|
||||
Reference in New Issue
Block a user