<table><tr><td style="">rjvbb added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D9344" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>In <tt style="background: #ebebeb; font-size: 13px;">ProjectDialogProvider::askProjectConfigLocation()</tt>:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">qCWarning(SHELL) << "selected project:" << projectFileUrl << "selectedUrl=" << dlg->selectedUrl()
    << "projectName=" << dlg->projectName() << "projectManager=" << dlg->projectManager();</pre></div>

<p>and in <tt style="background: #ebebeb; font-size: 13px;">equalProjectFile()</tt>:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">qWarning() << Q_FUNC_INFO << "configPath=" << configPath << "defaultName=" << defaultName
    << "cfg.Name=" << grp.readEntry( "Name", QString() ) << "projectName=" << dlg->projectName();</pre></div>

<p>gives the following observations:</p>

<p>1: Opening an existing project of which I renamed the .kdev4 files manually in the past, project dir <tt style="background: #ebebeb; font-size: 13px;">kdevelop-git-5</tt>:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">kdevplatform.shell: selected project: QUrl("file:///home/bertin/cworks/Scratch/KDE/KF5/kdevelop-git-5/kf5-kdevelop-5.kdev4")
        selectedUrl= QUrl("file:///home/bertin/cworks/Scratch/KDE/KF5/kdevelop-git-5/kf5-kdevelop-5.kdev4")
        projectName= "kdevelop-git-5" projectManager= "<built-in>"</pre></div>

<p>2: Creating new project, closing it, reopening it (project dir <tt style="background: #ebebeb; font-size: 13px;">kcompl-git</tt>, no shouldAsk dialog):</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">kdevplatform.shell: selected project: QUrl("file:///home/bertin/cworks/Scratch/KDE/KF5/kcompl-git/kcompl-git.kdev4")
    selectedUrl= QUrl("file:///home/bertin/cworks/Scratch/KDE/KF5/kcompl-git/kcompl-git.kdev4")
    projectName= "kcompl-git" projectManager= "KDevCMakeManager"
bool KDevelop::equalProjectFile(const QString &, KDevelop::OpenProjectDialog *) configPath= "/home/bertin/cworks/Scratch/KDE/KF5/kcompl-git/kcompl-git.kdev4"
    defaultName= "kcompl-git" cfg.Name= "kcompl-git" projectName= "kcompl-git"</pre></div>

<p>3: After renaming it to 5:kcompl-git, on-disk and inside 5:kcompl-git.kdev4 (NO shouldAsk dialog posted):</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">kdevplatform.shell: selected project: QUrl("file:///home/bertin/cworks/Scratch/KDE/KF5/kcompl-git/5:kcompl-git.kdev4")
    selectedUrl= QUrl("file:///home/bertin/cworks/Scratch/KDE/KF5/kcompl-git/5:kcompl-git.kdev4")
    projectName= "kcompl-git" projectManager= "<built-in>"</pre></div>

<p>4: Creating as 5:kcompl-git.kdev4 from scratch (= lines 322,3 in hunk 2 above NOT commented-out):</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">kdevplatform.shell: selected project: QUrl("file:///home/bertin/cworks/Scratch/KDE/KF5/kcompl-git/5:kcompl-git.kdev4")
    selectedUrl= QUrl("file:///home/bertin/cworks/Scratch/KDE/KF5/kcompl-git/CMakeLists.txt")
    projectName= "5:kcompl-git" projectManager= "KDevCMakeManager"</pre></div>

<p>5: reloading 5:kcompl-git after closing (a shouldAsk dialog IS posted):</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">kdevplatform.shell: selected project: QUrl("file:///home/bertin/cworks/Scratch/KDE/KF5/kcompl-git/5:kcompl-git.kdev4")
    selectedUrl= QUrl("file:///home/bertin/cworks/Scratch/KDE/KF5/kcompl-git/5:kcompl-git.kdev4")
    projectName= "kcompl-git" projectManager= "KDevCustomBuildSystem"
bool KDevelop::equalProjectFile(const QString &, KDevelop::OpenProjectDialog *) configPath= "/home/bertin/cworks/Scratch/KDE/KF5/kcompl-git/5:kcompl-git.kdev4"
    defaultName= "kcompl-git" cfg.Name= "5:kcompl-git" projectName= "kcompl-git"</pre></div>

<p>I can see the difference between 3 and 5 and why 5 would post a dialog, but don't see the difference between 1 and 5 (also why <tt style="background: #ebebeb; font-size: 13px;">equalProjectFile()</tt> appears not to be called).</p>

<p>The real question here might be why an override dialog should be posted at all when the user reopens a .kdev4 file. That makes sense if you select a (C)Makefile or .pro file but it probably is the wrong question to ask when the user opens an existing .kdev4 file. Especially when only a single such file exists. Wouldn't it be enough in that case to verify if .kdev4 filename and the Name property stored therein correspond?</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D9344" rel="noreferrer">https://phabricator.kde.org/D9344</a></div></div><br /><div><strong>To: </strong>rjvbb<br /><strong>Cc: </strong>kdevelop-devel, vbspam, njensen, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger<br /></div>