本文整理汇总了C++中QCString::copy方法的典型用法代码示例。如果您正苦于以下问题:C++ QCString::copy方法的具体用法?C++ QCString::copy怎么用?C++ QCString::copy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QCString
的用法示例。
在下文中一共展示了QCString::copy方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sendCommand
void DictApplet::sendCommand(const QCString &fun, const QString &data)
{
if (waiting > 0) {
waiting = 1;
delayedFunc = fun.copy();
delayedData = data;
return;
}
DCOPClient *client = kapp->dcopClient();
if (!client->isApplicationRegistered("kdict")) {
KApplication::startServiceByDesktopName("kdict");
waiting = 1;
delayedFunc = fun.copy();
delayedData = data;
QTimer::singleShot(100, this, SLOT(sendDelayedCommand()));
return;
} else {
QCStringList list = client->remoteObjects("kdict");
if (list.findIndex("KDictIface")==-1) {
waiting = 1;
delayedFunc = fun.copy();
delayedData = data;
QTimer::singleShot(100, this, SLOT(sendDelayedCommand()));
return;
}
}
client->send("kdict","default",fun,data);
}
示例2: QByteArray
Buffer::Buffer(const QCString &cstr)
: QByteArray(cstr.copy())
{
uint len = cstr.length();
init(len);
m_posWrite = len;
}
示例3:
//----------------------------------------------------------------------------
// NDnsWorker
//----------------------------------------------------------------------------
NDnsWorker::NDnsWorker(QObject *_par, const QCString &_host)
{
success = cancelled = false;
par = _par;
host = _host.copy(); // do we need this to avoid sharing across threads?
}