QOAuth错误 - qt creator - 'QOAuth :: Interface :: Interface(const QOAuth :: Interface&)'是私有的

时间:2010-11-17 00:37:36

标签: qt

/usr/include/QtOAuth/interface.h:101: error: ‘QOAuth::Interface::Interface(const QOAuth::Interface&)’ is private

我得到的错误。怎么解决这个问题?我查看了文件interface.h,方法Interface是一种公共方法。

有什么理由会导致错误吗?

QApplication a(argc, argv);

QByteArray token;
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();

1 个答案:

答案 0 :(得分:0)

您试图调用不允许的接口复制构造函数(Q_DISABLE_COPY(接口)