fix: wrong usage of shared pointer
parent
18d219175d
commit
b74d3bd8ee
|
@ -19,7 +19,7 @@
|
|||
using std::string;
|
||||
using std::vector;
|
||||
|
||||
ListView::ListView(irect *contentRect, const vector<Item> *items) : _contentRect(contentRect), _items(items)
|
||||
ListView::ListView(irect *contentRect, const std::shared_ptr<vector<Item>> items) : _contentRect(contentRect), _items(items)
|
||||
{
|
||||
FillAreaRect(_contentRect, WHITE);
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ public:
|
|||
* @param ContentRect area of the screen where the list view is placed
|
||||
* @param Items items that shall be shown in the listview
|
||||
*/
|
||||
ListView(irect *contentRect, const vector<Item> *items);
|
||||
ListView(irect *contentRect, const std::shared_ptr<vector<Item>> items);
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
|
@ -67,7 +67,7 @@ public:
|
|||
|
||||
private:
|
||||
irect *_contentRect;
|
||||
const vector<Item> *_items;
|
||||
const std::shared_ptr<vector<Item>> _items = nullptr;
|
||||
vector<ListViewEntry> _entries;
|
||||
std::unique_ptr<ifont> _titleFont;
|
||||
std::unique_ptr<ifont> _footerFont;
|
||||
|
|
|
@ -48,7 +48,6 @@ public:
|
|||
|
||||
bool removeFile(int itemID);
|
||||
|
||||
|
||||
/**
|
||||
* gets the dataStructure of the given URL and writes its WEBDAV items to the items vector, reads Userdata from configfile
|
||||
*
|
||||
|
@ -61,9 +60,9 @@ public:
|
|||
void setUsername(const string &Username);
|
||||
void setPassword(const string &Pass);
|
||||
|
||||
vector<Item> *getItems() { return _items.get(); };
|
||||
bool isLoggedIn() { return _loggedIn; };
|
||||
bool isWorkOffline() { return _workOffline; };
|
||||
std::shared_ptr<vector<Item>> getItems() const { return _items; };
|
||||
bool isLoggedIn() const { return _loggedIn; };
|
||||
bool isWorkOffline() const { return _workOffline; };
|
||||
void switchWorkOffline() { _workOffline = !_workOffline; };
|
||||
|
||||
static string getLocalPath(string path);
|
||||
|
@ -71,7 +70,7 @@ public:
|
|||
private:
|
||||
static Nextcloud *nextcloudStatic;
|
||||
|
||||
std::shared_ptr<vector<Item>> _items = nullptr;
|
||||
std::shared_ptr<vector<Item>> _items = nullptr;
|
||||
bool _loggedIn{false};
|
||||
string _url;
|
||||
bool _workOffline{false};
|
||||
|
|
Loading…
Reference in New Issue