本文整理汇总了C++中QLOG_INFO函数的典型用法代码示例。如果您正苦于以下问题:C++ QLOG_INFO函数的具体用法?C++ QLOG_INFO怎么用?C++ QLOG_INFO使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了QLOG_INFO函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QLOG_INFO
void UASActionsWidget::setShortcutMode()
{
QLOG_INFO() << " UASActionsWidget::setShortcutMode()";
if(!activeUas())
return;
QLOG_INFO() << "Set Mode to "
<< ui.shortcutButtonGroup->checkedButton()->text();
int index = ui.modeComboBox->findText(ui.shortcutButtonGroup->checkedButton()->text());
QLOG_DEBUG() << "index: "
<< index;
ui.modeComboBox->setCurrentIndex(index);
m_uas->setMode(MAV_MODE_FLAG_CUSTOM_MODE_ENABLED,
ui.modeComboBox->itemData(ui.modeComboBox->currentIndex()).toInt());
}
示例2: SamaelDockWidget
TerminalWidget::TerminalWidget(QWidget *parent)
: SamaelDockWidget(parent, QStringLiteral("TerminalWidget"), QStringLiteral("Terminal"))
{
this->setAllowedAreas(Qt::TopDockWidgetArea | Qt::BottomDockWidgetArea);
// configure the text edit
m_Terminal = new Terminal(m_ContentWidget);
m_Terminal->setFont(QFont("Courier",9));
m_Terminal->setLineWrapMode(QPlainTextEdit::NoWrap);
m_Terminal->setMaximumBlockCount(100);
// background & text color
auto p = m_Terminal->palette();
p.setColor(QPalette::Base,QColor(qRgb(28,32,36)));
p.setColor(QPalette::Text,QColor(qRgb(186,200,198)));
m_Terminal->setPalette(p);
// configure the text highlighter
m_Highlighter = new SamaelHighlighter(m_Terminal->document());
m_Highlighter->setContext(SamaelHighlighter::CONTEXT_TERMINAL);
// script system? anyone? the entry point is over here!
connect(m_Terminal, SIGNAL(command(QString)), this, SLOT(result(QString)));
// configure the layout of this widget
m_Layout = new QVBoxLayout(m_ContentWidget);
m_Layout->setContentsMargins(0,0,0,0);
m_Layout->addWidget(m_Terminal);
finalise(m_Layout);
QLOG_INFO() << "TerminalWidget - Ready!";
}
示例3: path
bool OcDbManager::openDB()
{
db = QSqlDatabase::addDatabase("QSQLITE");
QString path(QDir::homePath());
path.append(BASE_PATH).append("/database.sqlite");
path = QDir::toNativeSeparators(path);
QLOG_DEBUG() << "Database file path: " << path;
// check if database file exists before database will be opened
QFile dbfile(path);
while(!dbfile.exists()) {
QLOG_WARN() << "Database file does not exist. Waiting for it's creation by the engine...";
QEventLoop loop;
QTimer::singleShot(1000, &loop, SLOT(quit()));
loop.exec();
}
db.setDatabaseName(path);
db.setConnectOptions("QSQLITE_OPEN_READONLY");
bool dbOpen = db.open();
if (!dbOpen) {
QLOG_FATAL() << "Can not open sqlite database";
} else {
QLOG_INFO() << "Opened sqlite database";
}
return dbOpen;
}
示例4: QLOG_INFO
void UmlClass::generate_def(QTextStream & f, WrapperStr indent, bool h,
WrapperStr templates, WrapperStr cl_names,
WrapperStr, WrapperStr)
{
QLOG_INFO() << "generating definition";
//QsLogging::Logger::instance().
if (! cppDecl().isEmpty()) {
WrapperStr template1;
WrapperStr template2;
WrapperStr templates_tmplop;
WrapperStr cl_names_tmplop;
get_template_prefixes(template1, template2);
templates_tmplop = templates + "template<>\n";
templates += template1;
cl_names_tmplop = cl_names + "::" + name()/* true_name */;
cl_names = cl_names_tmplop + template2;
QVector<UmlItem*> ch = children();
for (int index = 0; index != ch.size(); index += 1)
if (ch[index]->kind() != aNcRelation)
((UmlClassItem *) ch[index])
->generate_def(f, indent, h, templates, cl_names,
templates_tmplop, cl_names_tmplop);
}
}
示例5: info
void PasswordVault::initializeVaultKey()
{
QString info("Setting the key for the Password Vault.\n"
"Note: If you have server passwords saved in the Vault,\n"
"these will no longer be valid and you will need to \n"
"re-enter them in order to encrypt them with the new \n"
"Vault Key.\n\n"
"The Password Vault key is used to encrypt server\n"
"passwords before being stored. The key is not\n"
"stored on file and must therefore be entered each\n"
"time you restart IQmol. If you forget your vault\n"
"key, you must reconfigure all the server settings\n"
"saved in IQmol\n");
SetPasswordDialog dialog(info, "Set Password Vault Key", "Vault Key" );
if (dialog.exec() == QDialog::Accepted) {
QString key(dialog.password());
QLOG_INFO() << "Vault key accepted";
delete m_enigmaMachine;
m_enigmaMachine = new EnigmaMachine(key.toStdString());
std::string hash(m_enigmaMachine->mdHash(key.toStdString()));
OverwriteString(key);
Preferences::ClearPasswordVaultContents();
Preferences::PasswordVaultKey(QString::fromStdString(hash));
Preferences::PasswordVaultSeed(m_enigmaMachine->seed());
}
}
示例6: QLOG_ERROR
void OcFeedsModelNew::feedCreated(const QString &name, const int &id)
{
QSqlQuery query;
if (!query.exec(QString("SELECT id, localUnreadCount, iconSource, iconWidth, iconHeight, folderId FROM feeds WHERE id = %1").arg(id))) {
QLOG_ERROR() << "Feeds model: failed to select data of newly created feed from database: " << query.lastError().text();
}
query.next();
if (query.value(5).toInt() == folderId()) {
QLOG_INFO() << "Feeds model: adding newly created feed";
beginInsertRows(QModelIndex(), rowCount(), rowCount());
OcFeedObject *fobj = new OcFeedObject(query.value(0).toInt(),
0,
name,
query.value(1).toInt(),
query.value(2).toString(),
query.value(3).toInt(),
query.value(4).toInt());
m_items.append(fobj);
endInsertRows();
queryAndSetTotalUnread();
}
}
示例7: QLOG_INFO
void VersionBuilder::buildFromMultilayer()
{
QLOG_INFO() << "Building version from multilayered sources.";
// just the builtin stuff for now
auto minecraftList = MMC->minecraftlist();
auto mcversion = minecraftList->findVersion(m_instance->intendedVersionId());
auto minecraftPatch = std::dynamic_pointer_cast<VersionPatch>(mcversion);
if (!minecraftPatch)
{
throw VersionIncomplete("net.minecraft");
}
minecraftPatch->setOrder(-2);
m_version->VersionPatches.append(minecraftPatch);
// TODO: this is obviously fake.
QResource LWJGL(":/versions/LWJGL/2.9.1.json");
auto lwjgl = parseJsonFile(LWJGL.absoluteFilePath(), false, false);
auto lwjglPatch = std::dynamic_pointer_cast<VersionPatch>(lwjgl);
if (!lwjglPatch)
{
throw VersionIncomplete("org.lwjgl");
}
lwjglPatch->setOrder(-1);
m_version->VersionPatches.append(lwjglPatch);
// load all patches, put into map for ordering, apply in the right order
readInstancePatches();
m_version->finalize();
}
示例8: QLOG_WARN
void ItemsManagerWorker::Update() {
if (updating_) {
QLOG_WARN() << "ItemsManagerWorker::Update called while updating";
return;
}
QLOG_INFO() << "Updating stash tabs";
updating_ = true;
// remove all mappings (from previous requests)
if (signal_mapper_)
delete signal_mapper_;
signal_mapper_ = new QSignalMapper;
// remove all pending requests
queue_ = std::queue<ItemsRequest>();
queue_id_ = 0;
replies_.clear();
items_.clear();
tabs_as_string_ = "";
items_as_string_ = "[ "; // space here is important, see ParseItems and OnTabReceived when all requests are completed
selected_character_ = "";
CurrentStatusUpdate status = CurrentStatusUpdate();
status.state = ProgramState::ItemsUpdating;
status.progress = 0;
status.total = 100;
emit StatusUpdate(status);
// first, download the main page because it's the only way to know which character is selected
QNetworkReply *main_page = network_manager_.get(QNetworkRequest(QUrl(kMainPage)));
connect(main_page, &QNetworkReply::finished, this, &ItemsManagerWorker::OnMainPageReceived);
}
示例9: switch
int InputCEC::CecLogMessage(void* cbParam, const cec_log_message message)
{
InputCEC *cec = (InputCEC*)cbParam;
switch (message.level)
{
case CEC_LOG_ERROR:
QLOG_ERROR() << "libCEC ERROR:" << message.message;
break;
case CEC_LOG_WARNING:
QLOG_WARN() << "libCEC WARNING:" << message.message;
break;
case CEC_LOG_NOTICE:
QLOG_INFO() << "libCEC NOTICE:" << message.message;
break;
case CEC_LOG_DEBUG:
if (cec->m_verboseLogging)
{
QLOG_DEBUG() << "libCEC DEBUG:" << message.message;
}
break;
case CEC_LOG_TRAFFIC:
break;
default:
break;
}
return 0;
}
示例10: get_name
QString RelationData::get_name(BrowserRelation * cl) const
{
static QString result;
if (cl == start) {
if (!a.role.isEmpty()) {
const char * role = a.role;
QString tName = get_name();
result = QString(role + QString(" (") + tName + ")");
return result;
}
}
else if (cl == end) {
if (!b.role.isEmpty()) {
QLOG_INFO() << "Returning name for relation: " << QString((const char *) b.role) + " (" + get_name() + ")";
const char * role = b.role;
QString tName = get_name();
result = QString(role + QString(" (") + tName + ")");
return QString(role + QString(" (") + tName + ")");
}
}
bool nameIsNotADefaultType = this->name != default_name(type);
if (nameIsNotADefaultType)
result = ("(" + this->name + ")").operator QString();
else
result = this->name.operator QString();
//QLOG_INFO() << "Returning name for relation: " << relationName;
return result;
}
示例11: fi
void SystemComponent::runUserScript(QString script)
{
// We take the path the user supplied and run it through fileInfo and
// look for the fileName() part, this is to avoid people sharing keymaps
// that tries to execute things like ../../ etc. Note that this function
// is still not safe, people can do nasty things with it, so users needs
// to be careful with their keymaps.
//
QFileInfo fi(script);
QString scriptPath = Paths::dataDir("scripts/" + fi.fileName());
QFile scriptFile(scriptPath);
if (scriptFile.exists())
{
if (!QFileInfo(scriptFile).isExecutable())
{
QLOG_WARN() << "Script:" << script << "is not executable";
return;
}
QLOG_INFO() << "Running script:" << scriptPath;
if (QProcess::startDetached(scriptPath, QStringList()))
QLOG_DEBUG() << "Script started successfully";
else
QLOG_WARN() << "Error running script:" << scriptPath;
}
else
{
QLOG_WARN() << "Could not find script:" << scriptPath;
}
}
示例12: QLOG_INFO
void DisplayManagerRPI::resetRendering()
{
QGuiApplication *guiApp = (QGuiApplication*)QGuiApplication::instance();
QQuickWindow *window = (QQuickWindow*)guiApp->focusWindow();
if (window)
{
QLOG_INFO() << "Recreating Qt UI renderer";
// destroy the window to reset OpenGL context
window->setPersistentOpenGLContext(false);
window->setPersistentSceneGraph(false);
window->destroy();
// Grab the Platform integration private object and recreate it
// this allows to clean / recreate the dispmanx objects
QGuiApplicationPrivate *privateApp = (QGuiApplicationPrivate *)QGuiApplicationPrivate::get(guiApp);
QPlatformIntegration *integration = privateApp->platformIntegration();
if (integration)
{
integration->destroy();
QThread::msleep(500);
integration->initialize();
}
else
{
QLOG_ERROR() << "Failed to retrieve platform integration";
}
// now recreate the window OpenGL context
window->setScreen(QGuiApplication::primaryScreen());
window->create();
}
}
示例13: QLOG_INFO
void CProxy::slotDisconnected()
{
QLOG_INFO() << "disconnected";
QTcpSocket * s = qobject_cast<QTcpSocket *>( sender() );
if ( s )
removePair( s );
}
示例14: while
void PlcSrConfig::delPlcConfig()
{//获取当前传感器名字及位置
plcName=this->ui->nameCbBox->currentText();
int index=this->ui->nameCbBox->currentIndex();
while(true==plcList.contains(plcName))
{//简单判断输入
if(QMessageBox::Yes==QMessageBox::question(this,"请选择",QString("是否删除%1传感器?").arg(plcName),QMessageBox::Yes|QMessageBox::No|QMessageBox::Yes))
{//清除所有PLC传感器参数
plcList.removeAt(index);
plcNameMap[plcName].clear();
portIdMap[plcName].clear();
baudRateMap[plcName].clear();
dataBitsMap[plcName].clear();
parityMap[plcName].clear();
stopBitsMap[plcName].clear();
rwDelayMap[plcName].clear();
typeMap[plcName].clear();
rwLenMap[plcName].clear();
this->ui->nameCbBox->removeItem(index);
return;
}else
QLOG_INFO()<<"已放弃删除"<<plcName<<"传感器";
return;
}
}
示例15: file
void PlcSrConfig::savePlcConfig()
{
QString fileName = "PlcSrConfig.xml";
QFile file(fileName);
if(false==file.open(QIODevice::ReadWrite|QIODevice::Truncate))
{
return;
}
else
{
QXmlStreamWriter writer(&file);
writer.setAutoFormatting(true);
writer.writeStartDocument();// 写文档头
writer.writeStartElement("PlcSensorConfig_List");
for (int i = 0; i <plcList.count(); i++)
{
QString pid=plcList.at(i);
//先取出对应键值
plcName=plcNameMap[pid];
portId=portIdMap[pid];
baudRate=baudRateMap[pid];
parity=parityMap[pid];
dataBits=dataBitsMap[pid];
stopBits=stopBitsMap[pid];
type=typeMap[pid];
rwDelay=rwDelayMap[pid];
rwLen=rwLenMap[pid];
QLOG_INFO()<<portId<<baudRate<<parity<<dataBits<<stopBits<<type<<rwDelay<<rwLen;
//再写入保存
writer.writeStartElement("plc");
writer.writeAttribute("ID", pid);
writer.writeTextElement("name", plcName);
writer.writeTextElement("portId",portId);
writer.writeTextElement("baudRate",baudRate);
writer.writeTextElement("dataBits",dataBits);
writer.writeTextElement("parity",parity);
writer.writeTextElement("stopBits",stopBits);
writer.writeTextElement("rwDelay",rwDelay);
writer.writeTextElement("type",type);
writer.writeTextElement("rwLen",rwLen);
writer.writeEndElement();
}
writer.writeEndDocument();
QLOG_INFO()<<"本地配置保存完成";
file.close();
}
}