Commit Graph

58 Commits

Author SHA1 Message Date
Daniel Teske
5e10114e76 Android: Remove bestMatch calls in fallback code in buildTargetSDK
besdtMatch finds a ndk version that is at most the targetApi passed into it.
Since we are passing in the fallback and lowest possible api level that qt
supports, the function would return at most the lowest supported version.
That's not very useful and cannot have worked, so simpy return the fallback
version directly.

Change-Id: I5e4757639099af4d207f928b0335d28efd75a02b
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-10-18 13:09:18 +02:00
hjk
35695ebb0c Qt4ProjectManager: Rename the "normal" qt4* files to qmake*
Change-Id: I5e173900a4008c72c67a30eaa9c101027c1b43af
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-10-16 14:30:05 +02:00
hjk
ebcd992577 Rename namespace Qt4ProjectManager to QmakeProjectManager
First step towards plugin renaming.

Change-Id: I8ac017660a7aa2bda0d7bb7d72ab0cfceaf6cfd2
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-10-16 12:09:59 +02:00
Leena Miettinen
e902945b7e Android: fix UI text capitalization and punctuation
Fix typos and style issues.

Change-Id: I8d1bbccd55e7558e7f8a8bedbab95f4bb8a8478f
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-10-09 17:50:52 +02:00
Daniel Teske
0a43f097de Android: Handle cases where the project is unparsed.
Change-Id: If1757fff8ff458610dae8cbfcf561154c7d56753
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-10-09 16:35:48 +02:00
Daniel Teske
1262310798 Android: androiddeployqt support
Change-Id: I37d706b4e11c6e1353a8ee73378b7d080080678c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-09-26 17:13:27 +02:00
Daniel Teske
a3a20c5697 Android: Fix unnecessary warnings from qt about .arg
Change-Id: I780dcf3ebd174275389620319e2d4b4784c84346
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-09-11 10:43:47 +02:00
Nikolai Kosjar
69fc3cf03f Kill ";;" at end of statement
Change-Id: I177094f19978e07f85e42b34701d8f03cd26665e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-09-04 09:19:10 +02:00
Daniel Teske
6c582e0180 Android Manifest Editor: Show available targets in combobox
Task-number: QTCREATORBUG-9682
Change-Id: I0454d96ff0a1df370e0b9197ae536bf5ae632ac2
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-08-30 12:05:04 +02:00
Daniel Teske
31fe6f069c Android: Use minimum sdk instead of build target sdk to filter devices
Task-number: QTCREATORBUG-9662
Change-Id: I3a5b3493bc8ef48bd23d014e86eef45185f3c17e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-08-28 16:05:44 +02:00
Daniel Teske
307aa7b3aa Rename AndroidManager::targetSDK to buildTargetSDK
There are 3 different sdk settings:
- The minimum sdk setting from the AndroidManifest.xml
- The target sdk setting from the AndroidManifest.xml
- The target sdk setting from the project.properties file

The last one is now called buildTargetSDK, since it only affects the
build.

Change-Id: I373d925a45088ff0cf8a8e0b22cf9744e571eeb1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-08-28 16:05:35 +02:00
Daniel Teske
3c2facab5f Android Manifest Editor: Add support for minimum and target sdk settings
Task-number: QTCREATORBUG-9692

Change-Id: Ide85392d86e7f3df4df9644f01d186ed939f5124
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-08-28 15:06:25 +02:00
Daniel Teske
cc7fe5eac6 Project: Simplfy file adding/removing interface
The filetype is only relevant for Qt4 projects. But even for Qt4 projects
the file type is insufficient to decide where the file should be added.
So remove the file type from the interface and let the projectmanagers
themselves figure out what they want to do.

Also fix
Task-number: QTCREATORBUG-9688

Change-Id: I02f7b1cd2e05efaf76e36fb9af34b109d4482f88
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-07-08 17:05:04 +02:00
Eike Ziller
42c9c96361 Merge remote-tracking branch 'origin/2.7' into 2.8
Conflicts:
	src/plugins/qmlprofiler/qmlprofilerengine.cpp

Change-Id: Ic9dc22d2d4a7306cfc4ef0ec158993e3768a9853
2013-06-14 16:19:14 +02:00
Daniel Teske
cb6eaa3c24 Android: Set JAVA_HOME in environment and use that environment
Change-Id: Ia0f3abad74b7ac423fab621ca22e0f698747c477
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Ray Donnelly <mingw.android@gmail.com>
2013-06-14 13:13:12 +02:00
Eike Ziller
4acece6d9e Merge remote-tracking branch 'origin/2.7' into 2.8
Conflicts:
	src/plugins/qmljstools/qmlconsoleitemdelegate.cpp
	src/plugins/qmlprofiler/qmlprofilerengine.cpp

Change-Id: I95c2c4116e28683fafcc0a557a7913d67361dcd4
2013-06-05 11:14:48 +02:00
Yoann Lopes
bab3b010af Android: fixed updating Java files on Windows.
When looking for lines in Java files that are not supported by the
selected API level, it didn't take into account that line endings are
"\r\n" on Windows. toInt() was failing, trying to convert for example
"10\r" to an integer.

Change-Id: I35478abd40d5ce4621d2320b3a5f5a3514cf9591
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-06-04 13:11:45 +02:00
Daniel Teske
d7f96e3201 Android Deploy Options: Clean up ui
Task-number: QTCREATORBUG-9208

Change-Id: I1b1864908a24af3cd7c576831656267a6390b583
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-05-29 15:15:56 +02:00
Daniel Teske
8b61a5da2e Android: Fix prebundled libraries use case
Task-number: QTCREATORBUG-9319
Change-Id: Iadf4baee10d51c9cb83ef1fffd2bffd8dc3eae56
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-05-24 15:11:22 +02:00
Eike Ziller
ef5d3796d5 Merge remote-tracking branch 'origin/2.7' into 2.8 2013-05-23 07:25:34 +02:00
Christian Strømme
35b96f2fc1 Android: Detect conditional dependencies.
To solve the problem with libQt5MultimediaQuick_p we need a way to detect
if an application is using both QtMultimedia and QtQuick.
This change adds logic to parse the -dependencies.xml file and look for
lib elements that have the extra attribute "extends". Libs with the
extends attribute will only be added to the list of dependencies, if the
library it extends is available.

Task-number: QTCREATORBUG-9300
Change-Id: I6f3e0a6d9158a91824e1e113f6aab7ec1112dd56
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-05-22 18:24:40 +02:00
Orgad Shaneh
b1d7d806c0 Fix some compiler warnings
* Unused variables in release build
* Comparison of bool to int

Change-Id: I1ac9b1051b26ae0655d4ff6b92d216926a4785da
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-05-17 08:13:18 +02:00
Daniel Teske
60b1aaeae4 Android: Implement a "editor" for android manifest files
Change-Id: I18c00ab452db21e5aa1ae3ad2eff465cfeff54b6
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-05-15 16:16:55 +02:00
Oswald Buddenhagen
6fb94a7b10 Merge branch '2.7'
Conflicts:
	doc/src/qtquick/qtquick-components.qdoc
	doc/src/qtquick/qtquick-designer.qdoc
	qtcreator.pri
	qtcreator.qbs
	src/plugins/cppeditor/cppinsertdecldef.cpp
	src/plugins/qnx/qnxruncontrolfactory.cpp

Change-Id: I0a37a07c42719bc0d9ef5b3ac4641d01a63c0d88
2013-05-15 10:21:47 +02:00
Daniel Teske
c842d83f91 Android: Check target architecture before deploying to device
Change-Id: I2d05f98cb6c390fb84186929fdf4152cc07d8965
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-05-06 11:11:55 +02:00
Eskil Abrahamsen Blomfeldt
91d48fe727 Enable mechanism to bundle Qt in APK
If the Qt version built against is Qt 5, and the deployment
method is "Use libs on device" + "Use local Qt libs", Creator
will copy the required files into the app bundle and set
the necessary meta-data to make the Java code in the app
actually load them from the app bundle.

We also make this deployment method the default on Qt 5.

Change-Id: Ib7a33e7d1fbd22f76c85c31e1dbc68912a38eda8
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-05-03 13:13:03 +02:00
Eike Ziller
a2171c2d82 Merge remote-tracking branch 'origin/2.7'
Conflicts:
	share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.cpp

Change-Id: I7f319154d5865c47ccfd5f525f0fd7983733dd0e
2013-05-03 09:49:28 +02:00
Daniel Teske
111392f6c5 Android: Make cleanPackageName automatically correct more errors
Disallow keywords, and parts that start with a digit.

Task-number: QTCREATORBUG-9200

Change-Id: Ia8b42c3015393f3e76126e311eebb728425726b7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-05-02 12:19:18 +02:00
Daniel Teske
4e37f1cd7f Android: Speed up project opening by caching the sdk version
The slowness is due to AndroidToolChain::addToEnvironment() being called
a lot on project opening. Thus we need to avoid any file opening or
process on loading.

This patch does 2 things:
a) It removes the call to sdkTargets() which is unneeded. That actually
checks which avds are available.

b) It caches the target sdk inside a named target setting. That means,
we assume that the file does not change behind our backs.

Task-number: QTCREATORBUG-9164

Change-Id: I9287934a0624db0b3e8318b8cf76e605418850c2
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-04-30 12:55:37 +02:00
Eike Ziller
44931c0985 Merge remote-tracking branch 'origin/2.7'
Conflicts:
	src/plugins/pythoneditor/tools/lexical/pythonformattoken.h

Change-Id: I7b921cd975aa755166a80d219ed5e8b69888aeb0
2013-04-18 09:22:19 +02:00
Daniel Teske
7298984039 Android: Fix reload prompt on changing settings in the package step
Change-Id: I102a4843652029dff757e12594efc4d5e5e50a99
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-17 13:25:59 +02:00
Daniel Teske
09f20adc7b Android: Only show android sdk versions that are supported by qt
That is at least android-9 for qt 5.

Task-number: QTCREATORBUG-9067
Change-Id: I977f8a35e5d2db2c645fe1a1bc52ef5d7b9f8b35
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-04-16 14:04:59 +02:00
Orgad Shaneh
03e7037aaa Android: Fix compiler warning
Comparison of bool and int

Change-Id: Iec471ce393442c4d75dffce4b3ddc9d275c17e67
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-03-27 15:33:28 +01:00
Eike Ziller
599be01a67 Merge remote-tracking branch 'origin/2.7'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	share/qtcreator/qml/qmlpuppet/interfaces/interfaces.pri
	share/qtcreator/qml/qmlpuppet/qml2puppet/instances/nodeinstancesignalspy.cpp
	share/qtcreator/qml/qmlpuppet/qml2puppet/instances/objectnodeinstance.h
	share/qtcreator/qml/qmlpuppet/qmlpuppet/instances/objectnodeinstance.h
	src/plugins/debugger/debuggerplugin.cpp
	src/plugins/qmldesigner/components/componentcore/modelnodecontextmenu_helper.cpp
	src/plugins/qmldesigner/components/debugview/debugview.cpp
	src/plugins/qmldesigner/components/formeditor/abstractcustomtool.cpp
	src/plugins/qmldesigner/components/formeditor/abstractcustomtool.h
	src/plugins/qmldesigner/components/formeditor/formeditorview.cpp
	src/plugins/qmldesigner/components/integration/stackedutilitypanelcontroller.h
	src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp
	src/plugins/qmldesigner/components/navigator/navigatorview.cpp
	src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp
	src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp
	src/plugins/qmldesigner/designercore/include/abstractview.h
	src/plugins/qmldesigner/designercore/include/qmldesignercorelib_global.h
	src/plugins/qmldesigner/designercore/include/rewriterview.h
	src/plugins/qmldesigner/designercore/metainfo/metainforeader.cpp
	src/plugins/qmldesigner/designercore/metainfo/subcomponentmanager.cpp
	src/plugins/qmldesigner/designercore/model/abstractview.cpp
	src/plugins/qmldesigner/designmodewidget.cpp

Change-Id: I9d8126e88397c02a87b5e4ab4da44e2bc7089134
2013-03-26 13:09:43 +01:00
Daniel Teske
22b2c30aa5 Android: Fix setting of icon
Task-number: QTCREATORBUG-9014
Change-Id: Ib155b09f5c57101cbacce1c2e9981a7d5b6be731
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-03-25 10:58:25 +01:00
Eskil Abrahamsen Blomfeldt
a20dd013a7 Android: Fix use_local_libs when running from launcher
The old way of passing the use_local_libs settings to the
app (which is still supported for compatibility with Necessitas)
was to pass it as command line arguments when the app is
launched from Qt Creator. This will make the app depend on
Ministro if it's later launched from the Android launcher.
To avoid this, we pass the info as part of AndroidManifest.xml
instead.

Task-number: QTCREATORBUG-8643
Change-Id: Ib044ce8bf7e285cf46075a8713bd7fc6736052d5
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-03-18 10:33:39 +01:00
Friedemann Kleint
dc95392aa4 Fix wasteful loops in AndroidManager::availableQtLibs.
Detected by Krazy (values or keys iteration).

Change-Id: I2ebfd4690261139ea0739bc9c00692c06064539c
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-03-12 16:18:19 +01:00
Daniel Teske
7789ba45f0 Android: Also include indirect dependencies in libs.xml
Change-Id: I12d5aff64fc6b677ac88c28eed90ae51443c7584
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-03-11 12:58:51 +01:00
Daniel Teske
78aa64e06b Android: Deploy libgnustl_shared.so directly from android-ndk
Task-number: QTCREATORBUG-8688

Change-Id: I890663c96d11a38275724b792eca0be782df673f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-03-04 14:56:45 +01:00
Robert Loehning
420eefd884 Compile fix
Change-Id: I2807efd386b86247a4fbf67151cd6d3fb98c3b22
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-02-18 16:22:42 +01:00
Eskil Abrahamsen Blomfeldt
a19ed6063a Fix Android plugin to support Qt 5 style rules-files
In Qt 5 we have modularized the rules files so that each module
specifies its own rules. This patch updates the plugin to support
reading from these in addition to the rules.xml of Qt 4 so that
it should work well for both.

The "replaces" attribute of the lib element is also added in Qt 5
because the files are generated and thus the approach of rules.xml
where replaces is a separate element and where the order has
semantics was not convenient. We of course support the
Necessitas approach as well.

Change-Id: Ife21903c9faf61e1791cf8c0ea78bb61c74dcb34
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2013-02-18 15:04:23 +01:00
Daniel Teske
4a890f6d47 Simplify Android settings, move debugger/gdbserver to Kit
Creator now realiable creates one toolchain for each toolchain found in
the ndk. This no longer depends on any qt versions being present.

Also the gdb command and gdb server command are moved to the Kit and are
no longer found in the Android Options page. Both settings can be
autodetected from the Kit options page. Note that this might break
existing android kits.

Change-Id: I1dce084f2bb372e615e19b1c9e3a1e205b5d9647
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2013-02-07 19:21:20 +01:00
Oswald Buddenhagen
1fda2111d4 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in
	src/plugins/debugger/qtmessageloghandler.cpp
	src/plugins/debugger/qtmessagelogwindow.cpp
	src/plugins/madde/maemodeployconfigurationwidget.cpp
	src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp
	src/plugins/qmldesigner/designercore/include/widgetqueryview.h
	src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp
	src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h
	src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
	src/plugins/qnx/bardescriptormagicmatcher.h
	src/plugins/qt4projectmanager/profilekeywords.cpp
	src/plugins/remotelinux/deployablefilesperprofile.cpp
	src/plugins/remotelinux/deployablefilesperprofile.h
	src/plugins/remotelinux/deploymentinfo.cpp
	src/plugins/remotelinux/deploymentsettingsassistant.cpp
	src/plugins/remotelinux/profilesupdatedialog.cpp
	tests/auto/icheckbuild/ichecklib.cpp
	tests/auto/icheckbuild/parsemanager.cpp
	tests/auto/icheckbuild/parsemanager.h

Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
2013-01-31 16:25:33 +01:00
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
BogDan Vatra
674ec5efa9 Send static_init_classes paratemer to Android application
Change-Id: I3eba3413464bd0e503f24817769bd3062be0eeb2
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2013-01-17 12:11:22 +01:00
Orgad Shaneh
29a93998df Remove braces for single lines of conditions
#!/usr/bin/env ruby

Dir.glob('**/*.cpp') { |file|
  # skip ast (excluding paste, astpath, and canv'ast'imer)
  next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
  s = File.read(file)
  next if s.include?('qlalr')
  orig = s.dup
  s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
    res = $&
    if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
      res
    else
      res.gsub!('} else', 'else')
      res.gsub!(/\n +} *\n/m, "\n")
      res.gsub(/ *{$/, '')
    end
  }
  s.gsub!(/ *$/, '')
  File.open(file, 'wb').write(s) if s != orig
}

Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
2013-01-08 10:48:18 +01:00
Ray Donnelly
decefcbd8f Use QProcess::kill() rather than QProcess::terminate() for adb.exe
terminate (on Windows) requires a Windows Event Loop to process it
so use kill() on all platforms instead.

Change-Id: Ic38d6813c3071fde67806b10d782e5ab3b0f1a18
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2012-12-13 12:57:24 +01:00
Daniel Teske
120b923edb Remove target from AndroidManager::openXmlFile()
It's no longer used.

Change-Id: I0256b76c2b007dd841aad51dae12602d9d7b3eb8
Reviewed-by: BogDan Vatra <bog_dan_ro@yahoo.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-16 14:38:04 +01:00
Daniel Teske
e0c9d9dd51 Remove createAndroidTemplates from AndroidManager::openXmlFile()
The default value is false, and all the callers that pass in a 4th
parameter, pass in false.

Change-Id: Ifff6fb138b4cdd1d249c25246c623335dd96dcc5
Reviewed-by: BogDan Vatra <bog_dan_ro@yahoo.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-11-16 14:37:58 +01:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00