mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 10:22:52 +00:00
generic: prepare for Katie changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
c10c11bd76
commit
45dcabf7f8
106 changed files with 466 additions and 462 deletions
|
@ -60,7 +60,7 @@ public:
|
|||
{
|
||||
/// returns the next store available for scanning
|
||||
|
||||
kDebug() << "propagate: " << url << endl;
|
||||
kDebug() << "propagate: " << url;
|
||||
|
||||
if (parent) {
|
||||
parent->folder->append(folder);
|
||||
|
@ -106,7 +106,7 @@ RemoteLister::~RemoteLister()
|
|||
void
|
||||
RemoteLister::completed()
|
||||
{
|
||||
kDebug() << "completed: " << url().prettyUrl() << endl;
|
||||
kDebug() << "completed: " << url().prettyUrl();
|
||||
|
||||
// Delay the call to _completed since it can do a "delete this"
|
||||
QTimer::singleShot(0, this, SLOT(_completed()));
|
||||
|
@ -115,7 +115,7 @@ RemoteLister::completed()
|
|||
void
|
||||
RemoteLister::canceled()
|
||||
{
|
||||
kDebug() << "canceled: " << url().prettyUrl() << endl;
|
||||
kDebug() << "canceled: " << url().prettyUrl();
|
||||
|
||||
QTimer::singleShot(0, this, SLOT(_completed()));
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ RemoteLister::_completed()
|
|||
currentStore->stores.erase(first);
|
||||
|
||||
//this returns _immediately_
|
||||
kDebug() << "scanning: " << url << endl;
|
||||
kDebug() << "scanning: " << url;
|
||||
openUrl(url);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -48,7 +48,7 @@ ScanManager::ScanManager(QObject *parent)
|
|||
ScanManager::~ScanManager()
|
||||
{
|
||||
if (m_thread) {
|
||||
kDebug() << "Attempting to abort scan operation..." << endl;
|
||||
kDebug() << "Attempting to abort scan operation...";
|
||||
m_abort = true;
|
||||
m_thread->wait();
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ bool ScanManager::start(const KUrl &url)
|
|||
|
||||
//url is guaranteed clean and safe
|
||||
|
||||
kDebug() << "Scan requested for: " << url.prettyUrl() << endl;
|
||||
kDebug() << "Scan requested for: " << url.prettyUrl();
|
||||
|
||||
if (running()) {
|
||||
kWarning() << "Tried to launch two concurrent scans, aborting old one...";
|
||||
|
@ -101,7 +101,7 @@ bool ScanManager::start(const KUrl &url)
|
|||
{
|
||||
//find a pointer to the requested branch
|
||||
|
||||
kDebug() << "Cache-(a)hit: " << cachePath << endl;
|
||||
kDebug() << "Cache-(a)hit: " << cachePath;
|
||||
|
||||
QStringList split = path.mid(cachePath.length()).split(QLatin1Char( '/' ));
|
||||
Folder *d = *it;
|
||||
|
@ -132,7 +132,7 @@ bool ScanManager::start(const KUrl &url)
|
|||
delete trees;
|
||||
|
||||
//we found a completed tree, thus no need to scan
|
||||
kDebug() << "Found cache-handle, generating map.." << endl;
|
||||
kDebug() << "Found cache-handle, generating map..";
|
||||
|
||||
emit branchCacheHit(d);
|
||||
|
||||
|
@ -148,7 +148,7 @@ bool ScanManager::start(const KUrl &url)
|
|||
}
|
||||
else if (cachePath.startsWith(path)) //then part of the requested tree is already scanned
|
||||
{
|
||||
kDebug() << "Cache-(b)hit: " << cachePath << endl;
|
||||
kDebug() << "Cache-(b)hit: " << cachePath;
|
||||
it.transferTo(*trees);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ CrontabPrinter::~CrontabPrinter() {
|
|||
}
|
||||
|
||||
bool CrontabPrinter::start() {
|
||||
logDebug() << "Printing selection..." << endl;
|
||||
logDebug() << "Printing selection...";
|
||||
|
||||
if (d->printer == NULL) {
|
||||
d->printer = new QPrinter();
|
||||
|
@ -94,7 +94,7 @@ bool CrontabPrinter::start() {
|
|||
// initialize the printer using the print dialog
|
||||
QPrintDialog *printDialog = KdePrint::createPrintDialog(d->printer, d->crontabWidget);
|
||||
if (printDialog->exec() == QDialog::Rejected) {
|
||||
logDebug() << "Printing canceled" << endl;
|
||||
logDebug() << "Printing canceled";
|
||||
delete printDialog;
|
||||
return false;
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ void CrontabPrinter::finish() {
|
|||
}
|
||||
|
||||
void CrontabPrinter::printPageNumber() {
|
||||
logDebug() << "Printing page number..." << endl;
|
||||
logDebug() << "Printing page number...";
|
||||
|
||||
d->painter->translate(0, - d->currentRowPosition);
|
||||
d->printView->moveTo(QPoint(0, d->printView->height()) );
|
||||
|
@ -384,12 +384,12 @@ QList<int> CrontabPrinter::findColumnWidths(const QList<QStringList>& contents,
|
|||
|
||||
int columnWidthSum = 0;
|
||||
foreach(int width, columnWidths) {
|
||||
logDebug() << "Column : " << width << endl;
|
||||
logDebug() << "Column : " << width;
|
||||
columnWidthSum += width;
|
||||
}
|
||||
|
||||
if (columnWidthSum >= pageWidth) {
|
||||
logDebug() << "The printing could be out of the page" << endl;
|
||||
logDebug() << "The printing could be out of the page";
|
||||
return columnWidths;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,13 +119,13 @@ CrontabWidget::CrontabWidget(QWidget* parent, CTHost* ctHost) :
|
|||
|
||||
initialize();
|
||||
|
||||
logDebug() << "Clipboard Status " << hasClipboardContent() << endl;
|
||||
logDebug() << "Clipboard Status " << hasClipboardContent();
|
||||
|
||||
d->tasksWidget->setFocus();
|
||||
|
||||
QTreeWidgetItem* item = d->tasksWidget->treeWidget()->topLevelItem(0);
|
||||
if (item != NULL) {
|
||||
logDebug() << "First item found" << d->tasksWidget->treeWidget()->topLevelItemCount() << endl;
|
||||
logDebug() << "First item found" << d->tasksWidget->treeWidget()->topLevelItemCount();
|
||||
item->setSelected(true);
|
||||
}
|
||||
|
||||
|
@ -209,9 +209,9 @@ QHBoxLayout* CrontabWidget::createCronSelector() {
|
|||
void CrontabWidget::initialize() {
|
||||
QVBoxLayout* layout = new QVBoxLayout(this);
|
||||
|
||||
logDebug() << "Begin view refresh" << endl;
|
||||
logDebug() << "Begin view refresh";
|
||||
|
||||
logDebug() << "Creating Tasks list..." << endl;
|
||||
logDebug() << "Creating Tasks list...";
|
||||
|
||||
QHBoxLayout* cronSelector = createCronSelector();
|
||||
layout->addLayout(cronSelector);
|
||||
|
@ -240,7 +240,7 @@ void CrontabWidget::refreshCron() {
|
|||
d->variablesWidget->refreshVariables(ctCron);
|
||||
|
||||
if (ctCron->isMultiUserCron() && ctHost()->isRootUser()==false) {
|
||||
logDebug() << "Disabling view..." << endl;
|
||||
logDebug() << "Disabling view...";
|
||||
|
||||
d->tasksWidget->treeWidget()->setEnabled(false);
|
||||
d->variablesWidget->treeWidget()->setEnabled(false);
|
||||
|
@ -251,7 +251,7 @@ void CrontabWidget::refreshCron() {
|
|||
d->tasksWidget->toggleRunNowAction(false);
|
||||
}
|
||||
else {
|
||||
logDebug() << "Enabling view..." << endl;
|
||||
logDebug() << "Enabling view...";
|
||||
|
||||
d->tasksWidget->treeWidget()->setEnabled(true);
|
||||
d->variablesWidget->treeWidget()->setEnabled(true);
|
||||
|
@ -276,7 +276,7 @@ void CrontabWidget::copy() {
|
|||
QString clipboardText;
|
||||
|
||||
if (d->tasksWidget->treeWidget()->hasFocus()) {
|
||||
logDebug() << "Tasks copying" << endl;
|
||||
logDebug() << "Tasks copying";
|
||||
|
||||
QList<TaskWidget*> tasksWidget = d->tasksWidget->selectedTasksWidget();
|
||||
foreach(TaskWidget* taskWidget, tasksWidget) {
|
||||
|
@ -288,7 +288,7 @@ void CrontabWidget::copy() {
|
|||
}
|
||||
|
||||
if (d->variablesWidget->treeWidget()->hasFocus()) {
|
||||
logDebug() << "Variables copying" << endl;
|
||||
logDebug() << "Variables copying";
|
||||
|
||||
QList<VariableWidget*> variablesWidget = d->variablesWidget->selectedVariablesWidget();
|
||||
foreach(VariableWidget* variableWidget, variablesWidget) {
|
||||
|
@ -302,28 +302,28 @@ void CrontabWidget::copy() {
|
|||
QApplication::clipboard()->setText(clipboardText, QClipboard::Clipboard);
|
||||
QApplication::clipboard()->setText(clipboardText, QClipboard::Selection);
|
||||
|
||||
logDebug() << "Clipboard Status " << hasClipboardContent() << endl;
|
||||
logDebug() << "Clipboard Status " << hasClipboardContent();
|
||||
togglePasteAction(hasClipboardContent());
|
||||
}
|
||||
|
||||
void CrontabWidget::cut() {
|
||||
logDebug() << "Cut content" << endl;
|
||||
logDebug() << "Cut content";
|
||||
|
||||
copy();
|
||||
|
||||
if (d->tasksWidget->treeWidget()->hasFocus()) {
|
||||
logDebug() << "Tasks cutting" << endl;
|
||||
logDebug() << "Tasks cutting";
|
||||
d->tasksWidget->deleteSelection();
|
||||
}
|
||||
|
||||
if (d->variablesWidget->treeWidget()->hasFocus()) {
|
||||
logDebug() << "Variables cutting" << endl;
|
||||
logDebug() << "Variables cutting";
|
||||
d->variablesWidget->deleteSelection();
|
||||
}
|
||||
}
|
||||
|
||||
void CrontabWidget::paste() {
|
||||
logDebug() << "Paste content" << endl;
|
||||
logDebug() << "Paste content";
|
||||
|
||||
if (d->tasksWidget->treeWidget()->hasFocus()) {
|
||||
foreach(CTTask* task, d->clipboardTasks) {
|
||||
|
@ -346,7 +346,7 @@ CTCron* CrontabWidget::currentCron() const {
|
|||
return d->ctHost->findSystemCron();
|
||||
|
||||
if (d->otherUsers->currentIndex() == d->otherUsers->count()-1) {
|
||||
logDebug() << "Using Global Cron" << endl;
|
||||
logDebug() << "Using Global Cron";
|
||||
return d->ctGlobalCron;
|
||||
}
|
||||
|
||||
|
@ -373,7 +373,7 @@ void CrontabWidget::checkOtherUsers() {
|
|||
}
|
||||
|
||||
void CrontabWidget::setupActions() {
|
||||
logDebug() << "Setup actions" << endl;
|
||||
logDebug() << "Setup actions";
|
||||
|
||||
//Edit menu
|
||||
d->cutAction = KStandardAction::cut(this, SLOT(cut()), this);
|
||||
|
@ -381,7 +381,7 @@ void CrontabWidget::setupActions() {
|
|||
d->pasteAction = KStandardAction::paste(this, SLOT(paste()), this);
|
||||
togglePasteAction(false);
|
||||
|
||||
logDebug() << "Actions initialized" << endl;
|
||||
logDebug() << "Actions initialized";
|
||||
|
||||
}
|
||||
|
||||
|
@ -417,7 +417,7 @@ void CrontabWidget::print() {
|
|||
CrontabPrinter printer(this);
|
||||
|
||||
if (printer.start() == false) {
|
||||
logDebug() << "Unable to start printer" << endl;
|
||||
logDebug() << "Unable to start printer";
|
||||
return;
|
||||
}
|
||||
printer.printTasks();
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
CTGlobalCron::CTGlobalCron(CTHost* _ctHost) :
|
||||
CTCron() {
|
||||
|
||||
logDebug() << "Initializing CTGlobalCron" << endl;
|
||||
logDebug() << "Initializing CTGlobalCron";
|
||||
|
||||
d->multiUserCron = true;
|
||||
d->systemCron = false;
|
||||
|
@ -46,7 +46,7 @@ CTGlobalCron::~CTGlobalCron() {
|
|||
}
|
||||
|
||||
QList<CTTask*> CTGlobalCron::tasks() const {
|
||||
logDebug() << "Global Cron Tasks" << endl;
|
||||
logDebug() << "Global Cron Tasks";
|
||||
QList<CTTask*> tasks;
|
||||
|
||||
foreach(CTCron* cron, ctHost->crons) {
|
||||
|
@ -61,7 +61,7 @@ QList<CTTask*> CTGlobalCron::tasks() const {
|
|||
}
|
||||
|
||||
QList<CTVariable*> CTGlobalCron::variables() const {
|
||||
logDebug() << "Global Cron Variables" << endl;
|
||||
logDebug() << "Global Cron Variables";
|
||||
QList<CTVariable*> variables;
|
||||
|
||||
foreach(CTCron* cron, ctHost->crons) {
|
||||
|
@ -77,14 +77,14 @@ QList<CTVariable*> CTGlobalCron::variables() const {
|
|||
}
|
||||
|
||||
void CTGlobalCron::addTask(CTTask* task) {
|
||||
logDebug() << "Global Cron addTask" << endl;
|
||||
logDebug() << "Global Cron addTask";
|
||||
|
||||
CTCron* actualCron = ctHost->findUserCron(task->userLogin);
|
||||
actualCron->addTask(task);
|
||||
}
|
||||
|
||||
void CTGlobalCron::addVariable(CTVariable* variable) {
|
||||
logDebug() << "Global Cron addVariable" << endl;
|
||||
logDebug() << "Global Cron addVariable";
|
||||
|
||||
CTCron* actualCron = ctHost->findUserCron(variable->userLogin);
|
||||
actualCron->addVariable(variable);
|
||||
|
@ -92,7 +92,7 @@ void CTGlobalCron::addVariable(CTVariable* variable) {
|
|||
|
||||
|
||||
void CTGlobalCron::modifyTask(CTTask* task) {
|
||||
logDebug() << "Global Cron modifyTask" << endl;
|
||||
logDebug() << "Global Cron modifyTask";
|
||||
|
||||
CTCron* actualCron = ctHost->findCronContaining(task);
|
||||
|
||||
|
@ -111,7 +111,7 @@ void CTGlobalCron::modifyTask(CTTask* task) {
|
|||
}
|
||||
|
||||
void CTGlobalCron::modifyVariable(CTVariable* variable) {
|
||||
logDebug() << "Global Cron modifyVariable" << endl;
|
||||
logDebug() << "Global Cron modifyVariable";
|
||||
|
||||
CTCron* actualCron = ctHost->findCronContaining(variable);
|
||||
|
||||
|
@ -130,14 +130,14 @@ void CTGlobalCron::modifyVariable(CTVariable* variable) {
|
|||
}
|
||||
|
||||
void CTGlobalCron::removeTask(CTTask* task) {
|
||||
logDebug() << "Global Cron removeTask" << endl;
|
||||
logDebug() << "Global Cron removeTask";
|
||||
|
||||
CTCron* actualCron = ctHost->findCronContaining(task);
|
||||
actualCron->removeTask(task);
|
||||
}
|
||||
|
||||
void CTGlobalCron::removeVariable(CTVariable* variable) {
|
||||
logDebug() << "Global Cron removeVariable" << endl;
|
||||
logDebug() << "Global Cron removeVariable";
|
||||
|
||||
CTCron* actualCron = ctHost->findCronContaining(variable);
|
||||
actualCron->removeVariable(variable);
|
||||
|
|
|
@ -102,7 +102,7 @@ CTCron::CTCron(const QString& crontabBinary, const struct passwd* userInfos, boo
|
|||
|
||||
if (initializeFromUserInfos(userInfos) == false) {
|
||||
ctInitializationError.setErrorMessage(i18n("No password entry found for uid '%1'", getuid()));
|
||||
logDebug() << "Error in crontab creation of" << userInfos->pw_name << endl;
|
||||
logDebug() << "Error in crontab creation of" << userInfos->pw_name;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -112,9 +112,9 @@ CTCron::CTCron(const QString& crontabBinary, const struct passwd* userInfos, boo
|
|||
this->parseFile(d->tmpFileName);
|
||||
}
|
||||
else {
|
||||
logDebug() << "Error when executing command" << commandLineStatus.commandLine << endl;
|
||||
logDebug() << "Standard output :" << commandLineStatus.standardOutput << endl;
|
||||
logDebug() << "Standard error :" << commandLineStatus.standardError << endl;
|
||||
logDebug() << "Error when executing command" << commandLineStatus.commandLine;
|
||||
logDebug() << "Standard output :" << commandLineStatus.standardOutput;
|
||||
logDebug() << "Standard error :" << commandLineStatus.standardError;
|
||||
}
|
||||
|
||||
d->initialTaskCount = d->task.size();
|
||||
|
@ -141,7 +141,7 @@ CTCron& CTCron::operator = (const CTCron& source) {
|
|||
return *this;
|
||||
|
||||
if (source.isSystemCron() == true) {
|
||||
logDebug() << "Affect the system cron" << endl;
|
||||
logDebug() << "Affect the system cron";
|
||||
}
|
||||
|
||||
d->variable.clear();
|
||||
|
@ -262,7 +262,7 @@ bool CTCron::saveToFile(const QString& fileName) {
|
|||
return false;
|
||||
}
|
||||
|
||||
//logDebug() << exportCron() << endl;
|
||||
//logDebug() << exportCron();
|
||||
|
||||
QTextStream out(&file);
|
||||
out << exportCron();
|
||||
|
@ -390,7 +390,7 @@ void CTCron::addTask(CTTask* task) {
|
|||
task->setSystemCrontab(false);
|
||||
}
|
||||
|
||||
logDebug() << "Adding task" << task->comment << " user : "<< task->userLogin << endl;
|
||||
logDebug() << "Adding task" << task->comment << " user : "<< task->userLogin;
|
||||
|
||||
d->task.append(task);
|
||||
}
|
||||
|
@ -402,7 +402,7 @@ void CTCron::addVariable(CTVariable* variable) {
|
|||
variable->userLogin = d->userLogin;
|
||||
|
||||
|
||||
logDebug() << "Adding variable" << variable->variable << " user : "<< variable->userLogin << endl;
|
||||
logDebug() << "Adding variable" << variable->variable << " user : "<< variable->userLogin;
|
||||
|
||||
d->variable.append(variable);
|
||||
}
|
||||
|
|
|
@ -129,7 +129,7 @@ bool CTHost::allowDeny(char *name) {
|
|||
|
||||
CTSaveStatus CTHost::save() {
|
||||
if (isRootUser() == false) {
|
||||
logDebug() << "Save current user cron" << endl;
|
||||
logDebug() << "Save current user cron";
|
||||
CTCron* ctCron = findCurrentUserCron();
|
||||
|
||||
return ctCron->save();
|
||||
|
@ -196,7 +196,7 @@ CTCron* CTHost::findCurrentUserCron() const {
|
|||
return ctCron;
|
||||
}
|
||||
|
||||
logDebug() << "Unable to find the current user Cron. Please report this bug and your crontab config to the developers" << endl;
|
||||
logDebug() << "Unable to find the current user Cron. Please report this bug and your crontab config to the developers";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -206,7 +206,7 @@ CTCron* CTHost::findSystemCron() const {
|
|||
return ctCron;
|
||||
}
|
||||
|
||||
logDebug() << "Unable to find the system Cron. Please report this bug and your crontab config to the developers" << endl;
|
||||
logDebug() << "Unable to find the system Cron. Please report this bug and your crontab config to the developers";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -216,7 +216,7 @@ CTCron* CTHost::findUserCron(const QString& userLogin) const {
|
|||
return ctCron;
|
||||
}
|
||||
|
||||
logDebug() << "Unable to find the user Cron " << userLogin << ". Please report this bug and your crontab config to the developers" << endl;
|
||||
logDebug() << "Unable to find the user Cron " << userLogin << ". Please report this bug and your crontab config to the developers";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -227,7 +227,7 @@ CTCron* CTHost::findCronContaining(CTTask* ctTask) const {
|
|||
}
|
||||
}
|
||||
|
||||
logDebug() << "Unable to find the cron of this task. Please report this bug and your crontab config to the developers" << endl;
|
||||
logDebug() << "Unable to find the cron of this task. Please report this bug and your crontab config to the developers";
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
@ -239,7 +239,7 @@ CTCron* CTHost::findCronContaining(CTVariable* ctVariable) const {
|
|||
}
|
||||
}
|
||||
|
||||
logDebug() << "Unable to find the cron of this variable. Please report this bug and your crontab config to the developers" << endl;
|
||||
logDebug() << "Unable to find the cron of this variable. Please report this bug and your crontab config to the developers";
|
||||
return NULL;
|
||||
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ CTTask::CTTask(const QString& tokenString, const QString& _comment, const QStrin
|
|||
// If reboot bypass initialize functions so no keys selected in modify task
|
||||
if (reboot == false) {
|
||||
|
||||
//logDebug() << "Line : " << tokStr << endl;
|
||||
//logDebug() << "Line : " << tokStr;
|
||||
minute.initialize(tokStr.mid(0, spacePos));
|
||||
|
||||
while (isSpace(tokStr, spacePos+1))
|
||||
|
@ -353,7 +353,7 @@ QPixmap CTTask::commandIcon() const {
|
|||
KUrl commandPath(completeCommandPath());
|
||||
|
||||
KMimeType::Ptr mimeType = KMimeType::findByUrl(commandPath);
|
||||
//logDebug() << mimeType->name() << endl;
|
||||
//logDebug() << mimeType->name();
|
||||
if (mimeType->name() == QLatin1String( "application/x-executable" ) || mimeType->name() == QLatin1String( "application/octet-stream" )) {
|
||||
|
||||
//The next line is identical as SmallIcon(commandPath.fileName()), but is able to return a isNull() QPixmap
|
||||
|
|
|
@ -99,7 +99,7 @@ GenericListWidget::GenericListWidget(CrontabWidget* crontabWidget, const QString
|
|||
|
||||
mainLayout->addLayout(treeLayout);
|
||||
|
||||
logDebug() << "Generic list created" << endl;
|
||||
logDebug() << "Generic list created";
|
||||
connect(treeWidget(), SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), SLOT(modifySelection(QTreeWidgetItem*,int)));
|
||||
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ KCMCron::KCMCron(QWidget* parent, const QVariantList& /*args*/) :
|
|||
|
||||
d->crontabWidget = new CrontabWidget(this, d->ctHost);
|
||||
|
||||
logDebug() << "Crontab Widget initialized" << endl;
|
||||
logDebug() << "Crontab Widget initialized";
|
||||
|
||||
connect(d->crontabWidget->tasksWidget(), SIGNAL(taskModified(bool)), this, SIGNAL(changed(bool)));
|
||||
connect(d->crontabWidget->variablesWidget(), SIGNAL(variableModified(bool)), this, SIGNAL(changed(bool)));
|
||||
|
@ -117,13 +117,13 @@ KCMCron::~KCMCron() {
|
|||
}
|
||||
|
||||
void KCMCron::load() {
|
||||
logDebug() << "Calling load" << endl;
|
||||
logDebug() << "Calling load";
|
||||
|
||||
d->ctHost->cancel();
|
||||
}
|
||||
|
||||
void KCMCron::save() {
|
||||
logDebug() << "Saving crontab..." << endl;
|
||||
logDebug() << "Saving crontab...";
|
||||
|
||||
CTSaveStatus saveStatus = d->ctHost->save();
|
||||
if (saveStatus.isError() == true) {
|
||||
|
@ -133,7 +133,7 @@ void KCMCron::save() {
|
|||
}
|
||||
|
||||
void KCMCron::defaults() {
|
||||
logDebug() << "Loading defaults" << endl;
|
||||
logDebug() << "Loading defaults";
|
||||
|
||||
d->ctHost->cancel();
|
||||
}
|
||||
|
|
|
@ -369,12 +369,12 @@ bool TaskEditorDialog::canReduceMinutesGroup() {
|
|||
|
||||
void TaskEditorDialog::emptyMinutesGroup() {
|
||||
|
||||
logDebug() << "Empty minutes layout" << endl;
|
||||
logDebug() << "Empty minutes layout";
|
||||
|
||||
for (int minuteIndex = 0; minuteIndex<=minuteTotal; ++minuteIndex ) {
|
||||
minutesLayout->removeWidget(minuteButtons[minuteIndex]);
|
||||
minuteButtons[minuteIndex]->hide();
|
||||
logDebug() << "Layout count" << minutesLayout->count() << endl;
|
||||
logDebug() << "Layout count" << minutesLayout->count();
|
||||
}
|
||||
|
||||
minutesLayout->removeItem(minutesPreselectionLayout);
|
||||
|
@ -393,7 +393,7 @@ void TaskEditorDialog::increaseMinutesGroup() {
|
|||
*/
|
||||
emptyMinutesGroup();
|
||||
|
||||
logDebug() << "Show all minutes" << endl;
|
||||
logDebug() << "Show all minutes";
|
||||
|
||||
int minuteIndex = 0;
|
||||
for (int row = 0; row < (minuteTotal+1)/minutePerColumn; ++row) {
|
||||
|
@ -411,7 +411,7 @@ void TaskEditorDialog::increaseMinutesGroup() {
|
|||
}
|
||||
|
||||
void TaskEditorDialog::reduceMinutesGroup() {
|
||||
logDebug() << "Reducing view" << endl;
|
||||
logDebug() << "Reducing view";
|
||||
|
||||
emptyMinutesGroup();
|
||||
|
||||
|
@ -430,7 +430,7 @@ void TaskEditorDialog::reduceMinutesGroup() {
|
|||
}
|
||||
}
|
||||
else {
|
||||
logDebug() << "Reducing id" << minuteIndex << endl;
|
||||
logDebug() << "Reducing id" << minuteIndex;
|
||||
ctTask->minute.setEnabled(minuteIndex, false);
|
||||
minuteButtons[minuteIndex]->setChecked(false);
|
||||
|
||||
|
@ -456,7 +456,7 @@ NumberPushButton* TaskEditorDialog::createMinuteButton(int minuteIndex) {
|
|||
}
|
||||
|
||||
void TaskEditorDialog::createMinutesGroup(QWidget* main) {
|
||||
logDebug() << "Creating minutes group" << endl;
|
||||
logDebug() << "Creating minutes group";
|
||||
|
||||
minutesGroup = new QGroupBox( i18n("Minutes"), main);
|
||||
|
||||
|
@ -497,7 +497,7 @@ void TaskEditorDialog::createMinutesGroup(QWidget* main) {
|
|||
reduceMinutesGroup();
|
||||
}
|
||||
|
||||
logDebug() << "Minutes group created" << endl;
|
||||
logDebug() << "Minutes group created";
|
||||
}
|
||||
|
||||
NumberPushButton* TaskEditorDialog::createHourButton(QGroupBox* hoursGroup, int hour) {
|
||||
|
@ -514,7 +514,7 @@ NumberPushButton* TaskEditorDialog::createHourButton(QGroupBox* hoursGroup, int
|
|||
|
||||
QGroupBox* TaskEditorDialog::createHoursGroup(QWidget* main) {
|
||||
|
||||
logDebug() << "Creating hours group" << endl;
|
||||
logDebug() << "Creating hours group";
|
||||
QGroupBox* hoursGroup = new QGroupBox(i18n("Hours"), main);
|
||||
|
||||
QGridLayout* hoursLayout = new QGridLayout(hoursGroup); //5 x 7
|
||||
|
@ -547,7 +547,7 @@ QGroupBox* TaskEditorDialog::createHoursGroup(QWidget* main) {
|
|||
connect(allHours, SIGNAL(clicked()), SLOT(slotAllHours()));
|
||||
connect(allHours, SIGNAL(clicked()), SLOT(slotWizard()));
|
||||
|
||||
logDebug() << "Create hours group" << endl;
|
||||
logDebug() << "Create hours group";
|
||||
return hoursGroup;
|
||||
}
|
||||
|
||||
|
@ -725,7 +725,7 @@ bool TaskEditorDialog::checkCommand() {
|
|||
QString path = pathCommand.at(0);
|
||||
QString binaryCommand = pathCommand.at(1);
|
||||
|
||||
logDebug() << "Looking for " << binaryCommand << "in" << path << endl;
|
||||
logDebug() << "Looking for " << binaryCommand << "in" << path;
|
||||
|
||||
bool found = false;
|
||||
bool exec = false;
|
||||
|
@ -977,7 +977,7 @@ void TaskEditorDialog::slotHourChanged() {
|
|||
void TaskEditorDialog::slotMinutesPreselection(int index) {
|
||||
QVariant itemData = minutesPreselection->itemData(index);
|
||||
int step = itemData.toInt();
|
||||
logDebug() << "Selected step " << step << endl;
|
||||
logDebug() << "Selected step " << step;
|
||||
|
||||
if (step == -1) {
|
||||
//Unselect everything
|
||||
|
|
|
@ -66,7 +66,7 @@ TasksWidget::TasksWidget(CrontabWidget* crontabWidget) :
|
|||
|
||||
connect(treeWidget(), SIGNAL(itemSelectionChanged()), this, SLOT(changeCurrentSelection()));
|
||||
|
||||
logDebug() << "Tasks list created" << endl;
|
||||
logDebug() << "Tasks list created";
|
||||
}
|
||||
|
||||
TasksWidget::~TasksWidget() {
|
||||
|
@ -112,7 +112,7 @@ void TasksWidget::runTaskNow() const {
|
|||
|
||||
CTCron* ctCron = crontabWidget()->currentCron();
|
||||
if (ctCron == NULL) {
|
||||
logDebug() << "Unable to find the related CtCron, please report this bug to KCron developer" << endl;
|
||||
logDebug() << "Unable to find the related CtCron, please report this bug to KCron developer";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -188,12 +188,12 @@ void TasksWidget::modifySelection(QTreeWidgetItem* item, int position) {
|
|||
|
||||
}
|
||||
|
||||
logDebug() << "End of modification" << endl;
|
||||
logDebug() << "End of modification";
|
||||
|
||||
}
|
||||
|
||||
void TasksWidget::deleteSelection() {
|
||||
logDebug() << "Selection deleting..." << endl;
|
||||
logDebug() << "Selection deleting...";
|
||||
|
||||
QList<QTreeWidgetItem*> tasksItems = treeWidget()->selectedItems();
|
||||
|
||||
|
@ -214,7 +214,7 @@ void TasksWidget::deleteSelection() {
|
|||
changeCurrentSelection();
|
||||
}
|
||||
|
||||
logDebug() << "End of deletion" << endl;
|
||||
logDebug() << "End of deletion";
|
||||
}
|
||||
|
||||
void TasksWidget::refreshTasks(CTCron* cron) {
|
||||
|
@ -336,7 +336,7 @@ void TasksWidget::toggleNewEntryAction(bool state) {
|
|||
}
|
||||
|
||||
void TasksWidget::changeCurrentSelection() {
|
||||
//logDebug() << "Change selection..." << endl;
|
||||
//logDebug() << "Change selection...";
|
||||
|
||||
if (treeWidget()->topLevelItemCount()==0) {
|
||||
togglePrintAction(false);
|
||||
|
|
|
@ -57,7 +57,7 @@ VariablesWidget::VariablesWidget(CrontabWidget* crontabWidget) :
|
|||
|
||||
connect(treeWidget(), SIGNAL(itemSelectionChanged()), this, SLOT(changeCurrentSelection()));
|
||||
|
||||
logDebug() << "Variables list created" << endl;
|
||||
logDebug() << "Variables list created";
|
||||
|
||||
}
|
||||
|
||||
|
@ -170,7 +170,7 @@ void VariablesWidget::createVariable() {
|
|||
}
|
||||
|
||||
void VariablesWidget::addVariable(CTVariable* variable) {
|
||||
logDebug() << "Add a new variable" << endl;
|
||||
logDebug() << "Add a new variable";
|
||||
crontabWidget()->currentCron()->addVariable(variable);
|
||||
new VariableWidget(this, variable);
|
||||
|
||||
|
@ -262,7 +262,7 @@ void VariablesWidget::toggleNewEntryAction(bool state) {
|
|||
}
|
||||
|
||||
void VariablesWidget::changeCurrentSelection() {
|
||||
logDebug() << "Change selection..." << endl;
|
||||
logDebug() << "Change selection...";
|
||||
|
||||
bool enabled;
|
||||
if (treeWidget()->selectedItems().isEmpty())
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
|
||||
#include <QFile>
|
||||
#include <QTextDocument>
|
||||
#include <QTextStream>
|
||||
|
||||
class KDirWatch;
|
||||
class FileWatcherTextItem;
|
||||
|
||||
|
|
|
@ -527,7 +527,7 @@ int TaskGroupItem::count() const
|
|||
|
||||
AbstractTaskItem *TaskGroupItem::createAbstractItem(TaskManager::AbstractGroupableItem *groupableItem)
|
||||
{
|
||||
//kDebug() << "item to create" << groupableItem << endl;
|
||||
//kDebug() << "item to create" << groupableItem;
|
||||
AbstractTaskItem *item = 0;
|
||||
|
||||
if (groupableItem->itemType() == TaskManager::GroupItemType) {
|
||||
|
|
|
@ -176,7 +176,7 @@ TransferHandler * KGet::addTransfer(KUrl srcUrl, QString destDir, QString sugges
|
|||
{
|
||||
srcUrl = mostLocalUrl(srcUrl);
|
||||
// Note: destDir may actually be a full path to a file :-(
|
||||
kDebug(5001) << "Source:" << srcUrl.url() << ", dest: " << destDir << ", sugg file: " << suggestedFileName << endl;
|
||||
kDebug(5001) << "Source:" << srcUrl.url() << ", dest: " << destDir << ", sugg file: " << suggestedFileName;
|
||||
|
||||
KUrl destUrl; // the final destination, including filename
|
||||
|
||||
|
@ -1140,9 +1140,9 @@ void KGet::loadPlugins()
|
|||
for ( int i = 0; i < offers.count(); ++i )
|
||||
{
|
||||
services[ offers[i]->property( "X-KDE-KGet-rank" ).toInt() ] = offers[i];
|
||||
kDebug(5001) << " TransferFactory plugin found:" << endl <<
|
||||
" rank = " << offers[i]->property( "X-KDE-KGet-rank" ).toInt() << endl <<
|
||||
" plugintype = " << offers[i]->property( "X-KDE-KGet-plugintype" ) << endl;
|
||||
kDebug(5001) << " TransferFactory plugin found:\n" <<
|
||||
" rank = " << offers[i]->property( "X-KDE-KGet-rank" ).toInt() << '\n' <<
|
||||
" plugintype = " << offers[i]->property( "X-KDE-KGet-plugintype" );
|
||||
}
|
||||
|
||||
//I must fill this pluginList before and my m_transferFactories list after.
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "core/transferhistorystore_xml_p.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QTextStream>
|
||||
#include <QtXml/qdom.h>
|
||||
#include <QFile>
|
||||
#include <QThread>
|
||||
|
|
|
@ -604,7 +604,7 @@ bool TransferTreeModel::dropMimeData(const QMimeData * mdata, Qt::DropAction act
|
|||
|
||||
if (parent.isValid())
|
||||
kDebug(5001) << "TransferTreeModel::dropMimeData" << " " << row << " "
|
||||
<< column << endl;
|
||||
<< column;
|
||||
|
||||
QList<QWeakPointer<TransferHandler> > transfers = itemData->transfers();
|
||||
kDebug(5001) << "TransferTreeModel::dropMimeData:" << transfers.count() << "transfers.";
|
||||
|
|
|
@ -508,7 +508,7 @@ void MainWindow::slotTransfersChanged(QMap<TransferHandler*, Transfer::ChangesFl
|
|||
break;
|
||||
}
|
||||
|
||||
// kDebug(5001) << it.key() << ": " << it.value() << endl;
|
||||
// kDebug(5001) << it.key() << ": " << it.value();
|
||||
}
|
||||
|
||||
if (update)
|
||||
|
|
|
@ -259,7 +259,7 @@ std::shared_ptr<MixDevice> Mixer_Backend::recommendedMaster()
|
|||
{
|
||||
if ( !_mixer->isDynamic())
|
||||
// This should never ever happen, as KMix does NOT accept soundcards without controls
|
||||
kError(67100) << "Mixer_Backend::recommendedMaster(): returning invalid master. This is a bug in KMix. Please file a bug report stating how you produced this." << endl;
|
||||
kError(67100) << "Mixer_Backend::recommendedMaster(): returning invalid master. This is a bug in KMix. Please file a bug report stating how you produced this.";
|
||||
}
|
||||
|
||||
// If we reach this code path, then obiously m_recommendedMaster == 0 (see above)
|
||||
|
|
|
@ -521,14 +521,14 @@ bool Mixer_OSS4::prepareUpdateFromHW()
|
|||
minfo.dev = -1;
|
||||
if ( wrapIoctl( ioctl(m_fd, SNDCTL_MIXERINFO, &minfo) ) < 0 )
|
||||
{
|
||||
kDebug(67100) << "Can't get mixerinfo from card!\n" << endl;
|
||||
kDebug(67100) << "Can't get mixerinfo from card!";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!minfo.enabled)
|
||||
{
|
||||
// Mixer is disabled. Probably disconnected USB device or card is unavailable;
|
||||
kDebug(67100) << "Mixer for card is disabled!\n" << endl;
|
||||
kDebug(67100) << "Mixer for card is disabled!";
|
||||
close();
|
||||
return false;
|
||||
}
|
||||
|
@ -616,7 +616,7 @@ int Mixer_OSS4::writeVolumeToHW(const QString& id, std::shared_ptr<MixDevice> md
|
|||
if ( wrapIoctl( ioctl(m_fd, SNDCTL_MIX_EXTINFO, &extinfo) ) < 0 )
|
||||
{
|
||||
//TO DO: more specific error handling
|
||||
kDebug ( 67100 ) << "failed to read info for control " << id2num(id) << endl;
|
||||
kDebug ( 67100 ) << "failed to read info for control " << id2num(id);
|
||||
return Mixer::ERR_READ;
|
||||
}
|
||||
|
||||
|
@ -661,7 +661,7 @@ int Mixer_OSS4::writeVolumeToHW(const QString& id, std::shared_ptr<MixDevice> md
|
|||
|
||||
if ( wrapIoctl ( ioctl (m_fd, SNDCTL_MIX_WRITE, &mv) ) < 0 )
|
||||
{
|
||||
kDebug ( 67100 ) << "error writing to control" << extinfo.extname << endl;
|
||||
kDebug ( 67100 ) << "error writing to control" << extinfo.extname;
|
||||
return Mixer::ERR_WRITE;
|
||||
}
|
||||
return 0;
|
||||
|
@ -678,7 +678,7 @@ void Mixer_OSS4::setEnumIdHW(const QString& id, unsigned int idx)
|
|||
if ( wrapIoctl ( ioctl(m_fd, SNDCTL_MIX_EXTINFO, &extinfo) ) < 0 )
|
||||
{
|
||||
//TO DO: more specific error handling
|
||||
kDebug ( 67100 ) << "failed to read info for control " << id2num(id) << endl;
|
||||
kDebug ( 67100 ) << "failed to read info for control " << id2num(id);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -711,7 +711,7 @@ void Mixer_OSS4::setEnumIdHW(const QString& id, unsigned int idx)
|
|||
if ( wrapIoctl ( ioctl (m_fd, SNDCTL_MIX_WRITE, &mv) ) < 0 )
|
||||
{
|
||||
/* Oops, can't write to mixer */
|
||||
kDebug ( 67100 ) << "error writing to control" << extinfo.extname << endl;
|
||||
kDebug ( 67100 ) << "error writing to control" << extinfo.extname;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -753,28 +753,28 @@ int Mixer_OSS4::wrapIoctl(int ioctlRet)
|
|||
{
|
||||
case EIO:
|
||||
{
|
||||
kDebug ( 67100 ) << "A hardware level error occurred" << endl;
|
||||
kDebug ( 67100 ) << "A hardware level error occurred";
|
||||
break;
|
||||
}
|
||||
case EINVAL:
|
||||
{
|
||||
kDebug ( 67100 ) << "Operation caused an EINVAL. You may have found a bug in kmix OSS4 module or in OSS4 itself" << endl;
|
||||
kDebug ( 67100 ) << "Operation caused an EINVAL. You may have found a bug in kmix OSS4 module or in OSS4 itself";
|
||||
break;
|
||||
}
|
||||
case ENXIO:
|
||||
{
|
||||
kDebug ( 67100 ) << "Operation index out of bounds or requested device does not exist - you likely found a bug in the kmix OSS4 module" << endl;
|
||||
kDebug ( 67100 ) << "Operation index out of bounds or requested device does not exist - you likely found a bug in the kmix OSS4 module";
|
||||
break;
|
||||
}
|
||||
case EPERM:
|
||||
case EACCES:
|
||||
{
|
||||
kDebug ( 67100 ) << errorText ( Mixer::ERR_PERM ) << endl;
|
||||
kDebug ( 67100 ) << errorText ( Mixer::ERR_PERM );
|
||||
break;
|
||||
}
|
||||
case ENODEV:
|
||||
{
|
||||
kDebug ( 67100 ) << "kmix received an ENODEV error - are the OSS4 drivers loaded ?" << endl;
|
||||
kDebug ( 67100 ) << "kmix received an ENODEV error - are the OSS4 drivers loaded ?";
|
||||
break;
|
||||
}
|
||||
case EPIPE:
|
||||
|
|
|
@ -140,7 +140,7 @@ void MixDevice::init( Mixer* mixer, const QString& id, const QString& name, con
|
|||
_moveDestinationMixSet = moveDestinationMixSet;
|
||||
if ( _id.contains(' ') ) {
|
||||
// The key is used in the config file. IdbusControlWrappert MUST NOT contain spaces
|
||||
kError(67100) << "MixDevice::setId(\"" << id << "\") . Invalid key - it must not contain spaces" << endl;
|
||||
kError(67100) << "MixDevice::setId(\"" << id << "\") . Invalid key - it must not contain spaces";
|
||||
_id.replace(' ', '_');
|
||||
}
|
||||
// kDebug(67100) << "MixDevice::init() _id=" << _id;
|
||||
|
|
|
@ -265,7 +265,7 @@ bool Mixer::openIfValid()
|
|||
else
|
||||
{
|
||||
if ( !m_dynamic )
|
||||
kError(67100) << "Mixer::open() no master detected." << endl;
|
||||
kError(67100) << "Mixer::open() no master detected.";
|
||||
QString noMaster = "---no-master-detected---";
|
||||
setLocalMasterMD(noMaster); // no master
|
||||
}
|
||||
|
|
|
@ -288,7 +288,7 @@ void MixerToolBox::initMixerInternal(MultiDriverMode multiDriverMode, QList<QStr
|
|||
KMixDeviceManager::instance()->setHotpluggingBackends(driverInfoUsed);
|
||||
}
|
||||
|
||||
kDebug(67100) << ref_hwInfoString << endl << "Total number of detected Mixers: " << Mixer::mixers().count();
|
||||
kDebug(67100) << ref_hwInfoString << "\nTotal number of detected Mixers: " << Mixer::mixers().count();
|
||||
//kDebug(67100) << "OUT MixerToolBox::initMixer()";
|
||||
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <kdebug.h>
|
||||
|
||||
#include <QList>
|
||||
#include <QMap>
|
||||
|
||||
class VolumeChannel;
|
||||
|
||||
|
|
|
@ -228,7 +228,7 @@ void DialogAddView::apply()
|
|||
if ( button != 0 ) {
|
||||
QString viewName = button->objectName();
|
||||
if ( mixer == 0 ) {
|
||||
kError(67100) << "DialogAddView::createPage(): Invalid Mixer (mixer=0)" << endl;
|
||||
kError(67100) << "DialogAddView::createPage(): Invalid Mixer (mixer=0)";
|
||||
return; // can not happen
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -363,7 +363,7 @@ bool GUIProfile::readProfile(const QString& ref_fileName)
|
|||
} // Read OK
|
||||
else {
|
||||
// !! this error message about faulty profiles should probably be surrounded with i18n()
|
||||
kError(67100) << "ERROR: The profile '" << ref_fileName<< "' contains errors, and is not used." << endl;
|
||||
kError(67100) << "ERROR: The profile '" << ref_fileName<< "' contains errors, and is not used.";
|
||||
}
|
||||
delete gpp;
|
||||
delete xmlReader;
|
||||
|
@ -663,7 +663,7 @@ void ProfControl::setSubcontrols(QString sctls)
|
|||
|
||||
QStringList qsl = sctls.split( ',', QString::SkipEmptyParts, Qt::CaseInsensitive);
|
||||
foreach (const QString &sctl, qsl) {
|
||||
//kDebug() << "setSubcontrols found: " << sctl.toLocal8Bit().constData() << endl;
|
||||
//kDebug() << "setSubcontrols found: " << sctl.toLocal8Bit().constData();
|
||||
if ( sctl == "pvolume" ) _useSubcontrolPlayback = true;
|
||||
else if ( sctl == "cvolume" ) _useSubcontrolCapture = true;
|
||||
else if ( sctl == "pswitch" ) _useSubcontrolPlaybackSwitch = true;
|
||||
|
|
|
@ -257,7 +257,7 @@ void KSmallSlider::paintEvent( QPaintEvent * )
|
|||
kDebug(67100) << "KSmallSlider::paintEvent: sliderPos=" << sliderPos
|
||||
<< "height()=" << height()
|
||||
<< "width()=" << width()
|
||||
<< "outer = " << outer << endl;
|
||||
<< "outer = " << outer;
|
||||
*/
|
||||
if ( grayed )
|
||||
gradient( p, false, outer,
|
||||
|
|
|
@ -114,7 +114,7 @@ void MDWEnum::update()
|
|||
_enumCombo->setCurrentIndex( m_mixdevice->enumId() );
|
||||
}
|
||||
else {
|
||||
kError(67100) << "MDWEnum::update() enumID=" << m_mixdevice->enumId() << " is no Enum ... skipped" << endl;
|
||||
kError(67100) << "MDWEnum::update() enumID=" << m_mixdevice->enumId() << " is no Enum ... skipped";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -731,7 +731,7 @@ void MDWSlider::setIcon( QString filename, QWidget* label )
|
|||
}
|
||||
else
|
||||
{
|
||||
kError(67100) << "Pixmap missing. filename=" << filename << endl;
|
||||
kError(67100) << "Pixmap missing. filename=" << filename;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -97,8 +97,7 @@ X11FrameBuffer::X11FrameBuffer(WId id, QObject *parent)
|
|||
kDebug() << "Got image. bpp: " << d->framebufferImage->bits_per_pixel
|
||||
<< ", depth: " << d->framebufferImage->depth
|
||||
<< ", padded width: " << d->framebufferImage->bytes_per_line
|
||||
<< " (sent: " << d->framebufferImage->width * 4 << ")"
|
||||
<< endl;
|
||||
<< " (sent: " << d->framebufferImage->width * 4 << ")";
|
||||
|
||||
fb = d->framebufferImage->data;
|
||||
#ifdef HAVE_XDAMAGE
|
||||
|
|
|
@ -69,7 +69,7 @@ ConfigurationDialog::~ConfigurationDialog() {
|
|||
}
|
||||
|
||||
void ConfigurationDialog::setupLogModeConfigurations() {
|
||||
logDebug() << "Setup Log Mode Configurations..." << endl;
|
||||
logDebug() << "Setup Log Mode Configurations...";
|
||||
|
||||
|
||||
foreach(LogMode* logMode, Globals::instance()->logModes()) {
|
||||
|
@ -88,7 +88,7 @@ void ConfigurationDialog::setupLogModeConfigurations() {
|
|||
|
||||
|
||||
foreach (LogModeConfigurationWidget* logModeConfigurationWidget, d->logModeConfigurations ) {
|
||||
logDebug() << "Adding " << logModeConfigurationWidget->itemName() << " configuration..." << endl;
|
||||
logDebug() << "Adding " << logModeConfigurationWidget->itemName() << " configuration...";
|
||||
|
||||
addPage(logModeConfigurationWidget, logModeConfigurationWidget->itemName(), logModeConfigurationWidget->iconName(), logModeConfigurationWidget->header(), false);
|
||||
|
||||
|
@ -97,7 +97,7 @@ void ConfigurationDialog::setupLogModeConfigurations() {
|
|||
}
|
||||
|
||||
void ConfigurationDialog::showConfiguration() {
|
||||
logDebug() << "Showing Configuration dialog..." << endl;
|
||||
logDebug() << "Showing Configuration dialog...";
|
||||
|
||||
show();
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ void ConfigurationDialog::setupGeneralConfiguration() {
|
|||
}
|
||||
|
||||
void ConfigurationDialog::updateSettings() {
|
||||
logDebug() << "Saving configuration..." << endl;
|
||||
logDebug() << "Saving configuration...";
|
||||
|
||||
d->changed = false;
|
||||
|
||||
|
@ -125,16 +125,16 @@ void ConfigurationDialog::updateSettings() {
|
|||
|
||||
emit configurationSaved();
|
||||
|
||||
logDebug() << "Configuration saved" << endl;
|
||||
logDebug() << "Configuration saved";
|
||||
}
|
||||
|
||||
bool ConfigurationDialog::hasChanged() {
|
||||
logDebug() << "Current change status : " << d->changed << endl;
|
||||
logDebug() << "Current change status : " << d->changed;
|
||||
return d->changed;
|
||||
}
|
||||
|
||||
void ConfigurationDialog::updateConfiguration() {
|
||||
logDebug() << "Updating configuration..." << endl;
|
||||
logDebug() << "Updating configuration...";
|
||||
|
||||
bool valid = d->generalConfiguration->isValid();
|
||||
if (valid) {
|
||||
|
@ -159,14 +159,14 @@ void ConfigurationDialog::updateConfiguration() {
|
|||
}
|
||||
|
||||
void ConfigurationDialog::updateButtons() {
|
||||
logDebug() << "Updating configuration buttons..." << endl;
|
||||
logDebug() << "Updating configuration buttons...";
|
||||
|
||||
d->changed = true;
|
||||
|
||||
}
|
||||
|
||||
void ConfigurationDialog::updateWidgets() {
|
||||
logDebug() << "Reading configuration..." << endl;
|
||||
logDebug() << "Reading configuration...";
|
||||
|
||||
d->generalConfiguration->readConfig();
|
||||
foreach (LogModeConfigurationWidget* logModeConfigurationWidget, d->logModeConfigurations ) {
|
||||
|
@ -177,7 +177,7 @@ void ConfigurationDialog::updateWidgets() {
|
|||
}
|
||||
|
||||
void ConfigurationDialog::updateWidgetsDefault() {
|
||||
logDebug() << "Loading default configuration..." << endl;
|
||||
logDebug() << "Loading default configuration...";
|
||||
|
||||
d->generalConfiguration->defaultConfig();
|
||||
foreach (LogModeConfigurationWidget* logModeConfigurationWidget, d->logModeConfigurations ) {
|
||||
|
|
|
@ -64,12 +64,12 @@ void DetailDialog::selectionChanged(LogViewWidget* logViewWidget) {
|
|||
|
||||
//TODO Try to find a method that reload (an resize) correctly the content of the detail dialog
|
||||
void DetailDialog::updateDetails() {
|
||||
//logDebug() << "Updating Detail Dialog..." << endl;
|
||||
//logDebug() << "Updating Detail Dialog...";
|
||||
|
||||
//Get the current-last item selected
|
||||
LogViewWidgetItem* item=logViewWidget->lastSelectedItem();
|
||||
if (item==NULL) {
|
||||
logDebug() << "No item found." << endl;
|
||||
logDebug() << "No item found.";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -97,23 +97,23 @@ void DetailDialog::updateDetails() {
|
|||
|
||||
void DetailDialog::moveToItem(int direction) {
|
||||
if (direction < 0)
|
||||
logDebug() << "Go to previous item..." << endl;
|
||||
logDebug() << "Go to previous item...";
|
||||
else
|
||||
logDebug() << "Go to next item..." << endl;
|
||||
logDebug() << "Go to next item...";
|
||||
|
||||
//Get the current-last item selected
|
||||
LogViewWidgetItem* item=logViewWidget->lastSelectedItem();
|
||||
if (item==NULL) {
|
||||
logDebug() << "No item found." << endl;
|
||||
logDebug() << "No item found.";
|
||||
return;
|
||||
}
|
||||
|
||||
QTreeWidgetItem* destinationItem = logViewWidget->topLevelItem( logViewWidget->indexOfTopLevelItem(item) + direction );
|
||||
if (destinationItem==NULL) {
|
||||
if (direction < 0)
|
||||
logDebug() << "No previous item found." << endl;
|
||||
logDebug() << "No previous item found.";
|
||||
else
|
||||
logDebug() << "No next item found." << endl;
|
||||
logDebug() << "No next item found.";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -119,7 +119,7 @@ void GeneralConfigurationWidget::readConfig() {
|
|||
}
|
||||
|
||||
void GeneralConfigurationWidget::saveConfig() const {
|
||||
logDebug() << "Save config from General preferences" << endl;
|
||||
logDebug() << "Save config from General preferences";
|
||||
|
||||
KSystemLogConfig::setStartupLogMode(startupLogMode->itemData(startupLogMode->currentIndex()).toString());
|
||||
|
||||
|
@ -139,11 +139,11 @@ void GeneralConfigurationWidget::defaultConfig() {
|
|||
|
||||
bool GeneralConfigurationWidget::isValid() const {
|
||||
if (maxLines->value()>0) {
|
||||
logDebug() << "General configuration valid" << endl;
|
||||
logDebug() << "General configuration valid";
|
||||
return true;
|
||||
}
|
||||
|
||||
logDebug() << "General configuration not valid" << endl;
|
||||
logDebug() << "General configuration not valid";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ void Analyzer::deleteLogFiles() {
|
|||
|
||||
// Remove the watching on the monitored files
|
||||
foreach (LogFileReader* logFileReader, logFileReaders) {
|
||||
logDebug() << "Remove file : " << logFileReader->logFile().url().path() << endl;
|
||||
logDebug() << "Remove file : " << logFileReader->logFile().url().path();
|
||||
delete logFileReader;
|
||||
}
|
||||
|
||||
|
@ -85,11 +85,11 @@ void Analyzer::setParsingPaused(bool paused) {
|
|||
bool watching;
|
||||
//If we resume the parsing, then parse files to know if new lines have been appended
|
||||
if (parsingPaused==true) {
|
||||
logDebug() << "Pausing reading" << endl;
|
||||
logDebug() << "Pausing reading";
|
||||
watching=false;
|
||||
}
|
||||
else {
|
||||
logDebug() << "Relaunch reading" << endl;
|
||||
logDebug() << "Relaunch reading";
|
||||
watching=true;
|
||||
}
|
||||
|
||||
|
@ -117,18 +117,18 @@ void Analyzer::setLogFiles(const QList<LogFile>& logFiles) {
|
|||
|
||||
void Analyzer::logFileChanged(LogFileReader* logFileReader, ReadingMode readingMode, const QStringList& content) {
|
||||
if (readingMode == Analyzer::FullRead)
|
||||
logDebug() << "File " << logFileReader->logFile().url().path() << " has been modified on full read." << endl;
|
||||
logDebug() << "File " << logFileReader->logFile().url().path() << " has been modified on full read.";
|
||||
else
|
||||
logDebug() << "File " << logFileReader->logFile().url().path() << " has been modified on partial read" << endl;
|
||||
logDebug() << "File " << logFileReader->logFile().url().path() << " has been modified on partial read";
|
||||
|
||||
if (parsingPaused == true) {
|
||||
logDebug() << "Pause enabled. Nothing read." << endl;
|
||||
logDebug() << "Pause enabled. Nothing read.";
|
||||
return;
|
||||
}
|
||||
|
||||
logDebug() << "Locking file modifications of " << logFileReader->logFile().url().path() << endl;
|
||||
logDebug() << "Locking file modifications of " << logFileReader->logFile().url().path();
|
||||
QMutexLocker locker(insertionLocking);
|
||||
logDebug() << "Unlocking file modifications of " << logFileReader->logFile().url().path() << endl;
|
||||
logDebug() << "Unlocking file modifications of " << logFileReader->logFile().url().path();
|
||||
|
||||
QTime benchmark;
|
||||
benchmark.start();
|
||||
|
@ -141,7 +141,7 @@ void Analyzer::logFileChanged(LogFileReader* logFileReader, ReadingMode readingM
|
|||
insertedLogLineCount = insertLines(content, logFileReader->logFile(), Analyzer::UpdatingRead);
|
||||
}
|
||||
else {
|
||||
logDebug() << "Reading file "<< logFileReader->logFile().url().path() << endl;
|
||||
logDebug() << "Reading file "<< logFileReader->logFile().url().path();
|
||||
|
||||
emit statusBarChanged( i18n("Opening '%1'...", logFileReader->logFile().url().path()) );
|
||||
|
||||
|
@ -166,15 +166,15 @@ void Analyzer::logFileChanged(LogFileReader* logFileReader, ReadingMode readingM
|
|||
//Inform MainWindow status bar
|
||||
emit statusBarChanged( i18n("Log file '%1' has changed.", logFileReader->logFile().url().path()) );
|
||||
|
||||
logDebug() << "Updating log files in " << benchmark.elapsed() << " ms" << endl;
|
||||
logDebug() << "Updating log files in " << benchmark.elapsed() << " ms";
|
||||
}
|
||||
|
||||
int Analyzer::insertLines(const QStringList& bufferedLines, const LogFile& logFile, ReadingMode readingMode) {
|
||||
logDebug() << "Inserting lines..." << endl;
|
||||
logDebug() << "Inserting lines...";
|
||||
|
||||
//If there is no line
|
||||
if (bufferedLines.size()==0) {
|
||||
logWarning() << "File is empty : " << logFile.url().path() << endl;
|
||||
logWarning() << "File is empty : " << logFile.url().path();
|
||||
}
|
||||
|
||||
|
||||
|
@ -189,7 +189,7 @@ int Analyzer::insertLines(const QStringList& bufferedLines, const LogFile& logFi
|
|||
*
|
||||
* TODO Read revertly the file and ignore last lines if we are in Descending mode
|
||||
*/
|
||||
logDebug() << "Log file Sort mode is " << logFileSortMode() << endl;
|
||||
logDebug() << "Log file Sort mode is " << logFileSortMode();
|
||||
if (logFileSortMode() == Analyzer::AscendingSortedLogFile) {
|
||||
//Calculate how many lines we will ignore
|
||||
if (bufferedLines.size() > KSystemLogConfig::maxLines()) {
|
||||
|
@ -219,7 +219,7 @@ int Analyzer::insertLines(const QStringList& bufferedLines, const LogFile& logFi
|
|||
++currentPosition;
|
||||
}
|
||||
|
||||
logDebug() << "Total read lines :"<< (bufferedLines.size() - stop) << "(" << logFile.url().path() << ")" << endl;
|
||||
logDebug() << "Total read lines :"<< (bufferedLines.size() - stop) << "(" << logFile.url().path() << ")";
|
||||
|
||||
return insertedLogLineCount;
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ KioLogFileReader::KioLogFileReader(const LogFile& logFile) :
|
|||
connect(& (d->fileWatch), SIGNAL(timeout()), this, SLOT(watchFile()));
|
||||
*/
|
||||
|
||||
logDebug() << "Starting " << logFile.url().path() << endl;
|
||||
logDebug() << "Starting " << logFile.url().path();
|
||||
|
||||
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ KioLogFileReader::~KioLogFileReader() {
|
|||
}
|
||||
|
||||
void KioLogFileReader::open() {
|
||||
logDebug() << "Opening..." << endl;
|
||||
logDebug() << "Opening...";
|
||||
d->fileJob = KIO::open(d->logFile.url(), QIODevice::ReadOnly | QIODevice::Text);
|
||||
|
||||
connect(d->fileJob, SIGNAL(open(KIO::Job*)), this, SLOT(openDone(KIO::Job*)));
|
||||
|
@ -88,7 +88,7 @@ void KioLogFileReader::open() {
|
|||
connect(d->fileJob, SIGNAL(data(KIO::Job*,QByteArray)), this, SLOT(dataReceived(KIO::Job*,QByteArray)));
|
||||
connect(d->fileJob, SIGNAL(mimetype(KIO::Job*,QString)), this, SLOT(mimetypeReceived(KIO::Job*,QString)));
|
||||
|
||||
logDebug() << "File opened." << endl;
|
||||
logDebug() << "File opened.";
|
||||
}
|
||||
|
||||
void KioLogFileReader::close() {
|
||||
|
@ -96,18 +96,18 @@ void KioLogFileReader::close() {
|
|||
}
|
||||
|
||||
void KioLogFileReader::openDone(KIO::Job* job) {
|
||||
logDebug() << "Opening done..." << endl;
|
||||
logDebug() << "Opening done...";
|
||||
|
||||
d->fileJob->read(READ_SIZE);
|
||||
|
||||
}
|
||||
void KioLogFileReader::closeDone(KIO::Job* job) {
|
||||
logDebug() << "Closing done..." << endl;
|
||||
logDebug() << "Closing done...";
|
||||
}
|
||||
|
||||
void KioLogFileReader::dataReceived(KIO::Job* job, const QByteArray& data) {
|
||||
if (job != d->fileJob) {
|
||||
logDebug() << "Not the good job" << endl;
|
||||
logDebug() << "Not the good job";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -115,18 +115,18 @@ void KioLogFileReader::dataReceived(KIO::Job* job, const QByteArray& data) {
|
|||
return;
|
||||
}
|
||||
|
||||
//logDebug() << "Receiving data... (" << d->totalRead << ")" << endl;
|
||||
//logDebug() << "Receiving data... (" << d->totalRead << ")";
|
||||
d->buffer.append(QLatin1String( data ));
|
||||
d->totalRead += data.size();
|
||||
|
||||
emitCompleteLines();
|
||||
|
||||
logDebug() << "Total read : " << d->totalRead << " of " << d->fileJob->size() << endl;
|
||||
logDebug() << "Total read : " << d->totalRead << " of " << d->fileJob->size();
|
||||
if (d->totalRead < d->fileJob->size()) {
|
||||
d->fileJob->read(READ_SIZE);
|
||||
}
|
||||
|
||||
//logDebug() << "Data received : " << d->buffer << endl;
|
||||
//logDebug() << "Data received : " << d->buffer;
|
||||
|
||||
//d->totalRead++;
|
||||
}
|
||||
|
@ -156,11 +156,11 @@ void KioLogFileReader::emitCompleteLines() {
|
|||
}
|
||||
|
||||
void KioLogFileReader::mimetypeReceived(KIO::Job* job, const QString& type) {
|
||||
logDebug() << "Mimetype received " << type << endl;
|
||||
logDebug() << "Mimetype received " << type;
|
||||
}
|
||||
|
||||
void KioLogFileReader::watchFile(const QString& path) {
|
||||
logDebug() << "Watch file : size : " << path << endl;
|
||||
logDebug() << "Watch file : size : " << path;
|
||||
}
|
||||
|
||||
#include "moc_kioLogFileReader.cpp"
|
||||
|
|
|
@ -68,7 +68,7 @@ LevelPrintPage::LevelPrintPage(QWidget* parent)
|
|||
m_btnGroup->addButton(button, level->id());
|
||||
m_btnGroupLayout->addWidget(button, row, col);
|
||||
|
||||
logDebug() << "name: " << level->name() << " id: " << level->id() << endl;
|
||||
logDebug() << "name: " << level->name() << " id: " << level->id();
|
||||
|
||||
row++;
|
||||
if(row >= 4) {
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <QMutex>
|
||||
#include <QBuffer>
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
|
||||
#include <kdirwatch.h>
|
||||
#include <klocale.h>
|
||||
|
@ -33,7 +34,6 @@
|
|||
|
||||
#include "logFileReader.h"
|
||||
#include "logFileReaderPrivate.h"
|
||||
|
||||
#include "logging.h"
|
||||
|
||||
|
||||
|
@ -84,7 +84,7 @@ void LocalLogFileReader::init() {
|
|||
//Init current file position
|
||||
d->previousFilePosition = 0;
|
||||
|
||||
logDebug() << "Reading local file " << d->logFile.url().path() << endl;
|
||||
logDebug() << "Reading local file " << d->logFile.url().path();
|
||||
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ void LocalLogFileReader::watchFile(bool enable) {
|
|||
Q_D(LocalLogFileReader);
|
||||
|
||||
if (enable == true) {
|
||||
logDebug() << "Monitoring file : " << d->logFile.url().path() << endl;
|
||||
logDebug() << "Monitoring file : " << d->logFile.url().path();
|
||||
|
||||
if (d->watch->contains(d->logFile.url().path()) == false) {
|
||||
d->watch->addFile(d->logFile.url().path());
|
||||
|
@ -120,7 +120,7 @@ QIODevice* LocalLogFileReader::open() {
|
|||
|
||||
QString mimeType = KMimeType::findByFileContent( d->logFile.url().path() )->name();
|
||||
|
||||
logDebug() << d->logFile.url().path() << " : " << mimeType << endl;
|
||||
logDebug() << d->logFile.url().path() << " : " << mimeType;
|
||||
QIODevice* inputDevice;
|
||||
|
||||
//Try to see if this file exists
|
||||
|
@ -136,13 +136,13 @@ QIODevice* LocalLogFileReader::open() {
|
|||
|
||||
//Plain text file : we use a QFile object
|
||||
if (mimeType == QLatin1String( "text/plain" ) || mimeType == QLatin1String( "application/octet-stream" )) {
|
||||
logDebug() << "Using QFile input device" << endl;
|
||||
logDebug() << "Using QFile input device";
|
||||
|
||||
inputDevice = file;
|
||||
}
|
||||
//Compressed file : we use the KFilterDev helper
|
||||
else {
|
||||
logDebug() << "Using KFilterDev input device" << endl;
|
||||
logDebug() << "Using KFilterDev input device";
|
||||
|
||||
const QString logFilePath = d->logFile.url().path();
|
||||
KDecompressor kdecompressor;
|
||||
|
@ -190,7 +190,7 @@ void LocalLogFileReader::close(QIODevice* inputDevice) {
|
|||
}
|
||||
|
||||
QStringList LocalLogFileReader::readContent(QIODevice* inputDevice) {
|
||||
logDebug() << "Retrieving raw buffer..."<< endl;
|
||||
logDebug() << "Retrieving raw buffer...";
|
||||
|
||||
Q_D(LocalLogFileReader);
|
||||
|
||||
|
@ -201,11 +201,11 @@ QStringList LocalLogFileReader::readContent(QIODevice* inputDevice) {
|
|||
rawBuffer.append(inputStream.readLine());
|
||||
}
|
||||
|
||||
logDebug() << "Raw buffer retrieved."<< endl;
|
||||
logDebug() << "Raw buffer retrieved.";
|
||||
|
||||
//Get the size file for the next calculation
|
||||
d->previousFilePosition = inputDevice->size();
|
||||
logDebug() << "New file position : " << d->previousFilePosition << " (" << d->logFile.url().path() << ")" << endl;
|
||||
logDebug() << "New file position : " << d->previousFilePosition << " (" << d->logFile.url().path() << ")";
|
||||
|
||||
return rawBuffer;
|
||||
}
|
||||
|
@ -213,38 +213,38 @@ QStringList LocalLogFileReader::readContent(QIODevice* inputDevice) {
|
|||
void LocalLogFileReader::logFileModified() {
|
||||
Q_D(LocalLogFileReader);
|
||||
|
||||
logDebug() << "Locking log file modification..." << endl;
|
||||
logDebug() << "Locking log file modification...";
|
||||
if (d->insertionLocking.tryLock() == false) {
|
||||
logDebug() << "Log file modification already detected." << endl;
|
||||
logDebug() << "Log file modification already detected.";
|
||||
return;
|
||||
}
|
||||
|
||||
QIODevice* inputDevice = open();
|
||||
if (inputDevice == NULL) {
|
||||
logError() << "Could not open file " << d->logFile.url().path() << endl;
|
||||
logError() << "Could not open file " << d->logFile.url().path();
|
||||
return;
|
||||
}
|
||||
|
||||
//If there are new lines in the file, insert only them or this is the first time we read this file
|
||||
if (d->previousFilePosition!=0 && d->previousFilePosition <= inputDevice->size()) {
|
||||
logDebug() << "Reading from position " << d->previousFilePosition << " (" << d->logFile.url().path() << ")" << endl;
|
||||
logDebug() << "Reading from position " << d->previousFilePosition << " (" << d->logFile.url().path() << ")";
|
||||
|
||||
if (inputDevice->isSequential()) {
|
||||
logError() << "The file current position could not be modified" << endl;
|
||||
logError() << "The file current position could not be modified";
|
||||
}
|
||||
else {
|
||||
//Place the cursor to the last line opened
|
||||
inputDevice->seek(d->previousFilePosition);
|
||||
}
|
||||
|
||||
logDebug() << "Retrieving a part of the file..."<< endl;
|
||||
logDebug() << "Retrieving a part of the file...";
|
||||
|
||||
emit contentChanged(this, Analyzer::UpdatingRead, readContent(inputDevice));
|
||||
|
||||
}
|
||||
//Else reread all lines, clear log list
|
||||
else {
|
||||
logDebug() << "New file or file truncated. (Re-)Loading log file" << endl;
|
||||
logDebug() << "New file or file truncated. (Re-)Loading log file";
|
||||
|
||||
emit contentChanged(this, Analyzer::FullRead, readContent(inputDevice));
|
||||
|
||||
|
@ -252,7 +252,7 @@ void LocalLogFileReader::logFileModified() {
|
|||
|
||||
close(inputDevice);
|
||||
|
||||
logDebug() << "Unlocking log file modification..." << endl;
|
||||
logDebug() << "Unlocking log file modification...";
|
||||
d->insertionLocking.unlock();
|
||||
}
|
||||
|
||||
|
|
|
@ -178,7 +178,7 @@ QString LogLine::exportToText() const {
|
|||
QString exporting;
|
||||
|
||||
if (d->item == NULL) {
|
||||
logError() << "Trying to export text from NULL item" << endl;
|
||||
logError() << "Trying to export text from NULL item";
|
||||
return exporting;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,11 +73,11 @@ View* LogManager::usedView() const {
|
|||
|
||||
void LogManager::reload() {
|
||||
if (d->logMode == NULL) {
|
||||
logWarning() << "Log manager is not yet initialized" << endl;
|
||||
logWarning() << "Log manager is not yet initialized";
|
||||
return;
|
||||
}
|
||||
|
||||
logDebug() << "Reloading with log mode " << d->logMode->name() << "..." << endl;
|
||||
logDebug() << "Reloading with log mode " << d->logMode->name() << "...";
|
||||
|
||||
emit statusBarChanged(i18n("Loading log..."));
|
||||
|
||||
|
@ -85,19 +85,19 @@ void LogManager::reload() {
|
|||
emit tabTitleChanged(d->usedView, d->logMode->icon(), d->logMode->name());
|
||||
emit windowTitleChanged(d->logMode->name());
|
||||
|
||||
logDebug() << "Emptying view..." << endl;
|
||||
logDebug() << "Emptying view...";
|
||||
|
||||
// Empty the current list, to better fill it
|
||||
d->usedView->logViewWidget()->model()->clear();
|
||||
|
||||
logDebug() << "Initializing view..." << endl;
|
||||
logDebug() << "Initializing view...";
|
||||
|
||||
// Init the Log View
|
||||
logDebug() << "Initializing columns view..." << endl;
|
||||
logDebug() << "Initializing columns view...";
|
||||
|
||||
d->usedView->logViewWidget()->setColumns(d->analyzer->initColumns());
|
||||
|
||||
logDebug() << "Reading log..." << endl;
|
||||
logDebug() << "Reading log...";
|
||||
|
||||
// Read the log files
|
||||
d->analyzer->watchLogFiles(true);
|
||||
|
@ -107,7 +107,7 @@ void LogManager::reload() {
|
|||
// Log List has been totally reloaded
|
||||
emit reloaded();
|
||||
|
||||
logDebug() << "Log mode " << d->logMode->name() << " reloaded" << endl;
|
||||
logDebug() << "Log mode " << d->logMode->name() << " reloaded";
|
||||
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@ const QTime& LogManager::lastUpdate() const {
|
|||
}
|
||||
|
||||
void LogManager::updateLog(int lineCount) {
|
||||
logDebug() << "Updating log " << lineCount << " new lines" << endl;
|
||||
logDebug() << "Updating log " << lineCount << " new lines";
|
||||
|
||||
if (lineCount==0)
|
||||
return;
|
||||
|
@ -131,7 +131,7 @@ void LogManager::updateLog(int lineCount) {
|
|||
}
|
||||
|
||||
void LogManager::cleanPreviousLogMode() {
|
||||
logDebug() << "Cleaning previous LogMode..." << endl;
|
||||
logDebug() << "Cleaning previous LogMode...";
|
||||
|
||||
d->logMode = NULL;
|
||||
|
||||
|
@ -144,9 +144,9 @@ void LogManager::initialize(LogMode* mode) {
|
|||
}
|
||||
|
||||
void LogManager::internalInitialize(LogMode* mode, const QList<LogFile>& logFiles) {
|
||||
logDebug() << "Initializing LogManager..." << endl;
|
||||
logDebug() << "Initializing LogManager...";
|
||||
|
||||
logDebug() << "Using files" << logFiles << endl;
|
||||
logDebug() << "Using files" << logFiles;
|
||||
|
||||
cleanPreviousLogMode();
|
||||
|
||||
|
@ -168,7 +168,7 @@ void LogManager::internalInitialize(LogMode* mode, const QList<LogFile>& logFile
|
|||
//Find the log files used for this kind of mode, and set them to our log manager
|
||||
d->analyzer->setLogFiles(logFiles);
|
||||
|
||||
logDebug() << "LogManager initialized" << endl;
|
||||
logDebug() << "LogManager initialized";
|
||||
|
||||
}
|
||||
|
||||
|
@ -183,7 +183,7 @@ void LogManager::showErrorMessage(const QString& title, const QString& message)
|
|||
|
||||
void LogManager::setParsingPaused(bool paused) {
|
||||
if (d->logMode == NULL) {
|
||||
logWarning() << "Log manager is not yet initialized" << endl;
|
||||
logWarning() << "Log manager is not yet initialized";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -192,7 +192,7 @@ void LogManager::setParsingPaused(bool paused) {
|
|||
|
||||
bool LogManager::isParsingPaused() const {
|
||||
if (d->logMode == NULL) {
|
||||
logWarning() << "Log manager is not yet initialized" << endl;
|
||||
logWarning() << "Log manager is not yet initialized";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ bool LogManager::isParsingPaused() const {
|
|||
}
|
||||
|
||||
void LogManager::loadDroppedUrls(const KUrl::List& urls) {
|
||||
logDebug() << "Drop " << urls << endl;
|
||||
logDebug() << "Drop " << urls;
|
||||
|
||||
QList<LogFile> logFiles;
|
||||
|
||||
|
|
|
@ -100,7 +100,7 @@ Reader* ReaderFactory::createReader(LogMode* logMode) {
|
|||
return reader;
|
||||
}
|
||||
|
||||
logError() << "LogMode not found : returns NULL Reader" << endl;
|
||||
logError() << "LogMode not found : returns NULL Reader";
|
||||
return NULL;
|
||||
}
|
||||
*/
|
||||
|
@ -151,7 +151,7 @@ QList<LogFile> LogFilesFactory::createLogFiles(LogMode* logMode) {
|
|||
return LogFilesFactory::getXSessionLogFiles();
|
||||
}
|
||||
|
||||
logError() << "LogFiles not found : returns NULL Reader" << endl;
|
||||
logError() << "LogFiles not found : returns NULL Reader";
|
||||
|
||||
return QList<LogFile>();
|
||||
|
||||
|
@ -214,7 +214,7 @@ LogFile LogModeConfiguration::findGenericLogFile(const QString& file) {
|
|||
|
||||
KUrl url(file);
|
||||
if (!url.isValid()) {
|
||||
logWarning() << i18n("URL '%1' is not valid, skipping this URL.", url.path()) << endl;
|
||||
logWarning() << i18n("URL '%1' is not valid, skipping this URL.", url.path());
|
||||
return LogFile(KUrl(), Globals::instance()->noLogLevel());
|
||||
}
|
||||
|
||||
|
@ -242,7 +242,7 @@ QList<LogFile> LogModeConfiguration::findNoModeLogFiles(const QStringList& strin
|
|||
|
||||
KUrl url(string);
|
||||
if (!url.isValid()) {
|
||||
logWarning() << i18n("URL '%1' is not valid, skipping this URL.", url.path()) << endl;
|
||||
logWarning() << i18n("URL '%1' is not valid, skipping this URL.", url.path());
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <QPrintDialog>
|
||||
#include <QPen>
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
|
||||
#include <kapplication.h>
|
||||
#include <klocale.h>
|
||||
|
@ -53,7 +54,7 @@ LogViewExport::~LogViewExport() {
|
|||
}
|
||||
|
||||
void LogViewExport::sendMail() {
|
||||
logDebug() << "Exporting to mail..." << endl;
|
||||
logDebug() << "Exporting to mail...";
|
||||
|
||||
QString body(i18n("Here are my logs:\n"));
|
||||
|
||||
|
@ -90,7 +91,7 @@ void LogViewExport::sendMail() {
|
|||
}
|
||||
|
||||
void LogViewExport::printSelection() {
|
||||
logDebug() << "Printing selection..." << endl;
|
||||
logDebug() << "Printing selection...";
|
||||
|
||||
QPrinter printer;
|
||||
|
||||
|
@ -179,7 +180,7 @@ void LogViewExport::printSelection() {
|
|||
}
|
||||
|
||||
void LogViewExport::printPageNumber(QPainter& painter, QRect& printView, int movement, int page) {
|
||||
logDebug() << "Printing page number..." << endl;
|
||||
logDebug() << "Printing page number...";
|
||||
|
||||
painter.translate(0, -movement);
|
||||
printView.moveTo(QPoint(0, printView.height()) );
|
||||
|
@ -189,7 +190,7 @@ void LogViewExport::printPageNumber(QPainter& painter, QRect& printView, int mov
|
|||
}
|
||||
|
||||
void LogViewExport::copyToClipboard() {
|
||||
logDebug() << "Copying to clipboard..." << endl;
|
||||
logDebug() << "Copying to clipboard...";
|
||||
|
||||
int nbCopied=0;
|
||||
QString text;
|
||||
|
@ -218,12 +219,12 @@ void LogViewExport::copyToClipboard() {
|
|||
emit statusBarChanged(i18np("1 log line copied to clipboard.", "%1 log lines copied to clipboard.", nbCopied));
|
||||
}
|
||||
|
||||
logDebug() << "Copied " << nbCopied << " log lines" << endl;
|
||||
logDebug() << "Copied " << nbCopied << " log lines";
|
||||
|
||||
}
|
||||
|
||||
void LogViewExport::fileSave() {
|
||||
logDebug() << "Saving to a file..." << endl;
|
||||
logDebug() << "Saving to a file...";
|
||||
|
||||
QTreeWidgetItemIterator it(logViewWidget, QTreeWidgetItemIterator::Selected);
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ void LogViewFilterWidget::initSearchListFilter() {
|
|||
}
|
||||
|
||||
void LogViewFilterWidget::updateFilterColumns(const LogViewColumns& columns) {
|
||||
logDebug() << "Changing columns..." << endl;
|
||||
logDebug() << "Changing columns...";
|
||||
|
||||
//We first delete all items
|
||||
d->filterList->clear();
|
||||
|
@ -140,13 +140,13 @@ void LogViewFilterWidget::updateFilterColumns(const LogViewColumns& columns) {
|
|||
void LogViewFilterWidget::changeColumnFilter(int column) {
|
||||
//The user select all columns
|
||||
if (column==0) {
|
||||
logDebug() << "Searching on all columns" << endl;
|
||||
logDebug() << "Searching on all columns";
|
||||
|
||||
d->filterLine->setSearchColumns(QList<int>());
|
||||
return;
|
||||
}
|
||||
|
||||
logDebug() << "Searching on " << d->filterList->currentIndex() << " column" << endl;
|
||||
logDebug() << "Searching on " << d->filterList->currentIndex() << " column";
|
||||
|
||||
QList<int> filterColumns;
|
||||
//currentIndex() - 1 to do not count the "All" columns item
|
||||
|
|
|
@ -104,7 +104,7 @@ void LogViewModel::startingMultipleInsertions(Analyzer::ReadingMode /*readingMod
|
|||
d->concurrentMultipleInsertions++;
|
||||
|
||||
if (hasLocked == true) {
|
||||
logDebug() << "Starting multiple insertions..." << endl;
|
||||
logDebug() << "Starting multiple insertions...";
|
||||
|
||||
emit( processingMultipleInsertions(true) );
|
||||
|
||||
|
@ -121,7 +121,7 @@ void LogViewModel::endingMultipleInsertions(Analyzer::ReadingMode readingMode, i
|
|||
d->concurrentMultipleInsertions--;
|
||||
|
||||
if (lockMultipleInsertions() == true) {
|
||||
logDebug() << "Ending multiple insertions..." << endl;
|
||||
logDebug() << "Ending multiple insertions...";
|
||||
|
||||
//Scroll to the newest item if some lines have been added
|
||||
if (insertedLogLineCount>0) {
|
||||
|
@ -132,7 +132,7 @@ void LogViewModel::endingMultipleInsertions(Analyzer::ReadingMode readingMode, i
|
|||
d->logViewWidget->resizeColumns();
|
||||
}
|
||||
|
||||
logDebug() << "Enabling log view widget refresh..." << endl;
|
||||
logDebug() << "Enabling log view widget refresh...";
|
||||
d->logViewWidget->setUpdatesEnabled(true);
|
||||
|
||||
emit( processingMultipleInsertions(false) );
|
||||
|
@ -146,10 +146,10 @@ bool LogViewModel::lockMultipleInsertions() {
|
|||
|
||||
//Debug messages
|
||||
if (d->concurrentMultipleInsertions > 0) {
|
||||
logDebug() << "Existing multiple insertions request is still active" << endl;
|
||||
logDebug() << "Existing multiple insertions request is still active";
|
||||
}
|
||||
else if (d->concurrentMultipleInsertions < 0) {
|
||||
logError() << "Existing multiple insertions forgot to call this method" << endl;
|
||||
logError() << "Existing multiple insertions forgot to call this method";
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -181,14 +181,14 @@ bool LogViewModel::isNewer(LogLine* newLine) const {
|
|||
}
|
||||
|
||||
void LogViewModel::removeOldestLogLine() {
|
||||
//logDebug() << "Removing oldest log line" << endl;
|
||||
//logDebug() << "Removing oldest log line";
|
||||
|
||||
if (isEmpty()==true) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (d->oldestItem==NULL) {
|
||||
logWarning() << "Oldest item is null" << endl;
|
||||
logWarning() << "Oldest item is null";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ bool LogViewModel::insertNewLogLine(LogLine* line) {
|
|||
return true;
|
||||
}
|
||||
|
||||
//logDebug() << "Do not insert an old line : " << line->logItems() << endl;
|
||||
//logDebug() << "Do not insert an old line : " << line->logItems();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -123,14 +123,14 @@ void LogViewSearchWidget::findFirst() {
|
|||
}
|
||||
|
||||
void LogViewSearchWidget::findNext() {
|
||||
logDebug() << "Finding next" << endl;
|
||||
logDebug() << "Finding next";
|
||||
|
||||
LogViewWidgetItem* lastSelectedItem = d->logViewWidget->lastSelectedItem();
|
||||
internalFind(lastSelectedItem, LogViewSearchWidget::Next);
|
||||
}
|
||||
|
||||
void LogViewSearchWidget::findPrevious() {
|
||||
logDebug() << "Finding previous" << endl;
|
||||
logDebug() << "Finding previous";
|
||||
|
||||
LogViewWidgetItem* firstSelectedItem = d->logViewWidget->firstSelectedItem();
|
||||
internalFind(firstSelectedItem, LogViewSearchWidget::Previous);
|
||||
|
@ -299,7 +299,7 @@ void LogViewSearchWidget::highlightAll() {
|
|||
if (highlightAllButton->isChecked()) {
|
||||
unlightAll();
|
||||
|
||||
logDebug() << "Highlighting all" << endl;
|
||||
logDebug() << "Highlighting all";
|
||||
QTreeWidgetItemIterator it(d->logViewWidget, QTreeWidgetItemIterator::All);
|
||||
while ( *it != NULL ) {
|
||||
LogViewWidgetItem* item=static_cast<LogViewWidgetItem*> (*it);
|
||||
|
@ -320,7 +320,7 @@ void LogViewSearchWidget::highlightAll() {
|
|||
}
|
||||
|
||||
void LogViewSearchWidget::unlightAll() {
|
||||
logDebug() << "Unlighting all" << endl;
|
||||
logDebug() << "Unlighting all";
|
||||
|
||||
QTreeWidgetItemIterator it(d->logViewWidget, QTreeWidgetItemIterator::All);
|
||||
while ( *it != NULL ) {
|
||||
|
|
|
@ -90,7 +90,7 @@ LogViewWidget::~LogViewWidget() {
|
|||
}
|
||||
|
||||
void LogViewWidget::setColumns(const LogViewColumns& columns) {
|
||||
logDebug() << "Updating columns using " << columns << "..." << endl;
|
||||
logDebug() << "Updating columns using " << columns << "...";
|
||||
|
||||
//First, delete all current columns
|
||||
setColumnCount(0);
|
||||
|
@ -134,7 +134,7 @@ void LogViewWidget::setColumns(const LogViewColumns& columns) {
|
|||
|
||||
emit columnsChanged(columns);
|
||||
|
||||
logDebug() << "Log View Widget updated..." << endl;
|
||||
logDebug() << "Log View Widget updated...";
|
||||
|
||||
}
|
||||
|
||||
|
@ -256,7 +256,7 @@ void LogViewWidget::collapseAll() {
|
|||
}
|
||||
|
||||
void LogViewWidget::toggleToolTip(bool enabled) {
|
||||
logDebug() << "Toggle tool tip " << enabled << endl;
|
||||
logDebug() << "Toggle tool tip ";
|
||||
|
||||
QTreeWidgetItemIterator it(this);
|
||||
while (*it != NULL) {
|
||||
|
@ -269,7 +269,7 @@ void LogViewWidget::toggleToolTip(bool enabled) {
|
|||
}
|
||||
|
||||
void LogViewWidget::scrollToNewestItem() {
|
||||
logDebug() << "Scrolling to the newest item..." << endl;
|
||||
logDebug() << "Scrolling to the newest item...";
|
||||
|
||||
//Scroll to last item if requested
|
||||
if (KSystemLogConfig::newLinesDisplayed() == true) {
|
||||
|
@ -293,7 +293,7 @@ int LogViewWidget::notHiddenItemCount() {
|
|||
}
|
||||
|
||||
void LogViewWidget::toggleHeader(QAction* action) {
|
||||
logDebug() << "Toggling header" << endl;
|
||||
logDebug() << "Toggling header";
|
||||
|
||||
int columnIndex = action->data().toInt();
|
||||
if (header()->isSectionHidden(columnIndex) == true)
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* - logFatal()
|
||||
*
|
||||
* Use it like kDebug() function :
|
||||
* logDebug() << "Debug message" << list.size() << endl;
|
||||
* logDebug() << "Debug message" << list.size();
|
||||
*/
|
||||
|
||||
/*
|
||||
|
|
|
@ -76,14 +76,14 @@ void ProcessOutputLogFileReader::init() {
|
|||
d->processUpdater.setInterval(PROCESS_OUTPUT_UPDATER_INTERVAL);
|
||||
connect(&(d->processUpdater), SIGNAL(timeout()), this, SLOT(startProcess()));
|
||||
|
||||
logDebug() << "Using process name " << d->logFile.url().path() << endl;
|
||||
logDebug() << "Using process name " << d->logFile.url().path();
|
||||
}
|
||||
|
||||
void ProcessOutputLogFileReader::watchFile(bool enable) {
|
||||
Q_D(ProcessOutputLogFileReader);
|
||||
|
||||
if (enable == true) {
|
||||
logDebug() << "Monitoring process : " << d->logFile.url().path() << endl;
|
||||
logDebug() << "Monitoring process : " << d->logFile.url().path();
|
||||
|
||||
//Reinit current file position
|
||||
d->previousLinesCount = 0;
|
||||
|
@ -101,7 +101,7 @@ void ProcessOutputLogFileReader::watchFile(bool enable) {
|
|||
}
|
||||
|
||||
void ProcessOutputLogFileReader::startProcess() {
|
||||
logDebug() << "Starting process..." << endl;
|
||||
logDebug() << "Starting process...";
|
||||
|
||||
Q_D(ProcessOutputLogFileReader);
|
||||
|
||||
|
@ -111,7 +111,7 @@ void ProcessOutputLogFileReader::startProcess() {
|
|||
emit statusBarChanged(message);
|
||||
}
|
||||
|
||||
logDebug() << "Starting process..." << endl;
|
||||
logDebug() << "Starting process...";
|
||||
|
||||
d->process = new QProcess();
|
||||
connect(d->process, SIGNAL(readyReadStandardOutput()), this, SLOT(logFileModified()));
|
||||
|
@ -121,17 +121,17 @@ void ProcessOutputLogFileReader::startProcess() {
|
|||
|
||||
d->process->waitForStarted();
|
||||
|
||||
logDebug() << "Process started" << endl;
|
||||
logDebug() << "Process started";
|
||||
}
|
||||
|
||||
void ProcessOutputLogFileReader::closeProcess() {
|
||||
logDebug() << "Closing process..." << endl;
|
||||
logDebug() << "Closing process...";
|
||||
|
||||
Q_D(ProcessOutputLogFileReader);
|
||||
|
||||
//Get the size file for the next calculation
|
||||
d->previousLinesCount = d->availableStandardOutput.count();
|
||||
logDebug() << "New lines count : " << d->previousLinesCount << " (" << d->logFile.url().path() << ")" << endl;
|
||||
logDebug() << "New lines count : " << d->previousLinesCount << " (" << d->logFile.url().path() << ")";
|
||||
|
||||
d->availableStandardOutput.clear();
|
||||
|
||||
|
@ -141,7 +141,7 @@ void ProcessOutputLogFileReader::closeProcess() {
|
|||
d->process = NULL;
|
||||
}
|
||||
|
||||
logDebug() << "Process closed" << endl;
|
||||
logDebug() << "Process closed";
|
||||
}
|
||||
|
||||
void ProcessOutputLogFileReader::emitProcessOutput(int /*exitCode*/, QProcess::ExitStatus exitStatus) {
|
||||
|
@ -150,7 +150,7 @@ void ProcessOutputLogFileReader::emitProcessOutput(int /*exitCode*/, QProcess::E
|
|||
//First commit last lines of the buffer to the line list
|
||||
emptyBuffer();
|
||||
|
||||
logDebug() << "Process terminated" << d->previousLinesCount << "previously /" << d->availableStandardOutput.count() << "currently" << endl;
|
||||
logDebug() << "Process terminated" << d->previousLinesCount << "previously /" << d->availableStandardOutput.count() << "currently";
|
||||
|
||||
if (exitStatus==QProcess::CrashExit) {
|
||||
QString message(i18n("The process '%1' crashed.", d->logFile.url().path()));
|
||||
|
@ -167,7 +167,7 @@ void ProcessOutputLogFileReader::emitProcessOutput(int /*exitCode*/, QProcess::E
|
|||
}
|
||||
// If there are new lines in the file, insert only them or this is the first time we read this file
|
||||
else if (d->previousLinesCount!=0 && d->previousLinesCount <= d->availableStandardOutput.count()) {
|
||||
logDebug() << "Reading from line " << d->previousLinesCount << " (" << d->logFile.url().path() << ")" << endl;
|
||||
logDebug() << "Reading from line " << d->previousLinesCount << " (" << d->logFile.url().path() << ")";
|
||||
|
||||
QStringList newOutputs;
|
||||
|
||||
|
@ -178,14 +178,14 @@ void ProcessOutputLogFileReader::emitProcessOutput(int /*exitCode*/, QProcess::E
|
|||
++index;
|
||||
}
|
||||
|
||||
logDebug() << "Retrieving a part of the file..."<< endl;
|
||||
logDebug() << "Retrieving a part of the file...";
|
||||
|
||||
emit contentChanged(this, Analyzer::UpdatingRead, newOutputs);
|
||||
|
||||
}
|
||||
// Else reread all lines, clear log list
|
||||
else {
|
||||
logDebug() << "New process or process already read. Reading entire content" << endl;
|
||||
logDebug() << "New process or process already read. Reading entire content";
|
||||
|
||||
emit contentChanged(this, Analyzer::FullRead, d->availableStandardOutput);
|
||||
|
||||
|
@ -198,7 +198,7 @@ void ProcessOutputLogFileReader::emitProcessOutput(int /*exitCode*/, QProcess::E
|
|||
void ProcessOutputLogFileReader::logFileModified() {
|
||||
Q_D(ProcessOutputLogFileReader);
|
||||
|
||||
logDebug() << "Content available on process output..." << endl;
|
||||
logDebug() << "Content available on process output...";
|
||||
|
||||
//New added lines
|
||||
QByteArray bytesOutput = d->process->readAllStandardOutput();
|
||||
|
@ -217,7 +217,7 @@ void ProcessOutputLogFileReader::logFileModified() {
|
|||
endLinePos = d->buffer.indexOf(QLatin1String( "\n" ));
|
||||
}
|
||||
|
||||
logDebug() << "Received a total of" << d->availableStandardOutput.count() << "new lines" << endl;
|
||||
logDebug() << "Received a total of" << d->availableStandardOutput.count() << "new lines";
|
||||
}
|
||||
|
||||
|
||||
|
@ -229,7 +229,7 @@ void ProcessOutputLogFileReader::emptyBuffer() {
|
|||
Q_D(ProcessOutputLogFileReader);
|
||||
|
||||
if (d->buffer.isEmpty() == false) {
|
||||
logWarning() << "Buffer was not empty !!" << endl;
|
||||
logWarning() << "Buffer was not empty !!";
|
||||
d->availableStandardOutput.append(d->buffer);
|
||||
d->buffer.clear();
|
||||
}
|
||||
|
|
|
@ -202,7 +202,7 @@ void View::dragEnterEvent(QDragEnterEvent* event) {
|
|||
|
||||
//If URLs have been dropped
|
||||
if (urls.isEmpty() ) {
|
||||
logWarning() << "Empty drag and drop" << endl;
|
||||
logWarning() << "Empty drag and drop";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -212,12 +212,12 @@ void View::dragEnterEvent(QDragEnterEvent* event) {
|
|||
//TODO Add a recognition of binary files (using the Url mimetype) and refuse them
|
||||
|
||||
if (fileInfo.isReadable() == false) {
|
||||
logWarning() << "The drag and dropped file is not readable " << url.path() << endl;
|
||||
logWarning() << "The drag and dropped file is not readable " << url.path();
|
||||
return;
|
||||
}
|
||||
|
||||
if (fileInfo.isDir()) {
|
||||
logWarning() << "Tried to drag and drop a directory " << url.path() << endl;
|
||||
logWarning() << "Tried to drag and drop a directory " << url.path();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ LoggerDialog::~LoggerDialog() {
|
|||
}
|
||||
|
||||
void LoggerDialog::initialize() {
|
||||
logDebug() << "Initializing Logger dialog..." << endl;
|
||||
logDebug() << "Initializing Logger dialog...";
|
||||
|
||||
message->clear();
|
||||
message->setFocus();
|
||||
|
|
|
@ -76,7 +76,7 @@ int main(int argc, char** argv) {
|
|||
/*KSystemLog::MainWindow* mainWindow;*/
|
||||
new KSystemLog::MainWindow();
|
||||
for (int i = 0; i < args->count(); i++) {
|
||||
logDebug() << "Loading file " << args->url(i) << endl;
|
||||
logDebug() << "Loading file " << args->url(i);
|
||||
//TODO Implement this kind of loading
|
||||
//LogManager* firstLogManager = d->tabs->createTab();
|
||||
//d->tabs->load(Globals::instance()->findLogMode("openLogMode"), firstLogManager);
|
||||
|
|
|
@ -150,13 +150,13 @@ MainWindow::MainWindow() :
|
|||
d->tabs = NULL;
|
||||
d->statusBar = NULL;
|
||||
|
||||
logDebug() << "Starting KSystemLog..." << endl;
|
||||
logDebug() << "Starting KSystemLog...";
|
||||
|
||||
//Load log modes plugins
|
||||
loadLogModePlugins();
|
||||
|
||||
//Create the GUI from XML configuration
|
||||
logDebug() << "Creating Gui..." << endl;
|
||||
logDebug() << "Creating Gui...";
|
||||
createGUI();
|
||||
|
||||
//TODO Improve the status bar to add a custom widget which shows an history of latest message, and add a LogLevel for each ones
|
||||
|
@ -173,7 +173,7 @@ MainWindow::MainWindow() :
|
|||
// automatically save settings if changed: window size, toolbar
|
||||
// position, icon size, etc. Also to add actions for the statusbar
|
||||
// toolbar, and keybindings if necessary.
|
||||
logDebug() << "Setup Gui..." << endl;
|
||||
logDebug() << "Setup Gui...";
|
||||
setupGUI();
|
||||
|
||||
setupLogActions();
|
||||
|
@ -204,7 +204,7 @@ void MainWindow::loadLogModePlugins() {
|
|||
}
|
||||
|
||||
void MainWindow::setupTabLogViews() {
|
||||
logDebug() << "Creating tab widget..." << endl;
|
||||
logDebug() << "Creating tab widget...";
|
||||
|
||||
d->tabs=new TabLogViewsWidget();
|
||||
|
||||
|
@ -233,7 +233,7 @@ void MainWindow::setupStatusBar() {
|
|||
}
|
||||
|
||||
void MainWindow::prepareCreatedLogManager(LogManager* manager) {
|
||||
logDebug() << "Connecting to actions the new log manager and view..." << endl;
|
||||
logDebug() << "Connecting to actions the new log manager and view...";
|
||||
|
||||
//Contextual menu Log Manager signals
|
||||
QAction* separator;
|
||||
|
@ -285,7 +285,7 @@ void MainWindow::updateDetailDialog() {
|
|||
}
|
||||
|
||||
void MainWindow::updateSelection() {
|
||||
//logDebug() << "Updating selection..." << endl;
|
||||
//logDebug() << "Updating selection...";
|
||||
|
||||
LogManager* currentLogManager = d->tabs->activeLogManager();
|
||||
|
||||
|
@ -325,7 +325,7 @@ void MainWindow::updateReloading() {
|
|||
}
|
||||
|
||||
void MainWindow::closeEvent(QCloseEvent *event) {
|
||||
logDebug() << "Saving configuration before exit..." << endl;
|
||||
logDebug() << "Saving configuration before exit...";
|
||||
//Write the config to the file
|
||||
KSystemLogConfig::self()->writeConfig();
|
||||
KXmlGuiWindow::closeEvent(event);
|
||||
|
@ -359,7 +359,7 @@ void MainWindow::toggleNewLinesDisplaying(bool displayed) {
|
|||
}
|
||||
|
||||
void MainWindow::updateStatusBar() {
|
||||
logDebug() << "Updating status bar..." << endl;
|
||||
logDebug() << "Updating status bar...";
|
||||
|
||||
LogManager* currentManager=d->tabs->activeLogManager();
|
||||
|
||||
|
@ -378,14 +378,14 @@ void MainWindow::updateStatusBar() {
|
|||
}
|
||||
|
||||
void MainWindow::toggleResumePauseParsing(bool paused) {
|
||||
logDebug() << "Pausing parsing : " << paused << endl;
|
||||
logDebug() << "Pausing parsing : " << paused;
|
||||
|
||||
LogManager* currentLogManager = d->tabs->activeLogManager();
|
||||
if (currentLogManager != NULL) {
|
||||
currentLogManager->setParsingPaused(paused);
|
||||
}
|
||||
|
||||
logDebug() << "Parsing paused : " << paused << endl;
|
||||
logDebug() << "Parsing paused : " << paused;
|
||||
}
|
||||
|
||||
void MainWindow::changeResumePauseAction(bool paused) {
|
||||
|
@ -421,7 +421,7 @@ void MainWindow::fileOpen() {
|
|||
}
|
||||
|
||||
void MainWindow::showConfigurationDialog() {
|
||||
logDebug() << "Showing configuration dialog..." << endl;
|
||||
logDebug() << "Showing configuration dialog...";
|
||||
|
||||
if (d->configurationDialog == NULL) {
|
||||
d->configurationDialog = new ConfigurationDialog(this);
|
||||
|
@ -432,7 +432,7 @@ void MainWindow::showConfigurationDialog() {
|
|||
}
|
||||
|
||||
void MainWindow::showLogMessageDialog() {
|
||||
logDebug() << "Launching the Send message dialog box..." << endl;
|
||||
logDebug() << "Launching the Send message dialog box...";
|
||||
|
||||
if (d->loggedDialog == NULL) {
|
||||
d->loggedDialog = new LoggerDialog(this);
|
||||
|
@ -454,7 +454,7 @@ void MainWindow::changeWindowTitle(const QString& text) {
|
|||
|
||||
|
||||
void MainWindow::changeCurrentTab() {
|
||||
logDebug() << "Tab has changed" << endl;
|
||||
logDebug() << "Tab has changed";
|
||||
|
||||
LogManager* currentManager=d->tabs->activeLogManager();
|
||||
|
||||
|
@ -499,7 +499,7 @@ void MainWindow::changeCurrentTab() {
|
|||
//Updating Detail dialog
|
||||
updateDetailDialog();
|
||||
|
||||
logDebug() << "Tab changing done" << endl;
|
||||
logDebug() << "Tab changing done";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -510,7 +510,7 @@ void MainWindow::changeCurrentTab() {
|
|||
* later when this app is restored
|
||||
*/
|
||||
void MainWindow::saveProperties(KConfigGroup & /*configuration*/) {
|
||||
logDebug() << "Saving properties..." << endl;
|
||||
logDebug() << "Saving properties...";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -522,11 +522,11 @@ void MainWindow::saveProperties(KConfigGroup & /*configuration*/) {
|
|||
* in 'saveProperties'
|
||||
*/
|
||||
void MainWindow::readProperties( const KConfigGroup& /*configuration*/) {
|
||||
logDebug() << "Reading properties..." << endl;
|
||||
logDebug() << "Reading properties...";
|
||||
}
|
||||
|
||||
void MainWindow::toggleFilterBar() {
|
||||
logDebug() << "Toggling filter bar..." << d->filterBarAction->isChecked() << endl;
|
||||
logDebug() << "Toggling filter bar..." << d->filterBarAction->isChecked();
|
||||
|
||||
foreach (LogManager* manager, d->tabs->logManagers()) {
|
||||
manager->usedView()->toggleLogViewFilter(d->filterBarAction->isChecked());
|
||||
|
@ -546,7 +546,7 @@ void MainWindow::findPrevious() {
|
|||
}
|
||||
|
||||
void MainWindow::showSearchBar() {
|
||||
logDebug() << "Showing search bar..." << endl;
|
||||
logDebug() << "Showing search bar...";
|
||||
|
||||
LogManager* activeLogManager = d->tabs->activeLogManager();
|
||||
|
||||
|
@ -562,7 +562,7 @@ void MainWindow::showSearchBar() {
|
|||
}
|
||||
|
||||
void MainWindow::setupActions() {
|
||||
logDebug() << "Creating actions..." << endl;
|
||||
logDebug() << "Creating actions...";
|
||||
|
||||
QAction* fileOpenAction = actionCollection()->addAction(KStandardAction::Open, this, SLOT(fileOpen()));
|
||||
fileOpenAction->setToolTip(i18n("Open a file in KSystemLog"));
|
||||
|
@ -741,11 +741,11 @@ void MainWindow::selectLogModeAction(QAction* action) {
|
|||
}
|
||||
|
||||
if (currentMode==NULL) {
|
||||
logError() << "The selected mode does not exist" << endl;
|
||||
logError() << "The selected mode does not exist";
|
||||
return;
|
||||
}
|
||||
|
||||
logDebug() << "Selecting " << currentMode->name() << " (" << currentMode->id() << ")" << endl;
|
||||
logDebug() << "Selecting " << currentMode->name() << " (" << currentMode->id() << ")";
|
||||
|
||||
/*
|
||||
//If the user uses the middle button OR left button + shift OR left button + control : = it opens the log in a new tab
|
||||
|
|
|
@ -98,8 +98,8 @@ class AcpidAnalyzer : public Analyzer {
|
|||
date=QDate(year.toInt(), ParsingHelper::instance()->parseSyslogMonth(month), day.toInt());
|
||||
time=QTime(hour.toInt(), min.toInt(), sec.toInt());
|
||||
|
||||
//logDebug() << "Date=" << date.toString() << endl;
|
||||
//logDebug() << "Time=" << time.toString() << endl;
|
||||
//logDebug() << "Date=" << date.toString();
|
||||
//logDebug() << "Time=" << time.toString();
|
||||
|
||||
line=line.remove(0, dateEnd+2);
|
||||
|
||||
|
|
|
@ -172,7 +172,7 @@ class ApacheAnalyzer : public Analyzer {
|
|||
return (*it);
|
||||
}
|
||||
else {
|
||||
logError() << "New Log Level detected: Please send this log file to the KSystemLog developer to add it (" << type << ")" << endl;
|
||||
logError() << "New Log Level detected: Please send this log file to the KSystemLog developer to add it (" << type << ")";
|
||||
return Globals::instance()->noLogLevel();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ class ApacheConfigurationWidget : public LogModeConfigurationWidget {
|
|||
public slots:
|
||||
|
||||
void saveConfig() {
|
||||
logDebug() << "Saving config from Apache Options..." << endl;
|
||||
logDebug() << "Saving config from Apache Options...";
|
||||
|
||||
ApacheConfiguration* apacheConfiguration = Globals::instance()->findLogMode(QLatin1String( APACHE_LOG_MODE_ID ))->logModeConfiguration<ApacheConfiguration*>();
|
||||
apacheConfiguration->setApachePaths(apacheFileList->paths(apachePathsId));
|
||||
|
@ -90,11 +90,11 @@ class ApacheConfigurationWidget : public LogModeConfigurationWidget {
|
|||
protected:
|
||||
bool isValid() const {
|
||||
if (apacheFileList->isOneOfCategoryEmpty()==true) {
|
||||
logDebug() << "Apache configuration not valid" << endl;
|
||||
logDebug() << "Apache configuration not valid";
|
||||
return false;
|
||||
}
|
||||
|
||||
logDebug() << "Apache configuration valid" << endl;
|
||||
logDebug() << "Apache configuration valid";
|
||||
return true;
|
||||
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ FileList::FileList(QWidget* parent, const QString& descriptionText) :
|
|||
fileListHelper(this)
|
||||
{
|
||||
|
||||
logDebug() << "Initializing file list..." << endl;
|
||||
logDebug() << "Initializing file list...";
|
||||
|
||||
setupUi(this);
|
||||
|
||||
|
@ -71,7 +71,7 @@ FileList::FileList(QWidget* parent, const QString& descriptionText) :
|
|||
|
||||
updateButtons();
|
||||
|
||||
logDebug() << "File list initialized" << endl;
|
||||
logDebug() << "File list initialized";
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ QStringList FileListHelper::findPaths(KUrl::List urls) {
|
|||
//If this Url uses a joker (i.e. : "/var/log/apache2/*")
|
||||
if (url.fileName().contains(QLatin1Char( '*' ))) {
|
||||
const QStringList foundPaths = expandJoker(url.path());
|
||||
logDebug() << "Found paths of " << url.path() << ":" << foundPaths << endl;
|
||||
logDebug() << "Found paths of " << url.path() << ":" << foundPaths;
|
||||
foreach(const QString &foundPath, foundPaths) {
|
||||
paths.append(foundPath);
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ KUrl FileListHelper::openUrl(const QString& originPath) {
|
|||
QStringList FileListHelper::expandJoker(const KUrl& url) {
|
||||
QDir directory = QDir(url.path().left(url.path().count() - url.fileName().count()));
|
||||
|
||||
logDebug() << "Dir " << directory.path() << endl;
|
||||
logDebug() << "Dir " << directory.path();
|
||||
QString filename = url.fileName();
|
||||
|
||||
if (filename.isEmpty()) {
|
||||
|
|
|
@ -41,7 +41,7 @@ public:
|
|||
GenericLogModeConfiguration::GenericLogModeConfiguration(const QString& configurationGroup, const QStringList& defaultLogFilesPaths, const QList<int> defaultLogFilesLevels) :
|
||||
d(new GenericLogModeConfigurationPrivate()) {
|
||||
|
||||
logDebug() << "Using Configuration Group : " << configurationGroup << endl;
|
||||
logDebug() << "Using Configuration Group : " << configurationGroup;
|
||||
configuration->setCurrentGroup(configurationGroup);
|
||||
|
||||
configuration->addItemStringList(QLatin1String( "LogFilesPaths" ), d->logFilesPaths, defaultLogFilesPaths, QLatin1String( "LogFilesPaths" ));
|
||||
|
@ -77,7 +77,7 @@ QList<LogFile> GenericLogModeConfiguration::findGenericLogFiles() {
|
|||
QList<LogFile> logFiles;
|
||||
|
||||
if (d->logFilesPaths.size() != d->logFilesLevels.size()) {
|
||||
logDebug() << i18n("The two arrays size are different, skipping the reading of log files.") << endl;
|
||||
logDebug() << i18n("The two arrays size are different, skipping the reading of log files.");
|
||||
return logFiles;
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,7 @@ QList<LogFile> GenericLogModeConfiguration::findGenericLogFiles() {
|
|||
|
||||
KUrl url(stringValue);
|
||||
if (!url.isValid()) {
|
||||
logWarning() << i18n("URL '%1' is not valid, skipping this URL.", url.path()) << endl;
|
||||
logWarning() << i18n("URL '%1' is not valid, skipping this URL.", url.path());
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ LogLevelFileList::LogLevelFileList(QWidget* parent, const QString& description)
|
|||
FileList(parent, description)
|
||||
{
|
||||
|
||||
logDebug() << "Initializing specific file list..." << endl;
|
||||
logDebug() << "Initializing specific file list...";
|
||||
|
||||
changeItem=new QPushButton(i18n("&Change Status..."));
|
||||
changeItem->setToolTip(i18n("Change the level of the current file(s)"));
|
||||
|
@ -78,7 +78,7 @@ LogLevelFileList::LogLevelFileList(QWidget* parent, const QString& description)
|
|||
|
||||
updateSpecificButtons();
|
||||
|
||||
logDebug() << "Specific file list initialized" << endl;
|
||||
logDebug() << "Specific file list initialized";
|
||||
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ void LogLevelFileList::updateSpecificButtons() {
|
|||
}
|
||||
|
||||
void LogLevelFileList::changeItemType() {
|
||||
logDebug() << "Changing item type..." << endl;
|
||||
logDebug() << "Changing item type...";
|
||||
|
||||
LogLevelSelectionDialog logLevelSelectionDialog(this);
|
||||
|
||||
|
@ -165,7 +165,7 @@ QList<int> LogLevelFileList::levels() {
|
|||
void LogLevelFileList::addPaths(const QStringList& stringList, const QList<int>& valueList) {
|
||||
//A little security test
|
||||
if (stringList.size() != valueList.size()) {
|
||||
logDebug() << i18n("The two arrays size are different, skipping the reading of generic paths.") << endl;
|
||||
logDebug() << i18n("The two arrays size are different, skipping the reading of generic paths.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ MultipleFileList::MultipleFileList(QWidget* parent, const QString& descriptionTe
|
|||
fileListHelper(this)
|
||||
{
|
||||
|
||||
logDebug() << "Initializing multiple file list..." << endl;
|
||||
logDebug() << "Initializing multiple file list...";
|
||||
|
||||
setupUi(this);
|
||||
|
||||
|
@ -74,7 +74,7 @@ MultipleFileList::MultipleFileList(QWidget* parent, const QString& descriptionTe
|
|||
|
||||
updateButtons();
|
||||
|
||||
logDebug() << "Multiple File list initialized" << endl;
|
||||
logDebug() << "Multiple File list initialized";
|
||||
|
||||
}
|
||||
|
||||
|
@ -83,7 +83,7 @@ MultipleFileList::~MultipleFileList() {
|
|||
}
|
||||
|
||||
void MultipleFileList::updateButtons() {
|
||||
logDebug() << "Updating buttons..." << endl;
|
||||
logDebug() << "Updating buttons...";
|
||||
|
||||
if (isFileListsEmpty() == true)
|
||||
fileListHelper.setEnabledAction(removeAll, false);
|
||||
|
@ -128,18 +128,18 @@ void MultipleFileList::updateButtons() {
|
|||
fileListHelper.setEnabledAction(down, false);
|
||||
}
|
||||
|
||||
logDebug() << "Buttons updated" << endl;
|
||||
logDebug() << "Buttons updated";
|
||||
}
|
||||
|
||||
bool MultipleFileList::isFileListsEmpty() const {
|
||||
for (int i=0; i<fileList->topLevelItemCount(); ++i) {
|
||||
if (categoryCount(i) != 0) {
|
||||
logDebug() << "Is not empty" << endl;
|
||||
logDebug() << "Is not empty";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
logDebug() << "Is empty" << endl;
|
||||
logDebug() << "Is empty";
|
||||
return true;
|
||||
|
||||
}
|
||||
|
@ -147,12 +147,12 @@ bool MultipleFileList::isFileListsEmpty() const {
|
|||
bool MultipleFileList::isOneOfCategoryEmpty() const {
|
||||
for (int i=0; i<fileList->topLevelItemCount(); ++i) {
|
||||
if (categoryCount(i) == 0) {
|
||||
logDebug() << "A category is empty" << endl;
|
||||
logDebug() << "A category is empty";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
logDebug() << "No category empty" << endl;
|
||||
logDebug() << "No category empty";
|
||||
return false;
|
||||
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ bool MultipleFileList::isOneOfCategoryEmpty() const {
|
|||
int MultipleFileList::categoryCount(int index) const {
|
||||
QTreeWidgetItem* item = fileList->topLevelItem(index);
|
||||
if (item==NULL) {
|
||||
logError() << "Index out of range" << index << endl;
|
||||
logError() << "Index out of range" << index;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -201,7 +201,7 @@ int MultipleFileList::addCategory(const QString& itemName, const QString& button
|
|||
}
|
||||
|
||||
void MultipleFileList::addItem(int category) {
|
||||
logDebug() << "Adding item" << category << endl;
|
||||
logDebug() << "Adding item" << category;
|
||||
|
||||
//Open a standard Filedialog
|
||||
KUrl::List urls=fileListHelper.openUrls();
|
||||
|
@ -219,26 +219,26 @@ void MultipleFileList::addItem(int category) {
|
|||
}
|
||||
|
||||
void MultipleFileList::addItemInternal(QTreeWidgetItem* categoryItem, const QString& path) {
|
||||
logDebug() << "Adding" << path << "to" << categoryItem->text(0) << endl;
|
||||
logDebug() << "Adding" << path << "to" << categoryItem->text(0);
|
||||
QTreeWidgetItem* item = new QTreeWidgetItem(QStringList(path));
|
||||
categoryItem->addChild(item);
|
||||
categoryItem->setExpanded(true);
|
||||
}
|
||||
|
||||
QTreeWidgetItem* MultipleFileList::findCategoryOfChild(QTreeWidgetItem* childItem) {
|
||||
logDebug() << "Finding Category of" << childItem->text(0) << endl;
|
||||
logDebug() << "Finding Category of" << childItem->text(0);
|
||||
|
||||
for(int i=0; i<fileList->topLevelItemCount(); ++i) {
|
||||
QTreeWidgetItem* item = fileList->topLevelItem(i);
|
||||
|
||||
if (item->indexOfChild(childItem) != -1) {
|
||||
logDebug() << "Category of" << childItem->text(0) << "is" << item->text(0) << endl;
|
||||
logDebug() << "Category of" << childItem->text(0) << "is" << item->text(0);
|
||||
return item;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
logDebug() << "No Category of" << childItem->text(0) << endl;
|
||||
logDebug() << "No Category of" << childItem->text(0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -337,9 +337,9 @@ void MultipleFileList::unselectAllItems() {
|
|||
}
|
||||
|
||||
void MultipleFileList::updateEmptyItems() {
|
||||
logDebug() << "Updating empty items..." << endl;
|
||||
logDebug() << "Updating empty items...";
|
||||
|
||||
logDebug() << "Adding empty items..." << endl;
|
||||
logDebug() << "Adding empty items...";
|
||||
|
||||
for(int i=0; i<fileList->topLevelItemCount(); ++i) {
|
||||
QTreeWidgetItem* categoryItem = fileList->topLevelItem(i);
|
||||
|
@ -352,29 +352,29 @@ void MultipleFileList::updateEmptyItems() {
|
|||
|
||||
removeEmptyItems();
|
||||
|
||||
logDebug() << "Empty items updated" << endl;
|
||||
logDebug() << "Empty items updated";
|
||||
}
|
||||
|
||||
void MultipleFileList::removeEmptyItems() {
|
||||
logDebug() << "Removing empty items..." << endl;
|
||||
logDebug() << "Removing empty items...";
|
||||
|
||||
//Remove empty items of lists
|
||||
for(int categoryIndex=0; categoryIndex<fileList->topLevelItemCount(); ++categoryIndex) {
|
||||
QTreeWidgetItem* categoryItem = fileList->topLevelItem(categoryIndex);
|
||||
|
||||
logDebug() << "Removing empty items of " << categoryItem->text(0) << endl;
|
||||
logDebug() << "Removing empty items of " << categoryItem->text(0);
|
||||
|
||||
for(int i=0; i<categoryItem->childCount(); ++i) {
|
||||
QTreeWidgetItem* childItem = categoryItem->child(i);
|
||||
|
||||
if (isEmptyItem(childItem) == true && categoryItem->childCount() > 1) {
|
||||
logDebug() << "Remove a child item" << endl;
|
||||
logDebug() << "Remove a child item";
|
||||
delete categoryItem->takeChild(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
logDebug() << "Empty items of " << categoryItem->text(0) << "removed" << endl;
|
||||
logDebug() << "Empty items of " << categoryItem->text(0) << "removed";
|
||||
|
||||
|
||||
}
|
||||
|
@ -390,7 +390,7 @@ bool MultipleFileList::isEmptyItem(QTreeWidgetItem* item) const {
|
|||
}
|
||||
|
||||
void MultipleFileList::addEmptyItem(QTreeWidgetItem* item) {
|
||||
logDebug() << "Adding an empty item..." << endl;
|
||||
logDebug() << "Adding an empty item...";
|
||||
|
||||
QTreeWidgetItem* emptyItem = new QTreeWidgetItem(item, QStringList(i18n("No log file...")));
|
||||
item->setExpanded(true);
|
||||
|
|
|
@ -135,7 +135,7 @@ QDateTime ParsingHelper::parseSyslogDateTime(const QString& dateTime) {
|
|||
|
||||
int firstPosition = regex.indexIn(dateTime);
|
||||
if (firstPosition == -1) {
|
||||
logDebug() << "Unable to parse date " << dateTime << endl;
|
||||
logDebug() << "Unable to parse date " << dateTime;
|
||||
return QDateTime::currentDateTime();
|
||||
}
|
||||
|
||||
|
|
|
@ -75,11 +75,11 @@ Analyzer::LogFileSortMode SyslogAnalyzer::logFileSortMode() {
|
|||
* TODO Improve speed of this method (with KRegExp class for example)
|
||||
*/
|
||||
LogLine* SyslogAnalyzer::parseMessage(const QString& logLine, const LogFile& originalFile) {
|
||||
//logDebug() << QTime::currentTime() << " : Reading line : " << logLine << " from " << originalFile.url.path() << endl;
|
||||
//logDebug() << QTime::currentTime() << " : Reading line : " << logLine << " from " << originalFile.url.path();
|
||||
|
||||
//15 is the default date size format
|
||||
if (logLine.length()<15) {
|
||||
logDebug() << "Too short line" << endl;
|
||||
logDebug() << "Too short line";
|
||||
return undefinedLogLine(logLine, originalFile);
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ LogLine* SyslogAnalyzer::parseMessage(const QString& logLine, const LogFile& ori
|
|||
|
||||
QDateTime dateTime(QDate(year, monthNum, dayNum), QTime(h, m, s));
|
||||
if (dateTime.isValid() == false) {
|
||||
logDebug() << "Malformed date and time" << endl;
|
||||
logDebug() << "Malformed date and time";
|
||||
return undefinedLogLine(logLine, originalFile);
|
||||
}
|
||||
|
||||
|
|
|
@ -89,21 +89,21 @@ class CronConfigurationWidget : public LogModeConfigurationWidget {
|
|||
|
||||
bool isValid() const {
|
||||
if (fileList->isEmpty() == true) {
|
||||
logDebug() << "Cron configuration not valid" << endl;
|
||||
logDebug() << "Cron configuration not valid";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (processFilterGroup->isChecked() && processFilter->text().isEmpty()) {
|
||||
logDebug() << "Cron configuration not valid" << endl;
|
||||
logDebug() << "Cron configuration not valid";
|
||||
return false;
|
||||
}
|
||||
|
||||
logDebug() << "Cron configuration valid" << endl;
|
||||
logDebug() << "Cron configuration valid";
|
||||
return true;
|
||||
}
|
||||
|
||||
void saveConfig() {
|
||||
logDebug() << "Saving config from Cron Options..." << endl;
|
||||
logDebug() << "Saving config from Cron Options...";
|
||||
|
||||
CronConfiguration* cronConfiguration = Globals::instance()->findLogMode(QLatin1String( CRON_LOG_MODE_ID ))->logModeConfiguration<CronConfiguration*>();
|
||||
cronConfiguration->setCronPaths(fileList->paths());
|
||||
|
|
|
@ -93,7 +93,7 @@ class CupsAccessAnalyzer : public Analyzer {
|
|||
|
||||
int firstPosition = cupsAccessRegex.indexIn(logLine);
|
||||
if (firstPosition == -1) {
|
||||
logDebug() << "Unable to parse line " << logLine << endl;
|
||||
logDebug() << "Unable to parse line " << logLine;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -136,7 +136,7 @@ class CupsAnalyzer : public Analyzer {
|
|||
return(*it);
|
||||
}
|
||||
else {
|
||||
logError() << i18n("New Log Level detected: Please send this log file to the KSystemLog developer to add it.") << endl;
|
||||
logError() << i18n("New Log Level detected: Please send this log file to the KSystemLog developer to add it.");
|
||||
return(Globals::instance()->noLogLevel());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ class CupsConfigurationWidget : public LogModeConfigurationWidget {
|
|||
public slots:
|
||||
|
||||
void saveConfig() {
|
||||
logDebug() << "Saving config from Cups Options..." << endl;
|
||||
logDebug() << "Saving config from Cups Options...";
|
||||
|
||||
CupsConfiguration* cupsConfiguration = Globals::instance()->findLogMode(QLatin1String( CUPS_LOG_MODE_ID ))->logModeConfiguration<CupsConfiguration*>();
|
||||
cupsConfiguration->setCupsPaths(cupsFileList->paths(cupsPathsId));
|
||||
|
@ -97,11 +97,11 @@ class CupsConfigurationWidget : public LogModeConfigurationWidget {
|
|||
protected:
|
||||
bool isValid() const {
|
||||
if (cupsFileList->isOneOfCategoryEmpty()==true) {
|
||||
logDebug() << "Cups configuration not valid" << endl;
|
||||
logDebug() << "Cups configuration not valid";
|
||||
return false;
|
||||
}
|
||||
|
||||
logDebug() << "Cups configuration valid" << endl;
|
||||
logDebug() << "Cups configuration valid";
|
||||
return true;
|
||||
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ class CupsPageAnalyzer : public Analyzer {
|
|||
|
||||
int firstPosition = cupsPageRegex.indexIn(logLine);
|
||||
if (firstPosition == -1) {
|
||||
logDebug() << "Unable to parse line " << logLine << endl;
|
||||
logDebug() << "Unable to parse line " << logLine;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -85,18 +85,18 @@ class CupsPdfAnalyzer : public Analyzer {
|
|||
|
||||
int firstPosition = cupsPdfRegex.indexIn(logLine);
|
||||
if (firstPosition == -1) {
|
||||
logDebug() << "Unable to parse line " << logLine << endl;
|
||||
logDebug() << "Unable to parse line " << logLine;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
QStringList capturedTexts = cupsPdfRegex.capturedTexts();
|
||||
|
||||
/*
|
||||
logDebug() << "------------------------------------------" << endl;
|
||||
logDebug() << "------------------------------------------";
|
||||
foreach(QString cap, capturedTexts) {
|
||||
logDebug() << cap << endl;
|
||||
logDebug() << cap;
|
||||
}
|
||||
logDebug() << "------------------------------------------" << endl;
|
||||
logDebug() << "------------------------------------------";
|
||||
*/
|
||||
|
||||
//Remove full line
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include <QRegExp>
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
|
||||
#include <klocale.h>
|
||||
|
||||
|
@ -87,7 +88,7 @@ class KernelAnalyzer : public Analyzer {
|
|||
long updateSeconds = pureSecondsString.toLong();
|
||||
|
||||
startupDateTime = QDateTime::currentDateTime().addSecs(- updateSeconds);
|
||||
logDebug() << "Startup time : " << startupDateTime << endl;
|
||||
logDebug() << "Startup time : " << startupDateTime;
|
||||
|
||||
}
|
||||
|
||||
|
@ -105,7 +106,7 @@ class KernelAnalyzer : public Analyzer {
|
|||
//If we have the date, we are able to update the start date
|
||||
if (timeExists != -1) {
|
||||
|
||||
//logDebug() << componentRegexp.cap(1).toInt() << "and" << componentRegexp.cap(2).toInt() << endl;
|
||||
//logDebug() << componentRegexp.cap(1).toInt() << "and" << componentRegexp.cap(2).toInt();
|
||||
dateTime = dateTime.addSecs( timeRegex.cap(1).toInt() );
|
||||
dateTime = dateTime.addMSecs( timeRegex.cap(2).toInt()/1000 );
|
||||
|
||||
|
@ -118,13 +119,13 @@ class KernelAnalyzer : public Analyzer {
|
|||
}
|
||||
|
||||
/*
|
||||
logDebug() << "--------------------------------" << endl;
|
||||
logDebug() << logLine << endl;
|
||||
logDebug() << "Secs : " << dateTime.time().second() << endl;
|
||||
logDebug() << "MSec : " << dateTime.time().msec() << endl;
|
||||
logDebug() << "Comp : " << messages.at(0) << endl;
|
||||
logDebug() << "Msg : " << messages.at(1) << endl;
|
||||
logDebug() << "--------------------------------" << endl;
|
||||
logDebug() << "--------------------------------";
|
||||
logDebug() << logLine;
|
||||
logDebug() << "Secs : " << dateTime.time().second();
|
||||
logDebug() << "MSec : " << dateTime.time().msec();
|
||||
logDebug() << "Comp : " << messages.at(0);
|
||||
logDebug() << "Msg : " << messages.at(1);
|
||||
logDebug() << "--------------------------------";
|
||||
*/
|
||||
|
||||
LogLine* line = new LogLine(
|
||||
|
|
|
@ -64,7 +64,7 @@ Analyzer* OpenLogMode::createAnalyzer() {
|
|||
QList<LogFile> OpenLogMode::createLogFiles() {
|
||||
//Open a standard Filedialog
|
||||
KUrl openingFileName(KFileDialog::getOpenUrl(KUrl(), QString(), parent, i18n("Open Location")));
|
||||
logDebug() << "Opening file : " << openingFileName.url() << endl;
|
||||
logDebug() << "Opening file : " << openingFileName.url();
|
||||
|
||||
if (openingFileName.isEmpty()) {
|
||||
return QList<LogFile>();
|
||||
|
|
|
@ -56,7 +56,7 @@ class PostfixAnalyzer : public SyslogAnalyzer {
|
|||
|
||||
items.append(message + "\n" + message);
|
||||
|
||||
logDebug() << "Coucou" << items.at(items.count()-1) << endl;
|
||||
logDebug() << "Coucou" << items.at(items.count()-1);
|
||||
|
||||
syslogLine->setLogItems(items);
|
||||
return syslogLine;
|
||||
|
|
|
@ -67,16 +67,16 @@ class PostfixConfigurationWidget : public LogModeConfigurationWidget {
|
|||
|
||||
bool isValid() const {
|
||||
if (fileList->isEmpty() == false) {
|
||||
logDebug() << "Postfix configuration valid" << endl;
|
||||
logDebug() << "Postfix configuration valid";
|
||||
return true;
|
||||
}
|
||||
|
||||
logDebug() << "Postfix configuration not valid" << endl;
|
||||
logDebug() << "Postfix configuration not valid";
|
||||
return false;
|
||||
}
|
||||
|
||||
void saveConfig() {
|
||||
logDebug() << "Saving config from Postfix Options..." << endl;
|
||||
logDebug() << "Saving config from Postfix Options...";
|
||||
|
||||
PostfixConfiguration* configuration = Globals::instance()->findLogMode(QLatin1String( POSTFIX_LOG_MODE_ID ))->logModeConfiguration<PostfixConfiguration*>();
|
||||
configuration->setLogFilesPaths(fileList->paths());
|
||||
|
|
|
@ -142,7 +142,7 @@ class SambaAnalyzer : public Analyzer {
|
|||
list.append(function);
|
||||
list.append(lineNumber);
|
||||
|
||||
logDebug() << "Creating new line " << endl;
|
||||
logDebug() << "Creating new line ";
|
||||
|
||||
LogLine* returnedLogLine = currentLogLine;
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ class SambaConfigurationWidget : public LogModeConfigurationWidget {
|
|||
public slots:
|
||||
|
||||
void saveConfig() {
|
||||
logDebug() << "Saving config from Samba Options..." << endl;
|
||||
logDebug() << "Saving config from Samba Options...";
|
||||
|
||||
SambaConfiguration* sambaConfiguration = Globals::instance()->findLogMode(QLatin1String( SAMBA_LOG_MODE_ID ))->logModeConfiguration<SambaConfiguration*>();
|
||||
sambaConfiguration->setSambaPaths(sambaFileList->paths(sambaPathsId));
|
||||
|
@ -93,11 +93,11 @@ class SambaConfigurationWidget : public LogModeConfigurationWidget {
|
|||
protected:
|
||||
bool isValid() const {
|
||||
if (sambaFileList->isOneOfCategoryEmpty()==true) {
|
||||
logDebug() << "Samba configuration not valid" << endl;
|
||||
logDebug() << "Samba configuration not valid";
|
||||
return false;
|
||||
}
|
||||
|
||||
logDebug() << "Samba configuration valid" << endl;
|
||||
logDebug() << "Samba configuration valid";
|
||||
return true;
|
||||
|
||||
}
|
||||
|
|
|
@ -67,16 +67,16 @@ class SystemConfigurationWidget : public LogModeConfigurationWidget {
|
|||
|
||||
bool isValid() const {
|
||||
if (fileList->isEmpty() == false) {
|
||||
logDebug() << "System configuration valid" << endl;
|
||||
logDebug() << "System configuration valid";
|
||||
return true;
|
||||
}
|
||||
|
||||
logDebug() << "System configuration not valid" << endl;
|
||||
logDebug() << "System configuration not valid";
|
||||
return false;
|
||||
}
|
||||
|
||||
void saveConfig() {
|
||||
logDebug() << "Saving config from System Options..." << endl;
|
||||
logDebug() << "Saving config from System Options...";
|
||||
|
||||
SystemConfiguration* systemConfiguration = Globals::instance()->findLogMode(QLatin1String( SYSTEM_LOG_MODE_ID ))->logModeConfiguration<SystemConfiguration*>();
|
||||
systemConfiguration->setLogFilesPaths(fileList->paths());
|
||||
|
|
|
@ -90,12 +90,12 @@ TabLogViewsWidget::~TabLogViewsWidget() {
|
|||
|
||||
//Delete existing tabs and related tabLogManagers
|
||||
foreach(TabLogManager* tabLogManager, copy) {
|
||||
logDebug() << "Deleting " << tabLogManager->logManager()->logMode()->name() << endl;
|
||||
logDebug() << "Deleting " << tabLogManager->logManager()->logMode()->name();
|
||||
removePage(tabLogManager->logManager()->usedView());
|
||||
|
||||
d->tabLogManagers.removeAll(tabLogManager);
|
||||
delete tabLogManager;
|
||||
logDebug() << tabLogManager->logManager()->logMode()->name() << " deleted" << endl;
|
||||
logDebug() << tabLogManager->logManager()->logMode()->name() << " deleted";
|
||||
}
|
||||
*/
|
||||
|
||||
|
@ -103,7 +103,7 @@ TabLogViewsWidget::~TabLogViewsWidget() {
|
|||
}
|
||||
|
||||
void TabLogViewsWidget::newTab(View* view) {
|
||||
logDebug() << "Inserting to a new tab the view " << endl;
|
||||
logDebug() << "Inserting to a new tab the view ";
|
||||
|
||||
//Add a tab at the end of the widget
|
||||
insertTab(count(), view, SmallIcon(QLatin1String( NO_MODE_ICON )), i18n("No Log"));
|
||||
|
@ -116,7 +116,7 @@ void TabLogViewsWidget::newTab(View* view) {
|
|||
}
|
||||
|
||||
void TabLogViewsWidget::changeTab(View* view, const QIcon& icon, const QString& label) {
|
||||
logDebug() << "Changing tab " << label << endl;
|
||||
logDebug() << "Changing tab " << label;
|
||||
int index = indexOf(view);
|
||||
setTabIcon(index, icon);
|
||||
setTabText(index, label);
|
||||
|
@ -142,7 +142,7 @@ TabLogManager* TabLogViewsWidget::findRelatedTabLogManager(View* view) {
|
|||
}
|
||||
}
|
||||
|
||||
logError() << "No log manager found" << endl;
|
||||
logError() << "No log manager found";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -157,19 +157,19 @@ LogManager* TabLogViewsWidget::activeLogManager() {
|
|||
}
|
||||
|
||||
LogManager* TabLogViewsWidget::createTab() {
|
||||
logDebug() << "Creating a new tab" << endl;
|
||||
logDebug() << "Creating a new tab";
|
||||
|
||||
return newTabLogManager()->logManager();
|
||||
}
|
||||
|
||||
void TabLogViewsWidget::moveTabLeft() {
|
||||
logDebug() << "Duplicate tab to the left" << endl;
|
||||
logDebug() << "Duplicate tab to the left";
|
||||
|
||||
TabLogManager* currentTabLogManager=activeTabLogManager();
|
||||
int position=indexOf(currentTabLogManager->logManager()->usedView());
|
||||
|
||||
if (position<=0) {
|
||||
logError() << "Tab Position <= 0 : " << position << endl;
|
||||
logError() << "Tab Position <= 0 : " << position;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -181,13 +181,13 @@ void TabLogViewsWidget::moveTabLeft() {
|
|||
}
|
||||
|
||||
void TabLogViewsWidget::moveTabRight() {
|
||||
logDebug() << "Duplicate tab to the right" << endl;
|
||||
logDebug() << "Duplicate tab to the right";
|
||||
|
||||
TabLogManager* currentTabLogManager=activeTabLogManager();
|
||||
int position=indexOf(currentTabLogManager->logManager()->usedView());
|
||||
|
||||
if (position>=count()-1) {
|
||||
logError() << "Tab Position >= count()-1 : " << position << endl;
|
||||
logError() << "Tab Position >= count()-1 : " << position;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ void TabLogViewsWidget::moveTabRight() {
|
|||
}
|
||||
|
||||
LogManager* TabLogViewsWidget::duplicateTab() {
|
||||
logDebug() << "Duplicate current tab" << endl;
|
||||
logDebug() << "Duplicate current tab";
|
||||
|
||||
TabLogManager* currentManager=activeTabLogManager();
|
||||
|
||||
|
@ -214,11 +214,11 @@ LogManager* TabLogViewsWidget::duplicateTab() {
|
|||
}
|
||||
|
||||
TabLogManager* TabLogViewsWidget::newTabLogManager() {
|
||||
logDebug() << "Creating new View..." << endl;
|
||||
logDebug() << "Creating new View...";
|
||||
|
||||
View* view = new View(this);
|
||||
|
||||
logDebug() << "Creating new LogManager..." << endl;
|
||||
logDebug() << "Creating new LogManager...";
|
||||
|
||||
LogManager* logManager=new LogManager(view);
|
||||
|
||||
|
@ -229,7 +229,7 @@ TabLogManager* TabLogViewsWidget::newTabLogManager() {
|
|||
TabLogManager* tabLogManager = new TabLogManager(logManager);
|
||||
d->tabLogManagers.append(tabLogManager);
|
||||
|
||||
logDebug() << "New LogManager created" << endl;
|
||||
logDebug() << "New LogManager created";
|
||||
|
||||
//Finally add the view to the tabs
|
||||
newTab(view);
|
||||
|
@ -248,7 +248,7 @@ TabLogManager* TabLogViewsWidget::newTabLogManager() {
|
|||
|
||||
void TabLogViewsWidget::closeTab() {
|
||||
if (count()==1) {
|
||||
logError() << "Cannot close tab, one tab left" << endl;
|
||||
logError() << "Cannot close tab, one tab left";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -267,10 +267,10 @@ void TabLogViewsWidget::closeTab() {
|
|||
}
|
||||
|
||||
void TabLogViewsWidget::load(LogMode* logMode, LogManager* manager) {
|
||||
logDebug() << "Loading a new mode : " << logMode->name() << endl;
|
||||
logDebug() << "Loading a new mode : " << logMode->name();
|
||||
|
||||
if (manager==NULL || logMode==NULL) {
|
||||
logError() << "Error while loading a manager " << endl;
|
||||
logError() << "Error while loading a manager";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -282,7 +282,7 @@ void TabLogViewsWidget::load(LogMode* logMode, LogManager* manager) {
|
|||
}
|
||||
|
||||
void TabLogViewsWidget::reloadCurrent() {
|
||||
logDebug() << "Reloading current log manager..." << endl;
|
||||
logDebug() << "Reloading current log manager...";
|
||||
|
||||
LogManager* manager=activeLogManager();
|
||||
|
||||
|
@ -293,7 +293,7 @@ void TabLogViewsWidget::reloadCurrent() {
|
|||
}
|
||||
|
||||
void TabLogViewsWidget::reloadAll() {
|
||||
logDebug() << "Reloading all tabs..." << endl;
|
||||
logDebug() << "Reloading all tabs...";
|
||||
|
||||
foreach (TabLogManager* tabLogManager, d->tabLogManagers) {
|
||||
//Log manager without log mode does not need to be reloaded
|
||||
|
@ -316,7 +316,7 @@ void TabLogViewsWidget::reloadAll() {
|
|||
}
|
||||
|
||||
void TabLogViewsWidget::changeCurrentTab() {
|
||||
logDebug() << "Changing current tab..." << endl;
|
||||
logDebug() << "Changing current tab...";
|
||||
|
||||
TabLogManager* tabLogManager=activeTabLogManager();
|
||||
|
||||
|
@ -326,7 +326,7 @@ void TabLogViewsWidget::changeCurrentTab() {
|
|||
//If the tab displayed the new added line count, rename it to the default log mode name
|
||||
changeTab(tabLogManager->logManager()->usedView(), logModeIcon(tabLogManager->logManager()->logMode()), tabLogManager->title());
|
||||
|
||||
logDebug() << "Current tab changed" << endl;
|
||||
logDebug() << "Current tab changed";
|
||||
}
|
||||
|
||||
void TabLogViewsWidget::changeReloadingTab(View* view, bool reloading) {
|
||||
|
@ -339,7 +339,7 @@ void TabLogViewsWidget::changeReloadingTab(View* view, bool reloading) {
|
|||
}
|
||||
|
||||
void TabLogViewsWidget::changeTitleAddedLines(View* view, int addedLinesSinceLastUpdate) {
|
||||
logDebug() << "Changing title" << addedLinesSinceLastUpdate << " added lines..." << endl;
|
||||
logDebug() << "Changing title" << addedLinesSinceLastUpdate << " added lines...";
|
||||
LogManager* currentManager=activeLogManager();
|
||||
|
||||
//Only display added line on tab title if this is not an update of the current tab
|
||||
|
@ -403,7 +403,7 @@ void TabLogViewsWidget::prepareContextMenu(bool /*onTab*/) {
|
|||
}
|
||||
|
||||
void TabLogViewsWidget::showContextMenu(const QPoint& cursorPosition) {
|
||||
logDebug() << "Showing context menu at " << cursorPosition << endl;
|
||||
logDebug() << "Showing context menu at " << cursorPosition;
|
||||
|
||||
prepareContextMenu(false);
|
||||
|
||||
|
@ -412,7 +412,7 @@ void TabLogViewsWidget::showContextMenu(const QPoint& cursorPosition) {
|
|||
}
|
||||
|
||||
void TabLogViewsWidget::showContextMenu(QWidget* tab, const QPoint& cursorPosition) {
|
||||
logDebug() << "Showing context menu at " << cursorPosition << " at " << tab->objectName() << endl;
|
||||
logDebug() << "Showing context menu at " << cursorPosition << " at " << tab->objectName();
|
||||
|
||||
prepareContextMenu(true);
|
||||
|
||||
|
|
|
@ -88,11 +88,11 @@ void FindIncompatibleKioTest::find() {
|
|||
existingMethods << QLatin1String("void SlaveBase::chown(KUrl const &, const QString &, const QString &)");
|
||||
existingMethods << QLatin1String("void SlaveBase::setSubUrl(KUrl const &)");
|
||||
|
||||
//logDebug() << existingMethods << endl;
|
||||
//logDebug() << existingMethods;
|
||||
|
||||
QFile file(outputPath);
|
||||
if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) {
|
||||
logError() << "Unable to open the output file" << outputPath << endl;
|
||||
logError() << "Unable to open the output file" << outputPath;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -238,7 +238,7 @@ QMap<QString, bool> FindIncompatibleKioTest::findMethods(const QStringList& meth
|
|||
|
||||
}
|
||||
|
||||
logDebug() << endl;
|
||||
logDebug();
|
||||
|
||||
return foundMethods;
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ QStringList FindIncompatibleKioTest::headerContent(const KUrl& url) {
|
|||
|
||||
KIO::NetAccess::removeTempFile(tmpFile );
|
||||
} else {
|
||||
logDebug() << KIO::NetAccess::lastErrorString() << endl;;
|
||||
logDebug() << KIO::NetAccess::lastErrorString();
|
||||
}
|
||||
|
||||
return kioHeaderContent;
|
||||
|
|
|
@ -50,7 +50,7 @@ private:
|
|||
|
||||
|
||||
void KioLogFileReaderTest::initTestCase() {
|
||||
logDebug() << "Hello" << endl;
|
||||
logDebug() << "Hello";
|
||||
}
|
||||
|
||||
|
||||
|
@ -77,7 +77,7 @@ void KioLogFileReaderTest::testKioLogFileReader() {
|
|||
}
|
||||
|
||||
void KioLogFileReaderTest::readLine(const QString& line) {
|
||||
logDebug() << "Line " << line << endl;
|
||||
logDebug() << "Line " << line;
|
||||
}
|
||||
|
||||
QTEST_KDEMAIN(KioLogFileReaderTest, GUI)
|
||||
|
|
|
@ -329,7 +329,7 @@ void SystemAnalyzerTest::testMaxLines() {
|
|||
}
|
||||
|
||||
void SystemAnalyzerTest::compareWithMinTime(QList<LogLine*> logLines, const QDateTime& minTime) {
|
||||
logDebug() << "Min time : " << minTime.toString() << endl;
|
||||
logDebug() << "Min time : " << minTime.toString();
|
||||
|
||||
foreach (LogLine* logLine, logLines) {
|
||||
if (logLine->time() < minTime) {
|
||||
|
|
|
@ -44,7 +44,7 @@ TestUtil::~TestUtil() {
|
|||
}
|
||||
|
||||
void TestUtil::registerLogModeFactories() const {
|
||||
logDebug() << "Registering existing log mode factories" << endl;
|
||||
logDebug() << "Registering existing log mode factories";
|
||||
Globals::instance()->registerLogModeFactory(new SystemLogModeFactory());
|
||||
Globals::instance()->registerLogModeFactory(new KernelLogModeFactory());
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ void TestUtil::destroyReader(Analyzer* analyzer) const {
|
|||
}
|
||||
|
||||
QList<LogFile> TestUtil::createLogFiles(const QString& resourceFileName) const {
|
||||
logDebug() << "Using log file name " << resourceFileName << endl;
|
||||
logDebug() << "Using log file name " << resourceFileName;
|
||||
|
||||
LogLevel* informationLogLevel = Globals::instance()->informationLogLevel();
|
||||
|
||||
|
@ -109,7 +109,7 @@ void TestUtil::addLogLines(const QString& fileName, const QStringList& addedLine
|
|||
|
||||
QFile data(fileName);
|
||||
if (data.open(QFile::Append | QIODevice::Text)) {
|
||||
logDebug() << "Opening "<< fileName << " for writing " << addedLines.count() << " line(s)."<< endl;
|
||||
logDebug() << "Opening "<< fileName << " for writing " << addedLines.count() << " line(s).";
|
||||
|
||||
QTextStream out(&data);
|
||||
foreach (const QString &line, addedLines) {
|
||||
|
|
|
@ -325,8 +325,8 @@ void KvkbdApp::buttonLoaded(VButton *btn)
|
|||
}
|
||||
void KvkbdApp::partLoaded(MainWidget *vPart, int total_rows, int total_cols)
|
||||
{
|
||||
//cout << "Col Strech: " << total_cols << endl;
|
||||
// cout << "Row Strech: " << total_rows << endl;
|
||||
// std::cout << "Col Strech: " << total_cols << std::endl;
|
||||
// std::cout << "Row Strech: " << total_rows << std::endl;
|
||||
|
||||
QString partName = vPart->property("part").toString();
|
||||
|
||||
|
@ -340,7 +340,7 @@ void KvkbdApp::partLoaded(MainWidget *vPart, int total_rows, int total_cols)
|
|||
}
|
||||
|
||||
layout->addWidget(vPart,row_pos,col_pos,total_rows,total_cols);
|
||||
//cout << "Insert to layout: " << qPrintable(partName) << " RowStart: " << row_pos << " ColStart: " << col_pos << " RowSpan: " << total_rows << " ColSpan: " << total_cols << endl;
|
||||
// std::cout << "Insert to layout: " << qPrintable(partName) << " RowStart: " << row_pos << " ColStart: " << col_pos << " RowSpan: " << total_rows << " ColSpan: " << total_cols << std::endl;
|
||||
parts.insert(partName, vPart);
|
||||
layoutPosition.insert(partName, QRect(col_pos,row_pos,total_cols,total_rows));
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ ResizableDragWidget::~ResizableDragWidget()
|
|||
|
||||
void ResizableDragWidget::mousePressEvent(QMouseEvent * ev)
|
||||
{
|
||||
// cout << "ResizableDragWidget::mousePressEvent" << endl;
|
||||
// std::cout << "ResizableDragWidget::mousePressEvent" << std::endl;
|
||||
|
||||
DragWidget::mousePressEvent(ev);
|
||||
|
||||
|
@ -58,7 +58,7 @@ void ResizableDragWidget::mousePressEvent(QMouseEvent * ev)
|
|||
|
||||
void ResizableDragWidget::mouseMoveEvent(QMouseEvent * ev)
|
||||
{
|
||||
// cout << "ResizableDragWidget::mouseMoveEvent | Resize: " << doResize << " | Dragged: " << dragged << endl;
|
||||
// std::cout << "ResizableDragWidget::mouseMoveEvent | Resize: " << doResize << " | Dragged: " << dragged << std::endl;
|
||||
|
||||
|
||||
DragWidget::mouseMoveEvent(ev);
|
||||
|
|
|
@ -209,7 +209,7 @@ int ThemeLoader::loadLayout(const QString& themeName)
|
|||
int width = node.attributes().namedItem("width").toAttr().value().toInt();
|
||||
QString hintName = node.attributes().namedItem("name").toAttr().value();
|
||||
widthMap.insert(hintName, width);
|
||||
//cout << "widths[" << qPrintable(hintName) << "]=>"<< width << endl;
|
||||
// std::cout << "widths[" << qPrintable(hintName) << "]=>"<< width << std::endl;
|
||||
}
|
||||
|
||||
wList = docElem.elementsByTagName("buttonHeight");
|
||||
|
@ -220,7 +220,7 @@ int ThemeLoader::loadLayout(const QString& themeName)
|
|||
int height = node.attributes().namedItem("height").toAttr().value().toInt();
|
||||
QString hintName = node.attributes().namedItem("name").toAttr().value();
|
||||
heightMap.insert(hintName, height);
|
||||
//cout << "heights[" << qPrintable(hintName) << "]=>"<< height << endl;
|
||||
// std::cout << "heights[" << qPrintable(hintName) << "]=>"<< height << std::endl;
|
||||
}
|
||||
|
||||
wList = docElem.elementsByTagName("spacingHints");
|
||||
|
@ -231,7 +231,7 @@ int ThemeLoader::loadLayout(const QString& themeName)
|
|||
int width = node.attributes().namedItem("width").toAttr().value().toInt();
|
||||
QString hintName = node.attributes().namedItem("name").toAttr().value();
|
||||
spacingMap.insert(hintName, width);
|
||||
//cout << "spacing[" << qPrintable(hintName) << "]=>"<< width << endl;
|
||||
// std::cout << "spacing[" << qPrintable(hintName) << "]=>"<< width << std::endl;
|
||||
}
|
||||
|
||||
wList = docElem.elementsByTagName("part");
|
||||
|
@ -386,7 +386,7 @@ void ThemeLoader::loadKeys(MainWidget *vPart, const QDomNode& wNode)
|
|||
btn->storeSize();
|
||||
|
||||
// btn->setNode(node);
|
||||
// cout << "ColorGroup: " << qPrintable(colorGroup) << endl;
|
||||
// std::cout << "ColorGroup: " << qPrintable(colorGroup) << std::endl;
|
||||
|
||||
sx+=buttonWidth+rowSpacingX;
|
||||
|
||||
|
@ -413,7 +413,7 @@ void ThemeLoader::loadKeys(MainWidget *vPart, const QDomNode& wNode)
|
|||
|
||||
}
|
||||
|
||||
//cout << "X=>"<<sx<<" | Y=>"<<sy<<endl;
|
||||
//std::cout << "X=>"<<sx<<" | Y=>"<<sy<<endl;
|
||||
//
|
||||
}//row
|
||||
|
||||
|
|
|
@ -17,13 +17,13 @@
|
|||
#include <qtransform.h>
|
||||
#include <qstring.h>
|
||||
#include <qdom.h>
|
||||
#include <qcolor.h>
|
||||
#include <qpixmap.h>
|
||||
|
||||
// local includes
|
||||
#include "global.h"
|
||||
#include "area.h"
|
||||
|
||||
#include <QColor>
|
||||
|
||||
namespace Okular {
|
||||
|
||||
class Action;
|
||||
|
|
|
@ -104,7 +104,7 @@ void TeXFontDefinition::fontNameReceiver(const QString& fname)
|
|||
QString filename_test(font_pool->getExtraSearchPath() + '/' + filename);
|
||||
file = fopen( QFile::encodeName(filename_test), "r");
|
||||
if (file == 0) {
|
||||
kError(kvs::dvi) << i18n("Cannot find font %1, file %2.", fontname, filename) << endl;
|
||||
kError(kvs::dvi) << i18n("Cannot find font %1, file %2.", fontname, filename);
|
||||
return;
|
||||
} else
|
||||
filename = filename_test;
|
||||
|
@ -168,7 +168,7 @@ void TeXFontDefinition::fontNameReceiver(const QString& fname)
|
|||
#else
|
||||
// If we don't have the FreeType library, we should never have
|
||||
// reached this point. Complain, and leave this font blank
|
||||
kError(kvs::dvi) << i18n("Cannot recognize format for font file %1", filename) << endl;
|
||||
kError(kvs::dvi) << i18n("Cannot recognize format for font file %1", filename);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -40,13 +40,13 @@ TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc, double sl
|
|||
|
||||
if ( error == FT_Err_Unknown_File_Format ) {
|
||||
errorMessage = i18n("The font file %1 could be opened and read, but its font format is unsupported.", parent->filename);
|
||||
kError(kvs::dvi) << errorMessage << endl;
|
||||
kError(kvs::dvi) << errorMessage;
|
||||
fatalErrorInFontLoading = true;
|
||||
return;
|
||||
} else
|
||||
if ( error ) {
|
||||
errorMessage = i18n("The font file %1 is broken, or it could not be opened or read.", parent->filename);
|
||||
kError(kvs::dvi) << errorMessage << endl;
|
||||
kError(kvs::dvi) << errorMessage;
|
||||
fatalErrorInFontLoading = true;
|
||||
return;
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ TeXFont_PFB::TeXFont_PFB(TeXFontDefinition *parent, fontEncoding *enc, double sl
|
|||
if ((found == 0) && (face->charmap != 0)) {
|
||||
#ifdef DEBUG_PFB
|
||||
kDebug(kvs::dvi) << "No encoding given: using charmap platform=" << face->charmap->platform_id <<
|
||||
", encoding=" << face->charmap->encoding_id << " that is contained in the font." << endl;
|
||||
", encoding=" << face->charmap->encoding_id << " that is contained in the font.";
|
||||
#endif
|
||||
for(int i=0; i<256; i++)
|
||||
charMap[i] = FT_Get_Char_Index( face, i );
|
||||
|
@ -144,7 +144,7 @@ glyph* TeXFont_PFB::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCo
|
|||
|
||||
// Paranoia checks
|
||||
if (ch >= TeXFontDefinition::max_num_of_chars_in_font) {
|
||||
kError(kvs::dvi) << "TeXFont_PFB::getGlyph(): Argument is too big." << endl;
|
||||
kError(kvs::dvi) << "TeXFont_PFB::getGlyph(): Argument is too big.";
|
||||
return glyphtable;
|
||||
}
|
||||
|
||||
|
@ -169,7 +169,7 @@ glyph* TeXFont_PFB::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCo
|
|||
QString msg = i18n("FreeType reported an error when setting the character size for font file %1.", parent->filename);
|
||||
if (errorMessage.isEmpty())
|
||||
errorMessage = msg;
|
||||
kError(kvs::dvi) << msg << endl;
|
||||
kError(kvs::dvi) << msg;
|
||||
g->shrunkenCharacter = QImage(1, 1, QImage::Format_RGB32);
|
||||
g->shrunkenCharacter.fill(qRgb(255, 255, 255));
|
||||
return g;
|
||||
|
@ -185,7 +185,7 @@ glyph* TeXFont_PFB::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCo
|
|||
QString msg = i18n("FreeType is unable to load glyph #%1 from font file %2.", ch, parent->filename);
|
||||
if (errorMessage.isEmpty())
|
||||
errorMessage = msg;
|
||||
kError(kvs::dvi) << msg << endl;
|
||||
kError(kvs::dvi) << msg;
|
||||
g->shrunkenCharacter = QImage(1, 1, QImage::Format_RGB32);
|
||||
g->shrunkenCharacter.fill(qRgb(255, 255, 255));
|
||||
return g;
|
||||
|
@ -197,7 +197,7 @@ glyph* TeXFont_PFB::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCo
|
|||
QString msg = i18n("FreeType is unable to render glyph #%1 from font file %2.", ch, parent->filename);
|
||||
if (errorMessage.isEmpty())
|
||||
errorMessage = msg;
|
||||
kError(kvs::dvi) << msg << endl;
|
||||
kError(kvs::dvi) << msg;
|
||||
g->shrunkenCharacter = QImage(1, 1, QImage::Format_RGB32);
|
||||
g->shrunkenCharacter.fill(qRgb(255, 255, 255));
|
||||
return g;
|
||||
|
@ -208,7 +208,7 @@ glyph* TeXFont_PFB::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCo
|
|||
if ((slot->bitmap.width == 0) || (slot->bitmap.rows == 0)) {
|
||||
if (errorMessage.isEmpty())
|
||||
errorMessage = i18n("Glyph #%1 is empty.", ch);
|
||||
kError(kvs::dvi) << i18n("Glyph #%1 from font file %2 is empty.", ch, parent->filename) << endl;
|
||||
kError(kvs::dvi) << i18n("Glyph #%1 from font file %2 is empty.", ch, parent->filename);
|
||||
g->shrunkenCharacter = QImage(15, 15 , QImage::Format_RGB32);
|
||||
g->shrunkenCharacter.fill(qRgb(255, 0, 0));
|
||||
g->x2 = 0;
|
||||
|
@ -279,7 +279,7 @@ glyph* TeXFont_PFB::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCo
|
|||
QString msg = i18n("FreeType is unable to load metric for glyph #%1 from font file %2.", ch, parent->filename);
|
||||
if (errorMessage.isEmpty())
|
||||
errorMessage = msg;
|
||||
kError(kvs::dvi) << msg << endl;
|
||||
kError(kvs::dvi) << msg;
|
||||
g->dvi_advance_in_units_of_design_size_by_2e20 = 1;
|
||||
}
|
||||
g->dvi_advance_in_units_of_design_size_by_2e20 = (qint32)(((qint64)(1<<20) * (qint64)face->glyph->metrics.horiAdvance) / (qint64)face->units_per_EM);
|
||||
|
|
|
@ -87,7 +87,7 @@ TeXFont_PK::TeXFont_PK(TeXFontDefinition *parent)
|
|||
characterBitmaps[i] = 0;
|
||||
file = fopen(QFile::encodeName(parent->filename), "r");
|
||||
if (file == 0)
|
||||
kError(kvs::dvi) << i18n("Cannot open font file %1.", parent->filename) << endl;
|
||||
kError(kvs::dvi) << i18n("Cannot open font file %1.", parent->filename);
|
||||
#ifdef DEBUG_PK
|
||||
else
|
||||
kDebug(kvs::dvi) << "TeXFont_PK::TeXFont_PK(): file opened successfully";
|
||||
|
@ -124,7 +124,7 @@ glyph* TeXFont_PK::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCol
|
|||
|
||||
// Paranoia checks
|
||||
if (ch >= TeXFontDefinition::max_num_of_chars_in_font) {
|
||||
kError(kvs::dvi) << "TeXFont_PK::getGlyph(): Argument is too big." << endl;
|
||||
kError(kvs::dvi) << "TeXFont_PK::getGlyph(): Argument is too big.";
|
||||
return glyphtable;
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ glyph* TeXFont_PK::getGlyph(quint16 ch, bool generateCharacterPixmap, const QCol
|
|||
// If the character is not defined in the PK file, mark the
|
||||
// character as missing, and print an error message
|
||||
if (g->addr == 0) {
|
||||
kError(kvs::dvi) << i18n("TexFont_PK::operator[]: Character %1 not defined in font %2", ch, parent->filename) << endl;
|
||||
kError(kvs::dvi) << i18n("TexFont_PK::operator[]: Character %1 not defined in font %2", ch, parent->filename);
|
||||
g->addr = -1;
|
||||
return g;
|
||||
}
|
||||
|
@ -720,13 +720,13 @@ void TeXFont_PK::read_PK_index()
|
|||
#endif
|
||||
|
||||
if (file == 0) {
|
||||
kError(kvs::dvi) << "TeXFont_PK::read_PK_index(): file == 0" << endl;
|
||||
kError(kvs::dvi) << "TeXFont_PK::read_PK_index(): file == 0";
|
||||
return;
|
||||
}
|
||||
|
||||
int magic = two(file);
|
||||
if (magic != PK_MAGIC) {
|
||||
kError(kvs::dvi) << "TeXFont_PK::read_PK_index(): file is not a PK file" << endl;
|
||||
kError(kvs::dvi) << "TeXFont_PK::read_PK_index(): file is not a PK file";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent)
|
|||
|
||||
QFile file( parent->filename );
|
||||
if ( !file.open( QIODevice::ReadOnly ) ) {
|
||||
kError(kvs::dvi) << "TeXFont_TFM::TeXFont_TFM(): Could not read TFM file" << endl;
|
||||
kError(kvs::dvi) << "TeXFont_TFM::TeXFont_TFM(): Could not read TFM file";
|
||||
return;
|
||||
}
|
||||
QDataStream stream( &file );
|
||||
|
@ -37,15 +37,15 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent)
|
|||
stream >> lf >> lh >> bc >> ec >> nw >> nh >> nd;
|
||||
#ifdef DEBUG_TFM
|
||||
kDebug(kvs::dvi) << "lf= " << lf
|
||||
<< "lh= " << lh << endl
|
||||
<< "bc= " << bc << endl
|
||||
<< "ec= " << ec << endl
|
||||
<< "nw= " << nw << endl
|
||||
<< "nh= " << nh << endl
|
||||
<< "nd= " << nd << endl;
|
||||
<< "lh= " << lh << '\n'
|
||||
<< "bc= " << bc << '\n'
|
||||
<< "ec= " << ec << '\n'
|
||||
<< "nw= " << nw << '\n'
|
||||
<< "nh= " << nh << '\n'
|
||||
<< "nd= " << nd;
|
||||
#endif
|
||||
if ((bc > ec) || (ec >= TeXFontDefinition::max_num_of_chars_in_font)) {
|
||||
kError(kvs::dvi) << "TeXFont_TFM::TeXFont_TFM( filename=" << parent->filename << " ): The font has an invalid bc and ec entries." << endl;
|
||||
kError(kvs::dvi) << "TeXFont_TFM::TeXFont_TFM( filename=" << parent->filename << " ): The font has an invalid bc and ec entries.";
|
||||
file.close();
|
||||
return;
|
||||
}
|
||||
|
@ -55,8 +55,8 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent)
|
|||
stream >> checksum >> design_size_in_TeX_points.value;
|
||||
#ifdef DEBUG_TFM
|
||||
kDebug(kvs::dvi) << "checksum = " << checksum
|
||||
<< "design_size = " << design_size_in_TeX_points.toDouble() << " TeX Points" << endl
|
||||
<< " = " << design_size_in_TeX_points.toDouble()*254.0/7227.0 << " cm" << endl;
|
||||
<< "design_size = " << design_size_in_TeX_points.toDouble() << " TeX Points" << '\n'
|
||||
<< " = " << design_size_in_TeX_points.toDouble()*254.0/7227.0 << " cm";
|
||||
#endif
|
||||
|
||||
// Width table
|
||||
|
@ -93,7 +93,7 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent)
|
|||
quint8 byte;
|
||||
stream >> byte;
|
||||
if (byte >= nw)
|
||||
kError(kvs::dvi) << "TeXFont_TFM::TeXFont_TFM( filename=" << parent->filename << " ): The font has an invalid Char-Info table." << endl;
|
||||
kError(kvs::dvi) << "TeXFont_TFM::TeXFont_TFM( filename=" << parent->filename << " ): The font has an invalid Char-Info table.";
|
||||
else {
|
||||
characterWidth_in_units_of_design_size[characterCode] = widthTable_in_units_of_design_size[byte];
|
||||
g->dvi_advance_in_units_of_design_size_by_2e20 = widthTable_in_units_of_design_size[byte].value;
|
||||
|
@ -102,7 +102,7 @@ TeXFont_TFM::TeXFont_TFM(TeXFontDefinition *parent)
|
|||
stream >> byte;
|
||||
byte = byte >> 4;
|
||||
if (byte >= nh)
|
||||
kError(kvs::dvi) << "TeXFont_TFM::TeXFont_TFM( filename=" << parent->filename << " ): The font has an invalid Char-Info table." << endl;
|
||||
kError(kvs::dvi) << "TeXFont_TFM::TeXFont_TFM( filename=" << parent->filename << " ): The font has an invalid Char-Info table.";
|
||||
else
|
||||
characterHeight_in_units_of_design_size[characterCode] = heightTable_in_units_of_design_size[byte];
|
||||
|
||||
|
@ -126,7 +126,7 @@ glyph* TeXFont_TFM::getGlyph(quint16 characterCode, bool generateCharacterPixmap
|
|||
|
||||
// Paranoia checks
|
||||
if (characterCode >= TeXFontDefinition::max_num_of_chars_in_font) {
|
||||
kError(kvs::dvi) << "TeXFont_TFM::getGlyph(): Argument is too big." << endl;
|
||||
kError(kvs::dvi) << "TeXFont_TFM::getGlyph(): Argument is too big.";
|
||||
return glyphtable;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,9 +21,9 @@ quint8 bigEndianByteReader::readUINT8()
|
|||
// necessary for virtual fonts, which do not end with EOP.
|
||||
if (command_pointer >= end_pointer) {
|
||||
#ifdef DEBUG_ENDIANREADER
|
||||
kError(kvs::dvi) << "bigEndianByteReader::readUINT8() tried to read past end of data chunk" << endl;
|
||||
kError(kvs::dvi) << "end_pointer = " << end_pointer << endl;
|
||||
kError(kvs::dvi) << "command_pointer = " << command_pointer << endl;
|
||||
kError(kvs::dvi) << "bigEndianByteReader::readUINT8() tried to read past end of data chunk";
|
||||
kError(kvs::dvi) << "end_pointer = " << end_pointer;
|
||||
kError(kvs::dvi) << "command_pointer = " << command_pointer;
|
||||
#endif
|
||||
return EOP;
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ dvifile::dvifile(const dvifile *old, fontPool *fp)
|
|||
size_of_file = old->size_of_file;
|
||||
end_pointer = dvi_Data()+size_of_file;
|
||||
if (dvi_Data() == 0) {
|
||||
kError(kvs::dvi) << "Not enough memory to copy the DVI-file." << endl;
|
||||
kError(kvs::dvi) << "Not enough memory to copy the DVI-file.";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -239,7 +239,7 @@ void dvifile::prepare_pages()
|
|||
|
||||
page_offset.resize(total_pages+1);
|
||||
if (page_offset.size() < (total_pages+1)) {
|
||||
kError(kvs::dvi) << "No memory for page list!" << endl;
|
||||
kError(kvs::dvi) << "No memory for page list!";
|
||||
return;
|
||||
}
|
||||
for(int i=0; i<=total_pages; i++)
|
||||
|
|
|
@ -113,12 +113,12 @@ void dviRenderer::drawPage(RenderedDocumentPagePixmap* page)
|
|||
|
||||
// Paranoid safety checks
|
||||
if (page == 0) {
|
||||
kError(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called with argument == 0" << endl;
|
||||
kError(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called with argument == 0";
|
||||
return;
|
||||
}
|
||||
// Paranoid safety checks
|
||||
if (page->pageNumber == 0) {
|
||||
kError(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called for a documentPage with page number 0" << endl;
|
||||
kError(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called for a documentPage with page number 0";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -126,17 +126,17 @@ void dviRenderer::drawPage(RenderedDocumentPagePixmap* page)
|
|||
|
||||
|
||||
if ( dviFile == 0 ) {
|
||||
kError(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called, but no dviFile class allocated." << endl;
|
||||
kError(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called, but no dviFile class allocated.";
|
||||
page->clear();
|
||||
return;
|
||||
}
|
||||
if (page->pageNumber > dviFile->total_pages) {
|
||||
kError(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called for a documentPage with page number " << page->pageNumber
|
||||
<< " but the current dviFile has only " << dviFile->total_pages << " pages." << endl;
|
||||
<< " but the current dviFile has only " << dviFile->total_pages << " pages.";
|
||||
return;
|
||||
}
|
||||
if ( dviFile->dvi_Data() == 0 ) {
|
||||
kError(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called, but no dviFile is loaded yet." << endl;
|
||||
kError(kvs::dvi) << "dviRenderer::drawPage(documentPage *) called, but no dviFile is loaded yet.";
|
||||
page->clear();
|
||||
return;
|
||||
}
|
||||
|
@ -577,7 +577,7 @@ Anchor dviRenderer::parseReference(const QString &reference)
|
|||
QMutexLocker locker(&mutex);
|
||||
|
||||
#ifdef DEBUG_DVIRENDERER
|
||||
kError(kvs::dvi) << "dviRenderer::parseReference( " << reference << " ) called" << endl;
|
||||
kError(kvs::dvi) << "dviRenderer::parseReference( " << reference << " ) called";
|
||||
#endif
|
||||
|
||||
if (dviFile == 0)
|
||||
|
|
|
@ -211,7 +211,7 @@ void dviRenderer::set_vf_char(unsigned int cmd, unsigned int ch)
|
|||
static unsigned char c;
|
||||
macro *m = &currinf.fontp->macrotable[ch];
|
||||
if (m->pos == NULL) {
|
||||
kError(kvs::dvi) << "Character " << ch << " not defined in font " << currinf.fontp->fontname << endl;
|
||||
kError(kvs::dvi) << "Character " << ch << " not defined in font " << currinf.fontp->fontname;
|
||||
m->pos = m->end = &c;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ fontEncoding::fontEncoding(const QString &encName)
|
|||
QIODevice::ReadOnly|QIODevice::Text);
|
||||
|
||||
if (!kpsewhich.waitForStarted()) {
|
||||
kError(kvs::dvi) << "fontEncoding::fontEncoding(...): kpsewhich could not be started." << endl;
|
||||
kError(kvs::dvi) << "fontEncoding::fontEncoding(...): kpsewhich could not be started.";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ fontEncoding::fontEncoding(const QString &encName)
|
|||
|
||||
const QString encFileName = QString(kpsewhich.readAll()).trimmed();
|
||||
if (encFileName.isEmpty()) {
|
||||
kError(kvs::dvi) << QString("fontEncoding::fontEncoding(...): The file '%1' could not be found by kpsewhich.").arg(encName) << endl;
|
||||
kError(kvs::dvi) << QString("fontEncoding::fontEncoding(...): The file '%1' could not be found by kpsewhich.").arg(encName);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ fontEncoding::fontEncoding(const QString &encName)
|
|||
for(; i<256; i++)
|
||||
glyphNameVector[i] = ".notdef";
|
||||
} else {
|
||||
kError(kvs::dvi) << QString("fontEncoding::fontEncoding(...): The file '%1' could not be opened.").arg(encFileName) << endl;
|
||||
kError(kvs::dvi) << QString("fontEncoding::fontEncoding(...): The file '%1' could not be opened.").arg(encFileName);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ fontMap::fontMap()
|
|||
QIODevice::ReadOnly|QIODevice::Text);
|
||||
|
||||
if (!kpsewhich.waitForStarted()) {
|
||||
kError(kvs::dvi) << "fontMap::fontMap(): kpsewhich could not be started." << endl;
|
||||
kError(kvs::dvi) << "fontMap::fontMap(): kpsewhich could not be started.";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ fontMap::fontMap()
|
|||
QStringList() << "--format=dvips config" << "ps2pk.map",
|
||||
QIODevice::ReadOnly|QIODevice::Text);
|
||||
if (!kpsewhich.waitForStarted()) {
|
||||
kError(kvs::dvi) << "fontMap::fontMap(): kpsewhich could not be started." << endl;
|
||||
kError(kvs::dvi) << "fontMap::fontMap(): kpsewhich could not be started.";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ fontMap::fontMap()
|
|||
map_fileName = QString(kpsewhich.readAll()).trimmed();
|
||||
// If both versions fail, then there is nothing left to do.
|
||||
if (map_fileName.isEmpty()) {
|
||||
kError(kvs::dvi) << "fontMap::fontMap(): The file 'ps2pk.map' could not be found by kpsewhich." << endl;
|
||||
kError(kvs::dvi) << "fontMap::fontMap(): The file 'ps2pk.map' could not be found by kpsewhich.";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ fontMap::fontMap()
|
|||
}
|
||||
file.close();
|
||||
} else
|
||||
kError(kvs::dvi) << QString("fontMap::fontMap(): The file '%1' could not be opened.").arg(map_fileName) << endl;
|
||||
kError(kvs::dvi) << QString("fontMap::fontMap(): The file '%1' could not be opened.").arg(map_fileName);
|
||||
|
||||
#ifdef DEBUG_FONTMAP
|
||||
kDebug(kvs::dvi) << "FontMap file parsed. Results:";
|
||||
|
@ -119,7 +119,7 @@ fontMap::fontMap()
|
|||
<< ", FontFileName=" << it.data().fontFileName
|
||||
<< ", FullName=" << it.data().fullFontName
|
||||
<< ", Encoding=" << it.data().fontEncoding
|
||||
<< "." << endl;;
|
||||
<< ".";
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ fontPool::fontPool(bool useFontHinting)
|
|||
#ifdef HAVE_FREETYPE
|
||||
// Initialize the Freetype Library
|
||||
if ( FT_Init_FreeType( &FreeType_library ) != 0 ) {
|
||||
kError(kvs::dvi) << "Cannot load the FreeType library. KDVI proceeds without FreeType support." << endl;
|
||||
kError(kvs::dvi) << "Cannot load the FreeType library. KDVI proceeds without FreeType support.";
|
||||
FreeType_could_be_loaded = false;
|
||||
} else
|
||||
FreeType_could_be_loaded = true;
|
||||
|
|
|
@ -232,8 +232,7 @@ QImage DviGenerator::image( Okular::PixmapRequest *request )
|
|||
#if 0
|
||||
kDebug(DviDebug) << *request
|
||||
<< ", res:" << pageInfo->resolution << " - (" << pageInfo->width << ","
|
||||
<< ps.width().getLength_in_inch() << ")," << ps.width().getLength_in_mm()
|
||||
<< endl;
|
||||
<< ps.width().getLength_in_inch() << ")," << ps.width().getLength_in_mm();
|
||||
#endif
|
||||
|
||||
m_dviRenderer->drawPage( pageInfo );
|
||||
|
@ -306,8 +305,7 @@ Okular::TextPage *DviGenerator::extractTextFromPage( dviPageInfo *pageInfo )
|
|||
kDebug(DviDebug) << "orientation: " << orientation
|
||||
<< ", curTB.box: " << curTB.box
|
||||
<< ", tmpRect: " << tmpRect
|
||||
<< ", ( " << pageWidth << "," << pageHeight << " )"
|
||||
<<endl;
|
||||
<< ", ( " << pageWidth << "," << pageHeight << " )";
|
||||
#endif
|
||||
textOfThePage.push_back( new Okular::TextEntity( curTB.text,
|
||||
new Okular::NormalizedRect( curTB.box, pageWidth, pageHeight ) ) );
|
||||
|
|
|
@ -66,7 +66,7 @@ float Length::convertToMM(const QString &distance, bool *ok)
|
|||
// If no unit has been found -> error message, set *ok to false and
|
||||
// return 0.0.
|
||||
if (MMperUnit == 0.0) {
|
||||
kError(kvs::shell) << "distance::convertToMM: no known unit found in the string '" << distance << "'." << endl;
|
||||
kError(kvs::shell) << "distance::convertToMM: no known unit found in the string '" << distance << "'.";
|
||||
if (ok)
|
||||
*ok = false;
|
||||
return 0.0;
|
||||
|
|
|
@ -117,7 +117,7 @@ bool pageSize::setPageSize(const QString& name)
|
|||
currentSize = defaultPageSize();
|
||||
pageWidth.setLength_in_mm(staticList[currentSize].width);
|
||||
pageHeight.setLength_in_mm(staticList[currentSize].height);
|
||||
kError(kvs::shell) << "pageSize::setPageSize: could not parse '" << name << "'. Using " << staticList[currentSize].name << " as a default." << endl;
|
||||
kError(kvs::shell) << "pageSize::setPageSize: could not parse '" << name << "'. Using " << staticList[currentSize].name << " as a default.";
|
||||
emit(sizeChanged(*this));
|
||||
return false;
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ void pageSize::setPageSize(const QString& width, const QString& _widthUnits, con
|
|||
|
||||
QString widthUnits = _widthUnits;
|
||||
if ((widthUnits != "cm") && (widthUnits != "mm") && (widthUnits != "in")) {
|
||||
kError(kvs::shell) << "Unrecognized page width unit '" << widthUnits << "'. Assuming mm" << endl;
|
||||
kError(kvs::shell) << "Unrecognized page width unit '" << widthUnits << "'. Assuming mm";
|
||||
widthUnits = "mm";
|
||||
}
|
||||
pageWidth.setLength_in_mm(w);
|
||||
|
@ -157,7 +157,7 @@ void pageSize::setPageSize(const QString& width, const QString& _widthUnits, con
|
|||
|
||||
QString heightUnits = _heightUnits;
|
||||
if ((heightUnits != "cm") && (heightUnits != "mm") && (heightUnits != "in")) {
|
||||
kError(kvs::shell) << "Unrecognized page height unit '" << widthUnits << "'. Assuming mm" << endl;
|
||||
kError(kvs::shell) << "Unrecognized page height unit '" << widthUnits << "'. Assuming mm";
|
||||
heightUnits = "mm";
|
||||
}
|
||||
pageHeight.setLength_in_mm(h);
|
||||
|
@ -269,7 +269,7 @@ QString pageSize::formatName() const
|
|||
int pageSize::getOrientation() const
|
||||
{
|
||||
if (currentSize == -1) {
|
||||
kError(kvs::shell) << "pageSize::getOrientation: getOrientation called for page format that does not have a name." << endl;
|
||||
kError(kvs::shell) << "pageSize::getOrientation: getOrientation called for page format that does not have a name.";
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -283,7 +283,7 @@ int pageSize::getOrientation() const
|
|||
void pageSize::setOrientation(int orient)
|
||||
{
|
||||
if (currentSize == -1) {
|
||||
kError(kvs::shell) << "pageSize::setOrientation: setOrientation called for page format that does not have a name." << endl;
|
||||
kError(kvs::shell) << "pageSize::setOrientation: setOrientation called for page format that does not have a name.";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
|
|||
#endif
|
||||
|
||||
if (knownDevices.isEmpty()) {
|
||||
kError(kvs::dvi) << "No known devices found" << endl;
|
||||
kError(kvs::dvi) << "No known devices found";
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -238,14 +238,14 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
|
|||
if ( res ) {
|
||||
// Starting ghostscript did not work.
|
||||
// TODO: Issue error message, switch PS support off.
|
||||
kError(kvs::dvi) << "ghostview could not be started" << endl;
|
||||
kError(kvs::dvi) << "ghostview could not be started";
|
||||
}
|
||||
|
||||
PSfile.remove();
|
||||
|
||||
// Check if gs has indeed produced a file.
|
||||
if (QFile::exists(filename) == false) {
|
||||
kError(kvs::dvi) << "GS did not produce output." << endl;
|
||||
kError(kvs::dvi) << "GS did not produce output.";
|
||||
|
||||
// No. Check is the reason is that the device is not compiled into
|
||||
// ghostscript. If so, try again with another device.
|
||||
|
@ -255,7 +255,7 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
|
|||
GSoutput = QString::fromLocal8Bit(proc.readLine());
|
||||
if (GSoutput.contains("Unknown device")) {
|
||||
kDebug(kvs::dvi) << QString("The version of ghostview installed on this computer does not support "
|
||||
"the '%1' ghostview device driver.").arg(*gsDevice) << endl;
|
||||
"the '%1' ghostview device driver.").arg(*gsDevice);
|
||||
knownDevices.erase(gsDevice);
|
||||
gsDevice = knownDevices.begin();
|
||||
if (knownDevices.isEmpty())
|
||||
|
@ -298,7 +298,7 @@ void ghostscript_interface::graphics(const PageNumber& page, double dpi, long ma
|
|||
#endif
|
||||
|
||||
if (paint == 0) {
|
||||
kError(kvs::dvi) << "ghostscript_interface::graphics(PageNumber page, double dpi, long magnification, QPainter *paint) called with paint == 0" << endl;
|
||||
kError(kvs::dvi) << "ghostscript_interface::graphics(PageNumber page, double dpi, long magnification, QPainter *paint) called with paint == 0";
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
double SimplePageSize::zoomForHeight(quint32 height, const QPaintDevice& pd) const
|
||||
{
|
||||
if (!isValid()) {
|
||||
kError(kvs::shell) << "SimplePageSize::zoomForHeight() called when paper height was invalid" << endl;
|
||||
kError(kvs::shell) << "SimplePageSize::zoomForHeight() called when paper height was invalid";
|
||||
return 0.1;
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ double SimplePageSize::zoomForHeight(quint32 height, const QPaintDevice& pd) con
|
|||
double SimplePageSize::zoomForWidth(quint32 width, const QPaintDevice& pd) const
|
||||
{
|
||||
if (!isValid()) {
|
||||
kError(kvs::shell) << "SimplePageSize::zoomForWidth() called when paper width was invalid" << endl;
|
||||
kError(kvs::shell) << "SimplePageSize::zoomForWidth() called when paper width was invalid";
|
||||
return 0.1;
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue