Wouldn't it be better to fix the issues instead?
It would be nice if you could put the issues you find in a list that we can go through and fix
Wouldn't it be better to fix the issues instead?
True. The below code won't work without a restarthyarion wrote: ↑Fri Apr 02, 2021 10:13 pmWouldn't it be better to fix the issues instead?
It would be nice if you could put the issues you find in a list that we can go through and fix
Also all Undocked QPushButtons don't get updated without restart. They inherit previous sizes even swiching to no stylesheet. I might be able to fix this one.QLabel[haslink="true"] {
color: #55aaff;
}
Gui--UrlLabel {
color: #55aaff;
}
Was any progress made on this front? I'm happy to use that QGIS metadata.txt file format, but it doesn't look like it's actually used anywhere in FreeCAD. We use JSON in a couple of places (Arch and Path use it, but I think this would be its first use in the core), and of course XML is used in the core, but has the disadvantage of being huge overkill for this use.Kunda1 wrote: ↑Thu Apr 01, 2021 12:36 amThere was/is an ongoing discussion about this regarding Addons. This would qualify as an addon, per se.
https://github.com/FreeCAD/FreeCAD-addo ... -303949382
Maybe some of the macros are using it? I don't remember specifically right now. Honestly I don't think FC is married to the metadata format. If you made a stronger proposal for something else it could be utilized instead just because as you can see it's not widely embraced. Maybe beneficial to check with the Extension manager dev and see how far he got with it?chennes wrote: ↑Fri Apr 02, 2021 11:34 pmWas any progress made on this front? I'm happy to use that QGIS metadata.txt file format, but it doesn't look like it's actually used anywhere in FreeCAD. We use JSON in a couple of places (Arch and Path use it, but I think this would be its first use in the core), and of course XML is used in the core, but has the disadvantage of being huge overkill for this use.Kunda1 wrote: ↑Thu Apr 01, 2021 12:36 am There was/is an ongoing discussion about this regarding Addons. This would qualify as an addon, per se.
https://github.com/FreeCAD/FreeCAD-addo ... -303949382
@mnesarco does extension manager parse add-on metadata?mnesarco wrote:
Code: Select all
namespace Base {
/**
* \class Metadata
* \brief Reads data from a metadata file.
*
* All metadata is treated as strings: no processing is done on it. Any
* metadata names are supported by the class, but one has special meaning:
* "description" is allowed to be multiple lines. All others are single-line
* only. Typical metadata contains:
* * name
* * author
* * version
* * date
* * description (multiline supported, end with two blank lines)
* * homepage_url
* * tracker_url
* * git_repository_url
* * screenshot_filename
*
* No guarantee is made that calling code must use any of this data, and there
* is no in-code requirement that any or all of this data exists. Calling code
* may request metadata of any name: if it does not exist, an empty string is
* returned.
*
* With the exception of "description", blank lines are ignored, and anything
* following a semicolon ';' on a line is ignored.
*/
class Metadata {
public:
explicit Metadata(const boost::filesystem::path& metadataFile);
~Metadata() = default;
/**
* Get named metadata item, or an empty string if that key does not exist.
*/
std::string operator[] (const std::string& key) const;
private:
std::map<std::string, std::string> _metadata;
};
}
It might be simple now, but I suspect it will be extended with time, so I'm not sure it's a good idea to invent a new file format for this.chennes wrote: ↑Sat Apr 03, 2021 9:31 pm OK, I poked at this a little today. Here's my proposed Metadata class -- the idea is that calling C++ code would just instantiate this class with a file path, and they'd get back a "dictionary" of whatever metadata that file contained. Purely string-based to keep things as simple as possible
Well, we are inventing a new format regardless (unless we use the QGIS format, but it's not like that's some kind of official standard). So whether the underlying framework is XML, JSON, or something else, the schema will be something new.