本文整理汇总了C++中Configurator::getValue方法的典型用法代码示例。如果您正苦于以下问题:C++ Configurator::getValue方法的具体用法?C++ Configurator::getValue怎么用?C++ Configurator::getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configurator
的用法示例。
在下文中一共展示了Configurator::getValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char *argv[]) {
QGuiApplication* app = SailfishApp::application(argc, argv);
QQuickView* view = SailfishApp::createView();
Configurator config;
config.load();
//qmlRegisterType<Request>("Sailbook.Request", 1, 0, "Request");
qmlRegisterUncreatableType<Request>("App.Sailbook", 1, 0, "Request", QStringLiteral("Error"));
//qmlRegisterInterface<SessionManager>("SessionManager");
SessionManager session(QStringLiteral(APPID), config.getValue(QStringLiteral("token")).toString());
session.setExtendedPermission(SessionManager::ExtendedPermissions(
SessionManager::Email |
SessionManager::ManageNotifications |
SessionManager::ManagePages |
SessionManager::PublishActions |
SessionManager::ReadFriendList |
SessionManager::ReadInsights |
SessionManager::ReadMailbox |
SessionManager::ReadPageMailboxes |
SessionManager::ReadStream |
SessionManager::RsvpEvent
));
session.setUserDataPermission(SessionManager::UserDataPermissions(
SessionManager::UserAboutMe |
SessionManager::UserActionsBooks |
SessionManager::UserActionsMusic |
SessionManager::UserActionsNews |
SessionManager::UserActionsVideo |
SessionManager::UserActivities |
SessionManager::UserBirthday |
SessionManager::UserEducationHistory |
SessionManager::UserEvents |
SessionManager::UserFriends |
SessionManager::UserGamesActivity |
SessionManager::UserGroups |
SessionManager::UserHometown |
SessionManager::UserInterests |
SessionManager::UserLikes |
SessionManager::UserLocation |
SessionManager::UserPhotos |
SessionManager::UserRelationshipDetails |
SessionManager::UserRelationships |
SessionManager::UserReligionPolitics |
SessionManager::UserStatus |
SessionManager::UserTaggedPlaces |
SessionManager::UserVideos |
SessionManager::UserWebsite |
SessionManager::UserWorkHistory
));
view->rootContext()->setContextProperty("SessionManager", &session);
view->rootContext()->setContextProperty("Configurator", &config);
view->setSource(SailfishApp::pathTo("qml/sailbook.qml"));
view->show();
return app->exec();
}