-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
👀 Some Qt objects are created without specifying a corresponding pointer for the parameter “parent”.
Examples:
- BackUp constructor
Lines 63 to 65 in 99fda6b
for (int i=0;i<DataTex::GlobalFilesDatabaseList.count();i++ ) { QTreeWidgetItem * item = new QTreeWidgetItem(); item->setText(3,QFileInfo(DataTex::GlobalFilesDatabaseList.values().at(i).databaseName()).baseName()); - DataTables::LoadFields
DataTex/datatex/datatables.cpp
Lines 278 to 283 in a6eff08
fields.exec(SqlFunctions::Fields_Query); while(fields.next()){ item++; ui->FieldTable->insertRow(item); ui->FieldTable->setItem(item,0 , new QTableWidgetItem(fields.value(0).toString())); ui->FieldTable->setItem(item,1 , new QTableWidgetItem(fields.value(1).toString())); - InfoPage constructor
DataTex/datatex/basefolder.cpp
Lines 75 to 93 in a6eff08
InfoPage::InfoPage(QWidget *parent) : QWizardPage(parent) { QSqlQuery DatabaseListQuery(DataTex::DataTeX_Settings); DatabaseListQuery.exec("SELECT FileName FROM Databases"); while (DatabaseListQuery.next()) { DatabaseList.append(DatabaseListQuery.value(0).toString()); } setTitle("Create new Database"); setPixmap(QWizard::WatermarkPixmap, QPixmap(":/images/datatex.png")); QLabel *label = new QLabel(tr("This wizard will help you create a new LaTeX database for DataTex.")); label->setWordWrap(true); QVBoxLayout *layout = new QVBoxLayout; QHBoxLayout *hlayout = new QHBoxLayout; QHBoxLayout *hlayout2 = new QHBoxLayout; QHBoxLayout *hlayout3 = new QHBoxLayout; BaseFolder::FilesDB = new QRadioButton(tr("Files Database")); BaseFolder::DocsDB = new QRadioButton(tr("Document Database")); QHBoxLayout * RadioLH = new QHBoxLayout; - LatexTextBrowser constructor
DataTex/datatex/highlighter.cpp
Lines 148 to 152 in 99fda6b
LatexTextBrowser::LatexTextBrowser(QWidget *parent) : QTextEdit(parent) { Highlighter * h = new Highlighter(); h->setDocument(LatexTextBrowser::document());
💭 I got the impression that such data would be required for safe management of parent-child relationships at more source code places.
Metadata
Metadata
Assignees
Labels
No labels