rhodes 5.5.0.22 → 5.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +1 -1
- data/CREDITS +3 -3
- data/Rakefile +0 -22
- data/extensions/rhoconnect-push/ext/rhoconnect-push/platform/android/Rakefile +1 -1
- data/lib/build/jake.rb +0 -5
- data/lib/commonAPI/coreapi/ext/shared/TimerImpl.cpp +27 -36
- data/platform/iphone/Classes/URLProtocol/CRhoURLProtocol.h +0 -2
- data/platform/iphone/Classes/URLProtocol/CRhoURLProtocol.m +25 -183
- data/platform/iphone/Classes/rho/net/IPhoneNetRequest.mm +4 -91
- data/platform/iphone/rbuild/iphone.rake +231 -272
- data/platform/shared/common/RhoTime.cpp +40 -81
- data/platform/shared/db/DBAdapter.cpp +0 -33
- data/platform/shared/db/DBAdapter.h +0 -5
- data/platform/shared/net/HttpServer.cpp +1 -27
- data/platform/shared/net/INetRequest.cpp +6 -33
- data/platform/shared/qt/rhodes/qkineticscroller.cpp +2 -2
- data/platform/shared/qt/rhodes/qkineticscroller_p.h +1 -1
- data/platform/shared/qt/rhodes/qtscrollerfilter.cpp +3 -3
- data/platform/shared/qt/rhodes/qtscrollevent.cpp +2 -2
- data/platform/shared/qt/rhodes/qwebviewkineticscroller.cpp +1 -1
- data/platform/shared/qt/rhodes/qwebviewkineticscroller.h +1 -1
- data/platform/wm/build/wm.rake +3 -7
- data/platform/wm/rhodes/browser/BrowserFactory.cpp +6 -4
- data/platform/wm/rhodes/rhodes.vcproj +2 -31
- data/rakefile.rb +0 -22
- data/res/generators/templates/application/app/Settings/home.erb +1 -1
- data/res/generators/templates/application/build.yml +4 -61
- data/res/generators/templates/application/icon/icon.png +0 -0
- data/res/generators/templates/application/icon/icon114.png +0 -0
- data/res/generators/templates/application/icon/icon120.png +0 -0
- data/res/generators/templates/application/icon/icon144.png +0 -0
- data/res/generators/templates/application/icon/icon152.png +0 -0
- data/res/generators/templates/application/icon/icon180.png +0 -0
- data/res/generators/templates/application/icon/icon57.png +0 -0
- data/res/generators/templates/application/icon/icon60.png +0 -0
- data/res/generators/templates/application/icon/icon72.png +0 -0
- data/res/generators/templates/application/icon/icon76.png +0 -0
- data/res/generators/templates/application/production/iTunesArtwork.png +0 -0
- data/res/generators/templates/application/production/iTunesArtwork@2x.png +0 -0
- data/res/generators/templates/iphone_project/buildRhoBundle +7 -23
- data/res/generators/templates/iphone_project/root/Info.plist +2 -0
- data/res/generators/templates/iphone_project/root/iTunesArtwork +0 -0
- data/res/generators/templates/iphone_project/root/iTunesArtwork@2x +0 -0
- data/res/generators/templates/iphone_project/root/icon114.png +0 -0
- data/res/generators/templates/iphone_project/root/icon120.png +0 -0
- data/res/generators/templates/iphone_project/root/icon144.png +0 -0
- data/res/generators/templates/iphone_project/root/icon152.png +0 -0
- data/res/generators/templates/iphone_project/root/icon180.png +0 -0
- data/res/generators/templates/iphone_project/root/icon57.png +0 -0
- data/res/generators/templates/iphone_project/root/icon60.png +0 -0
- data/res/generators/templates/iphone_project/root/icon72.png +0 -0
- data/res/generators/templates/iphone_project/root/icon76.png +0 -0
- data/rhodes.gemspec +6 -7
- data/version +1 -1
- metadata +16 -46
- data/platform/iphone/rbuild/putsOverride.rake +0 -8
- data/platform/wm/rhodes/browser/stubs.cpp +0 -5
@@ -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,39 +20,13 @@
|
|
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
|
|
27
27
|
#include "common/RhoTime.h"
|
28
28
|
#include "common/RhodesApp.h"
|
29
29
|
|
30
|
-
#include "common/RhoConf.h"
|
31
|
-
|
32
|
-
|
33
|
-
#include "logging/RhoLog.h"
|
34
|
-
|
35
|
-
#undef DEFAULT_LOGCATEGORY
|
36
|
-
#define DEFAULT_LOGCATEGORY "RhoTimer"
|
37
|
-
|
38
|
-
|
39
|
-
static bool is_net_trace() {
|
40
|
-
static int res = -1;
|
41
|
-
if (res == -1) {
|
42
|
-
if (rho_conf_getBool("net_trace") ) {
|
43
|
-
res = 1;
|
44
|
-
}
|
45
|
-
else {
|
46
|
-
res = 0;
|
47
|
-
}
|
48
|
-
}
|
49
|
-
return res == 1;
|
50
|
-
}
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
30
|
namespace rho{
|
57
31
|
namespace common{
|
58
32
|
|
@@ -169,34 +143,33 @@ boolean CRhoTimer::checkTimers()
|
|
169
143
|
for( int i = (int)m_arItems.size()-1; i >= 0; i--)
|
170
144
|
{
|
171
145
|
CTimerItem oItem = m_arItems.elementAt(i);
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
146
|
+
if(oItem.m_overflow==false)
|
147
|
+
{
|
148
|
+
|
149
|
+
if ( curTime.toULong() >= oItem.m_oFireTime.toULong() )
|
150
|
+
{
|
151
|
+
RAWTRACE("CRhoTimer::checkTimers: firing timer");
|
152
|
+
m_arItems.removeElementAt(i);
|
153
|
+
if ( RHODESAPP().callTimerCallback(oItem.m_strCallback, oItem.m_strCallbackData) )
|
154
|
+
bRet = true;
|
155
|
+
}
|
156
|
+
|
157
|
+
}
|
158
|
+
else
|
159
|
+
{
|
160
|
+
if ( curTime.toULong() >= oItem.m_oFireTime.toULong() )
|
161
|
+
{
|
162
|
+
if((curTime.toULong()-oItem.m_oFireTime.toULong())<=oItem.m_nInterval)
|
163
|
+
{
|
178
164
|
RAWTRACE("CRhoTimer::checkTimers: firing timer");
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
if ( curTime.toULong() >= oItem.m_oFireTime.toULong() )
|
188
|
-
{
|
189
|
-
if((curTime.toULong()-oItem.m_oFireTime.toULong())<=oItem.m_nInterval)
|
190
|
-
{
|
191
|
-
RAWTRACE("CRhoTimer::checkTimers: firing timer");
|
192
|
-
m_arItems.removeElementAt(i);
|
193
|
-
if ( RHODESAPP().callTimerCallback(oItem.m_strCallback, oItem.m_strCallbackData) )
|
194
|
-
bRet = true;
|
195
|
-
}
|
196
|
-
|
197
|
-
}
|
198
|
-
|
199
|
-
}
|
165
|
+
m_arItems.removeElementAt(i);
|
166
|
+
if ( RHODESAPP().callTimerCallback(oItem.m_strCallback, oItem.m_strCallbackData) )
|
167
|
+
bRet = true;
|
168
|
+
}
|
169
|
+
|
170
|
+
}
|
171
|
+
|
172
|
+
}
|
200
173
|
}
|
201
174
|
|
202
175
|
for( int i = (int)m_arNativeItems.size()-1; i >= 0; i--)
|
@@ -204,42 +177,28 @@ boolean CRhoTimer::checkTimers()
|
|
204
177
|
CNativeTimerItem oItem = m_arNativeItems.elementAt(i);
|
205
178
|
|
206
179
|
if(oItem.m_overflow==false)
|
207
|
-
|
180
|
+
{
|
208
181
|
if ( curTime.toULong() >= oItem.m_oFireTime.toULong() )
|
209
182
|
{
|
210
183
|
RAWTRACE("CRhoTimer::checkTimers: firing native timer");
|
211
184
|
m_arNativeItems.removeElementAt(i);
|
212
|
-
if (
|
213
|
-
RAWTRACE("$NetRequestProcess$ PRE ONTIMER CRhoTimer::checkTimers() 1 TIMER");
|
214
|
-
}
|
215
|
-
if ( oItem.m_pCallback->onTimer() ) {
|
185
|
+
if ( oItem.m_pCallback->onTimer() )
|
216
186
|
bRet = true;
|
217
|
-
}
|
218
|
-
if (is_net_trace()) {
|
219
|
-
RAWTRACE("$NetRequestProcess$ POST ONTIMER CRhoTimer::checkTimers() 1 TIMER");
|
220
|
-
}
|
221
187
|
}
|
222
188
|
}
|
223
189
|
else
|
224
190
|
{
|
225
191
|
if ( curTime.toULong() >= oItem.m_oFireTime.toULong() )
|
226
|
-
|
227
|
-
|
228
|
-
|
192
|
+
{
|
193
|
+
if((curTime.toULong()-oItem.m_oFireTime.toULong())<=oItem.m_nInterval)
|
194
|
+
{
|
229
195
|
RAWTRACE("CRhoTimer::checkTimers: firing native timer");
|
230
196
|
m_arNativeItems.removeElementAt(i);
|
231
|
-
if (
|
232
|
-
RAWTRACE("$NetRequestProcess$ PRE ONTIMER CRhoTimer::checkTimers() 2 TIMER");
|
233
|
-
}
|
234
|
-
if ( oItem.m_pCallback->onTimer() ) {
|
197
|
+
if ( oItem.m_pCallback->onTimer() )
|
235
198
|
bRet = true;
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
}
|
240
|
-
}
|
241
|
-
|
242
|
-
}
|
199
|
+
}
|
200
|
+
|
201
|
+
}
|
243
202
|
}
|
244
203
|
}
|
245
204
|
|
@@ -633,39 +633,6 @@ void CDBAdapter::copyTable(String tableName, CDBAdapter& dbFrom, CDBAdapter& dbT
|
|
633
633
|
}
|
634
634
|
}
|
635
635
|
}
|
636
|
-
|
637
|
-
// add file.blob attrib_type for blob attribs in changed_values
|
638
|
-
void CDBAdapter::updateAllBlobAttribChanges()
|
639
|
-
{
|
640
|
-
//Check for attrib = object
|
641
|
-
IDBResult res = executeSQL("SELECT object, source_id, attrib "
|
642
|
-
"FROM changed_values where update_type = 'update' and sent=0");
|
643
|
-
|
644
|
-
if ( res.isEnd() )
|
645
|
-
return;
|
646
|
-
|
647
|
-
startTransaction();
|
648
|
-
|
649
|
-
Vector<String> arObj, arAttrib;
|
650
|
-
Vector<int> arSrcID;
|
651
|
-
for( ; !res.isEnd(); res.next() )
|
652
|
-
{
|
653
|
-
arObj.addElement(res.getStringByIdx(0));
|
654
|
-
arSrcID.addElement(res.getIntByIdx(1));
|
655
|
-
arAttrib.addElement(res.getStringByIdx(2));
|
656
|
-
}
|
657
|
-
|
658
|
-
for( int i = 0; i < (int)arObj.size(); i++ )
|
659
|
-
{
|
660
|
-
String attribType = getAttrMgr().isBlobAttr(arSrcID.elementAt(i), arAttrib.elementAt(i).c_str()) ? "blob.file" : "";
|
661
|
-
if (attribType.length() > 0) {
|
662
|
-
executeSQL("UPDATE changed_values SET attrib_type=? WHERE source_id=? and object=? and attrib=? and sent=0", attribType, arSrcID.elementAt(i), arObj.elementAt(i), arAttrib.elementAt(i));
|
663
|
-
}
|
664
|
-
}
|
665
|
-
|
666
|
-
endTransaction();
|
667
|
-
}
|
668
|
-
|
669
636
|
|
670
637
|
void CDBAdapter::updateAllAttribChanges()
|
671
638
|
{
|
@@ -359,12 +359,7 @@ public:
|
|
359
359
|
|
360
360
|
DBResultPtr prepareStatement( const char* szSt );
|
361
361
|
DBResultPtr executeStatement(common::CAutoPtr<CDBResult>& res, const char* szSt);
|
362
|
-
|
363
|
-
// unpack object in changed_values with update_type==create to set of objects's attribs
|
364
362
|
void updateAllAttribChanges();
|
365
|
-
|
366
|
-
// add file.blob attrib_type for blob attribs in changed_values
|
367
|
-
void updateAllBlobAttribChanges();
|
368
363
|
void updateFullUpdateChanges(int nSrcID);
|
369
364
|
|
370
365
|
String exportDatabase();
|
@@ -81,24 +81,6 @@ 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
|
-
|
102
84
|
//extern "C" void rho_sync_addobjectnotify_bysrcname(const char* szSrcName, const char* szObject);
|
103
85
|
|
104
86
|
namespace rho
|
@@ -1515,13 +1497,8 @@ bool CHttpServer::decide(String const &method, String const &arg_uri, String con
|
|
1515
1497
|
#ifdef OS_MACOSX
|
1516
1498
|
String CHttpServer::directRequest( const String& method, const String& uri, const String& query, const HeaderList& headers ,const String& body )
|
1517
1499
|
{
|
1518
|
-
if (is_net_trace()) {
|
1519
|
-
RAWTRACE1("$NetRequestProcess$ PRE LOCK CHttpServer::directRequest uri = %s", uri.c_str());
|
1520
|
-
}
|
1521
1500
|
common::CMutexLock lock(m_mxSyncRequest);
|
1522
|
-
|
1523
|
-
RAWTRACE1("$NetRequestProcess$ POST LOCK CHttpServer::directRequest uri = %s", uri.c_str());
|
1524
|
-
}
|
1501
|
+
|
1525
1502
|
String ret;
|
1526
1503
|
if ( m_pQueue != 0 )
|
1527
1504
|
{
|
@@ -1549,9 +1526,6 @@ String CHttpServer::directRequest( const String& method, const String& uri, cons
|
|
1549
1526
|
|
1550
1527
|
ret = m_pQueue->getResponse();
|
1551
1528
|
}
|
1552
|
-
if (is_net_trace()) {
|
1553
|
-
RAWTRACE1("$NetRequestProcess$ FINISH CHttpServer::directRequest uri = %s", uri.c_str());
|
1554
|
-
}
|
1555
1529
|
|
1556
1530
|
return ret;
|
1557
1531
|
|
@@ -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,28 +31,6 @@
|
|
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
|
-
|
56
34
|
namespace rho {
|
57
35
|
namespace net {
|
58
36
|
|
@@ -72,17 +50,12 @@ void CNetRequestHolder::setRequest(INetRequestImpl* pReq)
|
|
72
50
|
|
73
51
|
void CNetRequestHolder::cancel()
|
74
52
|
{
|
75
|
-
if (is_net_trace()) {
|
76
|
-
RAWTRACE("$NetRequestProcess$ PRE SYNCHRONIZED CNetRequestHolder::cancel() TIMER");
|
77
|
-
}
|
78
53
|
synchronized(m_mxReq)
|
79
54
|
{
|
80
55
|
m_bCancel = true;
|
81
56
|
if ( m_pReq != 0 )
|
82
57
|
m_pReq->cancel();
|
83
|
-
|
84
|
-
RAWTRACE("$NetRequestProcess$ POST SYNCHRONIZED CNetRequestHolder::cancel() TIMER");
|
85
|
-
}
|
58
|
+
|
86
59
|
m_pReq = 0;
|
87
60
|
}
|
88
61
|
}
|
@@ -38,8 +38,8 @@
|
|
38
38
|
** $QT_END_LICENSE$
|
39
39
|
**
|
40
40
|
****************************************************************************/
|
41
|
-
#include
|
42
|
-
#include
|
41
|
+
#include <qkineticscroller.h>
|
42
|
+
#include <qkineticscroller_p.h>
|
43
43
|
#include <QMap>
|
44
44
|
#include <QApplication>
|
45
45
|
#include <QDesktopWidget>
|
data/platform/wm/build/wm.rake
CHANGED
@@ -135,10 +135,8 @@ 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 =
|
139
|
-
|
140
|
-
#$app_config["wm"]["webengine"] == "webkit" if !$app_config["wm"]["webengine"].nil?
|
141
|
-
#$is_webkit_engine = false if $is_webkit_engine.nil?
|
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?
|
142
140
|
|
143
141
|
if $wk_data_dir.nil?
|
144
142
|
$wk_data_dir = File.join($startdir, "libs/data") #"/Program Files" # its fake value for running without symbol extensions. do not delete
|
@@ -574,17 +572,15 @@ def build_cab
|
|
574
572
|
makePersistentFiles($srcdir, additional_dlls_persistent_paths, nil, $webkit_out_of_process, reg_keys_filename)
|
575
573
|
end
|
576
574
|
|
577
|
-
=begin
|
578
575
|
webkit = 'none'
|
579
576
|
if $is_webkit_engine && $webkit_capability
|
580
577
|
webkit = $webkit_out_of_process ? 'out_of_process' : 'in_process'
|
581
578
|
end
|
582
|
-
=end
|
583
579
|
|
584
580
|
#TODO TAU
|
585
581
|
webkit = 'none'
|
586
582
|
|
587
|
-
if $is_webkit_engine
|
583
|
+
if $is_webkit_engine && $webkit_capability
|
588
584
|
webkit = 'in_process'
|
589
585
|
end
|
590
586
|
|