Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
7c0b1b63
Commit
7c0b1b63
authored
Nov 30, 2010
by
con
Browse files
Merge remote branch 'origin/2.1' into master
parents
5daec0bd
e0084d9e
Changes
4
Hide whitespace changes
Inline
Side-by-side
share/qtcreator/qml/qmldump/main.cpp
View file @
7c0b1b63
...
...
@@ -14,6 +14,9 @@
#include <QtDeclarative/private/qdeclarativemetatype_p.h>
#include <QtDeclarative/private/qdeclarativeopenmetaobject_p.h>
#include <QtDeclarative/QDeclarativeView>
#ifdef QT_SIMULATOR
#include <QtGui/private/qsimulatorconnection_p.h>
#endif
static
QHash
<
QByteArray
,
QList
<
const
QDeclarativeType
*>
>
qmlTypesByCppName
;
static
QHash
<
QByteArray
,
QByteArray
>
cppToId
;
...
...
@@ -258,6 +261,9 @@ void writeEasingCurve(QXmlStreamWriter *xml)
int
main
(
int
argc
,
char
*
argv
[])
{
#ifdef QT_SIMULATOR
QtSimulatorPrivate
::
SimulatorConnection
::
createStubInstance
();
#endif
QApplication
app
(
argc
,
argv
);
if
(
argc
!=
1
&&
argc
!=
3
)
{
...
...
src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp
View file @
7c0b1b63
...
...
@@ -567,8 +567,6 @@ bool TextToModelMerger::load(const QString &data, DifferenceHandler &differenceH
{
// Have the QML engine check if the document is valid:
QDeclarativeEngine
engine
;
engine
.
setOutputWarningsToStandardError
(
false
);
foreach
(
const
QString
&
importPath
,
importPaths
)
engine
.
addImportPath
(
importPath
);
QDeclarativeComponent
comp
(
&
engine
);
comp
.
setData
(
data
.
toUtf8
(),
url
);
if
(
comp
.
status
()
==
QDeclarativeComponent
::
Error
)
{
...
...
src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.cpp
View file @
7c0b1b63
...
...
@@ -139,8 +139,8 @@ GettingStartedWelcomePageWidget::GettingStartedWelcomePageWidget(QWidget *parent
const
QString
featureRssFile
=
Core
::
ICore
::
instance
()
->
resourcePath
()
+
QLatin1String
(
"/rss/featured.rss"
);
emit
startRssFetching
(
QUrl
::
fromLocalFile
(
featureRssFile
));
ui
->
nextFeatureBtn
->
setEnabled
(
false
);
ui
->
prevFeatureBtn
->
setEnabled
(
false
);
ui
->
nextFeatureBtn
->
hide
(
);
ui
->
prevFeatureBtn
->
hide
(
);
connect
(
ui
->
nextFeatureBtn
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
slotNextFeature
()));
connect
(
ui
->
prevFeatureBtn
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
slotPrevFeature
()));
}
...
...
@@ -524,8 +524,10 @@ QStringList GettingStartedWelcomePageWidget::tipsOfTheDay()
void
GettingStartedWelcomePageWidget
::
addToFeatures
(
const
Core
::
RssItem
&
feature
)
{
m_featuredItems
.
append
(
feature
);
ui
->
nextFeatureBtn
->
setEnabled
(
true
);
ui
->
prevFeatureBtn
->
setEnabled
(
true
);
if
(
m_featuredItems
.
count
()
>
1
)
{
ui
->
nextFeatureBtn
->
show
();
ui
->
prevFeatureBtn
->
show
();
}
}
void
GettingStartedWelcomePageWidget
::
showFeature
(
int
feature
)
...
...
src/plugins/qt4projectmanager/qmldumptool.cpp
View file @
7c0b1b63
...
...
@@ -141,8 +141,10 @@ bool QmlDumpTool::canBuild(const QtVersion *qtVersion)
{
const
QString
installHeaders
=
qtVersion
->
versionInfo
().
value
(
"QT_INSTALL_HEADERS"
);
const
QString
header
=
installHeaders
+
QLatin1String
(
"/QtDeclarative/private/qdeclarativemetatype_p.h"
);
return
qtVersion
->
supportsTargetId
(
Constants
::
DESKTOP_TARGET_ID
)
&&
QFile
::
exists
(
header
);
return
(
qtVersion
->
supportsTargetId
(
Constants
::
DESKTOP_TARGET_ID
)
||
(
qtVersion
->
supportsTargetId
(
Constants
::
QT_SIMULATOR_TARGET_ID
)
&&
checkMinimumQtVersion
(
qtVersion
->
qtVersionString
(),
4
,
7
,
1
)))
&&
QFile
::
exists
(
header
);
}
static
QtVersion
*
qtVersionForProject
(
ProjectExplorer
::
Project
*
project
)
...
...
@@ -170,24 +172,25 @@ static QtVersion *qtVersionForProject(ProjectExplorer::Project *project)
return
0
;
}
// else, find any desktop Qt version that has qmldump, or
- if there isn't any -
// one that could build it
QtVersion
*
desktopQt
=
0
;
// else, find any desktop
or simulator
Qt version that has qmldump, or
//
- if there isn't any -
one that could build it
QtVersion
*
canBuildQmlDump
=
0
;
QtVersionManager
*
qtVersions
=
QtVersionManager
::
instance
();
foreach
(
QtVersion
*
version
,
qtVersions
->
validVersions
())
{
if
(
version
->
supportsTargetId
(
Constants
::
DESKTOP_TARGET_ID
))
{
if
(
version
->
supportsTargetId
(
Constants
::
DESKTOP_TARGET_ID
)
||
version
->
supportsTargetId
(
Constants
::
QT_SIMULATOR_TARGET_ID
))
{
const
QString
qtInstallData
=
version
->
versionInfo
().
value
(
"QT_INSTALL_DATA"
);
const
QString
path
=
QmlDumpTool
::
toolByInstallData
(
qtInstallData
);
if
(
!
path
.
isEmpty
())
return
version
;
if
(
!
desktopQt
&&
QmlDumpTool
::
canBuild
(
version
))
{
desktopQt
=
version
;
if
(
!
canBuildQmlDump
&&
QmlDumpTool
::
canBuild
(
version
))
{
canBuildQmlDump
=
version
;
}
}
}
return
desktopQt
;
return
canBuildQmlDump
;
}
QString
QmlDumpTool
::
toolForProject
(
ProjectExplorer
::
Project
*
project
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment