• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ Q_UNUSED函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中Q_UNUSED函数的典型用法代码示例。如果您正苦于以下问题:C++ Q_UNUSED函数的具体用法?C++ Q_UNUSED怎么用?C++ Q_UNUSED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了Q_UNUSED函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: Q_UNUSED

bool TrickCard::isCancelable(const CardEffectStruct &effect) const
{
    Q_UNUSED(effect);
    return cancelable;
}
开发者ID:lwtmusou,项目名称:touhoukill,代码行数:5,代码来源:standard.cpp


示例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:
//.........这里部分代码省略.........
开发者ID:KDE,项目名称:tupi,代码行数:101,代码来源:tuptimeline.cpp


示例3: Q_UNUSED

void QgsComposerHtml::frameLoaded( bool ok )
{
  Q_UNUSED( ok );
  mLoaded = true;
}
开发者ID:ndavid,项目名称:QGIS,代码行数:5,代码来源:qgscomposerhtml.cpp


示例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)
}


开发者ID:dmitry-aka-jok,项目名称:jpos2,代码行数:28,代码来源:posservice.cpp


示例5: Q_UNUSED

void FrameViewer::mousePressEvent(QMouseEvent *event)
{
    Q_UNUSED(event)
    stopAlert();
    return;
}
开发者ID:Asitha,项目名称:NoobaVSS,代码行数:6,代码来源:FrameViewer.cpp


示例6: Q_UNUSED

HRESULT QWmpPlayerService::GetCustomUIMode(BSTR *pbstrFile)
{
    Q_UNUSED(pbstrFile);

    return E_NOTIMPL;
}
开发者ID:bavanisp,项目名称:qtmobility-1.1.0,代码行数:6,代码来源:qwmpplayerservice.cpp


示例7: Q_UNUSED

void Translator::run(const Plasma::RunnerContext& context, const Plasma::QueryMatch& match)
{
    Q_UNUSED(context)
    kapp->clipboard()->setText(match.text());
}
开发者ID:fluxer,项目名称:kde-extraapps,代码行数:5,代码来源:translator.cpp


示例8: Q_UNUSED

void AddMetaItemPage::setTabPageNotifier(ITabPageNotifier *ANotifier)
{
	Q_UNUSED(ANotifier);
}
开发者ID:RandomWalkEagle,项目名称:Contacts,代码行数:4,代码来源:addmetaitempage.cpp


示例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;
//.........这里部分代码省略.........
开发者ID:fmoyaarnao,项目名称:QtAV,代码行数:101,代码来源:AVDemuxThread.cpp


示例10: Q_UNUSED

void QNetworkAccessBackend::setDownstreamLimited(bool b)
{
    Q_UNUSED(b);
    // do nothing
}
开发者ID:husninazer,项目名称:qt,代码行数:5,代码来源:qnetworkaccessbackend.cpp


示例11: Q_UNUSED

bool JsonCommand::triggerPrivate(int *state)
{
  Q_UNUSED(state);
  return static_cast<JsonCommandManager*>(parent())->sendRequest(m_url, m_request);
}
开发者ID:KDE,项目名称:simon,代码行数:5,代码来源:jsoncommand.cpp


示例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());
}
开发者ID:biton-project,项目名称:moneta-0.10.0,代码行数:6,代码来源:moneta.cpp


示例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
}
开发者ID:dcardenasnl,项目名称:Test,代码行数:16,代码来源:qwt_polar_item.cpp


示例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;
}
开发者ID:AM7000000,项目名称:QGIS,代码行数:71,代码来源:qgsosmimport.cpp


示例15: Q_UNUSED

void QgsComposerPictureWidget::resizeEvent( QResizeEvent *event )
{
  Q_UNUSED( event );
  mSearchDirectoriesComboBox->setMinimumWidth( mPreviewListWidget->sizeHint().width() );
}
开发者ID:ndavid,项目名称:QGIS,代码行数:5,代码来源:qgscomposerpicturewidget.cpp


示例16: Q_UNUSED

int QgsCategorizedSymbolRendererModel::columnCount( const QModelIndex &index ) const
{
  Q_UNUSED( index );
  return 3;
}
开发者ID:giohappy,项目名称:QGIS,代码行数:5,代码来源:qgscategorizedsymbolrendererwidget.cpp


示例17: Q_UNUSED

void CallDialog::closeEvent(QCloseEvent *event)
{
    Q_UNUSED(event);
    Vreg::settings()->setValue("call_geometry", saveGeometry());
    emit wndClosed(buddy);
}
开发者ID:vcryptfoundation,项目名称:vcrypt,代码行数:6,代码来源:calldialog.cpp


示例18: QgsDebugMsg

const unsigned char *QgsDistanceArea::measurePolygon( const unsigned char* feature, double* area, double* perimeter, bool hasZptr )
{
  if ( !feature )
  {
    QgsDebugMsg( "no feature to measure" );
    return 0;
  }

  QgsConstWkbPtr wkbPtr( feature + 1 + sizeof( int ) );

  // get number of rings in the polygon
  int numRings;
  wkbPtr >> numRings;

  if ( numRings == 0 )
  {
    QgsDebugMsg( "no rings to measure" );
    return 0;
  }

  // Set pointer to the first ring
  QList<QgsPoint> points;
  QgsPoint pnt;
  double x, y;
  if ( area )
    *area = 0;
  if ( perimeter )
    *perimeter = 0;

  try
  {
    for ( int idx = 0; idx < numRings; idx++ )
    {
      int nPoints;
      wkbPtr >> nPoints;

      // Extract the points from the WKB and store in a pair of
      // vectors.
      for ( int jdx = 0; jdx < nPoints; jdx++ )
      {
        wkbPtr >> x >> y;
        if ( hasZptr )
        {
          // totally ignore Z value
          wkbPtr += sizeof( double );
        }

        pnt = QgsPoint( x, y );

        if ( mEllipsoidalMode && ( mEllipsoid != GEO_NONE ) )
        {
          pnt = mCoordTransform->transform( pnt );
        }
        points.append( pnt );
      }

      if ( points.size() > 2 )
      {
        if ( area )
        {
          double areaTmp = computePolygonArea( points );
          if ( idx == 0 )
          {
            // exterior ring
            *area += areaTmp;
          }
          else
          {
            *area -= areaTmp; // interior rings
          }
        }

        if ( perimeter )
        {
          if ( idx == 0 )
          {
            // exterior ring
            *perimeter += computeDistance( points );
          }
        }
      }

      points.clear();
    }
  }
  catch ( QgsCsException &cse )
  {
    Q_UNUSED( cse );
    QgsMessageLog::logMessage( QObject::tr( "Caught a coordinate system exception while trying to transform a point. Unable to calculate polygon area or perimeter." ) );
  }

  return wkbPtr;
}
开发者ID:pavol-git,项目名称:QGIS,代码行数:93,代码来源:qgsdistancearea.cpp



注:本文中的Q_UNUSED函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ Q_atof函数代码示例发布时间:2022-05-30
下一篇:
C++ Q_TYPEID函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap