diff --git a/ui/qt/byte_view_text.cpp b/ui/qt/byte_view_text.cpp index 71aefc4904..4ac950ede3 100644 --- a/ui/qt/byte_view_text.cpp +++ b/ui/qt/byte_view_text.cpp @@ -572,7 +572,7 @@ void ByteViewText::updateScrollbars() qint64 maxval = length / row_width_ + ((length % row_width_) ? 1 : 0) - viewport()->height() / line_spacing_; - verticalScrollBar()->setRange(0, qMax((qint64)0, maxval)); + verticalScrollBar()->setRange(0, int(qMax((qint64)0, maxval))); horizontalScrollBar()->setRange(0, qMax(0, static_cast((totalPixels() - viewport()->width()) / font_width_))); } diff --git a/ui/qt/file_set_dialog.cpp b/ui/qt/file_set_dialog.cpp index 64c79ceae4..e96591e273 100644 --- a/ui/qt/file_set_dialog.cpp +++ b/ui/qt/file_set_dialog.cpp @@ -113,12 +113,12 @@ void FileSetDialog::addFile(fileset_entry *entry) { * it will be 0. */ if (entry->ctime > 0) - created = QDateTime::fromTime_t(entry->ctime).toLocalTime().toString("yyyy-MM-dd HH:mm:ss"); + created = QDateTime::fromTime_t(uint(entry->ctime)).toLocalTime().toString("yyyy-MM-dd HH:mm:ss"); else created = "Not available"; } - modified = QDateTime::fromTime_t(entry->mtime).toLocalTime().toString("yyyy-MM-dd HH:mm:ss"); + modified = QDateTime::fromTime_t(uint(entry->mtime)).toLocalTime().toString("yyyy-MM-dd HH:mm:ss"); size_str = format_size(entry->size, format_size_unit_bytes|format_size_prefix_si); diff --git a/ui/qt/iax2_analysis_dialog.cpp b/ui/qt/iax2_analysis_dialog.cpp index cbe36ed4e7..c15ae044f4 100644 --- a/ui/qt/iax2_analysis_dialog.cpp +++ b/ui/qt/iax2_analysis_dialog.cpp @@ -974,7 +974,7 @@ void Iax2AnalysisDialog::saveAudio(Iax2AnalysisDialog::StreamDirection direction if (stop_flag) { break; } - ui->progressFrame->setValue(fwd_tempfile_->pos() * 100 / fwd_tempfile_->size()); + ui->progressFrame->setValue(int(fwd_tempfile_->pos() * 100 / fwd_tempfile_->size())); if (fwd_statinfo_.pt == PT_PCMU) { sample = ulaw2linear((unsigned char)f_rawvalue); @@ -1001,7 +1001,7 @@ void Iax2AnalysisDialog::saveAudio(Iax2AnalysisDialog::StreamDirection direction if (stop_flag) { break; } - ui->progressFrame->setValue(rev_tempfile_->pos() * 100 / rev_tempfile_->size()); + ui->progressFrame->setValue(int(rev_tempfile_->pos() * 100 / rev_tempfile_->size())); if (rev_statinfo_.pt == PT_PCMU) { sample = ulaw2linear((unsigned char)r_rawvalue); @@ -1041,8 +1041,8 @@ void Iax2AnalysisDialog::saveAudio(Iax2AnalysisDialog::StreamDirection direction if (stop_flag) { break; } - int fwd_pct = fwd_tempfile_->pos() * 100 / fwd_tempfile_->size(); - int rev_pct = rev_tempfile_->pos() * 100 / rev_tempfile_->size(); + int fwd_pct = int(fwd_tempfile_->pos() * 100 / fwd_tempfile_->size()); + int rev_pct = int(rev_tempfile_->pos() * 100 / rev_tempfile_->size()); ui->progressFrame->setValue(qMin(fwd_pct, rev_pct)); if (f_write_silence > 0) { @@ -1108,13 +1108,13 @@ void Iax2AnalysisDialog::saveAudio(Iax2AnalysisDialog::StreamDirection direction switch (direction) { /* Only forward direction */ case dir_forward_: { - progress_pct = fwd_tempfile_->pos() * 100 / fwd_tempfile_->size(); + progress_pct = int(fwd_tempfile_->pos() * 100 / fwd_tempfile_->size()); tempfile = fwd_tempfile_; break; } /* only reversed direction */ case dir_reverse_: { - progress_pct = rev_tempfile_->pos() * 100 / rev_tempfile_->size(); + progress_pct = int(rev_tempfile_->pos() * 100 / rev_tempfile_->size()); tempfile = rev_tempfile_; break; } diff --git a/ui/qt/import_text_dialog.cpp b/ui/qt/import_text_dialog.cpp index fdfbae2204..46812d61dc 100644 --- a/ui/qt/import_text_dialog.cpp +++ b/ui/qt/import_text_dialog.cpp @@ -437,7 +437,7 @@ void ImportTextDialog::check_line_edit(SyntaxLineEdit *le, bool &ok_enabled, con if (is_short) { *val_ptr = num_str.toUShort(&conv_ok, base); } else { - *val_ptr = num_str.toULong(&conv_ok, base); + *val_ptr = (guint)num_str.toULong(&conv_ok, base); } if (conv_ok && *val_ptr <= max_val) { syntax_state = SyntaxLineEdit::Valid; diff --git a/ui/qt/io_graph_dialog.cpp b/ui/qt/io_graph_dialog.cpp index 5899eb60f3..22aac20a25 100644 --- a/ui/qt/io_graph_dialog.cpp +++ b/ui/qt/io_graph_dialog.cpp @@ -2032,7 +2032,7 @@ void IOGraph::recalcGraphData(capture_file *cap_file) mavg_in_average_count++; mavg_right++; } - mavg_to_add = warmup_interval; + mavg_to_add = (unsigned int)warmup_interval; } for (int i = 0; i <= cur_idx_; i++) { diff --git a/ui/qt/qcustomplot.cpp b/ui/qt/qcustomplot.cpp index 006be1ad36..72fb58747d 100644 --- a/ui/qt/qcustomplot.cpp +++ b/ui/qt/qcustomplot.cpp @@ -5624,7 +5624,7 @@ void QCPAxis::generateAutoTicks() // Generate tick positions according to mTickStep: qint64 firstStep = floor(mRange.lower/mTickStep); // do not use qFloor here, or we'll lose 64 bit precision qint64 lastStep = ceil(mRange.upper/mTickStep); // do not use qCeil here, or we'll lose 64 bit precision - int tickcount = lastStep-firstStep+1; + int tickcount = int(lastStep-firstStep+1); if (tickcount < 0) tickcount = 0; mTickVector.resize(tickcount); for (int i=0; iprogressFrame->setValue(tempfile->pos() * 100 / tempfile->size()); + ui->progressFrame->setValue(int(tempfile->pos() * 100 / tempfile->size())); sample_count=convert_payload_to_samples(save_data.payload_type, tempfile ,pd_out, save_data.payload_len); @@ -1369,7 +1369,7 @@ gboolean RtpAnalysisDialog::saveAudioRAW(StreamDirection direction, QFile *save_ return FALSE; } - ui->progressFrame->setValue(tempfile->pos() * 100 / fwd_tempfile_->size()); + ui->progressFrame->setValue(int(tempfile->pos() * 100 / fwd_tempfile_->size())); if (save_data.payload_len > 0) { for(size_t i = 0; i < save_data.payload_len; i++) { diff --git a/ui/qt/tcp_stream_dialog.cpp b/ui/qt/tcp_stream_dialog.cpp index a103e06211..b04336eeaa 100644 --- a/ui/qt/tcp_stream_dialog.cpp +++ b/ui/qt/tcp_stream_dialog.cpp @@ -960,7 +960,7 @@ goodput_adjust_for_sacks(guint32 *seglen, guint32 last_ack, *seglen += (next_new->second - next_new->first); // insert next_new before next_old in old_sacks // (be sure to save and restore next_old iterator around insert!) - int next_old_idx = next_old - old_sacks.begin(); + int next_old_idx = int(next_old - old_sacks.begin()); old_sacks.insert(next_old, *next_new); next_old = old_sacks.begin() + next_old_idx + 1; // advance to the next remaining sack in new_sacks