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

C++ qAddPostRoutine函数代码示例

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

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



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

示例1: defined

void Q3SocketDevice::init()
{
#if !defined(QT_NO_IPV6)
    if ( !initialized ) {
	WSAData wsadata;
	// IPv6 requires Winsock v2.0 or better.
	if ( WSAStartup( MAKEWORD(2,0), &wsadata ) != 0 ) {
#  if defined(QSOCKETDEVICE_DEBUG)
	    qDebug( "Q3SocketDevice: WinSock v2.0 initialization failed, disabling IPv6 support." );
#  endif
	} else {
	    qAddPostRoutine( cleanupWinSock );
	    initialized = 0x20;
	    return;
	}
    }
#endif

    if (!initialized) {
	WSAData wsadata;
	if ( WSAStartup( MAKEWORD(1,1), &wsadata ) != 0 ) {
#if defined(QT_CHECK_NULL)
	    qWarning( "Q3SocketDevice: WinSock initialization failed" );
#endif
#if defined(QSOCKETDEVICE_DEBUG)
	    qDebug( "Q3SocketDevice: WinSock initialization failed"  );
#endif
	    return;
	}
	qAddPostRoutine( cleanupWinSock );
	initialized = 0x11;
    }
}
开发者ID:RS102839,项目名称:qt,代码行数:33,代码来源:q3socketdevice_win.cpp


示例2: qt_xdnd_setup

void qt_xdnd_setup() {
    // set up protocol atoms
    qt_x11_intern_atom( "XdndEnter", &qt_xdnd_enter );
    qt_x11_intern_atom( "XdndPosition", &qt_xdnd_position );
    qt_x11_intern_atom( "XdndStatus", &qt_xdnd_status );
    qt_x11_intern_atom( "XdndLeave", &qt_xdnd_leave );
    qt_x11_intern_atom( "XdndDrop", &qt_xdnd_drop );
    qt_x11_intern_atom( "XdndFinished", &qt_xdnd_finished );
    qt_x11_intern_atom( "XdndTypeList", &qt_xdnd_type_list );

    qt_x11_intern_atom( "XdndSelection", &qt_xdnd_selection );

    qt_x11_intern_atom( "XdndAware", &qt_xdnd_aware );
    qt_x11_intern_atom( "XdndProxy", &qt_xdnd_proxy );


    qt_x11_intern_atom( "XdndActionCopy", &qt_xdnd_action_copy );
    qt_x11_intern_atom( "XdndActionLink", &qt_xdnd_action_link );
    qt_x11_intern_atom( "XdndActionMove", &qt_xdnd_action_move );
    qt_x11_intern_atom( "XdndActionPrivate", &qt_xdnd_action_private );

    qt_x11_intern_atom( "QT_SELECTION", &qt_selection_property );
    qt_x11_intern_atom( "INCR", &qt_incr_atom );

    qAddPostRoutine( qt_xdnd_cleanup );
}
开发者ID:AliYousuf,项目名称:abanq-port,代码行数:26,代码来源:qdnd_x11.cpp


示例3: make_navProcUPP

static const NavEventUPP make_navProcUPP()
{
    if(mac_navProcUPP)
        return mac_navProcUPP;
    qAddPostRoutine(cleanup_navProcUPP);
    return mac_navProcUPP = NewNavEventUPP(qt_mac_filedialog_event_proc);
}
开发者ID:AtlantisCD9,项目名称:Qt,代码行数:7,代码来源:q3filedialog_mac.cpp


示例4: qAddPostRoutine

void TSessionStoreFactory::loadPlugins()
{
    if (!ssifs) {
        ssifs = new QList<TSessionStoreInterface *>();
        qAddPostRoutine(cleanup);
        
        // Init hash
        hash.insert(TSessionSqlObjectStore().key().toLower(), SqlObject);
        hash.insert(TSessionCookieStore().key().toLower(), Cookie);
        hash.insert(TSessionFileStore().key().toLower(), File);

        QDir dir(Tf::app()->pluginPath());
        QStringList list = dir.entryList(QDir::Files);
        for (QStringListIterator i(list); i.hasNext(); ) {
            QPluginLoader loader(dir.absoluteFilePath(i.next()));
            TSessionStoreInterface *iface = qobject_cast<TSessionStoreInterface *>(loader.instance());
            if ( iface ) {
                ssifs->append(iface);
                QStringList keys = iface->keys();
                for (QStringListIterator j(keys); j.hasNext(); ) {
                    hash.insert(j.next(), Plugin);
                }
            }   
        }
    }
}
开发者ID:pivaldi,项目名称:TreeFrog,代码行数:26,代码来源:tsessionstorefactory.cpp


示例5: TAppSettings

void TAppSettings::instantiate(const QString &path)
{
    if (!appSettings) {
        appSettings = new TAppSettings(path);
        qAddPostRoutine(::cleanup);
    }
}
开发者ID:skipbit,项目名称:treefrog-framework,代码行数:7,代码来源:tappsettings.cpp


示例6: graphics

static WebGraphicHash* graphics()
{
    WebGraphicHash* hash = _graphics();

    if (hash->isEmpty()) {

        // prevent ~QPixmap running after ~QApplication (leaks native pixmaps)
        qAddPostRoutine(earlyClearGraphics);

        // QWebSettings::MissingImageGraphic
        hash->insert("missingImage", QPixmap(QLatin1String(":webkit/resources/missingImage.png")));
        // QWebSettings::MissingPluginGraphic
        hash->insert("nullPlugin", QPixmap(QLatin1String(":webkit/resources/nullPlugin.png")));
        // QWebSettings::DefaultFrameIconGraphic
        hash->insert("urlIcon", QPixmap(QLatin1String(":webkit/resources/urlIcon.png")));
        // QWebSettings::TextAreaSizeGripCornerGraphic
        hash->insert("textAreaResizeCorner", QPixmap(QLatin1String(":webkit/resources/textAreaResizeCorner.png")));
        // QWebSettings::DeleteButtonGraphic
        hash->insert("deleteButton", QPixmap(QLatin1String(":webkit/resources/deleteButton.png")));
        // QWebSettings::InputSpeechButtonGraphic
        hash->insert("inputSpeech", QPixmap(QLatin1String(":webkit/resources/inputSpeech.png")));
    }

    return hash;
}
开发者ID:victusfate,项目名称:webkit-graphics,代码行数:25,代码来源:ImageQt.cpp


示例7: qAddPostRoutine

ApplicationSettings *ApplicationSettings::self() {
  if (!settings_self) {
    settings_self = new ApplicationSettings;
    qAddPostRoutine(cleanup);
  }
  return settings_self;
}
开发者ID:jhgorse,项目名称:kst,代码行数:7,代码来源:applicationsettings.cpp


示例8: lock

/*!
  \internal
  */
void QTouchDevicePrivate::registerDevice(QTouchDevice *dev)
{
    QMutexLocker lock(&devicesMutex);
    if (deviceList()->isEmpty())
        qAddPostRoutine(cleanupDevicesList);
    deviceList()->append(dev);
}
开发者ID:AlexSoehn,项目名称:qt-base-deb,代码行数:10,代码来源:qtouchdevice.cpp


示例9: locker

/// Returns the actual singleton instance, creates it on first access. Mutex-protected.
/// ContextRegistryInfo and ContextPropertyInfo use this method to access the backend.
/// The optional \a backendName specifies the backend to force, ie: 'xml' or 'cdb'.
InfoBackend* InfoBackend::instance(const QString &backendName)
{
    static QMutex mutex;
    QMutexLocker locker(&mutex);
    if (!backendInstance)
    {
        // Backend instance doesn't exist -> create it
        if (backendName == "xml")
            backendInstance = new InfoXmlBackend;
        else if (backendName == "cdb")
            backendInstance = new InfoCdbBackend;
        else {
            if (InfoCdbBackend::databaseExists())
                backendInstance = new InfoCdbBackend;
            else
                backendInstance = new InfoXmlBackend;
        }

        // Move the backend to the main thread
        backendInstance->moveToThread(QCoreApplication::instance()->thread());

        // We must ensure that:
        // 1) QFileSystemWatcher is deleted before QCoreApplication.
        // 2) libcontextsubscriber can be unloaded successfully
        // (QCoreApplication cannot have a post routine that is inside a library
        // that has been unloaded.)

        // For 1), we add a post routine to QCoreApplication for deleting the
        // QFileSystemWathcer, for 2) we remove the post routine and delete the
        // QFileSystemWatcher when the library is unloaded.
        qAddPostRoutine(destroyInstance);
    }

    return backendInstance;
}
开发者ID:rburchell,项目名称:ck,代码行数:38,代码来源:infobackend.cpp


示例10: qAddPostRoutine

ViewItemManager *ViewItemManager::self() {
  if (!_vim_self) {
    _vim_self = new ViewItemManager;
    qAddPostRoutine(cleanup);
  }
  return _vim_self;
}
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:7,代码来源:viewitemmanager.cpp


示例11: qAddPostRoutine

OpenCVItem::OpenCVItem(QGraphicsItem *parent)
    :P(parent,Qt::Window) {

    static OpenCVStyle * style_=nullptr;
    if (style_==nullptr) {
        style_=new __private::OpenCVItemStyle/*construct by default style*/;
        qAddPostRoutine([]() {delete style_; style_=nullptr; });
    }

    this->setStyle(style_);

    {
        QPalette pal=this->palette();
        pal.setBrush(QPalette::Background,Qt::transparent);
        this->setPalette(pal);
    }

    this->resize(128,128);
    this->setMinimumWidth(128);
    this->setMinimumHeight(128);
    this->setPos(std::rand()&63,(std::rand()&63)+36);
    this->setAttribute(Qt::WA_DeleteOnClose);

    connect(this,&OpenCVItem::yChanged,this,[this]() {_onYChanged(); });
    connect(this,&OpenCVItem::xChanged,this,[this]() {_onXChanged(); });
}
开发者ID:ngzHappy,项目名称:OCVT0,代码行数:26,代码来源:OpenCVItem.cpp


示例12: qAddPostRoutine

void ObjectFactory::registerFactory(const QString& node, ObjectFactory *factory) {
  if (!factories) {
    factories = new QMap<QString,ObjectFactory*>;
    qAddPostRoutine(cleanupObjects);
  }
  factories->insert(node, factory);
}
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:7,代码来源:objectfactory.cpp


示例13: TMultiplexingServer

void TMultiplexingServer::instantiate(int listeningSocket)
{
    if (!multiplexingServer) {
        multiplexingServer = new TMultiplexingServer(listeningSocket);
        qAddPostRoutine(::cleanup);
    }
}
开发者ID:gaoxiaojun,项目名称:treefrog-framework,代码行数:7,代码来源:tmultiplexingserver_linux.cpp


示例14: make_navFilterUPP

static const NavObjectFilterUPP make_navFilterUPP()
{
    if(mac_navFilterUPP)
        return mac_navFilterUPP;
    qAddPostRoutine(cleanup_navFilterUPP);
    return mac_navFilterUPP = NewNavObjectFilterUPP(qt_mac_nav_filter);
}
开发者ID:AtlantisCD9,项目名称:Qt,代码行数:7,代码来源:q3filedialog_mac.cpp


示例15: qAddPostRoutine

PlotItemManager *PlotItemManager::self() {
  if (!_self) {
    _self = new PlotItemManager;
    qAddPostRoutine(cleanup);
  }
  return _self;
}
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:7,代码来源:plotitemmanager.cpp


示例16: exec

/*!
    Creates a service instance called \a name. The \a argc and \a argv
    parameters are parsed after the exec() function has been
    called. Then they are passed to the application's constructor.
    The application type is determined by the QtService subclass.

    The service is neither installed nor started. The name must not
    contain any backslashes or be longer than 255 characters. In
    addition, the name must be unique in the system's service
    database.

    \sa exec(), start(), QtServiceController::install()
*/
QtService::QtService(const std::map<QString, QVariant>& args, const QString &name)
{
#if defined(QtService_DEBUG)
    qInstallMsgHandler(QtServiceLogDebug);
    qAddPostRoutine(QtServiceCloseDebugLog);
#endif

    Q_ASSERT(!QtServiceBasePrivate::instance);
    QtServiceBasePrivate::instance = this;

    QString nm(name);
    if (nm.length() > 255) {
    qWarning("QtService: 'name' is longer than 255 characters.");
	nm.truncate(255);
    }
    if (nm.contains('\\')) {
    qWarning("QtService: 'name' contains backslashes '\\'.");
	nm.replace((QChar)'\\', (QChar)'\0');
    }

    d_ptr = new QtServiceBasePrivate(nm);
    d_ptr->q_ptr = this;

    d_ptr->serviceFlags = 0;
    d_ptr->sysd = 0;
    d_ptr->args = args;
}
开发者ID:CarstenHollmann,项目名称:IlwisConnectors,代码行数:40,代码来源:qtservice.cpp


示例17: qAddPostRoutine

void GraphicsFactory::registerFactory(const QString& node, GraphicsFactory *factory) {
  if (!factories) {
    factories = new QMap<QString,GraphicsFactory*>;
    qAddPostRoutine(cleanupGraphics);
  }
  factories->insert(node, factory);
}
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:7,代码来源:graphicsfactory.cpp


示例18: qAddPostRoutine

void RelationFactory::registerFactory(const QString& node, RelationFactory *factory) {
  if (!factories) {
    factories = new QMap<QString,RelationFactory*>;
    qAddPostRoutine(cleanupRelations);
  }
  factories->insert(node, factory);
}
开发者ID:Kst-plot,项目名称:kst-subversion-archive,代码行数:7,代码来源:relationfactory.cpp


示例19: qAddPostRoutine

/*!
    Sets \a iface to point to the implementation of the
    QAccessibleInterface for \a object, and returns \c QS_OK if
    successfull, or sets \a iface to 0 and returns \c QE_NOCOMPONENT if
    no accessibility implementation for \a object exists.

    The function uses the \link QObject::className() classname
    \endlink of \a object to find a suitable implementation. If no
    implementation for the object's class is available the function
    tries to find an implementation for the object's parent class.

    This function is called to answer an accessibility client's
    request for object information. You should never need to call this
    function yourself.
*/
QRESULT QAccessible::queryAccessibleInterface( QObject *object, QAccessibleInterface **iface )
{
    *iface = 0;
    if ( !object )
	return QE_INVALIDARG;

    if ( qAccessibleInterface ) {
	*iface = qAccessibleInterface->find( object );
	if ( *iface ) {
	    (*iface)->addRef();
	    return QS_OK;
	}
    }

    if ( !qAccessibleManager ) {
	qAccessibleManager = new QPluginManager<QAccessibleFactoryInterface>( IID_QAccessibleFactory, QApplication::libraryPaths(), "/accessible" );
	if ( !cleanupAdded ) {
	    qAddPostRoutine( qAccessibleCleanup );
	    cleanupAdded = TRUE;
	}
    }

    QInterfacePtr<QAccessibleFactoryInterface> factory = 0;
    QMetaObject *mo = object->metaObject();
    while ( mo ) {
	qAccessibleManager->queryInterface( mo->className(), &factory );
	if ( factory )
	    break;
	mo = mo->superClass();
    }
    if ( factory )
	return factory->createAccessibleInterface( mo->className(), object, iface );

    return QE_NOCOMPONENT;
}
开发者ID:OS2World,项目名称:LIB-QT3_Toolkit_Vbox,代码行数:50,代码来源:qaccessible.cpp


示例20: settings_

Settings::Settings() :
    settings_(QSettings::IniFormat, 
              QSettings::UserScope, 
              ".GlobiData/GomTVLeacher", "GomTVLeacher")
{
    qAddPostRoutine(clean);
}
开发者ID:Globidev,项目名称:GomTVLeacher,代码行数:7,代码来源:Settings.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ qAlpha函数代码示例发布时间:2022-05-30
下一篇:
C++ qAbs函数代码示例发布时间: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