mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:58:13 +00:00
LibCore: Make it possible to pass a parent to CFile constructors
This commit is contained in:
parent
dc572e31fa
commit
8aa3b74f80
2 changed files with 8 additions and 4 deletions
|
@ -4,8 +4,9 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
CFile::CFile(const StringView& filename)
|
CFile::CFile(const StringView& filename, CObject* parent)
|
||||||
: m_filename(filename)
|
: CIODevice(parent)
|
||||||
|
, m_filename(filename)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,11 @@
|
||||||
class CFile final : public CIODevice {
|
class CFile final : public CIODevice {
|
||||||
C_OBJECT(CFile)
|
C_OBJECT(CFile)
|
||||||
public:
|
public:
|
||||||
CFile() {}
|
CFile(CObject* parent = nullptr)
|
||||||
explicit CFile(const StringView&);
|
: CIODevice(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
explicit CFile(const StringView&, CObject* parent = nullptr);
|
||||||
virtual ~CFile() override;
|
virtual ~CFile() override;
|
||||||
|
|
||||||
String filename() const { return m_filename; }
|
String filename() const { return m_filename; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue