Added toString() method.

This commit is contained in:
2025-10-02 16:22:47 +02:00
parent 0bbac662f4
commit b631f4200e
2 changed files with 6 additions and 0 deletions

View File

@ -1,6 +1,7 @@
#include "genericcore.h"
#include <QDebug>
#include <QString>
using namespace std;
@ -8,4 +9,6 @@ GenericCore::GenericCore() { qDebug() << "Creating core..."; }
GenericCore::~GenericCore() { qDebug() << "Destroying core..."; }
QString GenericCore::toString() const { return QString("GenericCore (Version x.y.z)"); }
void GenericCore::sayHello() const { qDebug() << "Hello from the core!"; }

View File

@ -1,11 +1,14 @@
#ifndef GENERICCORE_H
#define GENERICCORE_H
class QString;
class GenericCore {
public:
GenericCore();
~GenericCore();
QString toString() const;
void sayHello() const;
};