Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 0959953b rédigé par Kubat's avatar Kubat
Parcourir les fichiers

MISC: Const-qualify some pointers + init with nullptr some shared pointers...

parent dc860b69
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!18Implement the VivyDocument specification
...@@ -213,7 +213,7 @@ VivyDocument::loadSubDocument(const QString &subName, VivyDocument::Capabilities ...@@ -213,7 +213,7 @@ VivyDocument::loadSubDocument(const QString &subName, VivyDocument::Capabilities
} }
bool bool
VivyDocument::detectDocumentType(const QFileInfo &file, Capabilities *ableType) noexcept VivyDocument::detectDocumentType(const QFileInfo &file, Capabilities *const ableType) noexcept
{ {
Vivy::Utils::DocumentType docType; Vivy::Utils::DocumentType docType;
bool rc = Vivy::Utils::detectDocumentType(file, &docType); bool rc = Vivy::Utils::detectDocumentType(file, &docType);
......
...@@ -61,11 +61,11 @@ private: ...@@ -61,11 +61,11 @@ private:
quint64 documentOptions{ 0 }; quint64 documentOptions{ 0 };
/* Links to other files, they're not embeded inside the vivy file */ /* Links to other files, they're not embeded inside the vivy file */
std::shared_ptr<AudioSubDocument> audioDocument{}; std::shared_ptr<AudioSubDocument> audioDocument{ nullptr };
std::shared_ptr<VideoSubDocument> videoDocument{}; std::shared_ptr<VideoSubDocument> videoDocument{ nullptr };
std::shared_ptr<AssSubDocument> assDocument{}; std::shared_ptr<AssSubDocument> assDocument{ nullptr };
static bool detectDocumentType(const QFileInfo &file, Capabilities *) noexcept; static bool detectDocumentType(const QFileInfo &file, Capabilities *const) noexcept;
void addDocumentType(Capabilities) noexcept; void addDocumentType(Capabilities) noexcept;
void saveMemoryFile(const QFileInfo &); void saveMemoryFile(const QFileInfo &);
......
...@@ -21,19 +21,16 @@ VivyDocumentView::VivyDocumentView(std::shared_ptr<VivyDocument> doc, QWidget *p ...@@ -21,19 +21,16 @@ VivyDocumentView::VivyDocumentView(std::shared_ptr<VivyDocument> doc, QWidget *p
: AbstractDocumentView(AbstractDocumentView::Type::Vivy, parent) : AbstractDocumentView(AbstractDocumentView::Type::Vivy, parent)
, document(doc) , document(doc)
{ {
qDebug() << "Create view for document" << doc->getName() << "with capabilities" setDockNestingEnabled(true);
<< doc->getDocumentCapabilitiesString();
loadAudioView(); loadAudioView();
loadVideoView(); loadVideoView();
loadAssView(); loadAssView();
setDockNestingEnabled(true);
// Add some actions... // Add some actions...
QAction *openPropertiesAct = new QAction("Open properties", this); QAction *openPropertiesAct = new QAction("Open properties", this);
connect(openPropertiesAct, &QAction::triggered, this, &VivyDocumentView::openProperties); connect(openPropertiesAct, &QAction::triggered, this, &VivyDocumentView::openProperties);
connect(document.get(), &AbstractDocument::documentChanged, this, [=, this]() noexcept -> void { connect(document.get(), &AbstractDocument::documentChanged, this, [=, this]() {
if (property) if (property)
openProperties(); openProperties();
emit documentPropertyChanged(); emit documentPropertyChanged();
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter