diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-10-01 07:33:23 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-10-01 07:35:12 (GMT) |
commit | 4a65cdd952d5d3325c9be6e55e9f33ca5efa0301 (patch) | |
tree | bb0c67b97b0ee7baeeb2d47793f9d9bc5249762d | |
parent | 26e34e9888e4c523741a659055d469c828909cc6 (diff) | |
parent | eedd35c220d6c8788c8ae4921135333a57feb3a0 (diff) | |
download | swift-contrib-4a65cdd952d5d3325c9be6e55e9f33ca5efa0301.zip swift-contrib-4a65cdd952d5d3325c9be6e55e9f33ca5efa0301.tar.bz2 |
Merge branch 'swift-1.x'
* swift-1.x:
Set a title on subscription notification popup.
Don't rely on CCVERSION being present.
Conflicts:
BuildTools/SCons/SConstruct
-rw-r--r-- | BuildTools/SCons/SConscript.boot | 2 | ||||
-rw-r--r-- | Swift/Controllers/EventNotifier.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot index 366981c..7148f6e 100644 --- a/BuildTools/SCons/SConscript.boot +++ b/BuildTools/SCons/SConscript.boot @@ -174,19 +174,19 @@ if env["PLATFORM"] == "posix" and platform.machine() == "x86_64" : # Warnings if env["PLATFORM"] == "win32" : # TODO: Find the ideal set of warnings #env.Append(CCFLAGS = ["/Wall"]) pass else : env.Append(CXXFLAGS = ["-Wextra", "-Wall", "-Wnon-virtual-dtor", "-Wundef", "-Wold-style-cast", "-Wno-long-long", "-Woverloaded-virtual", "-Wfloat-equal", "-Wredundant-decls"]) if not env.get("allow_warnings", False) : env.Append(CXXFLAGS = ["-Werror"]) - gccVersion = env["CCVERSION"].split(".") + gccVersion = env.get("CCVERSION", "0.0.0").split(".") if gccVersion >= ["4", "5", "0"] : env.Append(CXXFLAGS = ["-Wlogical-op"]) if "clang" in env["CC"] : env.Append(CXXFLAGS = ["-W#warnings", "-Wc++0x-compat", "-Waddress-of-temporary", "-Wambiguous-member-template", "-Warray-bounds", "-Watomic-properties", "-Wbind-to-temporary-copy", "-Wbuiltin-macro-redefined", "-Wc++-compat", "-Wc++0x-extensions", "-Wcomments", "-Wconditional-uninitialized", "-Wconstant-logical-operand", "-Wdeclaration-after-statement", "-Wdeprecated", "-Wdeprecated-implementations", "-Wdeprecated-writable-strings", "-Wduplicate-method-arg", "-Wempty-body", "-Wendif-labels", "-Wenum-compare", "-Wformat=2", "-Wfour-char-constants", "-Wgnu", "-Wincomplete-implementation", "-Winvalid-noreturn", "-Winvalid-offsetof", "-Winvalid-token-paste", "-Wlocal-type-template-args", "-Wmethod-signatures", "-Wmicrosoft", "-Wmissing-declarations", "-Wnon-pod-varargs", "-Wnonfragile-abi2", "-Wnull-dereference", "-Wout-of-line-declaration", "-Woverlength-strings", "-Wpacked", "-Wpointer-arith", "-Wpointer-sign", "-Wprotocol", "-Wreadonly-setter-attrs", "-Wselector", "-Wshift-overflow", "-Wshift-sign-overflow", "-Wstrict-selector-match", "-Wsuper-class-method-mismatch", "-Wtautological-compare", "-Wtypedef-redefinition", "-Wundeclared-selector", "-Wunknown-warning-option", "-Wunnamed-type-template-args", "-Wunused-exception-parameter", "-Wunused-member-function", "-Wused-but-marked-unused", "-Wvariadic-macros"]) # To enable: # "-Wheader-hygiene" # "-Wnon-gcc", # "-Wweak-vtables", # "-Wlarge-by-value-copy", diff --git a/Swift/Controllers/EventNotifier.cpp b/Swift/Controllers/EventNotifier.cpp index 645ee3c..7ecc27c 100644 --- a/Swift/Controllers/EventNotifier.cpp +++ b/Swift/Controllers/EventNotifier.cpp @@ -41,19 +41,19 @@ void EventNotifier::handleEventAdded(boost::shared_ptr<StanzaEvent> event) { JID activationJID = jid; if (messageEvent->getStanza()->getType() == Message::Groupchat) { activationJID = jid.toBare(); } notifier->showMessage(Notifier::IncomingMessage, title, messageEvent->getStanza()->getBody(), avatarManager->getAvatarPath(jid), boost::bind(&EventNotifier::handleNotificationActivated, this, activationJID)); } } else if(boost::shared_ptr<SubscriptionRequestEvent> subscriptionEvent = boost::dynamic_pointer_cast<SubscriptionRequestEvent>(event)) { JID jid = subscriptionEvent->getJID(); - std::string title = ""; + std::string title = jid; std::string message = str(format(QT_TRANSLATE_NOOP("", "%1% wants to add you to his/her contact list")) % nickResolver->jidToNick(jid)); notifier->showMessage(Notifier::SystemMessage, title, message, boost::filesystem::path(), boost::function<void()>()); } else if(boost::shared_ptr<ErrorEvent> errorEvent = boost::dynamic_pointer_cast<ErrorEvent>(event)) { notifier->showMessage(Notifier::SystemMessage, QT_TRANSLATE_NOOP("", "Error"), errorEvent->getText(), boost::filesystem::path(), boost::function<void()>()); } } |