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

C++ qCWarning函数代码示例

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

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



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

示例1: qgetenv

QWindowsOpenGLTester::Renderer QWindowsOpenGLTester::requestedGlesRenderer()
{
#ifndef Q_OS_WINCE
    const char platformVar[] = "QT_ANGLE_PLATFORM";
    if (qEnvironmentVariableIsSet(platformVar)) {
        const QByteArray anglePlatform = qgetenv(platformVar);
        if (anglePlatform == "d3d11")
            return QWindowsOpenGLTester::AngleRendererD3d11;
        if (anglePlatform == "d3d9")
            return QWindowsOpenGLTester::AngleRendererD3d9;
        if (anglePlatform == "warp")
            return QWindowsOpenGLTester::AngleRendererD3d11Warp;
        qCWarning(lcQpaGl) << "Invalid value set for " << platformVar << ": " << anglePlatform;
    }
#endif // !Q_OS_WINCE
    return QWindowsOpenGLTester::InvalidRenderer;
}
开发者ID:MarianMMX,项目名称:MarianMMX,代码行数:17,代码来源:qwindowsopengltester.cpp


示例2: qCWarning

void NPCStorage::prepare_dictionaries()
{
    // client expects the indices of npcs to be taken from sorted by name array
    std::sort(std::begin(m_all_npcs),std::end(m_all_npcs),[](const Parse_NPC &a,const Parse_NPC &b)->bool {
        return a.m_Name.compare(b.m_Name,Qt::CaseInsensitive)<0;
    });
    for(Parse_NPC &npc : m_all_npcs)
    {
        auto iter = m_name_to_npc_def.find(npc.m_Name.toLower());
        if(iter!=m_name_to_npc_def.end())
        {
            qCWarning(logNPCs) << "Duplicate NPC name" << npc.m_Name << "vs" << iter.value()->m_Name;
            continue;
        }
        m_name_to_npc_def[npc.m_Name.toLower()] = &npc;
    }
}
开发者ID:nemerle,项目名称:Segs,代码行数:17,代码来源:NpcStore.cpp


示例3: switch

quint32 Bundle::crcFile(enum Bundle::File file) const
{
    quint32 ret = 0;

    switch (file) {
    case Bundle::BINARY:
        ret = b->manifest.value(type()).toObject().value("crc").toDouble();
        break;
    case Bundle::RESOURCES:
        ret = b->manifest.value("resources").toObject().value("crc").toDouble();
        break;
    default:
        qCWarning(l) << "Unsupported CRC for" << file;
    }

    return ret;
}
开发者ID:ecosprog,项目名称:pebble,代码行数:17,代码来源:bundle.cpp


示例4: qCDebug

const QVariant Konfiguration::WertHolen(const QString &name,const QVariant &standart)
{
	if (K_Konfigpuffer.contains(name))
		return K_Konfigpuffer[name];
	else
	{
		if (K_Konfig->contains(name))
		{
			qCDebug(qalarm_Konfiguration)<<tr("%1 nicht im Puffer, lade aus Datei bzw. Standart.").arg(name);
			K_Konfigpuffer.insert(name,K_Konfig->value(name,standart));
			return K_Konfigpuffer[name];
		}
		else
			qCWarning(qalarm_Konfiguration)<<tr("Wert %1 nicht gefunden.").arg(name);
	}
	return standart;
}
开发者ID:QAlarm,项目名称:Lib,代码行数:17,代码来源:Konfiguration.cpp


示例5: clearDevices

void DevicesModel::refreshDeviceList()
{
    if (!m_dbusInterface->isValid()) {
        clearDevices();
        qCWarning(KDECONNECT_INTERFACES) << "dbus interface not valid";
        return;
    }

    bool onlyPaired = (m_displayFilter & StatusPaired);
    bool onlyReachable = (m_displayFilter & StatusReachable);

    QDBusPendingReply<QStringList> pendingDeviceIds = m_dbusInterface->devices(onlyReachable, onlyPaired);
    QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pendingDeviceIds, this);

    QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)),
                     this, SLOT(receivedDeviceList(QDBusPendingCallWatcher*)));
}
开发者ID:Bjoe,项目名称:kdeconnect-kde,代码行数:17,代码来源:devicesmodel.cpp


示例6: Q_Q

void QBluetoothSocketPrivate::connectToService(const QBluetoothAddress &address,
                                               const QBluetoothUuid &uuid,
                                               QIODevice::OpenMode openMode)
{
    Q_Q(QBluetoothSocket);
    Q_UNUSED(openMode);
    qCDebug(QT_BT_QNX) << "Connecting socket";

    m_peerAddress = address;
#ifdef QT_QNX_BT_BLUETOOTH
    QByteArray b_uuid = uuid.toByteArray();
    b_uuid = b_uuid.mid(1, b_uuid.length() - 2);
    socket = bt_spp_open(address.toString().toUtf8().data(), b_uuid.data(), false);
    if (socket == -1) {
        qCWarning(QT_BT_QNX) << "Could not connect to" << address.toString() << b_uuid <<  qt_error_string(errno);
        errorString = qt_error_string(errno);
        q->setSocketError(QBluetoothSocket::NetworkError);
        return;
    }

    delete readNotifier;
    delete connectWriteNotifier;

    readNotifier = new QSocketNotifier(socket, QSocketNotifier::Read);
    QObject::connect(readNotifier, SIGNAL(activated(int)), this, SLOT(_q_readNotify()));
    connectWriteNotifier = new QSocketNotifier(socket, QSocketNotifier::Write, q);
    QObject::connect(connectWriteNotifier, SIGNAL(activated(int)), this, SLOT(_q_writeNotify()));

    connecting = true;
    q->setOpenMode(openMode);
#else
    m_uuid = uuid;
    if (isServerSocket)
        return;

    if (state != QBluetoothSocket::UnconnectedState) {
        qCDebug(QT_BT_QNX) << "Socket already connected";
        return;
    }

    ppsSendControlMessage("connect_service", 0x1101, uuid, address.toString(), QString(), this, BT_SPP_CLIENT_SUBTYPE);
    ppsRegisterForEvent(QStringLiteral("service_connected"),this);
    ppsRegisterForEvent(QStringLiteral("get_mount_point_path"),this);
#endif
    q->setSocketState(QBluetoothSocket::ConnectingState);
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:46,代码来源:qbluetoothsocket_qnx.cpp


示例7: qCWarning

QStringList AWDBusAdaptor::ActiveServices() const
{
    QDBusMessage listServices = QDBusConnection::sessionBus().interface()->call(
        QDBus::BlockWithGui, "ListNames");
    if (listServices.arguments().isEmpty()) {
        qCWarning(LOG_DBUS) << "Could not find any DBus service";
        return {};
    }
    QStringList arguments = listServices.arguments().first().toStringList();

    return std::accumulate(arguments.cbegin(), arguments.cend(), QStringList(),
                           [](QStringList &source, QString service) {
                               if (service.startsWith(AWDBUS_SERVICE))
                                   source.append(service);
                               return source;
                           });
}
开发者ID:arcan1s,项目名称:awesome-widgets,代码行数:17,代码来源:awdbusadaptor.cpp


示例8: mmap

void FramebufferBackend::map()
{
    if (m_memory) {
        // already mapped;
        return;
    }
    if (m_fd < 0) {
        // not valid
        return;
    }
    void *mem = mmap(nullptr, m_bufferLength, PROT_WRITE, MAP_SHARED, m_fd, 0);
    if (mem == MAP_FAILED) {
        qCWarning(KWIN_FB) << "Failed to mmap frame buffer";
        return;
    }
    m_memory = mem;
}
开发者ID:8l,项目名称:kwin,代码行数:17,代码来源:fb_backend.cpp


示例9: con

chrono::milliseconds ConfigFile::remotePollInterval(const QString &connection) const
{
    QString con(connection);
    if (connection.isEmpty())
        con = defaultConnection();

    QSettings settings(configFile(), QSettings::IniFormat);
    settings.beginGroup(con);

    auto defaultPollInterval = chrono::milliseconds(DEFAULT_REMOTE_POLL_INTERVAL);
    auto remoteInterval = millisecondsValue(settings, remotePollIntervalC, defaultPollInterval);
    if (remoteInterval < chrono::seconds(5)) {
        qCWarning(lcConfigFile) << "Remote Interval is less than 5 seconds, reverting to" << DEFAULT_REMOTE_POLL_INTERVAL;
        remoteInterval = defaultPollInterval;
    }
    return remoteInterval;
}
开发者ID:owncloud,项目名称:client,代码行数:17,代码来源:configfile.cpp


示例10: qCDebug

/**
 * @fn convertOptionName
 */
QPair<QString, QString> QueuedPluginManager::convertOptionName(const QString &_key)
{
    qCDebug(LOG_PL) << "Convert option name" << _key;

    QStringList fields = _key.split('.');
    if (fields.count() < 3) {
        qCWarning(LOG_PL) << "Invalid option name" << _key;
        return {"", ""};
    }
    // Plugin.
    fields.takeFirst();
    // plugin name
    QString plugin = fields.takeFirst();
    QString option = fields.join('.');

    return {plugin, option};
}
开发者ID:arcan1s,项目名称:queued,代码行数:20,代码来源:QueuedPluginManager.cpp


示例11: ppsRegisterControl

void ppsRegisterControl()
{
    count++;
    if (count == 1) {
        if (ppsCtrlFD != -1) {
            qCDebug(QT_BT_QNX) << "PPS control FD not properly deinitialized";
            return;
        }
        ppsCtrlFD = qt_safe_open(btControlFDPath, O_RDWR | O_SYNC);
        if (ppsCtrlFD == -1) {
            qCWarning(QT_BT_QNX) << Q_FUNC_INFO << "ppsCtrlFD - failed to qt_safe_open" << btControlFDPath;
        } else {
            ppsCtrlNotifier = new QSocketNotifier(ppsCtrlFD, QSocketNotifier::Read);
            QObject::connect(ppsCtrlNotifier, SIGNAL(activated(int)), &bbSocketNotifier, SLOT(distribute()));
        }
    }
}
开发者ID:venkatarajasekhar,项目名称:Qt,代码行数:17,代码来源:ppshelpers.cpp


示例12: users

/**
 * @fn tryGetUser
 */
QueuedUser *QueuedCorePrivateHelper::tryGetUser(const long long _id)
{
    auto user = users()->user(_id);
    if (!user) {
        qCInfo(LOG_LIB) << "Try to get information about user" << _id << "from database";
        auto data = database()->get(QueuedDB::USERS_TABLE, _id);
        if (data.isEmpty()) {
            qCWarning(LOG_LIB) << "Could not find user with ID" << _id;
            return nullptr;
        }

        auto defs = QueuedUserManager::parseDefinitions(data);
        user = new QueuedUser(this, defs, _id);
    }

    return user;
}
开发者ID:arcan1s,项目名称:queued,代码行数:20,代码来源:QueuedCorePrivateHelper.cpp


示例13: blacklistUpdate

/** Updates, creates or removes a blacklist entry for the given item.
 *
 * May adjust the status or item._errorString.
 */
static void blacklistUpdate(SyncJournalDb *journal, SyncFileItem &item)
{
    SyncJournalErrorBlacklistRecord oldEntry = journal->errorBlacklistEntry(item._file);

    bool mayBlacklist =
        item._errorMayBeBlacklisted // explicitly flagged for blacklisting
        || ((item._status == SyncFileItem::NormalError
                || item._status == SyncFileItem::SoftError
                || item._status == SyncFileItem::DetailError)
               && item._httpErrorCode != 0 // or non-local error
               );

    // No new entry? Possibly remove the old one, then done.
    if (!mayBlacklist) {
        if (oldEntry.isValid()) {
            journal->wipeErrorBlacklistEntry(item._file);
        }
        return;
    }

    auto newEntry = createBlacklistEntry(oldEntry, item);
    journal->setErrorBlacklistEntry(newEntry);

    // Suppress the error if it was and continues to be blacklisted.
    // An ignoreDuration of 0 mean we're tracking the error, but not actively
    // suppressing it.
    if (item._hasBlacklistEntry && newEntry._ignoreDuration > 0) {
        item._status = SyncFileItem::BlacklistedError;

        qCInfo(lcPropagator) << "blacklisting " << item._file
                             << " for " << newEntry._ignoreDuration
                             << ", retry count " << newEntry._retryCount;

        return;
    }

    // Some soft errors might become louder on repeat occurrence
    if (item._status == SyncFileItem::SoftError
        && newEntry._retryCount > 1) {
        qCWarning(lcPropagator) << "escalating soft error on " << item._file
                                << " to normal error, " << item._httpErrorCode;
        item._status = SyncFileItem::NormalError;
        return;
    }
}
开发者ID:msphn,项目名称:client,代码行数:49,代码来源:owncloudpropagator.cpp


示例14: remotePollInterval

quint64 ConfigFile::forceSyncInterval(const QString &connection) const
{
    uint pollInterval = remotePollInterval(connection);

    QString con(connection);
    if (connection.isEmpty())
        con = defaultConnection();
    QSettings settings(configFile(), QSettings::IniFormat);
    settings.beginGroup(con);

    quint64 defaultInterval = 2 * 60 * 60 * 1000ull; // 2h
    quint64 interval = settings.value(QLatin1String(forceSyncIntervalC), defaultInterval).toULongLong();
    if (interval < pollInterval) {
        qCWarning(lcConfigFile) << "Force sync interval is less than the remote poll inteval, reverting to" << pollInterval;
        interval = pollInterval;
    }
    return interval;
}
开发者ID:msphn,项目名称:client,代码行数:18,代码来源:configfile.cpp


示例15: qCDebug

QString ExtScript::applyFilters(QString _value) const
{
    qCDebug(LOG_LIB) << "Value" << _value;

    for (auto filt : m_filters) {
        qCInfo(LOG_LIB) << "Found filter" << filt;
        QVariantMap filter = jsonFilters[filt].toMap();
        if (filter.isEmpty()) {
            qCWarning(LOG_LIB) << "Could not find filter" << _value
                               << "in the json";
            continue;
        }
        for (auto f : filter.keys())
            _value.replace(f, filter[f].toString());
    }

    return _value;
}
开发者ID:wlemuel,项目名称:awesome-widgets,代码行数:18,代码来源:extscript.cpp


示例16: typeRepository

uint TypeRepository::indexForType(const AbstractType::Ptr input) {
  if(!input)
    return 0;

  uint i = typeRepository()->index(AbstractTypeDataRequest(*input));
#ifdef DEBUG_TYPE_REPOSITORY
  AbstractType::Ptr t = typeForIndex(i);
  if(!t->equals(input.data())) {
      qCWarning(LANGUAGE) << "found type in repository does not equal source type:" << input->toString() << t->toString();
      t->equals(input.data());
  }
#ifdef ASSERT_ON_PROBLEM
  Q_ASSERT(t->equals(input.data()));
  Q_ASSERT(input->equals(t.data()));
#endif
#endif
  return i;
}
开发者ID:KDE,项目名称:kdevplatform,代码行数:18,代码来源:typerepository.cpp


示例17: qCWarning

void XWaylandManager::handleSurfaceId(XWaylandShellSurface *window, xcb_client_message_event_t *event)
{
    if (window->surface()) {
        qCWarning(XWAYLAND_TRACE) << "Window" << window->window() << "already has a surface id";
        return;
    }

    quint32 id = event->data.data32[0];
    window->setSurfaceId(id);

    wl_resource *resource = wl_client_get_object(m_server->client(), id);
    if (resource) {
        window->setSurface(QWaylandSurface::fromResource(resource));
    } else {
        window->setSurface(Q_NULLPTR);
        m_unpairedWindows.append(window);
    }
}
开发者ID:greenisland,项目名称:greenisland,代码行数:18,代码来源:xwaylandmanager.cpp


示例18: read_data

static QByteArray read_data( archive* a ){
	QByteArray raw;
	
	//Read chuncks
	const char *buff;
	size_t size;
	int64_t offset;
	
	while( true ){
		switch( archive_read_data_block( a, (const void**)&buff, &size, &offset ) ){
			case ARCHIVE_OK: raw += QByteArray( buff, size ); break;
			case ARCHIVE_EOF: return raw;
			default:
				qCWarning(LOG) << "Error while reading zip data:" << archive_error_string(a);
				return raw;
		}
	}
}
开发者ID:spillerrec,项目名称:cgCompress,代码行数:18,代码来源:cgcreator.cpp


示例19: getLayoutsList

LayoutSet X11Helper::getCurrentLayouts()
{
	LayoutSet layoutSet;

	QList<LayoutUnit> currentLayouts = getLayoutsList();
	layoutSet.layouts = currentLayouts;

	unsigned int group = X11Helper::getGroup();
	if( group < (unsigned int)currentLayouts.size() ) {
		layoutSet.currentLayout = currentLayouts[group];
	}
	else {
		qCWarning(KCM_KEYBOARD) << "Current group number" << group << "is outside of current layout list" << getLayoutsListAsString(currentLayouts);
		layoutSet.currentLayout = LayoutUnit();
	}

	return layoutSet;
}
开发者ID:CerebrosuS,项目名称:plasma-desktop,代码行数:18,代码来源:x11_helper.cpp


示例20: sendRequest

void MoveJob::start()
{
    QNetworkRequest req;
    req.setRawHeader("Destination", QUrl::toPercentEncoding(_destination, "/"));
    for (auto it = _extraHeaders.constBegin(); it != _extraHeaders.constEnd(); ++it) {
        req.setRawHeader(it.key(), it.value());
    }
    if (_url.isValid()) {
        sendRequest("MOVE", _url, req);
    } else {
        sendRequest("MOVE", makeDavUrl(path()), req);
    }

    if (reply()->error() != QNetworkReply::NoError) {
        qCWarning(lcPropagateRemoteMove) << " Network error: " << reply()->errorString();
    }
    AbstractNetworkJob::start();
}
开发者ID:owncloud,项目名称:client,代码行数:18,代码来源:propagateremotemove.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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