Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
flatpak-qt-creator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
920d524d
Commit
920d524d
authored
Dec 03, 2013
by
Eike Ziller
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/3.0'
parents
223ecc70
580c1c35
Changes
29
Show whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
154 additions
and
190 deletions
+154
-190
dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/installscript.qs
...org.qtproject.qtcreator.application/meta/installscript.qs
+11
-3
scripts/createSourcePackages.sh
scripts/createSourcePackages.sh
+6
-5
share/qtcreator/templates/qml/qtquick_1_1/main.qmlproject
share/qtcreator/templates/qml/qtquick_1_1/main.qmlproject
+1
-1
share/qtcreator/templates/qml/qtquick_2_0/main.qmlproject
share/qtcreator/templates/qml/qtquick_2_0/main.qmlproject
+1
-1
share/qtcreator/templates/qml/qtquickcontrols_1_0/main.qmlproject
...creator/templates/qml/qtquickcontrols_1_0/main.qmlproject
+1
-1
share/qtcreator/welcomescreen/examples.qml
share/qtcreator/welcomescreen/examples.qml
+5
-3
share/qtcreator/welcomescreen/widgets/Delegate.qml
share/qtcreator/welcomescreen/widgets/Delegate.qml
+2
-3
share/qtcreator/welcomescreen/widgets/Tabs.qml
share/qtcreator/welcomescreen/widgets/Tabs.qml
+1
-0
src/libs/cplusplus/Macro.h
src/libs/cplusplus/Macro.h
+0
-7
src/libs/cplusplus/MatchingText.h
src/libs/cplusplus/MatchingText.h
+0
-3
src/libs/cplusplus/pp-engine.cpp
src/libs/cplusplus/pp-engine.cpp
+8
-10
src/plugins/cppeditor/cppeditor.cpp
src/plugins/cppeditor/cppeditor.cpp
+2
-4
src/plugins/cppeditor/cppfollowsymbolundercursor.cpp
src/plugins/cppeditor/cppfollowsymbolundercursor.cpp
+4
-6
src/plugins/cpptools/cppfindreferences.cpp
src/plugins/cpptools/cppfindreferences.cpp
+0
-2
src/plugins/cpptools/cpphighlightingsupportinternal.cpp
src/plugins/cpptools/cpphighlightingsupportinternal.cpp
+0
-3
src/plugins/debugger/debuggerprotocol.cpp
src/plugins/debugger/debuggerprotocol.cpp
+9
-0
src/plugins/fakevim/fakevim_test.cpp
src/plugins/fakevim/fakevim_test.cpp
+11
-0
src/plugins/fakevim/fakevimhandler.cpp
src/plugins/fakevim/fakevimhandler.cpp
+13
-1
src/plugins/ios/iosconfigurations.cpp
src/plugins/ios/iosconfigurations.cpp
+51
-54
src/plugins/qmlprofiler/qml/MainView.qml
src/plugins/qmlprofiler/qml/MainView.qml
+0
-2
src/plugins/qmlprofiler/qmlprofilertraceview.cpp
src/plugins/qmlprofiler/qmlprofilertraceview.cpp
+15
-3
src/plugins/qmlprofiler/qmlprofilertraceview.h
src/plugins/qmlprofiler/qmlprofilertraceview.h
+2
-0
src/shared/qbs
src/shared/qbs
+1
-1
tests/auto/cplusplus/checksymbols/tst_checksymbols.cpp
tests/auto/cplusplus/checksymbols/tst_checksymbols.cpp
+0
-51
tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp
tests/auto/cplusplus/preprocessor/tst_preprocessor.cpp
+1
-5
tests/auto/debugger/tst_dumpers.cpp
tests/auto/debugger/tst_dumpers.cpp
+3
-4
tests/system/objects.map
tests/system/objects.map
+0
-4
tests/system/shared/build_utils.py
tests/system/shared/build_utils.py
+0
-4
tests/system/shared/utils.py
tests/system/shared/utils.py
+6
-9
No files found.
dist/installer/ifw/packages/org.qtproject.qtcreator.application/meta/installscript.qs
View file @
920d524d
...
@@ -157,7 +157,14 @@ Component.prototype.createOperations = function()
...
@@ -157,7 +157,14 @@ Component.prototype.createOperations = function()
component.qtCreatorBinaryPath,
component.qtCreatorBinaryPath,
"@StartMenuDir@/Qt Creator.lnk",
"@StartMenuDir@/Qt Creator.lnk",
"workingDirectory=@homeDir@" );
"workingDirectory=@homeDir@" );
component.addElevatedOperation("Execute", "{0,3010,1638}", "@TargetDir@\\lib\\vcredist_msvc2010\\vcredist_x86.exe", "/norestart", "/q");
// only install c runtime if it is needed, no minor version check of the c runtime till we need it
if (installer.value("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\10.0\\VC\\VCRedist\\x86\\Installed") != 1) {
// return value 3010 means it need a reboot, but in most cases it is not needed for run Qt application
// return value 5100 means there's a newer version of the runtime already installed
component.addElevatedOperation("Execute", "{0,1638,3010,5100}", "@TargetDir@\\lib\\vcredist_msvc2010\\vcredist_x86.exe", "/norestart", "/q");
}
registerWindowsFileTypeExtensions();
registerWindowsFileTypeExtensions();
if (component.userInterface("AssociateCommonFiletypesForm").AssociateCommonFiletypesCheckBox
if (component.userInterface("AssociateCommonFiletypesForm").AssociateCommonFiletypesCheckBox
...
@@ -191,8 +198,9 @@ function isRoot()
...
@@ -191,8 +198,9 @@ function isRoot()
Component.prototype.installationFinishedPageIsShown = function()
Component.prototype.installationFinishedPageIsShown = function()
{
{
isroot = isRoot();
try {
try {
if (component.installed && installer.isInstaller() && installer.status == QInstaller.Success && !is
Root()
) {
if (component.installed && installer.isInstaller() && installer.status == QInstaller.Success && !is
root
) {
installer.addWizardPageItem( component, "LaunchQtCreatorCheckBoxForm", QInstaller.InstallationFinished );
installer.addWizardPageItem( component, "LaunchQtCreatorCheckBoxForm", QInstaller.InstallationFinished );
}
}
} catch(e) {
} catch(e) {
...
@@ -203,7 +211,7 @@ Component.prototype.installationFinishedPageIsShown = function()
...
@@ -203,7 +211,7 @@ Component.prototype.installationFinishedPageIsShown = function()
Component.prototype.installationFinished = function()
Component.prototype.installationFinished = function()
{
{
try {
try {
if (component.installed && installer.isInstaller() && installer.status == QInstaller.Success && !is
Root()
) {
if (component.installed && installer.isInstaller() && installer.status == QInstaller.Success && !is
root
) {
var isLaunchQtCreatorCheckBoxChecked = component.userInterface("LaunchQtCreatorCheckBoxForm").launchQtCreatorCheckBox.checked;
var isLaunchQtCreatorCheckBoxChecked = component.userInterface("LaunchQtCreatorCheckBoxForm").launchQtCreatorCheckBox.checked;
if (isLaunchQtCreatorCheckBoxChecked)
if (isLaunchQtCreatorCheckBoxChecked)
installer.executeDetached(component.qtCreatorBinaryPath, new Array(), "@homeDir@");
installer.executeDetached(component.qtCreatorBinaryPath, new Array(), "@homeDir@");
...
...
scripts/createSourcePackages.sh
View file @
920d524d
#!/bin/bash
#!/bin/bash
## Command line parameters
## Command line parameters
if
[[
$#
!=
1
]]
;
then
if
[[
$#
!=
2
]]
;
then
cat
<<
USAGE
cat
<<
USAGE
usage:
usage:
$0
<version>
$0
<version>
<edition>
Creates tar and zip source package from HEAD of the main repository and submodules.
Creates tar and zip source package from HEAD of the main repository and submodules.
Files and directories are named after <version>.
Files and directories are named after
qt-creator-<edition>-src-
<version>.
example:
example:
$0
2.2.0-beta
$0
2.2.0-beta
opensource
USAGE
USAGE
exit
1
exit
1
fi
fi
VERSION
=
$1
VERSION
=
$1
PREFIX
=
qt-creator-
${
VERSION
}
-src
EDITION
=
$2
PREFIX
=
qt-creator-
${
EDITION
}
-src-
${
VERSION
}
cd
`
dirname
$0
`
/..
cd
`
dirname
$0
`
/..
RESULTDIR
=
`
pwd
`
RESULTDIR
=
`
pwd
`
TEMPSOURCES
=
`
mktemp
-d
-t
qtcCreatorSourcePackage.XXXXXX
`
TEMPSOURCES
=
`
mktemp
-d
-t
qtcCreatorSourcePackage.XXXXXX
`
...
...
share/qtcreator/templates/qml/qtquick_1_1/main.qmlproject
View file @
920d524d
/* File generated by Qt Creator
, version 2.7.0
*/
/* File generated by Qt Creator */
import QmlProject 1.1
import QmlProject 1.1
...
...
share/qtcreator/templates/qml/qtquick_2_0/main.qmlproject
View file @
920d524d
/* File generated by Qt Creator
, version 2.7.0
*/
/* File generated by Qt Creator */
import QmlProject 1.1
import QmlProject 1.1
...
...
share/qtcreator/templates/qml/qtquickcontrols_1_0/main.qmlproject
View file @
920d524d
/* File generated by Qt Creator
, version 2.7.0
*/
/* File generated by Qt Creator */
import QmlProject 1.1
import QmlProject 1.1
...
...
share/qtcreator/welcomescreen/examples.qml
View file @
920d524d
...
@@ -38,10 +38,12 @@ Rectangle {
...
@@ -38,10 +38,12 @@ Rectangle {
CustomizedGridView
{
CustomizedGridView
{
id
:
grid
id
:
grid
anchors.rightMargin
:
38
anchors.rightMargin
:
38
anchors.bottomMargin
:
60
anchors.leftMargin
:
38
anchors.leftMargin
:
38
anchors.topMargin
:
82
anchors.left
:
parent
.
left
anchors.fill
:
parent
anchors.right
:
parent
.
right
height
:
scrollView
.
height
-
82
y
:
scrollView
.
flickableItem
.
contentY
+
82
contentY
:
scrollView
.
flickableItem
.
contentY
model
:
examplesModel
model
:
examplesModel
}
}
...
...
share/qtcreator/welcomescreen/widgets/Delegate.qml
View file @
920d524d
...
@@ -117,7 +117,7 @@ Rectangle {
...
@@ -117,7 +117,7 @@ Rectangle {
y
:
170
y
:
170
color
:
colors
.
strongForegroundColor
color
:
colors
.
strongForegroundColor
text
:
qsTr
(
"
2D PAINTING EXAMPLE long description
"
)
text
:
qsTr
(
"
2D PAINTING EXAMPLE long description
"
)
clip
:
true
elide
:
Text
.
ElideRight
anchors.right
:
parent
.
right
anchors.right
:
parent
.
right
anchors.rightMargin
:
16
anchors.rightMargin
:
16
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
...
@@ -330,7 +330,6 @@ Rectangle {
...
@@ -330,7 +330,6 @@ Rectangle {
height
:
32
height
:
32
anchors.left
:
tags
.
right
anchors.left
:
tags
.
right
anchors.leftMargin
:
6
anchors.leftMargin
:
6
clip
:
true
spacing
:
2
spacing
:
2
...
@@ -355,7 +354,7 @@ Rectangle {
...
@@ -355,7 +354,7 @@ Rectangle {
onClicked
:
appendTag
(
modelData
)
onClicked
:
appendTag
(
modelData
)
property
bool
hugeTag
:
(
text
.
length
>
12
)
&&
index
>
1
property
bool
hugeTag
:
(
text
.
length
>
12
)
&&
index
>
1
property
bool
isExampleTag
:
text
===
"
example
"
property
bool
isExampleTag
:
text
===
"
example
"
visible
:
!
hugeTag
&&
!
isExampleTag
&&
index
<
8
visible
:
!
hugeTag
&&
!
isExampleTag
&&
index
<
8
&&
y
<
32
}
}
}
}
}
}
...
...
share/qtcreator/welcomescreen/widgets/Tabs.qml
View file @
920d524d
...
@@ -51,6 +51,7 @@ Column {
...
@@ -51,6 +51,7 @@ Column {
onClicked
:
{
onClicked
:
{
customTab
.
currentIndex
=
index
customTab
.
currentIndex
=
index
checked
=
true
}
}
}
}
}
}
...
...
src/libs/cplusplus/Macro.h
View file @
920d524d
...
@@ -137,12 +137,6 @@ public:
...
@@ -137,12 +137,6 @@ public:
void
setVariadic
(
bool
isVariadic
)
void
setVariadic
(
bool
isVariadic
)
{
f
.
_variadic
=
isVariadic
;
}
{
f
.
_variadic
=
isVariadic
;
}
bool
isPredefined
()
const
{
return
f
.
_predefined
;
}
void
setPredefined
(
bool
isPredefined
)
{
f
.
_predefined
=
isPredefined
;
}
QString
toString
()
const
;
QString
toString
()
const
;
QString
toStringWithLineBreaks
()
const
;
QString
toStringWithLineBreaks
()
const
;
...
@@ -157,7 +151,6 @@ private:
...
@@ -157,7 +151,6 @@ private:
unsigned
_hidden
:
1
;
unsigned
_hidden
:
1
;
unsigned
_functionLike
:
1
;
unsigned
_functionLike
:
1
;
unsigned
_variadic
:
1
;
unsigned
_variadic
:
1
;
unsigned
_predefined
:
1
;
};
};
QByteArray
_name
;
QByteArray
_name
;
...
...
src/libs/cplusplus/MatchingText.h
View file @
920d524d
...
@@ -36,9 +36,6 @@ QT_FORWARD_DECLARE_CLASS(QChar)
...
@@ -36,9 +36,6 @@ QT_FORWARD_DECLARE_CLASS(QChar)
namespace
CPlusPlus
{
namespace
CPlusPlus
{
class
BackwardsScanner
;
class
TokenCache
;
class
CPLUSPLUS_EXPORT
MatchingText
class
CPLUSPLUS_EXPORT
MatchingText
{
{
public:
public:
...
...
src/libs/cplusplus/pp-engine.cpp
View file @
920d524d
...
@@ -917,21 +917,23 @@ bool Preprocessor::handleIdentifier(PPToken *tk)
...
@@ -917,21 +917,23 @@ bool Preprocessor::handleIdentifier(PPToken *tk)
&&
macroNameRef
[
0
]
==
'_'
&&
macroNameRef
[
0
]
==
'_'
&&
macroNameRef
[
1
]
==
'_'
)
{
&&
macroNameRef
[
1
]
==
'_'
)
{
PPToken
newTk
;
PPToken
newTk
;
QByteArray
txt
;
if
(
macroNameRef
==
ppLine
)
{
if
(
macroNameRef
==
ppLine
)
{
txt
=
QByteArray
::
number
(
tk
->
lineno
);
QByteArray
txt
=
QByteArray
::
number
(
tk
->
lineno
);
newTk
=
generateToken
(
T_STRING_LITERAL
,
txt
.
constData
(),
txt
.
size
(),
tk
->
lineno
,
false
);
newTk
=
generateToken
(
T_STRING_LITERAL
,
txt
.
constData
(),
txt
.
size
(),
tk
->
lineno
,
false
);
}
else
if
(
macroNameRef
==
ppFile
)
{
}
else
if
(
macroNameRef
==
ppFile
)
{
QByteArray
txt
;
txt
.
append
(
'"'
);
txt
.
append
(
'"'
);
txt
.
append
(
m_env
->
currentFileUtf8
);
txt
.
append
(
m_env
->
currentFileUtf8
);
txt
.
append
(
'"'
);
txt
.
append
(
'"'
);
newTk
=
generateToken
(
T_STRING_LITERAL
,
txt
.
constData
(),
txt
.
size
(),
tk
->
lineno
,
false
);
newTk
=
generateToken
(
T_STRING_LITERAL
,
txt
.
constData
(),
txt
.
size
(),
tk
->
lineno
,
false
);
}
else
if
(
macroNameRef
==
ppDate
)
{
}
else
if
(
macroNameRef
==
ppDate
)
{
QByteArray
txt
;
txt
.
append
(
'"'
);
txt
.
append
(
'"'
);
txt
.
append
(
QDate
::
currentDate
().
toString
().
toUtf8
());
txt
.
append
(
QDate
::
currentDate
().
toString
().
toUtf8
());
txt
.
append
(
'"'
);
txt
.
append
(
'"'
);
newTk
=
generateToken
(
T_STRING_LITERAL
,
txt
.
constData
(),
txt
.
size
(),
tk
->
lineno
,
false
);
newTk
=
generateToken
(
T_STRING_LITERAL
,
txt
.
constData
(),
txt
.
size
(),
tk
->
lineno
,
false
);
}
else
if
(
macroNameRef
==
ppTime
)
{
}
else
if
(
macroNameRef
==
ppTime
)
{
QByteArray
txt
;
txt
.
append
(
'"'
);
txt
.
append
(
'"'
);
txt
.
append
(
QTime
::
currentTime
().
toString
().
toUtf8
());
txt
.
append
(
QTime
::
currentTime
().
toString
().
toUtf8
());
txt
.
append
(
'"'
);
txt
.
append
(
'"'
);
...
@@ -939,14 +941,10 @@ bool Preprocessor::handleIdentifier(PPToken *tk)
...
@@ -939,14 +941,10 @@ bool Preprocessor::handleIdentifier(PPToken *tk)
}
}
if
(
newTk
.
hasSource
())
{
if
(
newTk
.
hasSource
())
{
Macro
macro
;
newTk
.
f
.
newline
=
tk
->
newline
();
macro
.
setName
(
macroNameRef
.
toByteArray
());
newTk
.
f
.
whitespace
=
tk
->
whitespace
();
macro
.
setFileName
(
m_env
->
currentFile
);
*
tk
=
newTk
;
macro
.
setPredefined
(
true
);
return
false
;
macro
.
setDefinition
(
txt
,
QVector
<
PPToken
>
()
<<
newTk
);
m_env
->
bind
(
macro
);
if
(
m_client
)
m_client
->
macroAdded
(
macro
);
}
}
}
}
...
...
src/plugins/cppeditor/cppeditor.cpp
View file @
920d524d
...
@@ -797,12 +797,10 @@ const Macro *CPPEditorWidget::findCanonicalMacro(const QTextCursor &cursor, Docu
...
@@ -797,12 +797,10 @@ const Macro *CPPEditorWidget::findCanonicalMacro(const QTextCursor &cursor, Docu
if
(
const
Macro
*
macro
=
doc
->
findMacroDefinitionAt
(
line
))
{
if
(
const
Macro
*
macro
=
doc
->
findMacroDefinitionAt
(
line
))
{
QTextCursor
macroCursor
=
cursor
;
QTextCursor
macroCursor
=
cursor
;
const
QByteArray
name
=
identifierUnderCursor
(
&
macroCursor
).
toLatin1
();
const
QByteArray
name
=
identifierUnderCursor
(
&
macroCursor
).
toLatin1
();
if
(
macro
->
name
()
==
name
&&
!
macro
->
isPredefined
()
)
if
(
macro
->
name
()
==
name
)
return
macro
;
return
macro
;
}
else
if
(
const
Document
::
MacroUse
*
use
=
doc
->
findMacroUseAt
(
cursor
.
position
()))
{
}
else
if
(
const
Document
::
MacroUse
*
use
=
doc
->
findMacroUseAt
(
cursor
.
position
()))
{
const
Macro
&
macro
=
use
->
macro
();
return
&
use
->
macro
();
if
(
!
macro
.
isPredefined
())
return
&
macro
;
}
}
return
0
;
return
0
;
...
...
src/plugins/cppeditor/cppfollowsymbolundercursor.cpp
View file @
920d524d
...
@@ -592,13 +592,11 @@ BaseTextEditorWidget::Link FollowSymbolUnderCursor::findLink(const QTextCursor &
...
@@ -592,13 +592,11 @@ BaseTextEditorWidget::Link FollowSymbolUnderCursor::findLink(const QTextCursor &
m_widget
->
showPreProcessorWidget
();
m_widget
->
showPreProcessorWidget
();
}
else
if
(
fileName
!=
CppModelManagerInterface
::
configurationFileName
())
{
}
else
if
(
fileName
!=
CppModelManagerInterface
::
configurationFileName
())
{
const
Macro
&
macro
=
use
->
macro
();
const
Macro
&
macro
=
use
->
macro
();
if
(
!
macro
.
isPredefined
())
{
link
.
targetFileName
=
macro
.
fileName
();
link
.
targetFileName
=
macro
.
fileName
();
link
.
targetLine
=
macro
.
line
();
link
.
targetLine
=
macro
.
line
();
link
.
linkTextStart
=
use
->
begin
();
link
.
linkTextStart
=
use
->
begin
();
link
.
linkTextEnd
=
use
->
end
();
link
.
linkTextEnd
=
use
->
end
();
}
}
}
return
link
;
return
link
;
}
}
...
...
src/plugins/cpptools/cppfindreferences.cpp
View file @
920d524d
...
@@ -558,8 +558,6 @@ restart_search:
...
@@ -558,8 +558,6 @@ restart_search:
usages
.
clear
();
usages
.
clear
();
foreach
(
const
Document
::
MacroUse
&
use
,
doc
->
macroUses
())
{
foreach
(
const
Document
::
MacroUse
&
use
,
doc
->
macroUses
())
{
const
Macro
&
useMacro
=
use
.
macro
();
const
Macro
&
useMacro
=
use
.
macro
();
if
(
useMacro
.
isPredefined
())
continue
;
if
(
useMacro
.
fileName
()
==
macro
.
fileName
())
{
// Check if this is a match, but possibly against an outdated document.
if
(
useMacro
.
fileName
()
==
macro
.
fileName
())
{
// Check if this is a match, but possibly against an outdated document.
if
(
source
.
isEmpty
())
if
(
source
.
isEmpty
())
...
...
src/plugins/cpptools/cpphighlightingsupportinternal.cpp
View file @
920d524d
...
@@ -58,9 +58,6 @@ QFuture<TextEditor::HighlightingResult> CppHighlightingSupportInternal::highligh
...
@@ -58,9 +58,6 @@ QFuture<TextEditor::HighlightingResult> CppHighlightingSupportInternal::highligh
// Get macro definitions
// Get macro definitions
foreach
(
const
CPlusPlus
::
Macro
&
macro
,
doc
->
definedMacros
())
{
foreach
(
const
CPlusPlus
::
Macro
&
macro
,
doc
->
definedMacros
())
{
if
(
macro
.
isPredefined
())
continue
;
// No "real" definition location
int
line
,
column
;
int
line
,
column
;
editor
()
->
convertPosition
(
macro
.
offset
(),
&
line
,
&
column
);
editor
()
->
convertPosition
(
macro
.
offset
(),
&
line
,
&
column
);
++
column
;
//Highlighting starts at (column-1) --> compensate here
++
column
;
//Highlighting starts at (column-1) --> compensate here
...
...
src/plugins/debugger/debuggerprotocol.cpp
View file @
920d524d
...
@@ -33,7 +33,9 @@
...
@@ -33,7 +33,9 @@
#include <QDateTime>
#include <QDateTime>
#include <QDebug>
#include <QDebug>
#include <QHostAddress>
#include <QHostAddress>
#if QT_VERSION >= 0x050200
#include <QTimeZone>
#include <QTimeZone>
#endif
#include <ctype.h>
#include <ctype.h>
...
@@ -504,6 +506,7 @@ static QTime timeFromData(int ms)
...
@@ -504,6 +506,7 @@ static QTime timeFromData(int ms)
return
ms
==
-
1
?
QTime
()
:
QTime
(
0
,
0
,
0
,
0
).
addMSecs
(
ms
);
return
ms
==
-
1
?
QTime
()
:
QTime
(
0
,
0
,
0
,
0
).
addMSecs
(
ms
);
}
}
#if QT_VERSION >= 0x050200
// Stolen and adapted from qdatetime.cpp
// Stolen and adapted from qdatetime.cpp
static
void
getDateTime
(
qint64
msecs
,
int
status
,
QDate
*
date
,
QTime
*
time
)
static
void
getDateTime
(
qint64
msecs
,
int
status
,
QDate
*
date
,
QTime
*
time
)
{
{
...
@@ -550,6 +553,7 @@ static void getDateTime(qint64 msecs, int status, QDate *date, QTime *time)
...
@@ -550,6 +553,7 @@ static void getDateTime(qint64 msecs, int status, QDate *date, QTime *time)
*
date
=
(
status
&
NullDate
)
?
QDate
()
:
QDate
::
fromJulianDay
(
jd
);
*
date
=
(
status
&
NullDate
)
?
QDate
()
:
QDate
::
fromJulianDay
(
jd
);
*
time
=
(
status
&
NullTime
)
?
QTime
()
:
QTime
::
fromMSecsSinceStartOfDay
(
ds
);
*
time
=
(
status
&
NullTime
)
?
QTime
()
:
QTime
::
fromMSecsSinceStartOfDay
(
ds
);
}
}
#endif
QString
decodeData
(
const
QByteArray
&
ba
,
int
encoding
)
QString
decodeData
(
const
QByteArray
&
ba
,
int
encoding
)
{
{
...
@@ -678,6 +682,7 @@ QString decodeData(const QByteArray &ba, int encoding)
...
@@ -678,6 +682,7 @@ QString decodeData(const QByteArray &ba, int encoding)
return
QString
::
fromUtf8
(
decodedBa
);
return
QString
::
fromUtf8
(
decodedBa
);
}
}
case
DateTimeInternal
:
{
// 29, DateTimeInternal: msecs, spec, offset, tz, status
case
DateTimeInternal
:
{
// 29, DateTimeInternal: msecs, spec, offset, tz, status
#if QT_VERSION >= 0x050200
int
p0
=
ba
.
indexOf
(
'/'
);
int
p0
=
ba
.
indexOf
(
'/'
);
int
p1
=
ba
.
indexOf
(
'/'
,
p0
+
1
);
int
p1
=
ba
.
indexOf
(
'/'
,
p0
+
1
);
int
p2
=
ba
.
indexOf
(
'/'
,
p1
+
1
);
int
p2
=
ba
.
indexOf
(
'/'
,
p1
+
1
);
...
@@ -708,6 +713,10 @@ QString decodeData(const QByteArray &ba, int encoding)
...
@@ -708,6 +713,10 @@ QString decodeData(const QByteArray &ba, int encoding)
dateTime
=
QDateTime
(
date
,
time
,
spec
);
dateTime
=
QDateTime
(
date
,
time
,
spec
);
}
}
return
dateTime
.
toString
();
return
dateTime
.
toString
();
#else
// "Very plain".
return
QString
::
fromLatin1
(
ba
);
#endif
}
}
}
}
qDebug
()
<<
"ENCODING ERROR: "
<<
encoding
;
qDebug
()
<<
"ENCODING ERROR: "
<<
encoding
;
...
...
src/plugins/fakevim/fakevim_test.cpp
View file @
920d524d
...
@@ -2219,6 +2219,17 @@ void FakeVimPlugin::test_vim_substitute()
...
@@ -2219,6 +2219,17 @@ void FakeVimPlugin::test_vim_substitute()
COMMAND("'<,'>s/^/*", "abc" N "**def" N X "**ghi" N "jkl");
COMMAND("'<,'>s/^/*", "abc" N "**def" N X "**ghi" N "jkl");
KEYS("u", "abc" N X "*def" N "*ghi" N "jkl");
KEYS("u", "abc" N X "*def" N "*ghi" N "jkl");
KEYS("gv:s/^/+<CR>", "abc" N "+*def" N X "+*ghi" N "jkl");
KEYS("gv:s/^/+<CR>", "abc" N "+*def" N X "+*ghi" N "jkl");
// replace empty string
data.setText("abc");
COMMAND("s//--/g", "--a--b--c");
// remove characters
data.setText("abc def");
COMMAND("s/[abde]//g", "c f");
COMMAND("undo | s/[bcef]//g", "a d");
COMMAND("undo | s/\\w//g", " ");
COMMAND("undo | s/f\\|$/-/g", "abc de-");
}
}
void FakeVimPlugin::test_vim_ex_yank()
void FakeVimPlugin::test_vim_ex_yank()
...
...
src/plugins/fakevim/fakevimhandler.cpp
View file @
920d524d
...
@@ -623,10 +623,22 @@ static bool substituteText(QString *text, QRegExp &pattern, const QString &repla
...
@@ -623,10 +623,22 @@ static bool substituteText(QString *text, QRegExp &pattern, const QString &repla
{
{
bool substituted = false;
bool substituted = false;
int pos = 0;
int pos = 0;
int right = -1;
while (true) {
while (true) {
pos = pattern.indexIn(*text, pos, QRegExp::CaretAtZero);
pos = pattern.indexIn(*text, pos, QRegExp::CaretAtZero);
if (pos == -1)
if (pos == -1)
break;
break;
// ensure that substitution is advancing towards end of line
if (right == text->size() - pos) {
++pos;
if (pos == text->size())
break;
continue;
}
right = text->size() - pos;
substituted = true;
substituted = true;
QString matched = text->mid(pos, pattern.cap(0).size());
QString matched = text->mid(pos, pattern.cap(0).size());
QString repl;
QString repl;
...
@@ -652,7 +664,7 @@ static bool substituteText(QString *text, QRegExp &pattern, const QString &repla
...
@@ -652,7 +664,7 @@ static bool substituteText(QString *text, QRegExp &pattern, const QString &repla
}
}
}
}
text->replace(pos, matched.size(), repl);
text->replace(pos, matched.size(), repl);
pos +=
qMax(1, repl.size()
);
pos +=
(repl.isEmpty() && matched.isEmpty()) ? 1 : repl.size(
);
if (pos >= text->size() || !global)
if (pos >= text->size() || !global)
break;
break;
...
...
src/plugins/ios/iosconfigurations.cpp
View file @
920d524d
...
@@ -113,7 +113,8 @@ void IosConfigurations::updateAutomaticKitList()
...
@@ -113,7 +113,8 @@ void IosConfigurations::updateAutomaticKitList()
iter
.
next
();
iter
.
next
();
const
Platform
&
p
=
iter
.
value
();
const
Platform
&
p
=
iter
.
value
();
if
(
p
.
compilerPath
==
toolchain
->
compilerCommand
()
if
(
p
.
compilerPath
==
toolchain
->
compilerCommand
()
&&
p
.
backendFlags
==
toolchain
->
platformCodeGenFlags
())
{
&&
p
.
backendFlags
==
toolchain
->
platformCodeGenFlags
()
&&
!
platformToolchainMap
.
contains
(
p
.
name
))
{
platformToolchainMap
[
p
.
name
]
=
toolchain
;
platformToolchainMap
[
p
.
name
]
=
toolchain
;
found
=
true
;
found
=
true
;
}
}
...
@@ -251,7 +252,7 @@ void IosConfigurations::updateAutomaticKitList()
...
@@ -251,7 +252,7 @@ void IosConfigurations::updateAutomaticKitList()
qDebug
()
<<
"skipping existing kit with deviceKind "
<<
deviceKind
.
toString
();
qDebug
()
<<
"skipping existing kit with deviceKind "
<<
deviceKind
.
toString
();
continue
;
continue
;
}
}
if
(
!
k
->
isAutoDetected
())
// use also used set kits?
if
(
!
k
->
isAutoDetected
())
continue
;
continue
;
existingKits
<<
k
;
existingKits
<<
k
;
kitMatched
<<
false
;
kitMatched
<<
false
;
...
@@ -285,15 +286,20 @@ void IosConfigurations::updateAutomaticKitList()
...
@@ -285,15 +286,20 @@ void IosConfigurations::updateAutomaticKitList()
QList
<
BaseQtVersion
*>
qtVersions
=
qtVersionsForArch
.
value
(
arch
);
QList
<
BaseQtVersion
*>
qtVersions
=
qtVersionsForArch
.
value
(
arch
);
foreach
(
BaseQtVersion
*
qt
,
qtVersions
)
{
foreach
(
BaseQtVersion
*
qt
,
qtVersions
)
{
Kit
*
kitAtt
=
0
;
bool
kitExists
=
false
;
bool
kitExists
=
false
;
for
(
int
i
=
0
;
i
<
existingKits
.
size
();
++
i
)
{
for
(
int
i
=
0
;
i
<
existingKits
.
size
();
++
i
)
{
Kit
*
k
=
existingKits
.
at
(
i
);
Kit
*
k
=
existingKits
.
at
(
i
);
if
(
DeviceTypeKitInformation
::
deviceTypeId
(
k
)
==
pDeviceType
if
(
DeviceTypeKitInformation
::
deviceTypeId
(
k
)
==
pDeviceType
&&
ToolChainKitInformation
::
toolChain
(
k
)
==
pToolchain
&&
ToolChainKitInformation
::
toolChain
(
k
)
==
pToolchain
&&
SysRootKitInformation
::
sysRoot
(
k
)
==
p
.
sdkPath
&&
QtKitInformation
::
qtVersion
(
k
)
==
qt
)
&&
QtKitInformation
::
qtVersion
(
k
)
==
qt
)
{
{
QTC_CHECK
(
!
kitMatched
.
value
(
i
,
true
));
// as we generate only two kits per qt (one for device and one for simulator)
// we do not compare the sdk (thus automatically upgrading it in place if a
// new Xcode is used). Change?
kitExists
=
true
;
kitExists
=
true
;
kitAtt
=
k
;
if
(
debugProbe
)
if
(
debugProbe
)
qDebug
()
<<
"found existing kit "
<<
k
->
displayName
()
<<
" for "
<<
p
.
name
qDebug
()
<<
"found existing kit "
<<
k
->
displayName
()
<<
" for "
<<
p
.
name
<<
","
<<
qt
->
displayName
();
<<
","
<<
qt
->
displayName
();
...
@@ -302,12 +308,13 @@ void IosConfigurations::updateAutomaticKitList()
...
@@ -302,12 +308,13 @@ void IosConfigurations::updateAutomaticKitList()
break
;
break
;
}
}
}
}
if
(
kitExists
)
if
(
kitExists
)
{
continue
;
kitAtt
->
blockNotification
();
}
else
{
if
(
debugProbe
)
if
(
debugProbe
)
qDebug
()
<<
"setting up new kit for "
<<
p
.
name
;
qDebug
()
<<
"setting up new kit for "
<<
p
.
name
;
Kit
*
newKi
t
=
new
Kit
;
kitAt
t
=
new
Kit
;
newKi
t
->
setAutoDetected
(
true
);
kitAt
t
->
setAutoDetected
(
true
);
QString
baseDisplayName
=
tr
(
"%1 %2"
).
arg
(
p
.
name
,
qt
->
displayName
());
QString
baseDisplayName
=
tr
(
"%1 %2"
).
arg
(
p
.
name
,
qt
->
displayName
());
QString
displayName
=
baseDisplayName
;
QString
displayName
=
baseDisplayName
;
for
(
int
iVers
=
1
;
iVers
<
100
;
++
iVers
)
{
for
(
int
iVers
=
1
;
iVers
<
100
;
++
iVers
)
{
...
@@ -321,55 +328,45 @@ void IosConfigurations::updateAutomaticKitList()
...
@@ -321,55 +328,45 @@ void IosConfigurations::updateAutomaticKitList()
if
(
unique
)
break
;
if
(
unique
)
break
;
displayName
=
baseDisplayName
+
QLatin1String
(
"-"
)
+
QString
::
number
(
iVers
);
displayName
=
baseDisplayName
+
QLatin1String
(
"-"
)
+
QString
::
number
(
iVers
);
}
}
newKit
->
setDisplayName
(
displayName
);
kitAtt
->
setDisplayName
(
displayName
);
newKit
->
setIconPath
(
Utils
::
FileName
::
fromString
(
}
kitAtt
->
setIconPath
(
Utils
::
FileName
::
fromString
(
QLatin1String
(
Constants
::
IOS_SETTINGS_CATEGORY_ICON
)));
QLatin1String
(
Constants
::
IOS_SETTINGS_CATEGORY_ICON
)));
DeviceTypeKitInformation
::
setDeviceTypeId
(
newKit
,
pDeviceType
);
DeviceTypeKitInformation
::
setDeviceTypeId
(
kitAtt
,
pDeviceType
);