changed NULLs to nullptr
This commit is contained in:
@@ -21,7 +21,7 @@ ActionSearch::ActionSearch(QWidget *parent) :
|
||||
|
||||
ActionSearchEntry* entry_field = new ActionSearchEntry();
|
||||
QFont entry_field_font = entry_field->font();
|
||||
entry_field_font.setPointSize(entry_field_font.pointSize()*1.2);
|
||||
entry_field_font.setPointSize(qRound(entry_field_font.pointSize()*1.2));
|
||||
entry_field->setFont(entry_field_font);
|
||||
entry_field->setPlaceholderText("Search for action...");
|
||||
connect(entry_field, SIGNAL(textChanged(const QString&)), this, SLOT(search_update(const QString &)));
|
||||
@@ -32,7 +32,7 @@ ActionSearch::ActionSearch(QWidget *parent) :
|
||||
|
||||
list_widget = new ActionSearchList();
|
||||
QFont list_widget_font = list_widget->font();
|
||||
list_widget_font.setPointSize(list_widget_font.pointSize()*1.2);
|
||||
list_widget_font.setPointSize(qRound(list_widget_font.pointSize()*1.2));
|
||||
list_widget->setFont(list_widget_font);
|
||||
layout->addWidget(list_widget);
|
||||
connect(list_widget, SIGNAL(dbl_click()), this, SLOT(perform_action()));
|
||||
@@ -43,7 +43,7 @@ ActionSearch::ActionSearch(QWidget *parent) :
|
||||
}
|
||||
|
||||
void ActionSearch::search_update(const QString &s, const QString &p, QMenu *parent) {
|
||||
if (parent == NULL) {
|
||||
if (parent == nullptr) {
|
||||
list_widget->clear();
|
||||
QList<QAction*> menus = mainWindow->menuBar()->actions();
|
||||
for (int i=0;i<menus.size();i++) {
|
||||
@@ -60,7 +60,7 @@ void ActionSearch::search_update(const QString &s, const QString &p, QMenu *pare
|
||||
for (int i=0;i<actions.size();i++) {
|
||||
QAction* a = actions.at(i);
|
||||
if (!a->isSeparator()) {
|
||||
if (a->menu() != NULL) {
|
||||
if (a->menu() != nullptr) {
|
||||
search_update(s, menu_text, a->menu());
|
||||
} else {
|
||||
QString comp = a->text().replace("&", "");
|
||||
@@ -88,9 +88,9 @@ void ActionSearch::perform_action() {
|
||||
void ActionSearch::move_selection_up() {
|
||||
int lim = list_widget->count();
|
||||
for (int i=1;i<lim;i++) {
|
||||
if (list_widget->item(i)->isSelected()) {
|
||||
if (list_widget->item(i)->isSelected()) {
|
||||
list_widget->item(i-1)->setSelected(true);
|
||||
list_widget->scrollToItem(list_widget->item(i-1));
|
||||
list_widget->scrollToItem(list_widget->item(i-1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -99,9 +99,9 @@ void ActionSearch::move_selection_up() {
|
||||
void ActionSearch::move_selection_down() {
|
||||
int lim = list_widget->count()-1;
|
||||
for (int i=0;i<lim;i++) {
|
||||
if (list_widget->item(i)->isSelected()) {
|
||||
if (list_widget->item(i)->isSelected()) {
|
||||
list_widget->item(i+1)->setSelected(true);
|
||||
list_widget->scrollToItem(list_widget->item(i+1));
|
||||
list_widget->scrollToItem(list_widget->item(i+1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -120,6 +120,6 @@ void ActionSearchEntry::keyPressEvent(QKeyEvent * event) {
|
||||
}
|
||||
}
|
||||
|
||||
void ActionSearchList::mouseDoubleClickEvent(QMouseEvent *event) {
|
||||
void ActionSearchList::mouseDoubleClickEvent(QMouseEvent *) {
|
||||
emit dbl_click();
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ class ActionSearch : public QDialog
|
||||
public:
|
||||
ActionSearch(QWidget* parent = 0);
|
||||
private slots:
|
||||
void search_update(const QString& s, const QString &p = 0, QMenu *parent = NULL);
|
||||
void search_update(const QString& s, const QString &p = 0, QMenu *parent = nullptr);
|
||||
void perform_action();
|
||||
void move_selection_up();
|
||||
void move_selection_down();
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
DebugDialog* debug_dialog = NULL;
|
||||
DebugDialog* debug_dialog = nullptr;
|
||||
|
||||
DebugDialog::DebugDialog(QWidget *parent) : QDialog(parent) {
|
||||
setWindowTitle("Debug Log");
|
||||
|
||||
@@ -292,16 +292,16 @@ void ExportDialog::format_changed(int index)
|
||||
AVCodec* codec_info;
|
||||
for (int i=0;i<format_vcodecs.size();i++) {
|
||||
codec_info = avcodec_find_encoder((enum AVCodecID) format_vcodecs.at(i));
|
||||
if (codec_info == NULL) {
|
||||
vcodecCombobox->addItem("NULL");
|
||||
if (codec_info == nullptr) {
|
||||
vcodecCombobox->addItem("nullptr");
|
||||
} else {
|
||||
vcodecCombobox->addItem(codec_info->long_name);
|
||||
}
|
||||
}
|
||||
for (int i=0;i<format_acodecs.size();i++) {
|
||||
codec_info = avcodec_find_encoder((enum AVCodecID) format_acodecs.at(i));
|
||||
if (codec_info == NULL) {
|
||||
acodecCombobox->addItem("NULL");
|
||||
if (codec_info == nullptr) {
|
||||
acodecCombobox->addItem("nullptr");
|
||||
} else {
|
||||
acodecCombobox->addItem(codec_info->long_name);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ NewSequenceDialog::NewSequenceDialog(QWidget *parent, Media *existing) :
|
||||
{
|
||||
setup_ui();
|
||||
|
||||
if (existing != NULL) {
|
||||
if (existing != nullptr) {
|
||||
existing_sequence = existing->to_sequence();
|
||||
setWindowTitle("Editing \"" + existing_sequence->name + "\"");
|
||||
|
||||
@@ -50,7 +50,7 @@ NewSequenceDialog::NewSequenceDialog(QWidget *parent, Media *existing) :
|
||||
}
|
||||
}
|
||||
} else {
|
||||
existing_sequence = NULL;
|
||||
existing_sequence = nullptr;
|
||||
setWindowTitle("New Sequence");
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@ void NewSequenceDialog::set_sequence_name(const QString& s) {
|
||||
}
|
||||
|
||||
void NewSequenceDialog::create() {
|
||||
if (existing_sequence == NULL) {
|
||||
if (existing_sequence == nullptr) {
|
||||
Sequence* s = new Sequence();
|
||||
|
||||
s->name = sequence_name_edit->text();
|
||||
@@ -74,7 +74,7 @@ void NewSequenceDialog::create() {
|
||||
s->audio_layout = AV_CH_LAYOUT_STEREO;
|
||||
|
||||
ComboAction* ca = new ComboAction();
|
||||
panel_project->new_sequence(ca, s, true, NULL);
|
||||
panel_project->new_sequence(ca, s, true, nullptr);
|
||||
undo_stack.push(ca);
|
||||
} else {
|
||||
ComboAction* ca = new ComboAction();
|
||||
@@ -92,7 +92,7 @@ void NewSequenceDialog::create() {
|
||||
|
||||
for (int i=0;i<existing_sequence->clips.size();i++) {
|
||||
Clip* c = existing_sequence->clips.at(i);
|
||||
if (c != NULL) {
|
||||
if (c != nullptr) {
|
||||
c->refactor_frame_rate(ca, multiplier, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ void PreferencesDialog::setup_kbd_shortcut_worker(QMenu* menu, QTreeWidgetItem*
|
||||
|
||||
parent->addChild(item);
|
||||
|
||||
if (a->menu() != NULL) {
|
||||
if (a->menu() != nullptr) {
|
||||
item->setChildIndicatorPolicy(QTreeWidgetItem::ShowIndicator);
|
||||
setup_kbd_shortcut_worker(a->menu(), item);
|
||||
} else {
|
||||
@@ -150,7 +150,7 @@ void PreferencesDialog::reset_all_shortcuts() {
|
||||
}
|
||||
|
||||
bool PreferencesDialog::refine_shortcut_list(const QString &s, QTreeWidgetItem* parent) {
|
||||
if (parent == NULL) {
|
||||
if (parent == nullptr) {
|
||||
for (int i=0;i<keyboard_tree->topLevelItemCount();i++) {
|
||||
refine_shortcut_list(s, keyboard_tree->topLevelItem(i));
|
||||
}
|
||||
@@ -169,7 +169,7 @@ bool PreferencesDialog::refine_shortcut_list(const QString &s, QTreeWidgetItem*
|
||||
all_children_are_hidden = false;
|
||||
} else {
|
||||
QString shortcut;
|
||||
if (keyboard_tree->itemWidget(item, 1) != NULL) {
|
||||
if (keyboard_tree->itemWidget(item, 1) != nullptr) {
|
||||
shortcut = static_cast<QKeySequenceEdit*>(keyboard_tree->itemWidget(item, 1))->keySequence().toString();
|
||||
}
|
||||
if (item->text(0).contains(s, Qt::CaseInsensitive) || shortcut.contains(s, Qt::CaseInsensitive)) {
|
||||
|
||||
@@ -39,7 +39,7 @@ private slots:
|
||||
void save();
|
||||
void reset_default_shortcut();
|
||||
void reset_all_shortcuts();
|
||||
bool refine_shortcut_list(const QString &, QTreeWidgetItem* parent = NULL);
|
||||
bool refine_shortcut_list(const QString &, QTreeWidgetItem* parent = nullptr);
|
||||
void load_shortcut_file();
|
||||
void save_shortcut_file();
|
||||
void browse_css_file();
|
||||
|
||||
@@ -82,7 +82,7 @@ void ReplaceClipMediaDialog::replace() {
|
||||
|
||||
for (int i=0;i<sequence->clips.size();i++) {
|
||||
Clip* c = sequence->clips.at(i);
|
||||
if (c != NULL && c->media == media) {
|
||||
if (c != nullptr && c->media == media) {
|
||||
rcmc->clips.append(c);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,10 +84,10 @@ void SpeedDialog::run() {
|
||||
clip_percent = c->speed;
|
||||
if (c->track < 0) {
|
||||
bool process_video = true;
|
||||
if (c->media != NULL && c->media->get_type() == MEDIA_TYPE_FOOTAGE) {
|
||||
if (c->media != nullptr && c->media->get_type() == MEDIA_TYPE_FOOTAGE) {
|
||||
Footage* m = c->media->to_footage();
|
||||
FootageStream* ms = m->get_stream_from_file_index(true, c->media_stream);
|
||||
if (ms != NULL && ms->infinite_length) {
|
||||
if (ms != nullptr && ms->infinite_length) {
|
||||
process_video = false;
|
||||
}
|
||||
}
|
||||
@@ -304,7 +304,7 @@ void set_speed(ComboAction* ca, Clip* c, double speed, bool ripple, long& ep, lo
|
||||
if (!ripple && proposed_out > c->timeline_out) {
|
||||
for (int i=0;i<c->sequence->clips.size();i++) {
|
||||
Clip* compare = c->sequence->clips.at(i);
|
||||
if (compare != NULL
|
||||
if (compare != nullptr
|
||||
&& compare->track == c->track
|
||||
&& compare->timeline_in >= c->timeline_out && compare->timeline_in < proposed_out) {
|
||||
proposed_out = compare->timeline_in;
|
||||
|
||||
Reference in New Issue
Block a user