当前位置: 首页>>代码示例>>C++>>正文


C++ ULTRACOPIER_DEBUGCONSOLE函数代码示例

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


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

示例1: ULTRACOPIER_DEBUGCONSOLE

void WriteThread::internalWrite()
{
    if(stopIt)
        return;
    //read one block
    if(theBlockList.size()<=0)
    {
        ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+QString::number(id)+"] End detected of the file");
        return;
    }
    else
    {
        QMutexLocker lock_mutex(&accessList);
        blockArray=theBlockList.first();
        theBlockList.removeFirst();
    }
    //write one block
    freeBlock.release();

    if(stopIt)
        return;
    #ifdef ULTRACOPIER_PLUGIN_DEBUG
    stat=Write;
    #endif
    bytesWriten=file.write(blockArray);
    #ifdef ULTRACOPIER_PLUGIN_DEBUG
    stat=Idle;
    #endif
    //mutex for stream this data
    if(CurentCopiedSize==0)
    {
        ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+QString::number(id)+"] emit writeIsStarted()");
        emit writeIsStarted();
    }
    CurentCopiedSize+=bytesWriten;
    if(stopIt)
        return;
    if(file.error()!=QFile::NoError)
    {
        ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+QString::number(id)+"] "+QString("Error in writing: %1 (%2)").arg(file.errorString()).arg(file.error()));
        errorString_internal=QString("Error in writing: %1 (%2)").arg(file.errorString()).arg(file.error());
        stopIt=true;
        emit error();
        return;
    }
    if(bytesWriten!=blockArray.size())
    {
        ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+QString::number(id)+"] "+QString("Error in writing, bytesWriten: %1, blockArray.size(): %2").arg(bytesWriten).arg(blockArray.size()));
        errorString_internal=QString("Error in writing, bytesWriten: %1, blockArray.size(): %2").arg(bytesWriten).arg(blockArray.size());
        stopIt=true;
        emit error();
        return;
    }
    lastGoodPosition+=bytesWriten;
}
开发者ID:dsferruzza,项目名称:Ultracopier,代码行数:55,代码来源:WriteThread.cpp

示例2: ULTRACOPIER_DEBUGCONSOLE

void SystrayIcon::reloadEngineList()
{
    ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start");
    copyMenu->clear();
    if(engineEntryList.size()==0)
    {
        copyMenu->setEnabled(false);
        return;
    }
    ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"engineEntryList.size(): "+QString::number(engineEntryList.size()));
    copyMenu->setEnabled(true);
    if(engineEntryList.size()==1)
    {
        QAction *copy=new QAction(IconAdd,tr("Add &copy"),copyMenu);
        connect(copy,&QAction::triggered,this,&SystrayIcon::CatchCopyQuery);
        copy->setData(engineEntryList.first().name);
        copyMenu->addAction(copy);
        if(!engineEntryList.first().canDoOnlyCopy)
        {
            QAction *transfer=new QAction(IconAdd,tr("Add &transfer"),copyMenu);
            connect(transfer,&QAction::triggered,this,&SystrayIcon::CatchTransferQuery);
            transfer->setData(engineEntryList.first().name);
            copyMenu->addAction(transfer);
            QAction *move=new QAction(IconAdd,tr("Add &move"),copyMenu);
            connect(move,&QAction::triggered,this,&SystrayIcon::CatchMoveQuery);
            move->setData(engineEntryList.first().name);
            copyMenu->addAction(move);
        }
    }
    else
    {
        int index=0;
        while(index<engineEntryList.size())
        {
            QMenu * menu=new QMenu(engineEntryList.at(index).name);
            QAction *copy=new QAction(IconAdd,tr("Add &copy"),menu);
            connect(copy,&QAction::triggered,this,&SystrayIcon::CatchCopyQuery);
            copy->setData(engineEntryList.at(index).name);
            menu->addAction(copy);
            if(!engineEntryList.at(index).canDoOnlyCopy)
            {
                QAction *transfer=new QAction(IconAdd,tr("Add &transfer"),menu);
                connect(transfer,&QAction::triggered,this,&SystrayIcon::CatchTransferQuery);
                transfer->setData(engineEntryList.at(index).name);
                menu->addAction(transfer);
                QAction *move=new QAction(IconAdd,tr("Add &move"),menu);
                connect(move,&QAction::triggered,this,&SystrayIcon::CatchMoveQuery);
                move->setData(engineEntryList.at(index).name);
                menu->addAction(move);
            }
            copyMenu->addMenu(menu);
            index++;
        }
    }
}
开发者ID:dsferruzza,项目名称:Ultracopier,代码行数:55,代码来源:SystrayIcon.cpp

示例3: switch

TransferModel::currentTransfertItem TransferModel::getCurrentTransfertItem()
{
    currentTransfertItem returnItem;
    returnItem.haveItem=startId.size()>0;
    if(returnItem.haveItem)
    {
        if(!internalRunningOperation.contains(*startId.constBegin()))
        {
            returnItem.haveItem=false;
            return returnItem;
        }
        const ItemOfCopyListWithMoreInformations &itemTransfer=internalRunningOperation[*startId.constBegin()];
        returnItem.from=itemTransfer.generalData.sourceFullPath;
        returnItem.to=itemTransfer.generalData.destinationFullPath;
        returnItem.current_file=itemTransfer.generalData.destinationFileName+", "+facilityEngine->sizeToString(itemTransfer.generalData.size);
        switch(itemTransfer.actionType)
        {
            case Ultracopier::CustomOperation:
            if(!itemTransfer.custom_with_progression)
                returnItem.progressBar_file=-1;
            else
            {
                if(itemTransfer.generalData.size>0)
                    returnItem.progressBar_file=((double)itemTransfer.currentProgression/itemTransfer.generalData.size)*65535;
                else
                    returnItem.progressBar_file=-1;
            }
            break;
            case Ultracopier::Transfer:
            if(itemTransfer.generalData.size>0)
                returnItem.progressBar_file=((double)itemTransfer.currentProgression/itemTransfer.generalData.size)*65535;
            else
                returnItem.progressBar_file=0;
            break;
            //should never pass here
            case Ultracopier::PostOperation:
                ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QString("wrong action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType));
                returnItem.progressBar_file=65535;
            break;
            //should never pass here
            case Ultracopier::PreOperation:
                ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QString("wrong action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType));
                returnItem.progressBar_file=0;
            break;
            default:
                returnItem.progressBar_file=0;
                ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,QString("unknow action type for file %1: actionType: %2").arg(itemTransfer.generalData.id).arg(itemTransfer.actionType));
                break;
        }
    }
/*	else
        ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QString("No have running item"));*/
    return returnItem;
}
开发者ID:dsferruzza,项目名称:Ultracopier,代码行数:54,代码来源:TransferModel.cpp

示例4: ULTRACOPIER_DEBUGCONSOLE

void WriteThread::postOperation()
{
    if(postOperationRequested)
    {
        ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,QStringLiteral("[")+QString::number(id)+QStringLiteral("] double event dropped"));
        return;
    }
    postOperationRequested=true;
    ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("[")+QString::number(id)+QStringLiteral("] start"));
    emit internalStartClose();
}
开发者ID:NotDead,项目名称:Ultracopier,代码行数:11,代码来源:WriteThread.cpp

示例5: setAcceptDrops

/* drag event processing

need setAcceptDrops(true); into the constructor
need implementation to accept the drop:
void dragEnterEvent(QDragEnterEvent* event);
void dragMoveEvent(QDragMoveEvent* event);
void dragLeaveEvent(QDragLeaveEvent* event);
*/
void Themes::dropEvent(QDropEvent *event)
{
    ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start"));
    const QMimeData* mimeData = event->mimeData();
    if(mimeData->hasUrls())
    {
        ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("hasUrls"));
        emit urlDropped(mimeData->urls());
        event->acceptProposedAction();
    }
}
开发者ID:amitamitamitamit,项目名称:Ultracopier,代码行数:19,代码来源:interface.cpp

示例6: ULTRACOPIER_DEBUGCONSOLE

void Themes::dragEnterEvent(QDragEnterEvent* event)
{
    ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("start"));
    // if some actions should not be usable, like move, this code must be adopted
    const QMimeData* mimeData = event->mimeData();
    if(mimeData->hasUrls())
    {
        ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,QStringLiteral("hasUrls"));
        event->acceptProposedAction();
    }
}
开发者ID:amitamitamitamit,项目名称:Ultracopier,代码行数:11,代码来源:interface.cpp

示例7: ULTRACOPIER_DEBUGCONSOLE

void WriteThread::endIsDetected()
{
	if(endDetected)
	{
		ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"["+QString::number(id)+"] double event dropped");
		return;
	}
	endDetected=true;
	ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"["+QString::number(id)+"] start");
	emit internalStartEndOfFile();
}
开发者ID:dolanor,项目名称:Ultracopier,代码行数:11,代码来源:WriteThread.cpp

示例8: ULTRACOPIER_DEBUGCONSOLE

//reopen after an error
void ReadThread::reopen()
{
    ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+QString::number(id)+"] start");
    if(isInReadLoop)
    {
        ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"["+QString::number(id)+"] try reopen where read is not finish");
        return;
    }
    stopIt=true;
    emit internalStartReopen();
}
开发者ID:dsferruzza,项目名称:Ultracopier,代码行数:12,代码来源:ReadThread.cpp

示例9: ULTRACOPIER_DEBUGCONSOLE

void WriteThread::postOperation()
{
    if(postOperationRequested)
    {
        ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"["+std::to_string(id)+"] double event dropped");
        return;
    }
    postOperationRequested=true;
    ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"["+std::to_string(id)+"] start");
    emit internalStartClose();
}
开发者ID:alphaonex86,项目名称:Ultracopier,代码行数:11,代码来源:WriteThread.cpp

示例10: pixmap

QWidget * ThemesFactory::options()
{
    if(optionsEngine!=NULL)
    {
        bool ok;
        currentSpeed=optionsEngine->getOptionValue("currentSpeed").toUInt(&ok);
        if(!ok)
            currentSpeed=0;
        ui->comboBox_copyEnd->setCurrentIndex(optionsEngine->getOptionValue("comboBox_copyEnd").toUInt());
        ui->speedWithProgressBar->setChecked(optionsEngine->getOptionValue("speedWithProgressBar").toBool());
        ui->checkBoxShowSpeed->setChecked(optionsEngine->getOptionValue("checkBoxShowSpeed").toBool());
        ui->checkBoxStartWithMoreButtonPushed->setChecked(optionsEngine->getOptionValue("moreButtonPushed").toBool());
        ui->showDualProgression->setChecked(optionsEngine->getOptionValue("showDualProgression").toBool());
        ui->showProgressionInTheTitle->setChecked(optionsEngine->getOptionValue("showProgressionInTheTitle").toBool());
        ui->alwaysOnTop->setChecked(optionsEngine->getOptionValue("alwaysOnTop").toBool());
        ui->minimizeToSystray->setChecked(optionsEngine->getOptionValue("minimizeToSystray").toBool());

        progressColorWrite=optionsEngine->getOptionValue("progressColorWrite").value<QColor>();
        progressColorRead=optionsEngine->getOptionValue("progressColorRead").value<QColor>();
        progressColorRemaining=optionsEngine->getOptionValue("progressColorRemaining").value<QColor>();

        QPixmap pixmap(75,20);
        pixmap.fill(progressColorWrite);
        ui->progressColorWrite->setIcon(pixmap);
        pixmap.fill(progressColorRead);
        ui->progressColorRead->setIcon(pixmap);
        pixmap.fill(progressColorRemaining);
        ui->progressColorRemaining->setIcon(pixmap);
        updateSpeed();
        updateProgressionColorBar();

        connect(ui->alwaysOnTop,&QCheckBox::stateChanged,this,&ThemesFactory::alwaysOnTop);
        connect(ui->checkBoxShowSpeed,&QCheckBox::stateChanged,this,&ThemesFactory::checkBoxShowSpeed);
        connect(ui->minimizeToSystray,&QCheckBox::stateChanged,this,&ThemesFactory::minimizeToSystray);
        connect(ui->checkBox_limitSpeed,&QCheckBox::stateChanged,this,&ThemesFactory::uiUpdateSpeed);
        connect(ui->SliderSpeed,&QAbstractSlider::valueChanged,this,&ThemesFactory::on_SliderSpeed_valueChanged);
        connect(ui->limitSpeed,static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged),	this,	&ThemesFactory::uiUpdateSpeed);
        connect(ui->checkBoxShowSpeed,&QAbstractButton::toggled,this,&ThemesFactory::checkBoxShowSpeedHaveChanged);
        connect(ui->checkBoxStartWithMoreButtonPushed,&QAbstractButton::toggled,this,&ThemesFactory::checkBoxStartWithMoreButtonPushedHaveChanged);
        connect(ui->speedWithProgressBar,&QAbstractButton::toggled,this,&ThemesFactory::speedWithProgressBar);
        connect(ui->comboBox_copyEnd,	static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),		this,&ThemesFactory::comboBox_copyEnd);
        connect(ui->showDualProgression,&QCheckBox::stateChanged,this,&ThemesFactory::showDualProgression);
        connect(ui->showDualProgression,&QCheckBox::stateChanged,this,&ThemesFactory::updateProgressionColorBar);
        connect(ui->showProgressionInTheTitle,&QCheckBox::stateChanged,this,&ThemesFactory::setShowProgressionInTheTitle);
        connect(ui->progressColorWrite,&QAbstractButton::clicked,this,&ThemesFactory::progressColorWrite_clicked);
        connect(ui->progressColorRead,	&QAbstractButton::clicked,this,&ThemesFactory::progressColorRead_clicked);
        connect(ui->progressColorRemaining,&QAbstractButton::clicked,this,&ThemesFactory::progressColorRemaining_clicked);
    }
    else
        ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"internal error, crash prevented");
    ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"return the options");
    return tempWidget;
}
开发者ID:AutoRunWare,项目名称:Ultracopier,代码行数:53,代码来源:factory.cpp

示例11: QIcon

/** \brief To get image into the current themes, or default if not found
\param filePath The file path to search, like toto.png resolved with the root of the current themes
\see currentStylePath */
QIcon ThemesManager::loadIcon(const QString &fileName)
{
    if(currentPluginIndex==-1)
        return QIcon();
    if(pluginList.at(currentPluginIndex).factory==NULL)
    {
        ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Critical,"Try get icon when the factory is not loaded");
        return QIcon();
    }
    ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"Send interface pixmap: "+fileName);
    return pluginList.at(currentPluginIndex).factory->getIcon(fileName);
}
开发者ID:AutoRunWare,项目名称:Ultracopier,代码行数:15,代码来源:ThemesManager.cpp

示例12: ULTRACOPIER_DEBUGCONSOLE

/// \brief Called when event loop is setup
void EventDispatcher::initFunction()
{
	if(core==NULL || copyEngineList==NULL)
	{
		ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Critical,"Unable to initialize correctly the software");
		return;
	}
	ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"Initialize the variable of event loop");
	connect(copyServer,	SIGNAL(newCopy(quint32,QStringList,QStringList)),			core,		SLOT(newCopy(quint32,QStringList,QStringList)));
	connect(copyServer,	SIGNAL(newCopy(quint32,QStringList,QStringList,QString,QString)),	core,		SLOT(newCopy(quint32,QStringList,QStringList,QString,QString)));
	connect(copyServer,	SIGNAL(newMove(quint32,QStringList,QStringList)),			core,		SLOT(newMove(quint32,QStringList,QStringList)));
	connect(copyServer,	SIGNAL(newMove(quint32,QStringList,QStringList,QString,QString)),	core,		SLOT(newMove(quint32,QStringList,QStringList,QString,QString)));
	connect(core,		SIGNAL(copyFinished(quint32,bool)),					copyServer,	SLOT(copyFinished(quint32,bool)));
	connect(core,		SIGNAL(copyCanceled(quint32)),						copyServer,	SLOT(copyCanceled(quint32)));
	if(localListener.tryConnect())
	{
		stopIt=true;
		//why before removed???
		QCoreApplication::quit();
		return;
	}
	localListener.listenServer();
	//load the systray icon
	if(backgroundIcon==NULL)
	{
		backgroundIcon=new SystrayIcon();
		//connect the slot
		//quit is for this object
//		connect(core,		SIGNAL(newCanDoOnlyCopy(bool)),					backgroundIcon,	SLOT(newCanDoOnlyCopy(bool)));
		connect(backgroundIcon,	SIGNAL(quit()),this,SLOT(quit()));
		//show option is for OptionEngine object
		connect(backgroundIcon,	SIGNAL(showOptions()),						&optionDialog,	SLOT(show()));
		connect(copyServer,	SIGNAL(listenerReady(ListeningState,bool,bool)),		backgroundIcon,	SLOT(listenerReady(ListeningState,bool,bool)));
		connect(copyServer,	SIGNAL(pluginLoaderReady(CatchState,bool,bool)),		backgroundIcon,	SLOT(pluginLoaderReady(CatchState,bool,bool)));
		connect(backgroundIcon,	SIGNAL(tryCatchCopy()),						copyServer,	SLOT(listen()));
		connect(backgroundIcon,	SIGNAL(tryUncatchCopy()),					copyServer,	SLOT(close()));
		if(options->getOptionValue("CopyListener","CatchCopyAsDefault").toBool())
			copyServer->listen();
		ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"copyServer.oneListenerIsLoaded(): "+QString::number(copyServer->oneListenerIsLoaded()));
		//backgroundIcon->readyToListen(copyServer.oneListenerIsLoaded());

		connect(backgroundIcon,	SIGNAL(addWindowCopyMove(CopyMode,QString)),				core,		SLOT(addWindowCopyMove(CopyMode,QString)));
		connect(backgroundIcon,	SIGNAL(addWindowTransfer(QString)),					core,		SLOT(addWindowTransfer(QString)));
		connect(copyEngineList,	SIGNAL(addCopyEngine(QString,bool)),					backgroundIcon,	SLOT(addCopyEngine(QString,bool)));
		connect(copyEngineList,	SIGNAL(removeCopyEngine(QString)),					backgroundIcon,	SLOT(removeCopyEngine(QString)));
		copyEngineList->setIsConnected();
		copyServer->resendState();
	}
	//conntect the last chance signal before quit
	connect(QCoreApplication::instance(),SIGNAL(aboutToQuit()),this,SLOT(quit()));
	//connect the slot for the help dialog
	connect(backgroundIcon,SIGNAL(showHelp()),&theHelp,SLOT(show()));
}
开发者ID:dolanor,项目名称:Ultracopier,代码行数:54,代码来源:EventDispatcher.cpp

示例13: ULTRACOPIER_DEBUGCONSOLE

void Core::newCopyWithoutDestination(const quint32 &orderId,const QStringList &protocolsUsedForTheSources,const QStringList &sources)
{
    ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start");
    if(openNewCopyEngineInstance(Ultracopier::Copy,false,protocolsUsedForTheSources)==-1)
    {
        ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Warning,"Unable to get a copy engine instance");
        QMessageBox::critical(NULL,tr("Error"),tr("Unable to get a copy engine instance"));
        return;
    }
    copyList.last().orderId<<orderId;
    copyList.last().engine->newCopy(sources);
    copyList.last().interface->haveExternalOrder();
}
开发者ID:blizzard4591,项目名称:Ultracopier,代码行数:13,代码来源:Core.cpp

示例14: ULTRACOPIER_DEBUGCONSOLE

bool SessionLoader::getEnabled()
{
    ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"start");
    //return the value into the variable
    HKEY    ultracopier_regkey;
    bool temp=false;
    RegCreateKeyEx(HKEY_CURRENT_USER, TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Run"), 0, 0, REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS, 0, &ultracopier_regkey, 0);
    DWORD kSize=254;
    if(RegQueryValueEx(ultracopier_regkey,TEXT("ultracopier"),NULL,NULL,(LPBYTE)0,&kSize) == ERROR_SUCCESS)
        temp=true;
    RegCloseKey(ultracopier_regkey);
    ULTRACOPIER_DEBUGCONSOLE(Ultracopier::DebugLevel_Notice,"return this value: "+QString::number(temp));
    return temp;
}
开发者ID:dsferruzza,项目名称:Ultracopier,代码行数:14,代码来源:sessionLoader.cpp

示例15: ULTRACOPIER_DEBUGCONSOLE

/// \brief To add option group to options
bool OptionEngine::addOptionGroup(const QString &groupName,const QList<QPair<QString, QVariant> > &KeysList)
{
    ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"start(\""+groupName+"\",[...])");
    //search if previous with the same name exists
    if(GroupKeysList.contains(groupName))
    {
        ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Notice,"group already used previously");
        return false;
    }
    //if the backend is file, enter into the group
    if(currentBackend==File)
        settings->beginGroup(groupName);
    //browse all key, and append it to the key
    index=0;
    QList<OptionEngineGroupKey> KeyListTemp;
    loop_size=KeysList.size();
    while(index<loop_size)
    {
        OptionEngineGroupKey theCurrentKey;
        theCurrentKey.defaultValue=KeysList.at(index).second;
        //if memory backend, load the default value into the current value
        if(currentBackend==Memory)
            theCurrentKey.currentValue=theCurrentKey.defaultValue;
        else
        {
            if(settings->contains(KeysList.at(index).first))//if file backend, load the default value from the file
                theCurrentKey.currentValue=settings->value(KeysList.at(index).first);
            else //or if not found load the default value and set into the file
            {
                theCurrentKey.currentValue=theCurrentKey.defaultValue;
                //to switch default value if is unchanged
                //settings->setValue(KeysList.at(index).first,theCurrentKey.defaultValue);
            }
            if(settings->status()!=QSettings::NoError)
            {
                ULTRACOPIER_DEBUGCONSOLE(DebugLevel_Warning,"Have writing error, switch to memory only options");
#ifdef ULTRACOPIER_VERSION_PORTABLE
                resources->disableWritablePath();
#endif // ULTRACOPIER_VERSION_PORTABLE
                currentBackend=Memory;
            }
        }
        GroupKeysList[groupName][KeysList.at(index).first]=theCurrentKey;
        index++;
    }
    //if the backend is file, leave into the group
    if(currentBackend==File)
        settings->endGroup();
    return true;
}
开发者ID:dolanor,项目名称:Ultracopier,代码行数:51,代码来源:OptionEngine.cpp


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