[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/graphics/glimpse
From: Kåre Särs <kare.sars () kolumbus ! fi>
Date: 2008-03-17 20:56:13
Message-ID: 1205787373.611037.13680.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 786742 by sars:
Fix Krazy2 warnings
M +28 -6 glimpse.cpp
M +25 -4 glimpse.h
M +21 -0 main.cpp
--- trunk/playground/graphics/glimpse/glimpse.cpp #786741:786742
@@ -1,3 +1,25 @@
+/* ============================================================
+ *
+ * Copyright (C) 2007-2008 by Kare Sars <kare dot sars at iki dot fi>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This appication is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * ============================================================ */
+
#include "glimpse.h"
#include "glimpse.moc"
@@ -72,7 +94,7 @@
exit(1);
}
}
- setWindowTitle(ksanew->make()+ " " + ksanew->model() + " - Glimpse");
+ setWindowTitle(ksanew->make()+ ' ' + ksanew->model() + " - Glimpse");
// prepare the Show Image Dialog
buildShowImage();
@@ -188,8 +210,8 @@
// find next available file name for name suggestion
for (i=1; i<10000; i++) {
fname = currentDir;
- if (fname.endsWith("/") == false) {
- fname += "/";
+ if (fname.endsWith('/') == false) {
+ fname += '/';
}
fname += settingsUi.imgPrefix->text();
fname += QString().sprintf("%03d.",i);
@@ -213,7 +235,7 @@
if (file.exists()) {
if (KMessageBox::warningContinueCancel(this,
i18n("Do you want to overwrite \"%1\"?", file.fileName()),
- i18n("Warning"),
+ QString(),
KGuiItem(i18n("Overwrite")),
KStandardGuiItem::cancel(),
QString("editorWindowSaveOverwrite")
@@ -274,8 +296,8 @@
for (i=1; i<10000; i++) {
fname = settingsUi.saveDirLEdit->text();
- if (fname.endsWith("/") == false) {
- fname += "/";
+ if (fname.endsWith('/') == false) {
+ fname += '/';
}
fname += settingsUi.imgPrefix->text();
fname += QString().sprintf("%03d.",i);
--- trunk/playground/graphics/glimpse/glimpse.h #786741:786742
@@ -1,7 +1,28 @@
-// this is a test app to test KSaneWidget
-#ifndef SW_TESTER_H
-#define SW_TESTER_H
+/* ============================================================
+ *
+ * Copyright (C) 2007-2008 by Kare Sars <kare dot sars at iki dot fi>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This appication is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * ============================================================ */
+#ifndef GLIMPSE_H
+#define GLIMPSE_H
+
#include <libksane/ksane.h>
#include "ui_settings.h"
@@ -16,7 +37,7 @@
Q_OBJECT
public:
- Glimpse(const QString& device, QWidget *parent = 0);
+ explicit Glimpse(const QString& device, QWidget *parent = 0);
private:
void buildShowImage();
--- trunk/playground/graphics/glimpse/main.cpp #786741:786742
@@ -1,3 +1,24 @@
+/* ============================================================
+ *
+ * Copyright (C) 2007-2008 by Kare Sars <kare dot sars at iki dot fi>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) version 3, or any
+ * later version accepted by the membership of KDE e.V. (or its
+ * successor approved by the membership of KDE e.V.), which shall
+ * act as a proxy defined in Section 6 of version 3 of the license.
+ *
+ * This appication is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * ============================================================ */
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <kaboutdata.h>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic