filter limit 수정
This commit is contained in:
@@ -216,6 +216,9 @@ Widget::~Widget()
|
||||
|
||||
void Widget::InsertLog(QString str)
|
||||
{
|
||||
if(str[str.length()-1] == QChar('\n'))
|
||||
str = str.mid(0, str.length()-1);
|
||||
|
||||
QTime time = QTime::currentTime();
|
||||
QString strOut = time.toString("[hh:mm:ss] ") + str;
|
||||
m_plwLog->addItem(strOut);
|
||||
@@ -688,6 +691,8 @@ void Widget::process_refresh()
|
||||
{
|
||||
if (m_aProcess[i].arguments().size() == 0) continue;
|
||||
QString str = m_aProcess[i].arguments().at(1);
|
||||
str += "["+m_aProcess[i].arguments().at(2)+"] ";
|
||||
|
||||
switch(m_aProcess[i].state())
|
||||
{
|
||||
case QProcess::NotRunning:str += "(Wait)";break;
|
||||
|
||||
@@ -13,6 +13,12 @@ int main(int argc, char *argv[])
|
||||
cout << " ";
|
||||
cout << QString(__TIME__).toStdString() << endl;
|
||||
SFilterProcess filter;
|
||||
|
||||
cout << "execute arguments: ";
|
||||
for(int i=0; i<argc; i++)
|
||||
cout << argv[i] << " ";
|
||||
cout << endl;
|
||||
|
||||
if (argc != 4)
|
||||
{
|
||||
cout << "check argument " << endl;
|
||||
|
||||
@@ -67,7 +67,7 @@ bool SDatagroup::loadData(const int& _nDatagroupNumber)
|
||||
QString astrWhere[E_ARTICLE_MAX];
|
||||
setloadQuery(astrWhere, _nDatagroupNumber);
|
||||
|
||||
m_pSInitializer->insertLog("Start Loding data_" + QString::number(_nDatagroupNumber));
|
||||
m_pSInitializer->insertLog("Start Loading data_" + QString::number(_nDatagroupNumber));
|
||||
|
||||
QSet<QString> setCheckDupUrl;
|
||||
for (int i = 0; i < E_ARTICLE_MAX; i++)
|
||||
|
||||
@@ -653,6 +653,8 @@ void SInfluencer::STInfluencer::copyInfluencerFromGroupToList()
|
||||
m_listMap.clear();
|
||||
|
||||
QMapIterator<int, QMap<int, QList<stInfluencer>>> iter(m_mapInfluencerOfGroup);
|
||||
int nInfluencerLimitFrom = m_pSInitializer->getInfluencerLimitFrom().toInt();
|
||||
int nInfluencerLimitTo = m_pSInitializer->getInfluencerLimitTo().toInt();
|
||||
while (iter.hasNext())
|
||||
{
|
||||
iter.next();
|
||||
@@ -662,7 +664,17 @@ void SInfluencer::STInfluencer::copyInfluencerFromGroupToList()
|
||||
{
|
||||
iter2.next();
|
||||
|
||||
m_listMap.append(iter2.value());
|
||||
QList<stInfluencer> influencerList;
|
||||
|
||||
for(stInfluencer influencer : iter2.value())
|
||||
{
|
||||
if(influencer.rank < nInfluencerLimitFrom || influencer.rank > nInfluencerLimitTo)
|
||||
continue;
|
||||
|
||||
influencerList.append(influencer);
|
||||
}
|
||||
|
||||
m_listMap.append(influencerList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -778,26 +778,29 @@ void SInitializer::insertLog(const QString& _strMsg) const
|
||||
QTextStream out(&file);
|
||||
out << QTime::currentTime().toString("[hh:mm:ss] ") << _strMsg << "\n";
|
||||
file.close();
|
||||
|
||||
qDebug("[%s] %s", m_stFilterProcessGroup.m_strFilterProcessGroupName.toStdString().c_str(), _strMsg.toStdString().c_str());
|
||||
}
|
||||
|
||||
void SInitializer::insertDebugLog(const QString& _strMsg) const
|
||||
{
|
||||
/*
|
||||
if (!m_bDebug)
|
||||
return;
|
||||
|
||||
cout << "[";
|
||||
cout << m_stFilterProcessGroup.m_strFilterProcessGroupName.toStdString();
|
||||
cout << "] ";
|
||||
cout << _strMsg.toStdString() << endl;
|
||||
*/
|
||||
if (m_bDebug)
|
||||
{
|
||||
QFile file(m_stFilterProcessGroup.m_strFilterProcessGroupName + "_debug." + QDate::currentDate().toString(Qt::ISODate)+".log");
|
||||
if (!file.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append))
|
||||
return;
|
||||
|
||||
QTextStream out(&file);
|
||||
out << QTime::currentTime().toString("[hh:mm:ss] ") << _strMsg << "\n";
|
||||
file.close();
|
||||
}
|
||||
QFile file(m_stFilterProcessGroup.m_strFilterProcessGroupName + "_debug." + QDate::currentDate().toString(Qt::ISODate)+".log");
|
||||
if (!file.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append))
|
||||
return;
|
||||
|
||||
QTextStream out(&file);
|
||||
out << QTime::currentTime().toString("[hh:mm:ss] ") << _strMsg << "\n";
|
||||
file.close();
|
||||
|
||||
qDebug("[%s] %s", m_stFilterProcessGroup.m_strFilterProcessGroupName.toStdString().c_str(), _strMsg.toStdString().c_str());
|
||||
}
|
||||
|
||||
QSqlDatabase SInitializer::getDatabase(const QString& _dbName) const
|
||||
|
||||
Reference in New Issue
Block a user