开发者

QOAuth error - qt creator - ‘QOAuth::Interface::Interface(const QOAuth::Interface&)’ is private

开发者 https://www.devze.com 2023-01-25 05:24 出处:网络
/usr/include/QtOAuth/interface.h:101: error: ‘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)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号