Commit 51b527b4 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove endl at the end of qdebug

parent 672ab697
......@@ -76,7 +76,7 @@ CrontabPrinter::~CrontabPrinter() {
}
bool CrontabPrinter::start() {
logDebug() << "Printing selection..." << endl;
logDebug() << "Printing selection...";
if (d->printer == nullptr) {
d->printer = new QPrinter();
......@@ -95,7 +95,7 @@ bool CrontabPrinter::start() {
printDialog->setOptionTabs(QList<QWidget *>() << d->crontabWidget);
printDialog->setEnabledOptions(QAbstractPrintDialog::PrintToFile);
if (printDialog->exec() == QDialog::Rejected) {
logDebug() << "Printing canceled" << endl;
logDebug() << "Printing canceled";
delete printDialog;
return false;
}
......@@ -265,7 +265,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()) );
......@@ -385,12 +385,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;
}
......
......@@ -112,13 +112,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 != nullptr) {
logDebug() << "First item found" << d->tasksWidget->treeWidget()->topLevelItemCount() << endl;
logDebug() << "First item found" << d->tasksWidget->treeWidget()->topLevelItemCount();
item->setSelected(true);
}
......@@ -202,9 +202,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);
......@@ -233,7 +233,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);
......@@ -244,7 +244,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);
......@@ -269,7 +269,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) {
......@@ -281,7 +281,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) {
......@@ -295,28 +295,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) {
......@@ -339,7 +339,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;
}
......@@ -366,7 +366,7 @@ void CrontabWidget::checkOtherUsers() {
}
void CrontabWidget::setupActions() {
logDebug() << "Setup actions" << endl;
logDebug() << "Setup actions";
//Edit menu
d->cutAction = KStandardAction::cut(this, SLOT(cut()), this);
......@@ -374,7 +374,7 @@ void CrontabWidget::setupActions() {
d->pasteAction = KStandardAction::paste(this, SLOT(paste()), this);
togglePasteAction(false);
logDebug() << "Actions initialized" << endl;
logDebug() << "Actions initialized";
}
......@@ -410,7 +410,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();
......
......@@ -24,7 +24,7 @@
CTGlobalCron::CTGlobalCron(CTHost* _ctHost) :
CTCron() {
logDebug() << "Initializing CTGlobalCron" << endl;
logDebug() << "Initializing CTGlobalCron";
d->multiUserCron = true;
d->systemCron = false;
......@@ -40,7 +40,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) {
......@@ -55,7 +55,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) {
......@@ -71,14 +71,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);
......@@ -86,7 +86,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);
......@@ -105,7 +105,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);
......@@ -124,14 +124,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);
......
......@@ -101,7 +101,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;
}
......@@ -111,9 +111,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();
......@@ -140,7 +140,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();
......@@ -261,7 +261,7 @@ bool CTCron::saveToFile(const QString& fileName) {
return false;
}
//logDebug() << exportCron() << endl;
//logDebug() << exportCron();
QTextStream out(&file);
out << exportCron();
......@@ -389,7 +389,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);
}
......@@ -401,7 +401,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 nullptr;
}
......@@ -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 nullptr;
}
......@@ -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 nullptr;
}
......@@ -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 nullptr;
}
......@@ -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 nullptr;
}
......
......@@ -62,7 +62,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))
......@@ -354,7 +354,7 @@ QIcon CTTask::commandIcon() const {
QUrl commandPath = QUrl::fromLocalFile(completeCommandPath());
QMimeType mimeType = QMimeDatabase().mimeTypeForUrl(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
......
......@@ -95,7 +95,7 @@ GenericListWidget::GenericListWidget(CrontabWidget* crontabWidget, const QString
mainLayout->addLayout(treeLayout);
logDebug() << "Generic list created" << endl;
logDebug() << "Generic list created";
connect(treeWidget(), &QTreeWidget::itemDoubleClicked, this, &GenericListWidget::modifySelection);
}
......
......@@ -79,7 +79,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)));
......@@ -105,13 +105,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) {
......@@ -121,7 +121,7 @@ void KCMCron::save() {
}
void KCMCron::defaults() {
logDebug() << "Loading defaults" << endl;
logDebug() << "Loading defaults";
d->ctHost->cancel();
}
......
......@@ -367,12 +367,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);
......@@ -391,7 +391,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) {
......@@ -409,7 +409,7 @@ void TaskEditorDialog::increaseMinutesGroup() {
}
void TaskEditorDialog::reduceMinutesGroup() {
logDebug() << "Reducing view" << endl;
logDebug() << "Reducing view";
emptyMinutesGroup();
......@@ -428,7 +428,7 @@ void TaskEditorDialog::reduceMinutesGroup() {
}
}
else {
logDebug() << "Reducing id" << minuteIndex << endl;
logDebug() << "Reducing id" << minuteIndex;
ctTask->minute.setEnabled(minuteIndex, false);
minuteButtons[minuteIndex]->setChecked(false);
......@@ -454,7 +454,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);
......@@ -495,7 +495,7 @@ void TaskEditorDialog::createMinutesGroup(QWidget* main) {
reduceMinutesGroup();
}
logDebug() << "Minutes group created" << endl;
logDebug() << "Minutes group created";
}
NumberPushButton* TaskEditorDialog::createHourButton(QGroupBox* hoursGroup, int hour) {
......@@ -512,7 +512,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
......@@ -545,7 +545,7 @@ QGroupBox* TaskEditorDialog::createHoursGroup(QWidget* main) {
connect(allHours, &SetOrClearAllButton::clicked, this, &TaskEditorDialog::slotAllHours);
connect(allHours, &SetOrClearAllButton::clicked, this, &TaskEditorDialog::slotWizard);
logDebug() << "Create hours group" << endl;
logDebug() << "Create hours group";
return hoursGroup;
}
......@@ -728,7 +728,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
......
......@@ -60,7 +60,7 @@ TasksWidget::TasksWidget(CrontabWidget* crontabWidget) :
connect(treeWidget(), &QTreeWidget::itemSelectionChanged, this, &TasksWidget::changeCurrentSelection);
logDebug() << "Tasks list created" << endl;
logDebug() << "Tasks list created";
}
TasksWidget::~TasksWidget() {
......@@ -106,7 +106,7 @@ void TasksWidget::runTaskNow() const {
CTCron* ctCron = crontabWidget()->currentCron();
if (ctCron == nullptr) {
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;
}
......@@ -183,12 +183,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();
......@@ -209,7 +209,7 @@ void TasksWidget::deleteSelection() {
changeCurrentSelection();
}
logDebug() << "End of deletion" << endl;
logDebug() << "End of deletion";
}
void TasksWidget::refreshTasks(CTCron* cron) {
......@@ -331,7 +331,7 @@ void TasksWidget::toggleNewEntryAction(bool state) {
}
void TasksWidget::changeCurrentSelection() {
//logDebug() << "Change selection..." << endl;
//logDebug() << "Change selection...";
if (treeWidget()->topLevelItemCount()==0) {
togglePrintAction(false);
......
......@@ -53,7 +53,7 @@ VariablesWidget::VariablesWidget(CrontabWidget* crontabWidget) :
connect(treeWidget(), &QTreeWidget::itemSelectionChanged, this, &VariablesWidget::changeCurrentSelection);
logDebug() << "Variables list created" << endl;
logDebug() << "Variables list created";
}
......@@ -166,7 +166,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);
......@@ -258,7 +258,7 @@ void VariablesWidget::toggleNewEntryAction(bool state) {
}
void VariablesWidget::changeCurrentSelection() {
logDebug() << "Change selection..." << endl;
logDebug() << "Change selection...";
bool enabled;
if (treeWidget()->selectedItems().isEmpty())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment