QOAuth error - qt creator - ‘QOAuth::Interface::Interface(const QOAuth::Interface&)’ is private
/usr/include/QtOAuth/interface.h:101: error: ‘QOAuth::Interface::Interface(const QOAuth::Interface&)’ is private
Is the error I get. How to get around this? I've looked at the file interface.h
and the method Interface
is a public method.
Is there any reason why this would make an error?
QApplication a(argc, argv);
QByteArray toke开发者_开发技巧n;
QByteArray tokenSecret;
QLabel *l = new QLabel("hello world");
QOAuth::Interface qoauth = new QOAuth::Interface;
qoauth->setConsumerKey( "key" );
qoauth->setConsumerSecret( "secret" );
qoauth->setRequestTimeout( 10000 );
QOAuth::ParamMap reply =
qoauth->requestToken( "http://term.ie/oauth/example/request_token.php", QOAuth::GET, QOAuth::HMAC_SHA1 );
if ( qoauth->error() == QOAuth::NoError ) {
token = reply.value( QOAuth::ParamToken );
tokenSecret = reply.value( QOAuth::ParamTokenSecret );
l->setText("Working");
}
else {
l->setText("Not working");
}
l->show();
return a.exec();
You tried to call the copy constructor of Interface which is not allowed (Q_DISABLE_COPY(Interface)
精彩评论