Reduce compiler warnings: replace qAsConst with std::as_const and update event localPos() to position()
Replaced deprecated qAsConst usages in built modules and updated QMouseEvent::localPos() to position() per Qt6 deprecation guidance.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
46e673f660
commit
8af436f09a
281 files changed
+7102
-5490
No files matched your search
@@ -153,7 +153,7 @@ bool QtLockedFile::unlock()
|
||||
rmutex = 0;
|
||||
}
|
||||
else {
|
||||
for (Qt::HANDLE mutex : qAsConst(rmutexes)) {
|
||||
for (Qt::HANDLE mutex : std::as_const(rmutexes)) {
|
||||
ReleaseMutex(mutex);
|
||||
CloseHandle(mutex);
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ bool Compress::_compress(QIODevice *output,
|
||||
|
||||
|
||||
qint64 bytesTotal = 0;
|
||||
for (const FileInformations &file : qAsConst(files))
|
||||
for (const FileInformations &file : std::as_const(files))
|
||||
{
|
||||
if (m_aborted) return false;
|
||||
|
||||
@@ -241,11 +241,11 @@ bool Compress::_compress(QIODevice *output,
|
||||
}
|
||||
|
||||
m_c_sizeInfo.realSize = 0;
|
||||
for (const FileInformations &file : qAsConst(files))
|
||||
for (const FileInformations &file : std::as_const(files))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "file = " << file.inputFileName;
|
||||
emit compressInfo(maxCount, ++count, file.inputFileName);
|
||||
|
||||
|
||||
if (m_aborted) return false;
|
||||
|
||||
QString in = file.bAbsInputPath ? file.inputFileName : filesRootDir + QLatin1Char('/') + file.inputFileName;
|
||||
@@ -265,16 +265,16 @@ bool Compress::_compress(QIODevice *output,
|
||||
{
|
||||
m_lastError = tf.lastError();
|
||||
ERROR_LOG(m_logger) << "compress failed: " << m_lastError;
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for (const FileInformations &file : qAsConst(memFiles))
|
||||
for (const FileInformations &file : std::as_const(memFiles))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "(mem) file = " << file.inputFileName;
|
||||
emit compressInfo(maxCount, ++count, file.inputFileName);
|
||||
|
||||
|
||||
if (m_aborted) return false;
|
||||
|
||||
currentFileName = file.inputFileName;
|
||||
@@ -287,7 +287,7 @@ bool Compress::_compress(QIODevice *output,
|
||||
{
|
||||
m_lastError = tf.lastError();
|
||||
ERROR_LOG(m_logger) << "compress failed: " << m_lastError;
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <QCoreApplication>
|
||||
#include <QDir>
|
||||
#include <QSettings>
|
||||
#include <utility>
|
||||
|
||||
namespace NGL
|
||||
{
|
||||
@@ -62,7 +63,7 @@ bool copyDirContentsToDir(const QString &source, const QString &destination, boo
|
||||
{
|
||||
QVector<QString> pathsToSearch = directories(FileType::ConfigFile);
|
||||
pathsToSearch.append(directories(FileType::ProjectConfigFile));
|
||||
for (const QString &basePath : qAsConst(pathsToSearch))
|
||||
for (const QString &basePath : std::as_const(pathsToSearch))
|
||||
{
|
||||
QString absolutePath = basePath + QLatin1Char('/') + source;
|
||||
if (QDir(absolutePath).exists())
|
||||
|
||||
@@ -31,7 +31,16 @@ NGL_WRAP_UI(nglwidgets_SRCS
|
||||
nglpdfwidget.ui
|
||||
)
|
||||
|
||||
NGL_ADD_BIG_RESOURCES(oxygen_SRCS nglresources.qrc)
|
||||
# Collect big resource QRCs
|
||||
set(oxygen_SRCS nglresources.qrc)
|
||||
if(TARGET Qt6::Core)
|
||||
# Use Qt6's CMake helper to generate resource sources so resources are available at runtime
|
||||
qt_add_resources(RME_LIGHT_RCC rme_light_style.qrc)
|
||||
list(APPEND oxygen_SRCS ${RME_LIGHT_RCC})
|
||||
else()
|
||||
NGL_ADD_BIG_RESOURCES(oxygen_SRCS nglresources.qrc rme_light_style.qrc)
|
||||
endif()
|
||||
|
||||
# SV: logView
|
||||
NGL_ADD_LIBRARY(WS AAR SV nglwidgets SHARED ${nglwidgets_SRCS} ${oxygen_SRCS})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(nglwidgets
|
||||
|
||||
Executable
+369
@@ -0,0 +1,369 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
|
||||
<svg version="1.1" baseProfile="basic" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
|
||||
y="0px" width="24px" height="24px" viewBox="0 0 24 24" xml:space="preserve">
|
||||
<g id="BG_Dark">
|
||||
<g id="Logo_1_">
|
||||
</g>
|
||||
</g>
|
||||
<g id="Icontitle" display="none">
|
||||
<g display="inline">
|
||||
</g>
|
||||
</g>
|
||||
<g id="Slices">
|
||||
</g>
|
||||
<g id="Icons">
|
||||
<g id="_x30_01_target">
|
||||
</g>
|
||||
<g id="_x30_02_battery_mode">
|
||||
</g>
|
||||
<g id="_x30_03_ac_power">
|
||||
</g>
|
||||
<g id="_x30_04_new_mail_indicator">
|
||||
</g>
|
||||
<g id="_x30_05_wireless">
|
||||
</g>
|
||||
<g id="_x30_06_network_wireless">
|
||||
</g>
|
||||
<g id="_x30_07_media_flash">
|
||||
</g>
|
||||
<g id="_x30_08_application_exit">
|
||||
</g>
|
||||
<g id="_x30_09_layer">
|
||||
</g>
|
||||
<g id="_x30_10_browser_cache_prefs">
|
||||
</g>
|
||||
<g id="_x30_11_build_in_test">
|
||||
</g>
|
||||
<g id="_x30_12_edit_cut">
|
||||
</g>
|
||||
<g id="_x30_13_aircraft_simulation">
|
||||
</g>
|
||||
<g id="_x30_14_open_document">
|
||||
</g>
|
||||
<g id="_x30_15_document_data">
|
||||
</g>
|
||||
<g id="_x30_16_document_properties">
|
||||
</g>
|
||||
<g id="_x30_17_document_edit">
|
||||
</g>
|
||||
<g id="_x30_18_document_new">
|
||||
</g>
|
||||
<g id="_x30_19_dialog_ok">
|
||||
</g>
|
||||
<g id="_x30_20_dialog_no">
|
||||
</g>
|
||||
<g id="_x30_21_add_user">
|
||||
</g>
|
||||
<g id="_x30_22_remove_user">
|
||||
</g>
|
||||
<g id="_x30_23_download">
|
||||
</g>
|
||||
<g id="_x30_24_translation_editor">
|
||||
</g>
|
||||
<g id="_x30_25_handgranade_locations">
|
||||
</g>
|
||||
<g id="_x30_26_import_MSDL">
|
||||
</g>
|
||||
<g id="_x30_27_frequency_planning">
|
||||
</g>
|
||||
<g id="_x30_28_definition_exercise_phase">
|
||||
</g>
|
||||
<g id="_x30_29_MLVS_control">
|
||||
</g>
|
||||
<g id="_x30_31_mobile_video">
|
||||
</g>
|
||||
<g id="_x30_32_fixed_video_announcement">
|
||||
</g>
|
||||
<g id="_x30_32_projection">
|
||||
</g>
|
||||
<g id="_x30_33_projection_audio_channels">
|
||||
</g>
|
||||
<g id="_x30_34_new_spline">
|
||||
</g>
|
||||
<g id="_x30_35_new_cut">
|
||||
</g>
|
||||
<g id="_x30_36_new_group">
|
||||
</g>
|
||||
<g id="_x30_37_new_ungroup">
|
||||
</g>
|
||||
<g id="_x30_38_set_line_styles">
|
||||
</g>
|
||||
<g id="_x30_39_fill_pattern">
|
||||
</g>
|
||||
<g id="_x30_40_configure_arrows">
|
||||
</g>
|
||||
<g id="_x30_41_media_seek_forward">
|
||||
</g>
|
||||
<g id="_x30_42_media_skip_forward">
|
||||
</g>
|
||||
<g id="_x30_43_media_vcr_normal">
|
||||
<path fill="#FFD800" d="M22.219,11.375l-6.438-5.15C15.352,5.881,15,6.05,15,6.6V10H2c-0.55,0-1,0.45-1,1v2c0,0.55,0.45,1,1,1h13
|
||||
v3.4c0,0.55,0.352,0.719,0.781,0.375l6.438-5.15C22.648,12.281,22.648,11.719,22.219,11.375z"/>
|
||||
<g opacity="0.3">
|
||||
<path fill="#FFFFFF" d="M15,7.646V6.6c0-0.55,0.352-0.719,0.781-0.375l6.438,5.15c0.393,0.313,0.408,0.803,0.084,1.148
|
||||
c-0.031-0.033-0.047-0.071-0.084-0.102l-6.438-5.15C15.352,6.928,15,7.097,15,7.646z M2,11.047h13V10H2c-0.55,0-1,0.45-1,1v1.047
|
||||
C1,11.497,1.45,11.047,2,11.047z"/>
|
||||
</g>
|
||||
<g>
|
||||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="11.7705" y1="6.0459" x2="11.7705" y2="17.9541">
|
||||
<stop offset="0" style="stop-color:#FFFFFF"/>
|
||||
<stop offset="1" style="stop-color:#000000"/>
|
||||
</linearGradient>
|
||||
<path opacity="0.1" fill="url(#SVGID_1_)" d="M22.219,11.375l-6.438-5.15C15.352,5.881,15,6.05,15,6.6V10H2c-0.55,0-1,0.45-1,1v2
|
||||
c0,0.55,0.45,1,1,1h13v3.4c0,0.55,0.352,0.719,0.781,0.375l6.438-5.15C22.648,12.281,22.648,11.719,22.219,11.375z"/>
|
||||
<g opacity="0.3">
|
||||
<path fill="#1D1D1B" d="M15.369,6.047c0.12,0,0.262,0.057,0.412,0.178l6.438,5.15c0.43,0.344,0.43,0.906,0,1.25l-6.438,5.15
|
||||
c-0.15,0.121-0.292,0.178-0.412,0.178C15.148,17.953,15,17.757,15,17.4V14H2c-0.55,0-1-0.45-1-1v-2c0-0.55,0.45-1,1-1h13V6.6
|
||||
C15,6.243,15.148,6.047,15.369,6.047 M15.369,5.047C14.688,5.047,14,5.58,14,6.6V9H2c-1.103,0-2,0.897-2,2v2
|
||||
c0,1.103,0.897,2,2,2h12v2.4c0,1.02,0.688,1.553,1.369,1.553c0.246,0,0.626-0.068,1.037-0.396l6.438-5.15
|
||||
c0.443-0.355,0.697-0.867,0.697-1.406s-0.254-1.051-0.697-1.406l-6.438-5.15C15.995,5.115,15.615,5.047,15.369,5.047
|
||||
L15.369,5.047z"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="_x30_44_media_seek_backward">
|
||||
</g>
|
||||
<g id="_x30_45_media_skip_backward">
|
||||
</g>
|
||||
<g id="_x30_46_media_play_slower">
|
||||
</g>
|
||||
<g id="_x30_47_media_play_backward">
|
||||
</g>
|
||||
<g id="_x30_48_break_handling_no_pause">
|
||||
</g>
|
||||
<g id="_x30_49_break_handling_with_pause">
|
||||
</g>
|
||||
<g id="_x30_50_media_record">
|
||||
</g>
|
||||
<g id="_x30_51_marker_end">
|
||||
</g>
|
||||
<g id="_x30_52_marker_start">
|
||||
</g>
|
||||
<g id="_x30_53_audio_volume_muted">
|
||||
</g>
|
||||
<g id="_x30_54_audio_volume_high">
|
||||
</g>
|
||||
<g id="_x30_55_audio_volume_medium">
|
||||
</g>
|
||||
<g id="_x30_56_audio_volume_low">
|
||||
</g>
|
||||
<g id="_x30_57_get_position">
|
||||
</g>
|
||||
<g id="_x30_58_go_home">
|
||||
</g>
|
||||
<g id="_x30_59_planned_training_cycle">
|
||||
</g>
|
||||
<g id="_x30_60_visible_teams">
|
||||
</g>
|
||||
<g id="_x30_61_map">
|
||||
</g>
|
||||
<g id="_x30_63_video_menu">
|
||||
</g>
|
||||
<g id="_x30_63_debug_execution_from_cursor">
|
||||
</g>
|
||||
<g id="_x30_64_debug_execution_to_cursor">
|
||||
</g>
|
||||
<g id="_x30_65_overlays">
|
||||
</g>
|
||||
<g id="_x30_66_statistics">
|
||||
</g>
|
||||
<g id="_x30_67_create_pdf_topic">
|
||||
</g>
|
||||
<g id="_x30_68_create_lecture_topic">
|
||||
</g>
|
||||
<g id="_x30_69_create_image_topic">
|
||||
</g>
|
||||
<g id="_x30_70_create_evaluation_topic">
|
||||
</g>
|
||||
<g id="_x30_72_mine_barriers">
|
||||
</g>
|
||||
<g id="_x30_73_mine_barrier_corridor">
|
||||
</g>
|
||||
<g id="_x30_73_player_info_force_command">
|
||||
</g>
|
||||
<g id="_x30_74_Player_info_collapsed">
|
||||
</g>
|
||||
<g id="_x30_75_pi_force_left">
|
||||
</g>
|
||||
<g id="_x30_76_pi_force_right">
|
||||
</g>
|
||||
<g id="_x30_77_pi_force_movementtr.">
|
||||
</g>
|
||||
<g id="_x30_78_pi_force_nbc">
|
||||
</g>
|
||||
<g id="_x30_79_player_info_tactical_status_history">
|
||||
</g>
|
||||
<g id="_x30_80_pi_type_weapon_range">
|
||||
</g>
|
||||
<g id="_x30_82_3d_viewer__x28_3d_viewer_x29_">
|
||||
</g>
|
||||
<g id="_x30_85_set_view_position">
|
||||
</g>
|
||||
<g id="_x30_86_set_house_transparency">
|
||||
</g>
|
||||
<g id="_x30_87_set_force_visibility">
|
||||
</g>
|
||||
<g id="_x30_88_3d_viewer_config">
|
||||
</g>
|
||||
<g id="_x30_89_playback_situation">
|
||||
</g>
|
||||
<g id="_x30_90_playback_video">
|
||||
</g>
|
||||
<g id="_x30_91_playback_audio">
|
||||
</g>
|
||||
<g id="_x30_92_combat_power_report">
|
||||
</g>
|
||||
<g id="_x30_93_combat_effectiveness_reports">
|
||||
</g>
|
||||
<g id="_x30_94_mortar_firings">
|
||||
</g>
|
||||
<g id="_x30_95_weapon_firings">
|
||||
</g>
|
||||
<g id="_x30_96_artillery_firings">
|
||||
</g>
|
||||
<g id="_x30_97_mine_barrier">
|
||||
</g>
|
||||
<g id="_x30_98_N_x2F_C_events">
|
||||
</g>
|
||||
<g id="_x30_99_display_reports">
|
||||
</g>
|
||||
<g id="_x31_00_import_video">
|
||||
</g>
|
||||
<g id="_x31_01_import_images">
|
||||
</g>
|
||||
<g id="_x31_02_import_pdf_document">
|
||||
</g>
|
||||
<g id="_x31_03_define_presentation">
|
||||
</g>
|
||||
<g id="_x31_04_execute_presentation">
|
||||
</g>
|
||||
<g id="_x31_05_o_x2F_c_aar_preparation">
|
||||
</g>
|
||||
<g id="_x31_06_delete_take_home_package">
|
||||
</g>
|
||||
<g id="_x31_07_prepare_take_home_package">
|
||||
</g>
|
||||
<g id="_x31_08_create_take_home_package">
|
||||
</g>
|
||||
<g id="_x31_09_switch_to_secondary_map">
|
||||
</g>
|
||||
<g id="_x31_10_mgrs_grid">
|
||||
</g>
|
||||
<g id="_x31_11_overlay_plans">
|
||||
</g>
|
||||
<g id="_x31_12_filter_map_settings">
|
||||
</g>
|
||||
<g id="_x31_13_filter_map_settings_load">
|
||||
</g>
|
||||
<g id="_x31_14_filter_map_settings_save">
|
||||
</g>
|
||||
<g id="_x31_15_configure_symbol_attributes">
|
||||
</g>
|
||||
<g id="_x31_16_configure_symbol_display">
|
||||
</g>
|
||||
<g id="_x31_17_load_global_filter">
|
||||
</g>
|
||||
<g id="_x31_18_filter_teams">
|
||||
</g>
|
||||
<g id="_x31_19_filters_collapse_expand">
|
||||
</g>
|
||||
<g id="_x31_20_filter_player">
|
||||
</g>
|
||||
<g id="_x31_21_filter_effect_simulation_of_training_cycles">
|
||||
</g>
|
||||
<g id="_x31_22_filter_barriers">
|
||||
</g>
|
||||
<g id="_x31_23_filter_firings">
|
||||
</g>
|
||||
<g id="_x31_24_nc_agents">
|
||||
</g>
|
||||
<g id="_x31_25_filter_border_lines">
|
||||
</g>
|
||||
<g id="_x31_26_create_line_of_sight">
|
||||
</g>
|
||||
<g id="_x31_27_configure_line_of_sight">
|
||||
</g>
|
||||
<g id="_x31_28_show_line_of_sight">
|
||||
</g>
|
||||
<g id="_x31_29_create_terrain_profile">
|
||||
</g>
|
||||
<g id="_x31_30_show_terrain_profile">
|
||||
</g>
|
||||
<g id="_x31_31_create_distance_measure">
|
||||
</g>
|
||||
<g id="_x31_32_show_distance_measures">
|
||||
</g>
|
||||
<g id="_x31_33_select_player">
|
||||
</g>
|
||||
<g id="_x31_34_map_context_menu">
|
||||
</g>
|
||||
<g id="_x31_35_primary_map_toolbar">
|
||||
</g>
|
||||
<g id="_x31_36_secondary_map_toolbar">
|
||||
</g>
|
||||
<g id="_x31_37_primary_map_position">
|
||||
</g>
|
||||
<g id="_x31_38_secondary_map_position">
|
||||
</g>
|
||||
<g id="_x31_39_situation">
|
||||
</g>
|
||||
<g id="_x31_40_map_settings">
|
||||
</g>
|
||||
<g id="_x31_41_mini_map">
|
||||
</g>
|
||||
<g id="_x31_42_chat">
|
||||
</g>
|
||||
<g id="_x31_43_function_key_toolbar">
|
||||
</g>
|
||||
<g id="_x31_44_status_bar">
|
||||
</g>
|
||||
<g id="_x31_45_messages">
|
||||
</g>
|
||||
<g id="_x31_46_toolbar_editor">
|
||||
</g>
|
||||
<g id="_x31_47_presets">
|
||||
</g>
|
||||
<g id="_x31_48_help_index">
|
||||
</g>
|
||||
<g id="_x31_49_about">
|
||||
</g>
|
||||
<g id="_x31_50_raster">
|
||||
</g>
|
||||
<g id="_x31_51_switch_display">
|
||||
</g>
|
||||
<g id="_x31_52_screenshot">
|
||||
</g>
|
||||
<g id="_x31_53_laod">
|
||||
</g>
|
||||
<g id="_x31_54_arrow_back">
|
||||
</g>
|
||||
<g id="_x31_55_set_markers__x28_situation_x29_">
|
||||
</g>
|
||||
<g id="_x31_56_set_markers__x28_video_x29_">
|
||||
</g>
|
||||
<g id="_x31_57_set_markers__x28_audio_x29_">
|
||||
</g>
|
||||
<g id="_x31_58_switch_to_primary_map">
|
||||
</g>
|
||||
<g id="_x31_59_nbc_events">
|
||||
</g>
|
||||
<g id="_x31_60_explosive_devices">
|
||||
</g>
|
||||
<g id="_x31_61__ammunition_resupply">
|
||||
</g>
|
||||
<g id="_x31_62_ammunition_left">
|
||||
</g>
|
||||
<g id="_x31_63_awes_ammunition_administration">
|
||||
</g>
|
||||
<g id="_x31_64_treatment__x26__maintenance">
|
||||
</g>
|
||||
<g id="_x31_65_treatment_report">
|
||||
</g>
|
||||
<g id="_x31_66_maintenance_report">
|
||||
</g>
|
||||
<g id="_x31_67_filter_nbc_agents">
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 8.9 KiB |
@@ -50,12 +50,16 @@ void PDFPage::setPopplerPage(Poppler::Page *page)
|
||||
if (!m_page)
|
||||
return;
|
||||
|
||||
const QList<Poppler::Link *> links = m_page->links();
|
||||
for (const auto link : links)
|
||||
// Poppler::Page::links() returns std::vector<std::unique_ptr<Poppler::Link>> in Poppler Qt6
|
||||
auto links = m_page->links();
|
||||
for (auto &linkUp : links)
|
||||
{
|
||||
Poppler::Link *link = linkUp.get();
|
||||
if (!link)
|
||||
continue;
|
||||
if (link->linkType() == Poppler::Link::Browse ||
|
||||
link->linkType() == Poppler::Link::Goto)
|
||||
m_links += link;
|
||||
m_links.emplace_back(std::move(linkUp));
|
||||
else
|
||||
std::cerr << "linktype: " << link->linkType() << std::endl;
|
||||
}
|
||||
@@ -129,8 +133,8 @@ void PDFPage::paintEvent(QPaintEvent *event)
|
||||
|
||||
void PDFPage::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
const QPointF pos = event->localPos();
|
||||
for (const auto &linkRect : qAsConst(m_linkRects))
|
||||
const QPointF pos = event->position();
|
||||
for (const auto &linkRect : std::as_const(m_linkRects))
|
||||
{
|
||||
if (linkRect.contains(pos))
|
||||
{
|
||||
@@ -144,12 +148,14 @@ void PDFPage::mouseMoveEvent(QMouseEvent *event)
|
||||
|
||||
void PDFPage::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
const QPointF pos = event->localPos();
|
||||
const QPointF pos = event->position();
|
||||
for (int i = 0; i < m_linkRects.size(); ++i)
|
||||
{
|
||||
if (m_linkRects.at(i).contains(pos))
|
||||
{
|
||||
const auto *link = m_links.at(i);
|
||||
const Poppler::Link *link = m_links.at(i).get();
|
||||
if (!link)
|
||||
continue;
|
||||
if (link->linkType() == Poppler::Link::Browse)
|
||||
{
|
||||
const Poppler::LinkBrowse *linkBrowse = static_cast<const Poppler::LinkBrowse *>(link);
|
||||
@@ -188,9 +194,12 @@ void PDFPage::rebuildInternalData()
|
||||
|
||||
|
||||
m_linkRects.clear();
|
||||
m_linkRects.reserve(m_links.size());
|
||||
for (const auto link : qAsConst(m_links))
|
||||
m_linkRects.reserve(static_cast<int>(m_links.size()));
|
||||
for (const auto &linkUp : m_links)
|
||||
{
|
||||
const Poppler::Link *link = linkUp.get();
|
||||
if (!link)
|
||||
continue;
|
||||
const QRectF r = link->linkArea();
|
||||
m_linkRects += QRectF(r.x() * w, r.y() * h, r.width() * w, r.height() * h);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QSizeF>
|
||||
#include <QWidget>
|
||||
#include <QtGui/QPixmap>
|
||||
#include <poppler/qt5/poppler-qt5.h>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
namespace Poppler
|
||||
{
|
||||
@@ -47,7 +48,7 @@ protected:
|
||||
Poppler::Page *m_page;
|
||||
double m_scaleFactor;
|
||||
QPixmap m_pdfPixmap;
|
||||
QList< Poppler::Link * > m_links;
|
||||
std::vector<std::unique_ptr<Poppler::Link>> m_links;
|
||||
QList< QRectF > m_linkRects;
|
||||
Poppler::Page::Rotation m_rotation;
|
||||
};
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QMetaType>
|
||||
#include <QtCore/QMimeData>
|
||||
#include <QtCore/QDataStream>
|
||||
#include <QtCore/QIODevice>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtGui/QIcon>
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<RCC>
|
||||
<qresource prefix="/style">
|
||||
<file alias="media-seek-backward.svg">icons/svg/media-seek-backward.svg</file>
|
||||
<file alias="media-seek-forward.svg">icons/svg/media-seek-forward.svg</file>
|
||||
<file alias="restart.svg">icons/svg/restart.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -184,7 +184,7 @@ void TcpServer::workerFinished()
|
||||
void TcpServer::shutdownRequest()
|
||||
{
|
||||
emit aboutToQuit(d->port);
|
||||
for (WorkerBase *worker : qAsConst(d->workers))
|
||||
for (WorkerBase *worker : std::as_const(d->workers))
|
||||
{
|
||||
WorkerInstance *wi = dynamic_cast<WorkerInstance *>(worker);
|
||||
if (wi)
|
||||
|
||||
Reference in new issue
Block a user