Formats minimally release source files based on former clang-format
This commit is contained in:
387 files changed
+37323
-38074
No files matched your search
@@ -4,7 +4,7 @@
|
||||
#include <QtCore/QSettings>
|
||||
#include <QNetworkProxy>
|
||||
#ifndef WIN32
|
||||
#include <unistd.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include "LogViewGui.hpp"
|
||||
#include "logger.h"
|
||||
@@ -21,10 +21,13 @@ int main(int argc, char *argv[])
|
||||
s << "/proc/" << getpid() << "/exe";
|
||||
char buf[1024];
|
||||
ssize_t len = readlink(s.str().c_str(), buf, 1024);
|
||||
if(len > 0) {
|
||||
if (len > 0)
|
||||
{
|
||||
buf[len] = '\0';
|
||||
dir = buf;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
// fallback
|
||||
dir = argv[0];
|
||||
}
|
||||
@@ -32,7 +35,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
std::string::size_type pos = dir.find_last_of('/');
|
||||
if (std::string::npos != pos)
|
||||
logConfigFileName += dir.substr(0, pos + 1);;
|
||||
logConfigFileName += dir.substr(0, pos + 1);
|
||||
;
|
||||
logConfigFileName += "LogView_log4cxx.props";
|
||||
|
||||
qputenv("TDS_DEVEL", QByteArray::number(1));
|
||||
@@ -49,8 +53,9 @@ int main(int argc, char *argv[])
|
||||
settings.endGroup();
|
||||
|
||||
QScreen *screen = QGuiApplication::screens().value(screenNbr, QGuiApplication::primaryScreen());
|
||||
N_LogView::LogViewGui* logViewGui = new N_LogView::LogViewGui(nullptr);
|
||||
if (logViewGui->windowHandle()) {
|
||||
N_LogView::LogViewGui *logViewGui = new N_LogView::LogViewGui(nullptr);
|
||||
if (logViewGui->windowHandle())
|
||||
{
|
||||
logViewGui->windowHandle()->setScreen(screen);
|
||||
}
|
||||
logViewGui->show();
|
||||
@@ -59,4 +64,3 @@ int main(int argc, char *argv[])
|
||||
delete logViewGui;
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user