Created
December 29, 2011 04:17
-
-
Save diorahman/1531845 to your computer and use it in GitHub Desktop.
Sendok
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
void Sendok::share(QString title, QString url) | |
{ | |
#ifndef Q_WS_SIMULATOR | |
MDataUri dataUri; | |
dataUri.setMimeType("text/x-url"); | |
dataUri.setTextData(url); | |
dataUri.setAttribute("title", title); | |
dataUri.setAttribute("description", "SendokGarpu: Search for Best Restaurants and Nigthlife!"); | |
QStringList items; | |
items << dataUri.toString(); | |
ShareUiInterface shareIf("com.nokia.ShareUi"); | |
if (shareIf.isValid()) { | |
shareIf.share(items); | |
} else { | |
qCritical() << "Invalid interface"; | |
} | |
#endif | |
} | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
#ifndef Q_WS_SIMULATOR | |
#include <maemo-meegotouch-interfaces/shareuiinterface.h> | |
#include <MDataUri> | |
#endif | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment