rhodes 5.5.2 → 5.5.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (209) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +1 -1
  3. data/CREDITS +3 -3
  4. data/LICENSE +1 -1
  5. data/README.html +1 -1
  6. data/Rakefile +53 -14
  7. data/bin/get-rhodes-info +0 -0
  8. data/extensions/rhoconnect-push/ext/rhoconnect-push/platform/android/Rakefile +1 -1
  9. data/lib/build/jake.rb +11 -0
  10. data/lib/commonAPI/barcode/ext/platform/iphone/impl/BarcodeFactory.m +2 -1
  11. data/lib/commonAPI/coreapi/ext/NativeTabbar.xml +4 -0
  12. data/lib/commonAPI/coreapi/ext/platform/iphone/cpp_based_impl/SystemImpl.mm +1 -0
  13. data/lib/commonAPI/coreapi/ext/platform/iphone/impl/NativeTabbarSingleton.m +7 -2
  14. data/lib/commonAPI/coreapi/ext/platform/iphone/impl/NativeToolbarSingleton.m +6 -2
  15. data/lib/commonAPI/coreapi/ext/platform/iphone/impl/NavbarSingleton.m +8 -2
  16. data/lib/commonAPI/coreapi/ext/shared/ApplicationImpl.cpp +3 -0
  17. data/lib/commonAPI/coreapi/ext/shared/NetworkImpl.cpp +1 -0
  18. data/lib/commonAPI/coreapi/ext/shared/TimerImpl.cpp +36 -27
  19. data/lib/commonAPI/coreapi/public/api/rhoapi.js +6 -3
  20. data/lib/commonAPI/mediacapture/ext.yml +1 -2
  21. data/lib/commonAPI/mediacapture/ext/build.bat +8 -0
  22. data/lib/commonAPI/mediacapture/ext/platform/qt/MediaCapture.pro +82 -0
  23. data/lib/commonAPI/mediacapture/ext/platform/qt/Rakefile +35 -0
  24. data/lib/commonAPI/mediacapture/ext/platform/qt/resources/diaClosed.png +0 -0
  25. data/lib/commonAPI/mediacapture/ext/platform/qt/resources/diaOpened.png +0 -0
  26. data/lib/commonAPI/mediacapture/ext/platform/qt/resources/mediacapture.qrc +7 -0
  27. data/lib/commonAPI/mediacapture/ext/platform/qt/resources/photoSave.png +0 -0
  28. data/lib/commonAPI/mediacapture/ext/platform/qt/src/CCameraData.cpp +83 -0
  29. data/lib/commonAPI/mediacapture/ext/platform/qt/src/CCameraData.h +54 -0
  30. data/lib/commonAPI/mediacapture/ext/platform/qt/src/CameraDialogBuilder.h +36 -0
  31. data/lib/commonAPI/mediacapture/ext/platform/qt/src/CameraDialogController.h +31 -0
  32. data/lib/commonAPI/mediacapture/ext/platform/qt/src/CameraDialogView.h +73 -0
  33. data/lib/commonAPI/mediacapture/ext/platform/qt/src/Camera_impl.cpp +337 -0
  34. data/lib/commonAPI/mediacapture/ext/platform/qt/src/ImageFileNameGetter.h +40 -0
  35. data/lib/commonAPI/mediacapture/ext/platform/qt/src/ImageFilenameGetterResult.h +36 -0
  36. data/lib/commonAPI/mediacapture/ext/platform/qt/src/cameracrossthreadhalper.h +17 -0
  37. data/lib/commonAPI/mediacapture/ext/platform/qt/src/cameradialogview.cpp +178 -0
  38. data/lib/commonAPI/mediacapture/ext/shared/MediacaptureInit.cpp +8 -8
  39. data/lib/framework/rhodes.rb +1 -1
  40. data/lib/framework/version.rb +1 -1
  41. data/platform/android/Rhodes/AndroidManifest.xml.erb +1 -1
  42. data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +9 -2
  43. data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SplashScreen.java +33 -0
  44. data/platform/android/build/android.rake +97 -43
  45. data/platform/android/build/android_studio_project_generator.rb +21 -0
  46. data/platform/android/build/android_tools.rb +8 -6
  47. data/platform/iphone/Classes/AppManager/AppManager.h +6 -0
  48. data/platform/iphone/Classes/AppManager/AppManager.m +76 -37
  49. data/platform/iphone/Classes/MapView/GoogleGeocoder.m +2 -3
  50. data/platform/iphone/Classes/MapView/MapViewController.m +3 -3
  51. data/platform/iphone/Classes/NativeBar.h +1 -0
  52. data/platform/iphone/Classes/NativeBar.m +15 -0
  53. data/platform/iphone/Classes/RhoViewController.m +8 -3
  54. data/platform/iphone/Classes/RhoWKWebView.m +1 -1
  55. data/platform/iphone/Classes/Rhodes.m +55 -38
  56. data/platform/iphone/Classes/SimpleMainView.m +3 -2
  57. data/platform/iphone/Classes/TabbedMainView.h +2 -0
  58. data/platform/iphone/Classes/TabbedMainView.m +15 -3
  59. data/platform/iphone/Classes/URLProtocol/CRhoURLProtocol.h +2 -0
  60. data/platform/iphone/Classes/URLProtocol/CRhoURLProtocol.m +185 -30
  61. data/platform/iphone/Classes/rho/net/IPhoneNetRequest.mm +105 -6
  62. data/platform/iphone/rbuild/iphone.rake +426 -267
  63. data/platform/iphone/rbuild/putsOverride.rake +8 -0
  64. data/platform/shared/api_generator/iphone/CJSConverter.mm +5 -3
  65. data/platform/shared/common/BundleManager.cpp +16 -6
  66. data/platform/shared/common/PosixThreadImpl.cpp +10 -4
  67. data/platform/shared/common/RhoTime.cpp +81 -40
  68. data/platform/shared/common/RhodesApp.cpp +2 -2
  69. data/platform/shared/common/RhodesApp.h +1 -1
  70. data/platform/shared/db/DBAdapter.cpp +33 -0
  71. data/platform/shared/db/DBAdapter.h +5 -0
  72. data/platform/shared/logging/RhoLogConf.cpp +17 -1
  73. data/platform/shared/logging/RhoLogConf.h +6 -0
  74. data/platform/shared/net/CURLNetRequest.cpp +6 -0
  75. data/platform/shared/net/HttpServer.cpp +27 -1
  76. data/platform/shared/net/INetRequest.cpp +33 -6
  77. data/platform/shared/net/INetRequest.h +2 -0
  78. data/platform/shared/qt/RhoSimulator_dev.pro +14 -10
  79. data/platform/shared/qt/rhodes/QtMainWindow.cpp +2 -2
  80. data/platform/shared/qt/rhodes/iexecutable.h +27 -0
  81. data/platform/shared/qt/rhodes/impl/MainWindowImpl.cpp +5 -0
  82. data/platform/shared/qt/rhodes/impl/MainWindowImpl.h +3 -0
  83. data/platform/shared/qt/rhodes/qkineticscroller.cpp +2 -2
  84. data/platform/shared/qt/rhodes/qkineticscroller_p.h +1 -1
  85. data/platform/shared/qt/rhodes/qtscrollerfilter.cpp +3 -3
  86. data/platform/shared/qt/rhodes/qtscrollevent.cpp +2 -2
  87. data/platform/shared/qt/rhodes/qwebviewkineticscroller.cpp +1 -1
  88. data/platform/shared/qt/rhodes/qwebviewkineticscroller.h +1 -1
  89. data/platform/shared/qt/rhodes/resources/rho.png +0 -0
  90. data/platform/shared/qt/rhodes/rhodes.pro +3 -2
  91. data/platform/wm/build/wm.rake +28 -9
  92. data/platform/wm/rhodes/browser/BrowserFactory.cpp +4 -6
  93. data/platform/wm/rhodes/browser/stubs.cpp +5 -0
  94. data/platform/wm/rhodes/rho/net/NetRequestImpl.h +3 -0
  95. data/platform/wm/rhodes/rhodes.vcproj +31 -2
  96. data/rakefile.rb +53 -14
  97. data/res/build-tools/iphonesim/build/Release/iphonesim_8 +2 -2
  98. data/res/generators/rhogen.rb +6 -147
  99. data/res/generators/templates/api/platform/iphone/generated/base_impl/MontanaBase.m +7 -7
  100. data/res/generators/templates/api/platform/iphone/generated/javascript/montana_js_wrap.mm +2 -4
  101. data/res/generators/templates/application/AndroidManifest.erb +1 -1
  102. data/res/generators/templates/application/app/Settings/home.erb +1 -1
  103. data/res/generators/templates/application/build.yml +52 -6
  104. data/res/generators/templates/application/icon/icon.png +0 -0
  105. data/res/generators/templates/application/resources/android/res/drawable-hdpi/ic_notification.png +0 -0
  106. data/res/generators/templates/application/resources/android/res/drawable-hdpi/icon.png +0 -0
  107. data/res/generators/templates/application/resources/android/res/drawable-hdpi/loading.png +0 -0
  108. data/res/generators/templates/application/resources/android/res/drawable-ldpi/ic_notification.png +0 -0
  109. data/res/generators/templates/application/resources/android/res/drawable-ldpi/icon.png +0 -0
  110. data/res/generators/templates/application/resources/android/res/drawable-ldpi/loading.png +0 -0
  111. data/res/generators/templates/application/resources/android/res/drawable-mdpi/ic_notification.png +0 -0
  112. data/res/generators/templates/application/resources/android/res/drawable-mdpi/icon.png +0 -0
  113. data/res/generators/templates/application/resources/android/res/drawable-mdpi/loading.png +0 -0
  114. data/res/generators/templates/application/resources/android/res/drawable-xhdpi/ic_notification.png +0 -0
  115. data/res/generators/templates/application/resources/android/res/drawable-xhdpi/icon.png +0 -0
  116. data/res/generators/templates/application/resources/android/res/drawable-xhdpi/loading.png +0 -0
  117. data/res/generators/templates/application/resources/android/res/drawable-xxhdpi/ic_notification.png +0 -0
  118. data/res/generators/templates/application/resources/android/res/drawable-xxhdpi/icon.png +0 -0
  119. data/res/generators/templates/application/resources/android/res/drawable-xxhdpi/loading.png +0 -0
  120. data/res/generators/templates/application/resources/android/res/drawable-xxxhdpi/ic_notification.png +0 -0
  121. data/res/generators/templates/application/resources/android/res/drawable-xxxhdpi/icon.png +0 -0
  122. data/res/generators/templates/application/resources/android/res/drawable-xxxhdpi/loading.png +0 -0
  123. data/res/generators/templates/application/resources/android/res/drawable/ic_notification.png +0 -0
  124. data/res/generators/templates/application/resources/android/res/drawable/icon.png +0 -0
  125. data/res/generators/templates/application/resources/android/res/drawable/loading.png +0 -0
  126. data/res/generators/templates/application/resources/android/res/mipmap-hdpi/icon.png +0 -0
  127. data/res/generators/templates/application/resources/android/res/mipmap-ldpi/icon.png +0 -0
  128. data/res/generators/templates/application/resources/android/res/mipmap-mdpi/icon.png +0 -0
  129. data/res/generators/templates/application/resources/android/res/mipmap-xhdpi/icon.png +0 -0
  130. data/res/generators/templates/application/resources/android/res/mipmap-xxhdpi/icon.png +0 -0
  131. data/res/generators/templates/application/resources/android/res/mipmap-xxxhdpi/icon.png +0 -0
  132. data/res/generators/templates/application/resources/android/res/mipmap/icon.png +0 -0
  133. data/res/generators/templates/application/{app/loading-568h@2x.png → resources/ios/Default-568h@2x.png} +0 -0
  134. data/res/generators/templates/application/{app/loading-667h@2x.png → resources/ios/Default-667h@2x.png} +0 -0
  135. data/res/generators/templates/application/{app/loading-736h@3x.png → resources/ios/Default-736h@3x.png} +0 -0
  136. data/res/generators/templates/application/{app/loading-Landscape.png → resources/ios/Default-Landscape.png} +0 -0
  137. data/res/generators/templates/application/{app/loading-Landscape@2x.png → resources/ios/Default-Landscape@2x.png} +0 -0
  138. data/res/generators/templates/application/{app/loading-LandscapeLeft.png → resources/ios/Default-LandscapeLeft.png} +0 -0
  139. data/res/generators/templates/application/{app/loading-LandscapeLeft@2x.png → resources/ios/Default-LandscapeLeft@2x.png} +0 -0
  140. data/res/generators/templates/application/{app/loading-LandscapeRight.png → resources/ios/Default-LandscapeRight.png} +0 -0
  141. data/res/generators/templates/application/{app/loading-LandscapeRight@2x.png → resources/ios/Default-LandscapeRight@2x.png} +0 -0
  142. data/res/generators/templates/application/{app/loading-Portrait.png → resources/ios/Default-Portrait.png} +0 -0
  143. data/res/generators/templates/application/{app/loading-Portrait@2x.png → resources/ios/Default-Portrait@2x.png} +0 -0
  144. data/res/generators/templates/application/{app/loading-PortraitUpsideDown.png → resources/ios/Default-PortraitUpsideDown.png} +0 -0
  145. data/res/generators/templates/application/{app/loading-PortraitUpsideDown@2x.png → resources/ios/Default-PortraitUpsideDown@2x.png} +0 -0
  146. data/res/generators/templates/application/resources/ios/Default.png +0 -0
  147. data/res/generators/templates/application/{app/loading@2x.png → resources/ios/Default@2x.png} +0 -0
  148. data/res/generators/templates/application/resources/ios/iTunesArtwork.png +0 -0
  149. data/res/generators/templates/application/resources/ios/iTunesArtwork@2x.png +0 -0
  150. data/res/generators/templates/application/resources/ios/icon114.png +0 -0
  151. data/res/generators/templates/application/resources/ios/icon120.png +0 -0
  152. data/res/generators/templates/application/resources/ios/icon144.png +0 -0
  153. data/res/generators/templates/application/resources/ios/icon152.png +0 -0
  154. data/res/generators/templates/application/resources/ios/icon180.png +0 -0
  155. data/res/generators/templates/application/resources/ios/icon57.png +0 -0
  156. data/res/generators/templates/application/resources/ios/icon60.png +0 -0
  157. data/res/generators/templates/application/resources/ios/icon72.png +0 -0
  158. data/res/generators/templates/application/resources/ios/icon76.png +0 -0
  159. data/res/generators/templates/application/rhoconfig.txt +2 -1
  160. data/res/generators/templates/iphone_project/Bremen7.xcodeproj/project.pbxproj +44 -0
  161. data/res/generators/templates/iphone_project/Resources/back_btn.png +0 -0
  162. data/res/generators/templates/iphone_project/Resources/back_btn@2x.png +0 -0
  163. data/res/generators/templates/iphone_project/Resources/back_btn@3x.png +0 -0
  164. data/res/generators/templates/iphone_project/Resources/forward_btn.png +0 -0
  165. data/res/generators/templates/iphone_project/Resources/forward_btn@2x.png +0 -0
  166. data/res/generators/templates/iphone_project/Resources/forward_btn@3x.png +0 -0
  167. data/res/generators/templates/iphone_project/Resources/gears.png +0 -0
  168. data/res/generators/templates/iphone_project/Resources/gears@2x.png +0 -0
  169. data/res/generators/templates/iphone_project/Resources/gears@3x.png +0 -0
  170. data/res/generators/templates/iphone_project/Resources/home_btn.png +0 -0
  171. data/res/generators/templates/iphone_project/Resources/home_btn@2x.png +0 -0
  172. data/res/generators/templates/iphone_project/Resources/home_btn@3x.png +0 -0
  173. data/res/generators/templates/iphone_project/Resources/sync_btn.png +0 -0
  174. data/res/generators/templates/iphone_project/Resources/sync_btn@2x.png +0 -0
  175. data/res/generators/templates/iphone_project/Resources/sync_btn@3x.png +0 -0
  176. data/res/generators/templates/iphone_project/buildRhoBundle +23 -7
  177. data/res/generators/templates/iphone_project/root/Info.plist +0 -7
  178. data/res/generators/templates/iphone_project/root/iTunesArtwork +0 -0
  179. data/res/generators/templates/iphone_project/root/iTunesArtwork@2x +0 -0
  180. data/res/generators/templates/iphone_project/root/icon114.png +0 -0
  181. data/res/generators/templates/iphone_project/root/icon120.png +0 -0
  182. data/res/generators/templates/iphone_project/root/icon144.png +0 -0
  183. data/res/generators/templates/iphone_project/root/icon152.png +0 -0
  184. data/res/generators/templates/iphone_project/root/icon180.png +0 -0
  185. data/res/generators/templates/iphone_project/root/icon57.png +0 -0
  186. data/res/generators/templates/iphone_project/root/icon60.png +0 -0
  187. data/res/generators/templates/iphone_project/root/icon72.png +0 -0
  188. data/res/generators/templates/iphone_project/root/icon76.png +0 -0
  189. data/res/generators/templates/project/android_studio_project/app/build.gradle.erb +88 -0
  190. data/res/generators/templates/project/android_studio_project/build.gradle +23 -0
  191. data/res/generators/templates/project/android_studio_project/gradle.properties +17 -0
  192. data/res/generators/templates/project/android_studio_project/gradlew +160 -0
  193. data/res/generators/templates/project/android_studio_project/gradlew.bat +90 -0
  194. data/res/generators/templates/project/android_studio_project/settings.gradle +1 -0
  195. data/rhodes.gemspec +7 -6
  196. data/version +1 -1
  197. metadata +135 -42
  198. data/res/generators/templates/application/icon/icon.svg +0 -22
  199. data/res/generators/templates/application/icon/icon114.png +0 -0
  200. data/res/generators/templates/application/icon/icon120.png +0 -0
  201. data/res/generators/templates/application/icon/icon144.png +0 -0
  202. data/res/generators/templates/application/icon/icon152.png +0 -0
  203. data/res/generators/templates/application/icon/icon180.png +0 -0
  204. data/res/generators/templates/application/icon/icon57.png +0 -0
  205. data/res/generators/templates/application/icon/icon60.png +0 -0
  206. data/res/generators/templates/application/icon/icon72.png +0 -0
  207. data/res/generators/templates/application/icon/icon76.png +0 -0
  208. data/res/generators/templates/application/production/iTunesArtwork.png +0 -0
  209. data/res/generators/templates/application/production/iTunesArtwork@2x.png +0 -0
@@ -54,6 +54,7 @@ class CURLNetResponseImpl : public INetResponse
54
54
  String m_data;
55
55
  int m_nRespCode;
56
56
  String m_cookies;
57
+ String m_errorMessage;
57
58
 
58
59
  public:
59
60
  CURLNetResponseImpl(char const *data, size_t size, int nRespCode)
@@ -81,6 +82,11 @@ public:
81
82
  {
82
83
  return m_cookies;
83
84
  }
85
+
86
+ virtual String getErrorMessage()
87
+ {
88
+ return m_errorMessage;
89
+ }
84
90
 
85
91
  virtual void setCharData(const char* szData)
86
92
  {
@@ -81,6 +81,24 @@ typedef unsigned __int16 uint16_t;
81
81
  #undef DEFAULT_LOGCATEGORY
82
82
  #define DEFAULT_LOGCATEGORY "HttpServer"
83
83
 
84
+
85
+ static bool is_net_trace() {
86
+ static int res = -1;
87
+ if (res == -1) {
88
+ if (rho_conf_getBool("net_trace") ) {
89
+ res = 1;
90
+ }
91
+ else {
92
+ res = 0;
93
+ }
94
+ }
95
+ return res == 1;
96
+ }
97
+
98
+
99
+
100
+
101
+
84
102
  //extern "C" void rho_sync_addobjectnotify_bysrcname(const char* szSrcName, const char* szObject);
85
103
 
86
104
  namespace rho
@@ -1497,8 +1515,13 @@ bool CHttpServer::decide(String const &method, String const &arg_uri, String con
1497
1515
  #ifdef OS_MACOSX
1498
1516
  String CHttpServer::directRequest( const String& method, const String& uri, const String& query, const HeaderList& headers ,const String& body )
1499
1517
  {
1518
+ if (is_net_trace()) {
1519
+ RAWTRACE1("$NetRequestProcess$ PRE LOCK CHttpServer::directRequest uri = %s", uri.c_str());
1520
+ }
1500
1521
  common::CMutexLock lock(m_mxSyncRequest);
1501
-
1522
+ if (is_net_trace()) {
1523
+ RAWTRACE1("$NetRequestProcess$ POST LOCK CHttpServer::directRequest uri = %s", uri.c_str());
1524
+ }
1502
1525
  String ret;
1503
1526
  if ( m_pQueue != 0 )
1504
1527
  {
@@ -1526,6 +1549,9 @@ String CHttpServer::directRequest( const String& method, const String& uri, cons
1526
1549
 
1527
1550
  ret = m_pQueue->getResponse();
1528
1551
  }
1552
+ if (is_net_trace()) {
1553
+ RAWTRACE1("$NetRequestProcess$ FINISH CHttpServer::directRequest uri = %s", uri.c_str());
1554
+ }
1529
1555
 
1530
1556
  return ret;
1531
1557
 
@@ -1,18 +1,18 @@
1
1
  /*------------------------------------------------------------------------
2
2
  * (The MIT License)
3
- *
3
+ *
4
4
  * Copyright (c) 2008-2011 Rhomobile, Inc.
5
- *
5
+ *
6
6
  * Permission is hereby granted, free of charge, to any person obtaining a copy
7
7
  * of this software and associated documentation files (the "Software"), to deal
8
8
  * in the Software without restriction, including without limitation the rights
9
9
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
10
  * copies of the Software, and to permit persons to whom the Software is
11
11
  * furnished to do so, subject to the following conditions:
12
- *
12
+ *
13
13
  * The above copyright notice and this permission notice shall be included in
14
14
  * all copies or substantial portions of the Software.
15
- *
15
+ *
16
16
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
17
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
18
  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -20,7 +20,7 @@
20
20
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
22
  * THE SOFTWARE.
23
- *
23
+ *
24
24
  * http://rhomobile.com
25
25
  *------------------------------------------------------------------------*/
26
26
 
@@ -31,6 +31,28 @@
31
31
  #include "common/RhoFilePath.h"
32
32
  #include "net/URI.h"
33
33
 
34
+ #include "common/RhoConf.h"
35
+ #include "logging/RhoLog.h"
36
+
37
+ #undef DEFAULT_LOGCATEGORY
38
+ #define DEFAULT_LOGCATEGORY "NetRequestTimer"
39
+
40
+
41
+ static bool is_net_trace() {
42
+ static int res = -1;
43
+ if (res == -1) {
44
+ if (rho_conf_getBool("net_trace") ) {
45
+ res = 1;
46
+ }
47
+ else {
48
+ res = 0;
49
+ }
50
+ }
51
+ return res == 1;
52
+ }
53
+
54
+
55
+
34
56
  namespace rho {
35
57
  namespace net {
36
58
 
@@ -50,12 +72,17 @@ void CNetRequestHolder::setRequest(INetRequestImpl* pReq)
50
72
 
51
73
  void CNetRequestHolder::cancel()
52
74
  {
75
+ if (is_net_trace()) {
76
+ RAWTRACE("$NetRequestProcess$ PRE SYNCHRONIZED CNetRequestHolder::cancel() TIMER");
77
+ }
53
78
  synchronized(m_mxReq)
54
79
  {
55
80
  m_bCancel = true;
56
81
  if ( m_pReq != 0 )
57
82
  m_pReq->cancel();
58
-
83
+ if (is_net_trace()) {
84
+ RAWTRACE("$NetRequestProcess$ POST SYNCHRONIZED CNetRequestHolder::cancel() TIMER");
85
+ }
59
86
  m_pReq = 0;
60
87
  }
61
88
  }
@@ -46,6 +46,7 @@ struct INetResponse
46
46
  virtual unsigned int getDataSize() = 0;
47
47
  virtual int getRespCode() = 0;
48
48
  virtual String getCookies() = 0;
49
+ virtual String getErrorMessage() = 0;
49
50
 
50
51
  virtual void setCharData(const char* szData) = 0;
51
52
  };
@@ -102,6 +103,7 @@ public:
102
103
  unsigned int getDataSize(){ return m_netResp->getDataSize(); }
103
104
  int getRespCode(){ return m_netResp->getRespCode(); }
104
105
  String getCookies(){ return m_netResp->getCookies(); }
106
+ String getErrorMessage() { return m_netResp->getErrorMessage(); }
105
107
 
106
108
  boolean isOK()
107
109
  {
@@ -1,16 +1,17 @@
1
1
  TEMPLATE = subdirs
2
2
  SUBDIRS = rubylib rholib sqlite3 syncengine \
3
3
  ../../../lib/commonAPI/coreapi/ext/platform/qt/coreapi.pro \
4
- ../../../lib/commonAPI/logCapture/ext/platform/qt/logCapture.pro \
5
- ../../../../rhoconnect-client/ext/rhoconnect-client/ext/platform/qt/rhoconnect-client.pro \
6
- ../../../lib/extensions/digest/ext/digest.pro \
7
- ../../../lib/extensions/digest-md5/ext/digest-md5.pro \
8
- ../../../lib/extensions/digest-sha1/ext/digest-sha1.pro \
9
- ../../../lib/extensions/digest-sha2/ext/digest-sha2.pro \
10
- ../../../lib/extensions/fcntl/ext/fcntl.pro \
11
- ../../../lib/extensions/openssl/ext/openssl.pro \
12
- ../../../lib/extensions/serialport/ext/serialport.pro \
13
- ../../../lib/extensions/zlib/ext/zlib.pro
4
+ #../../../lib/commonAPI/logCapture/ext/platform/qt/logCapture.pro \
5
+ #../../../../rhoconnect-client/ext/rhoconnect-client/ext/platform/qt/rhoconnect-client.pro \
6
+ #../../../lib/extensions/digest/ext/digest.pro \
7
+ #../../../lib/extensions/digest-md5/ext/digest-md5.pro \
8
+ #../../../lib/extensions/digest-sha1/ext/digest-sha1.pro \
9
+ #../../../lib/extensions/digest-sha2/ext/digest-sha2.pro \
10
+ #../../../lib/extensions/fcntl/ext/fcntl.pro \
11
+ #../../../lib/extensions/openssl/ext/openssl.pro \
12
+ #../../../lib/extensions/serialport/ext/serialport.pro \
13
+ ../../../lib/extensions/zlib/ext/zlib.pro\
14
+ ../../../lib/commonAPI/mediacapture/ext/platform/qt/MediaCapture.pro
14
15
 
15
16
  unix:!macx {
16
17
  # SUBDIRS += curl
@@ -20,3 +21,6 @@ macx {
20
21
  }
21
22
  CONFIG += ordered
22
23
  SUBDIRS += rhodes
24
+
25
+ QMAKE_CXXFLAGS_RELEASE += -MP9
26
+ QMAKE_CXXFLAGS_DEBUG += -MP9
@@ -50,8 +50,8 @@
50
50
  #include "statistic/RhoProfiler.h"
51
51
  #include <QStylePainter>
52
52
  #if QT_VERSION >= 0x050000
53
- #include <QtWebKit/qtwebkitversion.h>
54
- #include <QNetworkCookieJar>
53
+ #include <QtWebKit/qtwebkitversion.h>
54
+ #include <QNetworkCookieJar>
55
55
  #endif
56
56
  #include <QResizeEvent>
57
57
  #include <QWebFrame>
@@ -0,0 +1,27 @@
1
+ #ifndef IEXECUTABLE_H
2
+ #define IEXECUTABLE_H
3
+
4
+ #include <QObject>
5
+ #include <QThread>
6
+ #include <QDebug>
7
+
8
+ class IExecutable : public QObject
9
+ {
10
+ Q_OBJECT
11
+ public:
12
+ explicit IExecutable(QObject *parent){
13
+ moveToThread(parent->thread());
14
+ //setParent(parent);
15
+ connect(parent, SIGNAL(destroyed(QObject*)), this, SLOT(deleteLater()));
16
+ connect(this, SIGNAL(run()), this, SLOT(execute()), Qt::QueuedConnection);
17
+ qDebug() << "Creating Executable in thred ID 0x" + QString::number((quint32)QThread::currentThreadId(), 16);
18
+ }
19
+ virtual ~IExecutable(){}
20
+
21
+ signals:
22
+ void run();
23
+ public slots:
24
+ virtual void execute(){deleteLater();}
25
+ };
26
+
27
+ #endif // IEXECUTABLE_H
@@ -579,6 +579,11 @@ int CMainWindow::tabbarGetCurrent()
579
579
  {
580
580
  return ((QtMainWindow*)qtMainWindow)->tabbarGetCurrent();
581
581
  }
582
+ void *CMainWindow::getQtMainWindow() const
583
+ {
584
+ return qtMainWindow;
585
+ }
586
+
582
587
 
583
588
  // Menu
584
589
  void CMainWindow::menuClear()
@@ -101,6 +101,7 @@ public:
101
101
  void tabbarBadge(int index, const char* badge);
102
102
  int tabbarGetCurrent();
103
103
 
104
+
104
105
  private:
105
106
  bool m_started;
106
107
  void* qtMainWindow;
@@ -149,6 +150,8 @@ public:
149
150
  void unsetProxyCommand();
150
151
  void setProxyCommand(const char* host, const char* port, const char* login, const char* password);
151
152
 
153
+ void *getQtMainWindow() const;
154
+
152
155
  signals:
153
156
  void doExitCommand(void);
154
157
  void doNavigateBackCommand(void);
@@ -38,8 +38,8 @@
38
38
  ** $QT_END_LICENSE$
39
39
  **
40
40
  ****************************************************************************/
41
- #include <qkineticscroller.h>
42
- #include <qkineticscroller_p.h>
41
+ #include "qkineticscroller.h"
42
+ #include "qkineticscroller_p.h"
43
43
  #include <QMap>
44
44
  #include <QApplication>
45
45
  #include <QDesktopWidget>
@@ -53,7 +53,7 @@
53
53
  #include <QTime>
54
54
  #include <QPointer>
55
55
  #include <QObject>
56
- #include <qkineticscroller.h>
56
+ #include "qkineticscroller.h"
57
57
  #include <QEvent>
58
58
  #if QT_VERSION < 0x040700
59
59
  # include <QTime>
@@ -1,6 +1,6 @@
1
- #include <qtscrollerfilter_p.h>
2
- #include <qtscrollevent.h>
3
- #include <qtscroller.h>
1
+ #include "qtscrollerfilter_p.h"
2
+ #include "qtscrollevent.h"
3
+ #include "qtscroller.h"
4
4
  #include <QAbstractItemView>
5
5
  #include <QScrollBar>
6
6
  #include <QGestureEvent>
@@ -1,5 +1,5 @@
1
- #include <qtscrollevent.h>
2
- #include <qtscrollevent_p.h>
1
+ #include "qtscrollevent.h"
2
+ #include "qtscrollevent_p.h"
3
3
 
4
4
  /*!
5
5
  \class QtScrollPrepareEvent
@@ -39,7 +39,7 @@
39
39
  **
40
40
  ****************************************************************************/
41
41
 
42
- #include <qwebviewkineticscroller.h>
42
+ #include "qwebviewkineticscroller.h"
43
43
  #include <QApplication>
44
44
  #include <QGraphicsView>
45
45
  #include <QWebView>
@@ -42,7 +42,7 @@
42
42
  #ifndef QWEBVIEWKINETICSCROLLER_H
43
43
  #define QWEBVIEWKINETICSCROLLER_H
44
44
 
45
- #include <qkineticscroller.h>
45
+ #include "qkineticscroller.h"
46
46
  #include <QWebView>
47
47
 
48
48
  QT_BEGIN_HEADER
@@ -1,5 +1,5 @@
1
1
  QT += core gui network webkit
2
- greaterThan(QT_MAJOR_VERSION, 4): QT += widgets webkitwidgets multimedia
2
+ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets webkitwidgets multimedia multimediawidgets
3
3
 
4
4
  TARGET = RhoSimulator
5
5
  TEMPLATE = app
@@ -144,7 +144,8 @@ impl/DateTimePickerImpl.h\
144
144
  impl/AlertImpl.h\
145
145
  impl/RhoThreadImpl.h\
146
146
  RhoSimulator.h\
147
- RhoNativeApiCall.h
147
+ RhoNativeApiCall.h \
148
+ iexecutable.h
148
149
 
149
150
  SOURCES += main.cpp\
150
151
  ExternalWebView.cpp\
@@ -135,8 +135,10 @@ module WM
135
135
  $build_persistent_cab = Jake.getBuildBoolProp("persistent")
136
136
  $run_on_startup = Jake.getBuildBoolProp("startAtBoot")
137
137
  $build_cab = true
138
- $is_webkit_engine = $app_config["wm"]["webengine"] == "Webkit" if !$app_config["wm"]["webengine"].nil?
139
- $is_webkit_engine = true if $is_webkit_engine.nil?
138
+ $is_webkit_engine = false
139
+ #$is_webkit_engine = true if !$app_config["wm"]["extensions"]["webkit"].nil?
140
+ #$app_config["wm"]["webengine"] == "webkit" if !$app_config["wm"]["webengine"].nil?
141
+ #$is_webkit_engine = false if $is_webkit_engine.nil?
140
142
 
141
143
  if $wk_data_dir.nil?
142
144
  $wk_data_dir = File.join($startdir, "libs/data") #"/Program Files" # its fake value for running without symbol extensions. do not delete
@@ -572,15 +574,17 @@ def build_cab
572
574
  makePersistentFiles($srcdir, additional_dlls_persistent_paths, nil, $webkit_out_of_process, reg_keys_filename)
573
575
  end
574
576
 
577
+ =begin
575
578
  webkit = 'none'
576
579
  if $is_webkit_engine && $webkit_capability
577
580
  webkit = $webkit_out_of_process ? 'out_of_process' : 'in_process'
578
581
  end
582
+ =end
579
583
 
580
584
  #TODO TAU
581
585
  webkit = 'none'
582
586
 
583
- if $is_webkit_engine && $webkit_capability
587
+ if $is_webkit_engine #&& $webkit_capability
584
588
  webkit = 'in_process'
585
589
  end
586
590
 
@@ -1288,6 +1292,7 @@ namespace "build" do
1288
1292
 
1289
1293
  when 3 # 5.5.0.0
1290
1294
  format ="Found QT Version : #{$QVersion}"
1295
+
1291
1296
  cp File.join($qtdir, "bin/Qt5Core.dll"), $target_path
1292
1297
  cp File.join($qtdir, "bin/Qt5WebKitWidgets.dll"), $target_path
1293
1298
  cp File.join($qtdir, "bin/Qt5Widgets.dll"), $target_path
@@ -1315,7 +1320,6 @@ namespace "build" do
1315
1320
  Dir.mkdir(target_if_path)
1316
1321
  end
1317
1322
 
1318
-
1319
1323
  cp File.join($qtdir, "plugins/imageformats/qgif.dll"), target_if_path
1320
1324
  cp File.join($qtdir, "plugins/imageformats/qico.dll"), target_if_path
1321
1325
  cp File.join($qtdir, "plugins/imageformats/qjpeg.dll"), target_if_path
@@ -1324,7 +1328,21 @@ namespace "build" do
1324
1328
  cp File.join($qtdir, "plugins/imageformats/qtga.dll"), target_if_path
1325
1329
  cp File.join($qtdir, "plugins/imageformats/qtiff.dll"), target_if_path
1326
1330
  cp File.join($qtdir, "plugins/imageformats/qwbmp.dll"), target_if_path
1327
-
1331
+
1332
+ targetFile = File.join($target_path, $appname + ".exe")
1333
+ if File.exists? targetFile
1334
+ Jake.run3("#{File.join($qtdir, 'bin/windeployqt')} #{targetFile}")
1335
+ else
1336
+ targetFile = File.join($target_path, "Rhodes.exe")
1337
+ if File.exists? targetFile
1338
+ Jake.run3("#{File.join($qtdir, 'bin/windeployqt')} #{targetFile}")
1339
+ else
1340
+ targetFile = File.join($target_path, "RhoLaunch.exe")
1341
+ if File.exists? targetFile
1342
+ Jake.run3("#{File.join($qtdir, 'bin/windeployqt')} #{targetFile}")
1343
+ end
1344
+ end
1345
+ end
1328
1346
  else
1329
1347
  format ="Unknown QT Version : #{$QVersion}"
1330
1348
  end
@@ -1670,10 +1688,11 @@ namespace "device" do
1670
1688
  if !skip_nsis
1671
1689
  vspec_files = ''
1672
1690
  if Jake.getBuildBoolProp('deployqt', $app_config, true)
1673
- vspec_files += " File /r \"imageformats\"\n"
1674
- if($qtversionindex.nil? || $qtversionindex > 1)
1675
- vspec_files += " File /r \"platforms\"\n"
1676
- end
1691
+ #vspec_files += " File /r \"imageformats\"\n"
1692
+ #if($qtversionindex.nil? || $qtversionindex > 1)
1693
+ #vspec_files += " File /r \"platforms\"\n"
1694
+ #end
1695
+ vspec_files += " File /r *.dll\n"
1677
1696
  end
1678
1697
  if Jake.getBuildBoolProp('deploymsvc', $app_config, true) && ($vs_version == 2008)
1679
1698
  vspec_files += " File *.manifest\n"
@@ -85,7 +85,7 @@ IBrowserEngine* BrowserFactory::create(HWND hwndParent)
85
85
  //TODO TAU
86
86
  //String xmlConfigType = rho_wmimpl_get_webengine();
87
87
  String xmlConfigType;
88
- String rhoConfigType = RHOCONF().getString("webengine");
88
+ String rhoConfigType = RHOCONF().getString("webengine");
89
89
 
90
90
  if (get_app_build_config_item("webengine"))
91
91
  {
@@ -110,12 +110,10 @@ IBrowserEngine* BrowserFactory::create(HWND hwndParent)
110
110
 
111
111
  if (selBrowserType == eNone)
112
112
  {
113
- selBrowserType = eWebkit;
114
- LOG(INFO) + "Browser engine was not set in config`s. Selected Webkit engine automatically.";
113
+ selBrowserType = eIE;
114
+ LOG(INFO) + "WebKit extension missing. Selected Internet Explorer engine automatically.";
115
115
  }
116
116
 
117
- //TAU
118
- selBrowserType = eWebkit;
119
117
  m_selBrowserType = selBrowserType;
120
118
 
121
119
  switch (selBrowserType)
@@ -158,4 +156,4 @@ EBrowserEngineType BrowserFactory::getCurrentBrowserType()
158
156
  extern "C" bool rho_wmimpl_is_browser_ieforwm()
159
157
  {
160
158
  return (bool)(rho::eIE == rho::BrowserFactory::getCurrentBrowserType());
161
- }
159
+ }