Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[kirigami] Minor improvements #379

Merged
merged 5 commits into from
Jun 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions daemon/src/harbour-amazfish-daemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QS
{
QByteArray localMsg = msg.toLocal8Bit();
const char* time = QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz").toLocal8Bit();
#ifdef QT_MESSAGELOGCONTEXT
fprintf(stderr,"%s %s:%d: %s\n", time, context.file, context.line, localMsg.constData());
#else
fprintf(stderr, "%s : %s\n", time, localMsg.constData());
#endif
}

int main(int argc, char **argv)
Expand Down
2 changes: 1 addition & 1 deletion ui/qml/components/platform.kirigami/ListItemPL.qml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import "."
Item {
id: root
height: item.height
width: parent.width
width: parent !== null ? parent.width : undefined

default property alias content: itemData.data
property real contentHeight
Expand Down
4 changes: 3 additions & 1 deletion ui/qml/components/platform.kirigami/PagePL.qml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ Kirigami.ScrollablePage {
enabled: page.canNavigateForward === true
icon.name: page.acceptIconName
visible: !page.hideAcceptButton && (page.isDialog || app.pages.hasAttached(page))
text: "" + (page.isDialog ? app.tr("Accept") : app.pages.nextPage().title)
text: "" + (page.isDialog || app.pages.nextPage() == undefined
? app.tr("Accept")
: app.pages.nextPage().title)
onTriggered: {
if (acceptCallback) acceptCallback();
else app.pages.navigateForward();
Expand Down
7 changes: 4 additions & 3 deletions ui/qml/components/platform.qtcontrols/TimePickerDialogPL.qml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ DialogPL {
maximumLength: 2
validator: IntValidator { bottom: 0; top: 23 }
Keys.onReturnPressed: gM.focus = true
onTextChanged: hours = parseInt(text)
onTextChanged: hour = parseInt(text)
}

LabelPL {
Expand All @@ -70,8 +70,9 @@ DialogPL {
hour = time.getHours();
minute = time.getMinutes();
}
gH.text = ("00" + hour).substr(-2);
gM.text = ("00" + minute).substr(-2);
// NaN value is converted to -2147483648
gH.text = (hour >= 0) ? ("00" + hour).substr(-2) : "00";
gM.text = (minute >= 0) ? ("00" + minute).substr(-2) : "00";
gH.forceActiveFocus();
}

Expand Down
2 changes: 1 addition & 1 deletion ui/qml/harbour-amazfish.qml
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ ApplicationWindowPL
}

function supportsFeature(feature) {
console.log("Checking if feature is supported:", feature, (supportedFeatures & feature) === feature);
// console.log("Checking if feature is supported:", feature, (supportedFeatures & feature) === feature);
return (supportedFeatures & feature) === feature;
}

Expand Down
2 changes: 1 addition & 1 deletion ui/src/daemoninterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void DaemonInterface::connectDaemon()

void DaemonInterface::pair(const QString &name, QString address)
{
qDebug() << Q_FUNC_INFO;
qDebug() << Q_FUNC_INFO << name << address;

if (m_connectionState == "pairing") {
return;
Expand Down
Loading