mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-11 23:49:38 -05:00
Merge pull request #2786 from csoler/v0.6-BugFixing_30
cleaning up debug info
This commit is contained in:
commit
746bac8325
@ -609,7 +609,9 @@ void GenCertDialog::genPerson()
|
|||||||
|
|
||||||
QCoreApplication::processEvents();
|
QCoreApplication::processEvents();
|
||||||
QAbstractEventDispatcher* ed = QAbstractEventDispatcher::instance();
|
QAbstractEventDispatcher* ed = QAbstractEventDispatcher::instance();
|
||||||
std::cout << "Waiting ed->processEvents()" << std::endl;
|
#ifdef DEBUG_GENCERTDIALOG
|
||||||
|
std::cout << "Waiting ed->processEvents()" << std::endl;
|
||||||
|
#endif
|
||||||
time_t waitEnd = time(NULL) + 10;//Wait no more than 10 sec to processEvents
|
time_t waitEnd = time(NULL) + 10;//Wait no more than 10 sec to processEvents
|
||||||
if (ed->hasPendingEvents())
|
if (ed->hasPendingEvents())
|
||||||
while(ed->processEvents(QEventLoop::AllEvents) && (time(NULL) < waitEnd));
|
while(ed->processEvents(QEventLoop::AllEvents) && (time(NULL) < waitEnd));
|
||||||
|
@ -1619,7 +1619,9 @@ bool NewFriendList::isColumnVisible(int col) const
|
|||||||
}
|
}
|
||||||
void NewFriendList::setColumnVisible(int col,bool visible)
|
void NewFriendList::setColumnVisible(int col,bool visible)
|
||||||
{
|
{
|
||||||
|
#ifdef DEBUG_NEW_FRIEND_LIST
|
||||||
std::cerr << "Setting column " << col << " to be visible: " << visible << std::endl;
|
std::cerr << "Setting column " << col << " to be visible: " << visible << std::endl;
|
||||||
|
#endif
|
||||||
ui->peerTreeWidget->setColumnHidden(col, !visible);
|
ui->peerTreeWidget->setColumnHidden(col, !visible);
|
||||||
}
|
}
|
||||||
void NewFriendList::toggleColumnVisible()
|
void NewFriendList::toggleColumnVisible()
|
||||||
|
@ -73,8 +73,9 @@ JsonApiPage::JsonApiPage(QWidget */*parent*/, Qt::WindowFlags /*flags*/)
|
|||||||
|
|
||||||
if(!je)
|
if(!je)
|
||||||
return;
|
return;
|
||||||
|
#ifdef DEBUG
|
||||||
std::cerr << "Caught JSONAPI event! code=" << static_cast<int>(je->mJsonApiEventCode) << std::endl;
|
std::cerr << "Caught JSONAPI event! code=" << static_cast<int>(je->mJsonApiEventCode) << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
RsQThreadUtils::postToObject([=]() { load(); }, this );
|
RsQThreadUtils::postToObject([=]() { load(); }, this );
|
||||||
},
|
},
|
||||||
|
@ -58,7 +58,9 @@ WebuiPage::WebuiPage(QWidget */*parent*/, Qt::WindowFlags /*flags*/)
|
|||||||
|
|
||||||
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> /* event */)
|
rsEvents->registerEventsHandler( [this](std::shared_ptr<const RsEvent> /* event */)
|
||||||
{
|
{
|
||||||
|
#ifdef DEBUG
|
||||||
std::cerr << "Caught JSONAPI event in webui!" << std::endl;
|
std::cerr << "Caught JSONAPI event in webui!" << std::endl;
|
||||||
|
#endif
|
||||||
RsQThreadUtils::postToObject([=]() { load(); }, this );
|
RsQThreadUtils::postToObject([=]() { load(); }, this );
|
||||||
},
|
},
|
||||||
mEventsHandlerId, RsEventType::JSON_API );
|
mEventsHandlerId, RsEventType::JSON_API );
|
||||||
@ -132,7 +134,9 @@ bool WebuiPage::restart()
|
|||||||
|
|
||||||
void WebuiPage::loadParams()
|
void WebuiPage::loadParams()
|
||||||
{
|
{
|
||||||
std::cerr << "WebuiPage::load()" << std::endl;
|
#ifdef DEBUG
|
||||||
|
std::cerr << "WebuiPage::load()" << std::endl;
|
||||||
|
#endif
|
||||||
whileBlocking(ui.enableWebUI_CB)->setChecked(Settings->getWebinterfaceEnabled());
|
whileBlocking(ui.enableWebUI_CB)->setChecked(Settings->getWebinterfaceEnabled());
|
||||||
whileBlocking(ui.webInterfaceFiles_LE)->setText(Settings->getWebinterfaceFilesDirectory());
|
whileBlocking(ui.webInterfaceFiles_LE)->setText(Settings->getWebinterfaceFilesDirectory());
|
||||||
|
|
||||||
|
@ -538,8 +538,9 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
|
|||||||
//
|
//
|
||||||
|
|
||||||
qRegisterMetaType<RsPeerId>("RsPeerId") ;
|
qRegisterMetaType<RsPeerId>("RsPeerId") ;
|
||||||
|
#ifdef DEBUG
|
||||||
std::cerr << "connecting signals and slots" << std::endl ;
|
std::cerr << "connecting signals and slots" << std::endl ;
|
||||||
|
#endif
|
||||||
QObject::connect(notify,SIGNAL(deferredSignatureHandlingRequested()),notify,SLOT(handleSignatureEvent()),Qt::QueuedConnection) ;
|
QObject::connect(notify,SIGNAL(deferredSignatureHandlingRequested()),notify,SLOT(handleSignatureEvent()),Qt::QueuedConnection) ;
|
||||||
QObject::connect(notify,SIGNAL(chatLobbyTimeShift(int)),notify,SLOT(handleChatLobbyTimeShift(int)),Qt::QueuedConnection) ;
|
QObject::connect(notify,SIGNAL(chatLobbyTimeShift(int)),notify,SLOT(handleChatLobbyTimeShift(int)),Qt::QueuedConnection) ;
|
||||||
QObject::connect(notify,SIGNAL(diskFull(int,int)) ,w ,SLOT(displayDiskSpaceWarning(int,int))) ;
|
QObject::connect(notify,SIGNAL(diskFull(int,int)) ,w ,SLOT(displayDiskSpaceWarning(int,int))) ;
|
||||||
@ -582,7 +583,7 @@ feenableexcept(FE_INVALID | FE_DIVBYZERO);
|
|||||||
if(!Settings->getWebinterfaceFilesDirectory().isNull())
|
if(!Settings->getWebinterfaceFilesDirectory().isNull())
|
||||||
rsWebUi->setHtmlFilesDirectory(Settings->getWebinterfaceFilesDirectory().toStdString());
|
rsWebUi->setHtmlFilesDirectory(Settings->getWebinterfaceFilesDirectory().toStdString());
|
||||||
#endif
|
#endif
|
||||||
RsInit::startupWebServices(conf);
|
RsInit::startupWebServices(conf,false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* dive into the endless loop */
|
/* dive into the endless loop */
|
||||||
|
@ -139,17 +139,22 @@ static bool notifyRunningInstance()
|
|||||||
// that a new process had been started
|
// that a new process had been started
|
||||||
QLocalSocket localSocket;
|
QLocalSocket localSocket;
|
||||||
localSocket.connectToServer(QString(TARGET));
|
localSocket.connectToServer(QString(TARGET));
|
||||||
|
#ifdef DEBUG
|
||||||
std::cerr << "Rshare::Rshare waitForConnected to other instance." << std::endl;
|
std::cerr << "Rshare::Rshare waitForConnected to other instance." << std::endl;
|
||||||
|
#endif
|
||||||
if( localSocket.waitForConnected(100) )
|
if( localSocket.waitForConnected(100) )
|
||||||
{
|
{
|
||||||
|
#ifdef DEBUG
|
||||||
std::cerr << "Rshare::Rshare Connection etablished. Waiting for disconnection." << std::endl;
|
std::cerr << "Rshare::Rshare Connection etablished. Waiting for disconnection." << std::endl;
|
||||||
|
#endif
|
||||||
localSocket.waitForDisconnected(1000);
|
localSocket.waitForDisconnected(1000);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
#ifdef DEBUG
|
||||||
std::cerr << "Rshare::Rshare failed to connect to other instance." << std::endl;
|
std::cerr << "Rshare::Rshare failed to connect to other instance." << std::endl;
|
||||||
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -264,7 +264,7 @@ int main(int argc, char* argv[])
|
|||||||
int initResult = RsInit::InitRetroShare(conf);
|
int initResult = RsInit::InitRetroShare(conf);
|
||||||
|
|
||||||
#ifdef RS_JSONAPI
|
#ifdef RS_JSONAPI
|
||||||
RsInit::startupWebServices(conf);
|
RsInit::startupWebServices(conf,true);
|
||||||
rstime::rs_usleep(1000000); // waits for jas->restart to print stuff
|
rstime::rs_usleep(1000000); // waits for jas->restart to print stuff
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -290,12 +290,12 @@ int main(int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::cout << std::endl << std::endl
|
std::cout << std::endl << std::endl
|
||||||
<< colored(COLOR_GREEN,"Available accounts:") << std::endl;
|
<< colored(COLOR_GREEN,"Available accounts:") << std::endl<<std::endl;
|
||||||
|
|
||||||
int accountCountDigits = static_cast<int>( ceil(log(locations.size())/log(10.0)) );
|
int accountCountDigits = static_cast<int>( ceil(log(locations.size())/log(10.0)) );
|
||||||
|
|
||||||
for( uint32_t i=0; i<locations.size(); ++i )
|
for( uint32_t i=0; i<locations.size(); ++i )
|
||||||
std::cout << colored(COLOR_GREEN,"[" + RsUtil::NumberToString(i+1,false,'0',accountCountDigits)+"]") << " "
|
std::cout << colored(COLOR_GREEN," [" + RsUtil::NumberToString(i+1,false,'0',accountCountDigits)+"]") << " "
|
||||||
<< colored(COLOR_YELLOW,locations[i].mLocationId.toStdString())<< " "
|
<< colored(COLOR_YELLOW,locations[i].mLocationId.toStdString())<< " "
|
||||||
<< colored(COLOR_BLUE,"(" + locations[i].mPgpId.toStdString()+ "): ")
|
<< colored(COLOR_BLUE,"(" + locations[i].mPgpId.toStdString()+ "): ")
|
||||||
<< colored(COLOR_PURPLE,locations[i].mPgpName + " (" + locations[i].mLocationName + ")" )
|
<< colored(COLOR_PURPLE,locations[i].mPgpName + " (" + locations[i].mLocationName + ")" )
|
||||||
|
Loading…
Reference in New Issue
Block a user