Merge remote-tracking branch 'origin/master' into pbap2
This commit is contained in:
commit
cb9ce72b9d
|
@ -45,8 +45,22 @@
|
|||
#include <syncevo/declarations.h>
|
||||
SE_BEGIN_CXX
|
||||
|
||||
// TODO: this check should be global
|
||||
static bool HaveDBus;
|
||||
|
||||
void KDEInitMainSlot(const char *appname)
|
||||
{
|
||||
// Very simple check. API doesn't say whether asking
|
||||
// for the bus connection will connect immediately.
|
||||
QDBusConnection dbus = QDBusConnection::sessionBus();
|
||||
HaveDBus = dbus.isConnected();
|
||||
|
||||
if (!HaveDBus) {
|
||||
// KApplication has been seen to crash without D-Bus (BMC #25596).
|
||||
// Bail out here if we don't have D-Bus.
|
||||
return;
|
||||
}
|
||||
|
||||
//QCoreApplication *app;
|
||||
int argc = 1;
|
||||
static char *argv[] = { const_cast<char *>(appname), NULL };
|
||||
|
@ -116,6 +130,11 @@ static bool UseKWallet(const InitStateTri &keyring,
|
|||
return false;
|
||||
}
|
||||
|
||||
// User wants KWallet, but is it usable?
|
||||
if (!HaveDBus) {
|
||||
SE_THROW("KDE KWallet requested, but it is not usable (running outside of a D-Bus session)");
|
||||
}
|
||||
|
||||
// Use KWallet.
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
<incomingscript><![CDATA[
|
||||
$VCARD_INCOMING_NAMECHANGE_SCRIPT
|
||||
$VCARD_INCOMING_PHOTO_VALUE_SCRIPT
|
||||
$VCARD_INCOMING_PHOTO_TYPE_SCRIPT
|
||||
]]></incomingscript>
|
||||
<outgoingscript><![CDATA[
|
||||
$VCARD_OUTGOING_ADDREV_SCRIPT
|
||||
|
@ -22,6 +23,7 @@
|
|||
<incomingscript><![CDATA[
|
||||
$VCARD_INCOMING_NAMECHANGE_SCRIPT
|
||||
$VCARD_INCOMING_PHOTO_VALUE_SCRIPT
|
||||
$VCARD_INCOMING_PHOTO_TYPE_SCRIPT
|
||||
]]></incomingscript>
|
||||
<outgoingscript><![CDATA[
|
||||
$VCARD_OUTGOING_ADDREV_SCRIPT
|
||||
|
|
|
@ -10,6 +10,15 @@
|
|||
}
|
||||
]]></macro>
|
||||
|
||||
<macro name="VCARD_INCOMING_PHOTO_TYPE_SCRIPT"><![CDATA[
|
||||
// Fix PHOTO TYPE=image/jpeg (sent by Funambol).
|
||||
INTEGER pos;
|
||||
pos = RFIND(PHOTO_TYPE, "/");
|
||||
if (pos != UNASSIGNED) {
|
||||
PHOTO_TYPE = SUBSTR(PHOTO_TYPE, pos + 1);
|
||||
}
|
||||
]]></macro>
|
||||
|
||||
<macro name="VCARD_OUTGOING_PHOTO_VALUE_SCRIPT"><![CDATA[
|
||||
// Ensure that PHOTO_VALUE == "binary" is not sent (it's the default).
|
||||
if (PHOTO_VALUE == "binary") {
|
||||
|
|
Loading…
Reference in a new issue