Use QDir::homePath() instead of RsAccounts::ConfigDirectory() to
determine libresapi socket path, this way statically linking to
libretroshare is not needed and the android package size is reduced
dramatically 20+MB -> 13MB
At same time this solves the socket path mismatch between retroshare
android service and the other android applications due to merge
Qt Creator get confused if files with same name are present in the same
project and when clickng on debug info open the same file, renaming
main to avoid this
The crash was introduced at 533dbef0c7
This has been particurarly tricky as lot of different parts contributed
in causing unexpected behaviours
When the activity is created onNewIntent is not called and we have to
get the intent data from C++ bu other means, but C++ code is running
in a different thread so there is no guarantee that the intent data is
reacheable yet on starting, so the C++ code has to wait for the intent
data being ready, but paying attention to not cause a deadlock beetween
the two thread (the android ui thread may be waiting for some
operation performed by Qt)
Because of notification intent flags not properly set the activity was
recreated also if it was already on top, this caused a nasty
interaction between android ui thread and qt thread that derived in a
deadlock, to avoid this lot of try/error has been made until the
proper soup of manifest and intent flags has been found
At this point link handling, notification handling, and Activity closing
should work as expected without any deadlock or crash
warning: implicit conversion from 'int' to 'char' changes value from 255
to -1 [-Wconstant-conversion]
asctobin()[i] = 255; /* used to
detect invalid characters */
/libbitdht/src/util/bdnet.h:107: warning: 'bdnet_inet_ntoa' has C-
linkage specified, but returns user-defined type 'std::string' (aka
'basic_string<char>') which is incompatible with C [-Wreturn-type-c-
linkage]
std::string bdnet_inet_ntoa(struct in_addr in);
^
warning: comparison of array 'known_zones[i].tzName' not equal to a null
pointer is always true [-Wtautological-pointer-compare]
for (int i=0; known_zones[i].tzName != 0; i++) {
warning: comparison of integers of different signs: 'uint32_t' (aka
'unsigned int') and 'int' [-Wsign-compare]
for(uint32_t i=0;i<(*it).size();++i)
~^~~~~~~~~~~~~
warning: function 'update_children_background' is not needed and will
not be emitted [-Wunneeded-internal-declaration]
static void update_children_background(QTreeWidgetItem *item, uint32_t
type)
^
warning: implicit conversion from 'double' to 'int' changes value from
2.5 to 2 [-Wliteral-conversion]
QSize buttonSize = QSize(iconSize + QSize(FMM,FMM));
warning: private field 'mAutoBanIdentitiesLimit' is not used [-Wunused-
private-field]
float mAutoBanIdentitiesLimit ;
warning: private field 'mFiles' is not used [-Wunused-private-field]
RsFiles* mFiles;
warning: private field 'lastGroupId' is not used [-Wunused-private-
field]
uint32_t lastGroupId;
warning: private field 'waittimes' is not used [-Wunused-private-field]
int waittimes;
warning: private field 'listen_checktime' is not used [-Wunused-private-
field]
long listen_checktime;
/home/phenom/GIT/RetroShare/trunk/libretroshare/src/util/radix64.h:96:
warning: explicitly assigning value of variable of type 'int' to itself
[-Wself-assign]
idx = idx;
~~~ ^ ~~~