Compare commits
4 Commits
49ae1473f9
...
0f13cf5196
| Author | SHA1 | Date | |
|---|---|---|---|
| 0f13cf5196 | |||
| d403d0a242 | |||
| c959a712f7 | |||
| f9a8f5d6b1 |
@@ -726,7 +726,7 @@ macro(qad_target_link_libraries _NAME)
|
||||
list(APPEND _ARGS ${_i})
|
||||
endif()
|
||||
endforeach()
|
||||
target_link_libraries(${_TARGET} ${Qt${_v}_LIBRARIES} ${_ARGS})
|
||||
target_link_libraries(${_TARGET} ${_ARGS} ${Qt${_v}_LIBRARIES})
|
||||
#message("link ${_TARGET}: ${Qt${_v}_LIBRARIES} ${_ARGS}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
@@ -505,6 +505,9 @@
|
||||
<property name="shortcut">
|
||||
<string>Esc</string>
|
||||
</property>
|
||||
<property name="shortcutContext">
|
||||
<enum>Qt::WidgetShortcut</enum>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionCheck_all">
|
||||
<property name="icon">
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
MapViewTileProvider_MapTiler::MapViewTileProvider_MapTiler() {
|
||||
nam = new QNetworkAccessManager();
|
||||
PIValueTree p;
|
||||
p.addChild(PIValueTree("url", "https://api.maptiler.com/maps"));
|
||||
p.addChild(PIValueTree("url", "https://api.maptiler.com/tiles"));
|
||||
p.addChild(PIValueTree("key", ""));
|
||||
p.addChild(PIValueTree("tileset", ""));
|
||||
initParameters(p);
|
||||
@@ -32,11 +32,15 @@ bool MapViewTileProvider_MapTiler::requestTile(MapViewTypes::TileIndex index) {
|
||||
req.setHeader(QNetworkRequest::UserAgentHeader, "Qt/5");
|
||||
auto * r = nam->get(req);
|
||||
if (!r) return false;
|
||||
// qDebug() << "Reqst:" << index.z << index.x << index.y;
|
||||
// qDebug() << "Reqst:" << index.z << index.x << index.y << req.url().toString();
|
||||
connect(r, &QNetworkReply::finished, this, [this, r, index]() {
|
||||
r->deleteLater();
|
||||
QPixmap tim;
|
||||
if (r->error() != QNetworkReply::NoError) {
|
||||
if (r->error() == QNetworkReply::ContentAccessDenied) {
|
||||
qDebug() << "Error:" << index.z << index.x << index.y << r->error();
|
||||
return;
|
||||
}
|
||||
qDebug() << "Retry:" << index.z << index.x << index.y << r->error();
|
||||
QTimer::singleShot(500, this, [this, index] { requestTile(index); });
|
||||
return;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <QHeaderView>
|
||||
#include <QKeyEvent>
|
||||
#include <QScreen>
|
||||
|
||||
|
||||
QCodeEditCompleter::QCodeEditCompleter(QWidget * parent): QTreeWidget(parent) {
|
||||
@@ -79,8 +80,13 @@ void QCodeEditCompleter::invoke(QPoint global_pos) {
|
||||
setCurrentItem(topLevelItem(1));
|
||||
if (isHidden()) move(global_pos);
|
||||
if (topLevelItemCount() > 0) {
|
||||
const auto screen = qApp->screenAt(global_pos);
|
||||
setVisible(true);
|
||||
adjust();
|
||||
if (global_pos.y() + height() > screen->availableSize().height()) {
|
||||
global_pos.setY(global_pos.y() -height() - fontHeight(this));
|
||||
}
|
||||
move(global_pos);
|
||||
} else {
|
||||
hide();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user