X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=src%2Fdialogs%2FEditFolderDialog.cpp;h=950e502a7790db72eba97e633dd0e2d09b9bb2cf;hb=5e66d268d985552aeeae3e9ae7d0967d359a557f;hp=4d332cea30d1061967a5e79b7ae7b206ec39adef;hpb=29dbafaca706ea6a34cd881060ebf680378f39b4;p=PrivacyBrowserPC.git diff --git a/src/dialogs/EditFolderDialog.cpp b/src/dialogs/EditFolderDialog.cpp index 4d332ce..950e502 100644 --- a/src/dialogs/EditFolderDialog.cpp +++ b/src/dialogs/EditFolderDialog.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2023 Soren Stoutner . + * Copyright 2023-2024 Soren Stoutner . * * This file is part of Privacy Browser PC . * @@ -26,7 +26,7 @@ #include // Construct the class. -EditFolderDialog::EditFolderDialog(const int databaseId, QIcon ¤tWebsiteFavoriteIcon) : QDialog(nullptr), folderDatabaseId(databaseId) +EditFolderDialog::EditFolderDialog(QWidget *parentWidgetPointer, const int databaseId, QIcon ¤tWebsiteFavoriteIcon) : QDialog(parentWidgetPointer), folderDatabaseId(databaseId) { // Set the window title. setWindowTitle(i18nc("The edit folder dialog window title.", "Edit Folder")); @@ -74,7 +74,7 @@ EditFolderDialog::EditFolderDialog(const int databaseId, QIcon ¤tWebsiteFa // Populate the bookmarks tree widget item. bookmarksTreeWidgetItemPointer->setText(folderHelperPointer->FOLDER_NAME_COLUMN, i18nc("The bookmarks root tree widget name", "Bookmarks")); - bookmarksTreeWidgetItemPointer->setIcon(folderHelperPointer->FOLDER_NAME_COLUMN, QIcon::fromTheme("bookmarks")); + bookmarksTreeWidgetItemPointer->setIcon(folderHelperPointer->FOLDER_NAME_COLUMN, QIcon::fromTheme(QLatin1String("bookmarks"), QIcon::fromTheme(QLatin1String("bookmark-new")))); bookmarksTreeWidgetItemPointer->setText(folderHelperPointer->FOLDER_ID_COLUMN, QLatin1String("0")); // Add the bookmarks tree widget item to the root of the tree. @@ -93,8 +93,8 @@ EditFolderDialog::EditFolderDialog(const int databaseId, QIcon ¤tWebsiteFa // Populate the line edits. folderNameLineEditPointer->setText(bookmarkStructPointer->name); - // Scroll to the beginning of the line edits. - folderNameLineEditPointer->setCursorPosition(0); + // Focus the folder name line edit. + folderNameLineEditPointer->setFocus(); // Connect the buttons. connect(browseButtonPointer, SIGNAL(clicked()), this, SLOT(browse()));