Permalink
Browse files

Fixed missing return value

  • Loading branch information...
bmcdorman committed Jun 22, 2012
1 parent 1b682b9 commit 73d645cd31ffd1b08497b718db807cee9a6b963d
View
@@ -60,3 +60,4 @@ trademarks/simulator/cbc2_sim/libcbc2_sim.a
releases/
package/
build/
+lib/
View
@@ -1,97 +0,0 @@
-/**************************************************************************
- * Copyright 2007-2012 KISS Institute for Practical Robotics *
- * *
- * This file is part of KISS (Kipr's Instructional Software System). *
- * *
- * KISS is free software: you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation, either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * KISS 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 KISS. Check the LICENSE file in the project root. *
- * If not, see <http://www.gnu.org/licenses/>. *
- **************************************************************************/
-
-// Note: This file actually isn't used yet. It is in preparation for KISS IDE 3.1.0
-
-#ifndef _TRANSACTION_H_
-#define _TRANSACTION_H_
-
-#include <QList>
-#include <QVariant>
-
-#define CREATED_PROJECT_PATH QString("CREATED_PROJECT_PATH")
-
-typedef QList<QVariant> QVariantList;
-
-class Transaction
-{
-public:
- Transaction(const QString& name, int type);
-
- const QString& name() const;
- const int type() const;
- const QVariantList& data() const;
-
- virtual QString successMessage() const;
- virtual QString failureMessage() const;
-
- enum {
- Unknown = 0,
- CreateProject,
- MakeDirectory,
- SendToDirectory,
- CompileFile,
- RunFile
- };
-
-protected:
- QVariantList m_data;
-
-private:
- QString m_name;
- int m_type;
-};
-
-namespace TransactionType
-{
- struct Unknown : Transaction
- {
- Unknown();
- };
-
- struct CreateProject : Transaction
- {
- CreateProject(const QString& name);
- };
-
- struct MakeDirectory : Transaction
- {
- MakeDirectory(const QString& path);
- };
-
- struct SendToDirectory : Transaction
- {
- SendToDirectory(const QString& path, const QString& directory);
- };
-
- struct CompileFile : Transaction
- {
- CompileFile(const QString& path, const QString& options);
- };
-
- struct RunFile : Transaction
- {
- RunFile(const QString& path, const QString& options);
- };
-}
-
-typedef QList<Transaction*> TransactionList;
-
-#endif
View
@@ -1,47 +0,0 @@
-/**************************************************************************
- * Copyright 2007-2012 KISS Institute for Practical Robotics *
- * *
- * This file is part of KISS (Kipr's Instructional Software System). *
- * *
- * KISS is free software: you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation, either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * KISS 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 KISS. Check the LICENSE file in the project root. *
- * If not, see <http://www.gnu.org/licenses/>. *
- **************************************************************************/
-
-#ifndef _LEXERC_H_
-#define _LEXERC_H_
-
-#include "LexerCPP.h"
-
-namespace Lexer
-{
- class C : public CPP
- {
- public:
- C(const Constructor* constructor);
-
- const char *keywords(int set) const;
- };
-
- struct ConstructorC : Constructor
- {
- ConstructorC();
-
- LexerBase* construct() const;
- LexerBase* construct(const QString& apis) const;
-
- LexerBase* _new() const;
- };
-}
-
-#endif
View
@@ -1,54 +0,0 @@
-/**************************************************************************
- * Copyright 2007-2012 KISS Institute for Practical Robotics *
- * *
- * This file is part of KISS (Kipr's Instructional Software System). *
- * *
- * KISS is free software: you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation, either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * KISS 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 KISS. Check the LICENSE file in the project root. *
- * If not, see <http://www.gnu.org/licenses/>. *
- **************************************************************************/
-
-#ifndef _LEXERCPP_H_
-#define _LEXERCPP_H_
-
-#include "LexerFactory.h"
-
-#include <Qsci/qscilexercpp.h>
-#include <Qsci/qsciapis.h>
-
-namespace Lexer
-{
- class CPP : public LexerBase, virtual public QsciLexerCPP
- {
- public:
- CPP(const Constructor* constructor);
-
- QColor defaultColor(int style) const;
- QFont font(int style) const;
- QFont defaultFont(int style) const;
-
- virtual const bool cStyleBlocks() const;
- };
-
- struct ConstructorCPP : Constructor
- {
- ConstructorCPP();
-
- LexerBase* construct() const;
- LexerBase* construct(const QString& apis) const;
-
- LexerBase* _new() const;
- };
-}
-
-#endif
View
@@ -1,47 +0,0 @@
-/**************************************************************************
- * Copyright 2007-2012 KISS Institute for Practical Robotics *
- * *
- * This file is part of KISS (Kipr's Instructional Software System). *
- * *
- * KISS is free software: you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation, either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * KISS 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 KISS. Check the LICENSE file in the project root. *
- * If not, see <http://www.gnu.org/licenses/>. *
- **************************************************************************/
-
-#ifndef _LEXERJAVA_H_
-#define _LEXERJAVA_H_
-
-#include "LexerCPP.h"
-
-namespace Lexer
-{
- class Java : public CPP
- {
- public:
- Java(const Constructor* constructor);
-
- const char *keywords(int set) const;
- };
-
- struct ConstructorJava : Constructor
- {
- ConstructorJava();
-
- LexerBase* construct() const;
- LexerBase* construct(const QString& apis) const;
-
- LexerBase* _new() const;
- };
-}
-
-#endif
@@ -1,50 +0,0 @@
-/**************************************************************************
- * Copyright 2007-2012 KISS Institute for Practical Robotics *
- * *
- * This file is part of KISS (Kipr's Instructional Software System). *
- * *
- * KISS is free software: you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation, either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * KISS 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 KISS. Check the LICENSE file in the project root. *
- * If not, see <http://www.gnu.org/licenses/>. *
- **************************************************************************/
-
-#ifndef _LEXERJAVASCRIPT_H_
-#define _LEXERJAVASCRIPT_H_
-
-#include "LexerFactory.h"
-
-#include <Qsci/qscilexerjavascript.h>
-#include <Qsci/qsciapis.h>
-
-namespace Lexer
-{
- class JavaScript : public LexerBase, public QsciLexerJavaScript
- {
- public:
- JavaScript(const Constructor* constructor);
-
- virtual const bool cStyleBlocks() const;
- };
-
- struct ConstructorJavaScript : Constructor
- {
- ConstructorJavaScript();
-
- LexerBase* construct() const;
- LexerBase* construct(const QString& apis) const;
-
- LexerBase* _new() const;
- };
-}
-
-#endif
View
@@ -465,6 +465,7 @@ SourceFile* SourceFile::newProjectFile(MainWindow* mainWindow, Project* project)
{
SourceFile* sourceFile = new SourceFile(mainWindow);
sourceFile->setAssociatedProject(project);
+ return sourceFile;
}
void SourceFile::zoomIn() { ui_editor->zoomIn(); updateMargins(); UiEventManager::ref().sendEvent(UI_EVENT_ZOOM_IN); }
View
@@ -1,63 +0,0 @@
-/**************************************************************************
- * Copyright 2007-2012 KISS Institute for Practical Robotics *
- * *
- * This file is part of KISS (Kipr's Instructional Software System). *
- * *
- * KISS is free software: you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation, either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * KISS 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 KISS. Check the LICENSE file in the project root. *
- * If not, see <http://www.gnu.org/licenses/>. *
- **************************************************************************/
-
-#include "Transaction.h"
-
-using namespace TransactionType;
-
-Transaction::Transaction(const QString& name, int type) : m_name(name), m_type(type) {}
-
-const QString& Transaction::name() const { return m_name; }
-const int Transaction::type() const { return m_type; }
-
-const QVariantList& Transaction::data() const { return m_data; }
-
-QString Transaction::successMessage() const { return m_name + ": success!"; }
-QString Transaction::failureMessage() const { return m_name + ": FAILURE."; }
-
-Unknown::Unknown() : Transaction("Unknown", Transaction::Unknown) {}
-
-CreateProject::CreateProject(const QString& name) : Transaction(name + " (create project)", Transaction::CreateProject)
-{
- m_data = QVariantList() << QVariant(name);
-}
-
-MakeDirectory::MakeDirectory(const QString& path) : Transaction(path + " (mkdir)", Transaction::MakeDirectory)
-{
- m_data = QVariantList() << QVariant(path);
-}
-
-SendToDirectory::SendToDirectory(const QString& path, const QString& directory)
- : Transaction(path + " -> " + directory, Transaction::SendToDirectory)
-{
- m_data = QVariantList() << QVariant(path) << directory;
-}
-
-CompileFile::CompileFile(const QString& path, const QString& options)
- : Transaction(path + " (compile with options:" + options + ")", Transaction::CompileFile)
-{
-
-}
-
-RunFile::RunFile(const QString& path, const QString& options)
- : Transaction(path + " (run with options:" + options + ")", Transaction::RunFile)
-{
-
-}
Oops, something went wrong.

0 comments on commit 73d645c

Please sign in to comment.