本文整理汇总了C++中Q_UNUSED函数的典型用法代码示例。如果您正苦于以下问题:C++ Q_UNUSED函数的具体用法?C++ Q_UNUSED怎么用?C++ Q_UNUSED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Q_UNUSED函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Q_UNUSED
bool TrickCard::isCancelable(const CardEffectStruct &effect) const
{
Q_UNUSED(effect);
return cancelable;
}
示例2: qDebug
bool TupTimeLine::requestFrameAction(int action, int framePos, int layerPos, int scenePos, const QVariant &arg)
{
/*
#ifdef K_DEBUG
#ifdef Q_OS_WIN32
qDebug() << "[TupTimeLine::requestFrameAction()]";
#else
T_FUNCINFO;
#endif
#endif
*/
Q_UNUSED(framePos);
TupProjectRequest request;
switch (action) {
case TupProjectActionBar::InsertFrame:
{
int lastFrame = framesTable(scenePos)->lastFrameByLayer(layerPos);
int currentFrame = framesTable(scenePos)->currentColumn();
if (currentFrame == lastFrame) {
request = TupRequestBuilder::createFrameRequest(scenePos, layerPos, lastFrame + 1,
TupProjectRequest::Add, tr("Frame %1").arg(lastFrame + 2));
emit requestTriggered(&request);
} else {
request = TupRequestBuilder::createFrameRequest(scenePos, layerPos, currentFrame + 1,
TupProjectRequest::Add, tr("Frame %1").arg(currentFrame + 2));
emit requestTriggered(&request);
int target = currentFrame + 2;
for (int index=target; index <= lastFrame+1; index++) {
target++;
request = TupRequestBuilder::createFrameRequest(scenePos, layerPos, index, TupProjectRequest::Rename, tr("Frame %1").arg(target));
emit requestTriggered(&request);
}
}
return true;
}
break;
case TupProjectActionBar::RemoveFrame:
{
int lastFrame = framesTable(scenePos)->lastFrameByLayer(layerPos);
int currentFrame = framesTable(scenePos)->currentColumn();
if (currentFrame > lastFrame)
return false;
if (lastFrame == 0) {
TupProjectRequest request = TupRequestBuilder::createFrameRequest(scenePos, layerPos, 0, TupProjectRequest::Reset);
emit requestTriggered(&request);
return true;
}
if (currentFrame == lastFrame) {
TupProjectRequest request = TupRequestBuilder::createFrameRequest(scenePos, layerPos, currentFrame, TupProjectRequest::Remove);
emit requestTriggered(&request);
if (currentFrame > 0)
selectFrame(layerPos, currentFrame-1);
else
framesTable(scenePos)->clearSelection();
} else {
request = TupRequestBuilder::createFrameRequest(scenePos, layerPos, currentFrame, TupProjectRequest::Remove, arg);
emit requestTriggered(&request);
selectFrame(layerPos, currentFrame);
}
return true;
}
break;
case TupProjectActionBar::MoveFrameBackward:
{
int currentFrame = framesTable(scenePos)->currentColumn();
TupProjectRequest request = TupRequestBuilder::createFrameRequest(scenePos, layerPos, currentFrame, TupProjectRequest::Exchange, currentFrame - 1);
emit requestTriggered(&request);
return true;
}
break;
case TupProjectActionBar::MoveFrameForward:
{
int currentFrame = framesTable(scenePos)->currentColumn();
int lastFrame = framesTable(scenePos)->lastFrameByLayer(layerPos);
if (currentFrame == lastFrame) {
TupProjectRequest request = TupRequestBuilder::createFrameRequest(scenePos, layerPos, lastFrame + 1, TupProjectRequest::Add, tr("Frame %1").arg(lastFrame + 2));
emit requestTriggered(&request);
}
TupProjectRequest request = TupRequestBuilder::createFrameRequest(scenePos, layerPos, currentFrame, TupProjectRequest::Exchange, currentFrame + 1);
emit requestTriggered(&request);
return true;
}
break;
case TupProjectActionBar::LockFrame:
//.........这里部分代码省略.........
示例3: Q_UNUSED
void QgsComposerHtml::frameLoaded( bool ok )
{
Q_UNUSED( ok );
mLoaded = true;
}
示例4: _S
box.exec();
return;
}
box.setText(_S("База данных успешно сохранена"));
box.exec();
return;
}
bool PosService::isBusy()
{
return false;
}
QString PosService::busyString()
{
return _S("");
}
void PosService::actionRequest(const QString &str)
{
Q_UNUSED(str)
}
示例5: Q_UNUSED
void FrameViewer::mousePressEvent(QMouseEvent *event)
{
Q_UNUSED(event)
stopAlert();
return;
}
示例6: Q_UNUSED
HRESULT QWmpPlayerService::GetCustomUIMode(BSTR *pbstrFile)
{
Q_UNUSED(pbstrFile);
return E_NOTIMPL;
}
示例7: Q_UNUSED
void Translator::run(const Plasma::RunnerContext& context, const Plasma::QueryMatch& match)
{
Q_UNUSED(context)
kapp->clipboard()->setText(match.text());
}
示例8: Q_UNUSED
void AddMetaItemPage::setTabPageNotifier(ITabPageNotifier *ANotifier)
{
Q_UNUSED(ANotifier);
}
示例9: pause
void AVDemuxThread::run()
{
m_buffering = false;
end = false;
if (audio_thread && !audio_thread->isRunning())
audio_thread->start(QThread::HighPriority);
if (video_thread && !video_thread->isRunning())
video_thread->start();
int stream = 0;
Packet pkt;
pause(false);
qDebug("get av queue a/v thread = %p %p", audio_thread, video_thread);
PacketBuffer *aqueue = audio_thread ? audio_thread->packetQueue() : 0;
PacketBuffer *vqueue = video_thread ? video_thread->packetQueue() : 0;
// aqueue as a primary buffer: music with/without cover
AVThread* thread = !video_thread || (audio_thread && demuxer->hasAttacedPicture()) ? audio_thread : video_thread;
m_buffer = thread->packetQueue();
const qint64 buf2 = aqueue ? aqueue->bufferValue() : 1; // TODO: may be changed by user. Deal with audio track change
if (aqueue) {
aqueue->clear();
aqueue->setBlocking(true);
}
if (vqueue) {
vqueue->clear();
vqueue->setBlocking(true);
}
connect(thread, SIGNAL(seekFinished(qint64)), this, SIGNAL(seekFinished(qint64)), Qt::DirectConnection);
connect(thread, SIGNAL(eofDecoded()), this, SLOT(eofDecoded()));
seek_tasks.clear();
int was_end = 0;
if (ademuxer) {
ademuxer->seek(0LL);
}
qreal last_apts = 0;
qreal last_vpts = 0;
AutoSem as(&sem);
Q_UNUSED(as);
while (!end) {
processNextSeekTask();
//vthread maybe changed by AVPlayer.setPriority() from no dec case
vqueue = video_thread ? video_thread->packetQueue() : 0;
if (demuxer->atEnd()) {
// if avthread may skip 1st eof packet because of a/v sync
const int kMaxEof = 1;//if buffer packet, we can use qMax(aqueue->bufferValue(), vqueue->bufferValue()) and not call blockEmpty(false);
if (aqueue && (!was_end || aqueue->isEmpty())) {
if (was_end < kMaxEof)
aqueue->put(Packet::createEOF());
const qreal dpts = last_vpts - last_apts;
if (dpts > 0.1) {
Packet fake_apkt;
fake_apkt.duration = last_vpts - qMin(thread->clock()->videoTime(), thread->clock()->value()); // FIXME: when clock value < 0?
qDebug("audio is too short than video: %.3f, fake_apkt.duration: %.3f", dpts, fake_apkt.duration);
last_apts = last_vpts = 0; // if not reset to 0, for example real eof pts, then no fake apkt after seek because dpts < 0
aqueue->put(fake_apkt);
}
aqueue->blockEmpty(was_end >= kMaxEof); // do not block if buffer is not enough. block again on seek
}
if (vqueue && (!was_end || vqueue->isEmpty())) {
if (was_end < kMaxEof)
vqueue->put(Packet::createEOF());
vqueue->blockEmpty(was_end >= kMaxEof);
}
if (m_buffering) {
m_buffering = false;
Q_EMIT mediaStatusChanged(QtAV::BufferedMedia);
Q_EMIT mediaStatusChanged(QtAV::EndOfMedia);
}
was_end = qMin(was_end + 1, kMaxEof);
bool exit_thread = !user_paused;
if (aqueue)
exit_thread &= aqueue->isEmpty();
if (vqueue)
exit_thread &= vqueue->isEmpty();
if (exit_thread) {
if (!(mediaEndAction() & MediaEndAction_Pause))
break;
pause(true);
Q_EMIT requestClockPause(true);
if (aqueue)
aqueue->blockEmpty(true);
if (vqueue)
vqueue->blockEmpty(true);
}
// wait for a/v thread finished
msleep(100);
continue;
}
was_end = 0;
if (tryPause()) {
continue; //the queue is empty and will block
}
updateBufferState();
if (!demuxer->readFrame()) {
continue;
}
stream = demuxer->stream();
pkt = demuxer->packet();
Packet apkt;
//.........这里部分代码省略.........
示例10: Q_UNUSED
void QNetworkAccessBackend::setDownstreamLimited(bool b)
{
Q_UNUSED(b);
// do nothing
}
示例11: Q_UNUSED
bool JsonCommand::triggerPrivate(int *state)
{
Q_UNUSED(state);
return static_cast<JsonCommandManager*>(parent())->sendRequest(m_url, m_request);
}
示例12: DebugMessageHandler
void DebugMessageHandler(QtMsgType type, const QMessageLogContext& context, const QString &msg)
{
Q_UNUSED(context);
const char *category = (type == QtDebugMsg) ? "qt" : NULL;
LogPrint(category, "GUI: %s\n", msg.toStdString());
}
示例13: items
/*!
Interval, that is necessary to display the item
This interval can be useful for operations like clipping or autoscaling
For items ( like the grid ), where a bounding interval makes no
sense an invalid interval is returned.
\param scaleId Scale id ( QwtPolar::Scale )
\return Bounding interval of the plot item for a specific scale
*/
QwtInterval QwtPolarItem::boundingInterval( int scaleId ) const
{
Q_UNUSED( scaleId );
return QwtInterval(); // invalid
}
示例14: QString
bool QgsOSMXmlImport::import()
{
mError.clear();
// open input
mInputFile.setFileName( mXmlFileName );
if ( !mInputFile.open( QIODevice::ReadOnly ) )
{
mError = QString( "Cannot open input file: %1" ).arg( mXmlFileName );
return false;
}
// open output
if ( QFile::exists( mDbFileName ) )
{
if ( !QFile( mDbFileName ).remove() )
{
mError = QString( "Database file cannot be overwritten: %1" ).arg( mDbFileName );
return false;
}
}
if ( !createDatabase() )
{
// mError is set in createDatabase()
return false;
}
qDebug( "starting import" );
int retX = sqlite3_exec( mDatabase, "BEGIN", nullptr, nullptr, nullptr );
Q_ASSERT( retX == SQLITE_OK );
Q_UNUSED( retX );
// start parsing
QXmlStreamReader xml( &mInputFile );
while ( !xml.atEnd() )
{
xml.readNext();
if ( xml.isEndDocument() )
break;
if ( xml.isStartElement() )
{
if ( xml.name() == "osm" )
readRoot( xml );
else
xml.raiseError( "Invalid root tag" );
}
}
int retY = sqlite3_exec( mDatabase, "COMMIT", nullptr, nullptr, nullptr );
Q_ASSERT( retY == SQLITE_OK );
Q_UNUSED( retY );
createIndexes();
if ( xml.hasError() )
{
mError = QString( "XML error: %1" ).arg( xml.errorString() );
return false;
}
closeDatabase();
return true;
}
示例15: Q_UNUSED
void QgsComposerPictureWidget::resizeEvent( QResizeEvent *event )
{
Q_UNUSED( event );
mSearchDirectoriesComboBox->setMinimumWidth( mPreviewListWidget->sizeHint().width() );
}