Keeping the given code document filename consistent.
ClosedPublic

Authored by fernandorodrigues on Oct 12 2018, 3:10 PM.

Details

Summary

Changed the create code document feature to use the filename given by the user as a complement to the makesTabClosable commit.

Diff Detail

Repository
R73 Rocs
Branch
fixingCreatedCodeFileName
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 3821
Build 3839: arc lint + arc unit
Restricted Application added a project: KDE Edu. · View Herald TranscriptOct 12 2018, 3:10 PM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
fernandorodrigues requested review of this revision.Oct 12 2018, 3:10 PM
tcanabrava requested changes to this revision.Oct 12 2018, 3:14 PM
tcanabrava added inline comments.
src/project/project.cpp
226–231

QLatin1Char('/'),
QStringLiteral(".js")

Those creates the data in copile time instead of runtime

243–253

the code for createCode and openCode document are the same, share the internal code.

src/project/project.h
94

const QString& filePath, this way you don't create a copy of the variable just to pass it around.

src/ui/mainwindow.cpp
370

QStringLiteral , but perhaps it's better to i18n("untitled") ?

493

QLatin1Char('/'), QStringLiteral(".js")

494

QFileInfo (cheaper than a QFile)

This revision now requires changes to proceed.Oct 12 2018, 3:14 PM
cordlandwehr added inline comments.
src/ui/mainwindow.cpp
497

just use the KMessageBox::error(...) factory to create an error message box with all the typical look and feel in KDE

Switched QString into QStringLiteral, QString into QLatin1Char and QMessageBox into KMessageBox.

tcanabrava accepted this revision.Oct 13 2018, 9:13 AM
This revision is now accepted and ready to land.Oct 13 2018, 9:13 AM
Closed by commit R73:844fca994663: Keeping the given code document filename consistent. (authored by Fernando Costa <fernandocr@id.uff.br>, committed by tcanabrava). · Explain WhyOct 13 2018, 9:14 AM
This revision was automatically updated to reflect the committed changes.